diff --git a/ChangeLog b/ChangeLog index ddda40a0e31..1c0e96fc27c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,18 +5,186 @@ English Dolibarr ChangeLog ***** ChangeLog for 15.0.0 compared to 14.0.0 ***** +For users: +--------------- + +NEW: Online proposal signature +NEW: Can define some max limit on expense report (per period, per type or expense, ...) +NEW: Allow the use of __NEWREF__ to get for example the new reference a draft order will get after validation. +NEW: Add option to disable globaly some notifications emails. +NEW: #18326 Workflow: Close order on shipment closing. +NEW: #18401 Add __NEWREF__ subtitute to get new object reference. +NEW: #18403 Add __URL_SHIPMENT__ substitute to get the URL of a shipment +NEW: #18689 REST API module: add api key generate / modify right. +NEW: #18663 Make "L'Annuaire des Entreprises" the default provider for SIREN verification for French thirdparties. +NEW: #18046 Add tags on ticket/categories +NEW: #18326 Workflow: Close order on shipment closing. +NEW: #18770 Can enter the buying price (for Weighted Average Price update) on lines during the reception step +NEW: #18814 Add legal form for Sweden +NEW: #18820 Accountancy - Add product account in import/export of thirdparty (level 3) +NEW: Accountancy - Format FEC/FEC2 - Add column NumFacture +NEW: Add $dolibarr_main_db_readonly in conf.php for readonly access. +NEW: add auto creation of agenda event on supplier_order cancellation +NEW: Add a PDF document template for Manufacturing Orders +NEW: Add budget field into task #18986 +NEW: add cancel button to `classify reception` form on supplier_orders +NEW: Added address field into contacts list +NEW: Added documents page and send mail possibility in payments +NEW: Add edit option in propal +NEW: Added linked files page and send mail possibility in payments +NEW: Add field date from/to in customer and supplier payment list +NEW: Add filter from date to date into action/evt list +NEW: Add import / export of MO and BOMLines - Close #18499 +NEW: Adding accounting export model for iSuite Expert +NEW: add link to an element by ref +NEW: add missing printFieldListFrom hook call on several lists +NEW: add MRP into Object Linked Box +NEW: Add option to hide customer code on PDF documents +NEW: Add param $nolog to avoid logging into dol_delete_recursive_dir() +NEW: Add sale representative in order and invoice list +NEW: add a setting to create PDF in PDF/A - 1b format #18990 +NEW: Add `SOCIETE_SHOW_VAT_IN_LIST` to display VAT number in combo list of thirdparties +NEW: Add sortorder on units list +NEW: Adds PDF_HIDE_PRODUCT_LABEL_IN_SUPPLIER_LINES to hide product label in supplier order lines +NEW: Add STOCK_MOVEMENT_LIST_HIDE_UNIT_PRICE to hide unit price on some pages +NEW: add support for zstd compression +NEW: Allow drag and drop on kits +NEW: Allow exporting supplier order validation date + validation user +NEW: Allows product ref generation after the form is validated with PRODUCT_GENERATE_REF_AFTER_FORM +NEW: autocomplete account group when editing an account card +NEW: Auto create invoice for payment done on an order with online payment link of order +NEW: Can edit fields of proposal when proposal is not yet signed +NEW: Can edit the translation key of an overwrote translation key. +NEW: can enable/disable external calendar by default +NEW: Can hide sender name on PDF documents +NEW: Can select lot from a combo list of existing batch numbers (in MRP consumtion) +NEW: Can set the default BOM on a product +NEW: Can set/unset the usual working day of the week (friday, saturday, sunday) +NEW: Can show progression of task into combo list of tasks +NEW: can upload the odt file for the product doc template +NEW: Contract - Add From/to input on search date +NEW: Customer Display with TakePOS +NEW: Split Sale in TakePOS +NEW: Customer invoice template list - Add input date from/to +NEW: date filter on project list and task list From->To +NEW: display shipping method and tracking url on shipment list +NEW: expense reports: conf to force amounts to be entered only including taxes +NEW: expense reports: conf to pre-fill start/end dates with bounds of current month +NEW: expense reports: show link to already existing overlapping expense report +NEW: expense reports: can make project field mandatory on lines +NEW: Expose bank account holder, label and number +NEW: feature #18986 +NEW: field and behavior in product object +NEW: generate intervention from time spent +NEW: holiday: handle monthly balance updates with cronjob +NEW: HRM integration, source code +NEW: HRM admin - Add tabs +NEW: HRM - Include more options to manage/custom dashboard +NEW: Increase size of params of actions for emailcollector +NEW: Invoice list - Use complete country select field with EEC or not +NEW: mass action delete, no more break if at least one object has child +NEW: mass action paid on customer invoice list +NEW: massaction validate on supplier orders list +NEW: Mass action send email to all attendees of an event. +NEW: expense reports: conf to pre-fill start/end dates with bounds of current month +NEW: Option "Add a link on the PDF to make the online payment" +NEW: More options to generate PDF (show Frame option, width of picture option) +NEW: Preview of pdf files of expense report lines +NEW: print without details +NEW: project time spent: conf to prevent recording time after X months +NEW: rewrite bind accountancy code finding on customer and sales invoice +NEW: Societe - Add perentity functionality on customer/supplier accountancy auxiliary account +NEW: Survey - Add a clickable link in email send +NEW: Social Contributions - Add from/to filter on list +NEW: Supplier order and proposal - Add From/to input on search date +NEW: Task - Add From/to input on search date +NEW: Add theme option THEME_ELDY_USEBORDERONTABLE +NEW: The Anti-CSRF protection MAIN_SECURITY_CSRF_WITH_TOKEN is on to value 1 by default +NEW: Update SQL : install and migration +NEW: Use an ajax call for the clicktodial feature instead of href link. +NEW: when multiple order linked to facture, show list into note. +NEW: when we delete several objects with massaction, if somes object has child we must see which objects are concerned and nevertheless delete objects which can be deleted +NEW: Editing a page in website module keep old page with name .back + + For developers: --------------- -WARNING: +NEW: Introduce method hasRight +NEW: Can use textarea field into a confirm popup. +NEW: Can use the result_mode of mysqli driver. Save memory for list count +NEW: #18319 REST API - Shipment: Add 'close' action / endpoint / POST method. +NEW: add action trigger for member excluded +NEW: add option MAIN_IBAN_IS_NEVER_MANDATORY, MAIN_IBAN_NOT_MANDATORY, PROPAL_NOT_BILLABLE, PROPAL_REOPEN_UNSIGNED_ONLY, PROPOSAL_ARE_NOT_BILLABLE, TICKETS_MESSAGE_FORCE_MAIL +NEW: Add code codebar column on serial/lot structure +NEW: Add date_valid and date_approve columns in the list of supplier orders +NEW: add hook `beforeBodyClose` +NEW: Add hook hookGetEntity. +NEW: add hookmanager on note pages +NEW: add hook 'menuLeftMenuItems' to filter the leftmenu items +NEW: Add the property "copytoclipboard" in modulebuilder +NEW: api for knowledgemanagement +NEW: API get list of legal form of business +NEW: API list of staff units +NEW: hook after rank update +NEW: printFieldListFrom hook call on several lists +NEW: Use lang selector when using a field key 'lang' in modulebuilder +NEW: we need to be able to put more filters on deleteByParentField() function +NEW: make it easier to set the `keyword`, `keywords` and `description` attributes of an ecm file object + + Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: * Update hook 'printOriginObjectLine', removed check on product type and special code. Need now reshook. * Old deprecated module "SimplePOS" has been completely removed. Use module "TakePOS" is you need a Point Of Sale. * The method static ActionComm::getActions($db, ...) is no more static. Use $actioncomm->getActions(...) instead (without $db param). * The 'action=delete&file=...' has been replaced with 'action=deletefile&file=...' to avoid confusion with deletion of object lines. +* Method getDictvalue has been renamed into getDictionaryValue to match camel case rule. + +***** ChangeLog for 14.0.3 compared to 14.0.2 ***** + +FIX: #18698 Supplier invoice list - "alert" checkbox not working +FIX: #18735 +FIX: #18767 : Member delete +FIX: #18854 +FIX: #18910 : MRP List SQL query syntax error with more than one extrafileds. +FIX: Accountancy - Format Quadra export - Missing line type C to create automaticly a subledger account with label +FIX: Accountancy - Missing specific filename for export on format FEC2, Ciel & repare it +FIX: Accountancy - Option of export popup are inverted +FIX: Accountancy - Some correction on export name +FIX: Accountancy - Trunc code_journal to 2 in format XIMPORT (Ciel, Sage50) +FIX: add warehouse in projects' overview count +FIX: autocalculation of the supplier price in main currency. +FIX: avoid warning if $categories is an id +FIX: Bad use of a forced contact of another company on PDF/ODT documents +FIX: Button text on proposal card to create a invoice +FIX: calculateCosts of BOM must not be included into fetch +FIX: check if greater 0 +FIX: default language defined for IN country +FIX: fetch of product with modulebuilder load too much data +FIX: Filter on categories +FIX: indentation +FIX: init hookmanager after loading $conf values +FIX: legal issue on expense report pdf (must also show price without tax) +FIX: missing filter status=1 on rss feeds +FIX: move fetch_optionnal into $ac_static->fetch() +FIX: payment using wrong type in takepos when too many payment mode +FIX: Product accountancy affectation with product_perentity activated (PR #18620) +FIX: products/services card: hidden extrafields were overridden +FIX: Propal list - Problem of pagination on date +FIX: selected lines on supplier invoice create +FIX: Selection of type "people" for membership must hide the company +FIX: select list of orders not complete when field type of company is on +FIX: support of localtax on expense report +FIX: task time: can't filter by user with pgsql + show error message +FIX: task time: keep on using natural_search +FIX: Test when date of invoie is in future (pb with TZ and offset) +FIX: translation into email for member at membership validation. +FIX: unprivileged user can see task associated with a not allowed project +FIX: user without permission can set ticket subject + ***** ChangeLog for 14.0.2 compared to 14.0.1 ***** FIX: #18353 Invoice list translation issue @@ -331,6 +499,37 @@ Following changes may create regressions for some external modules, but were nec * v14 seems to work correctly on PHP v8 but it generates a lot of verbose warnings. Currently, v14 i snot yet officialy supported with PHP 8. + +***** ChangeLog for 13.0.5 compared to 13.0.4 ***** + +FIX: 13.0: class CommandeFournisseurDispatch provides trigger for UPDATE but not for CREATE / DELETE +FIX: #18389 Accountancy - Bug on LDcompta10 export for supplier invoice +FIX: #18591 : Remove double quotes of SQL Queries for postgresql compatibility +FIX: Accountancy - Debug Export Sage50 / CIEL Compta / CIEL Compta Evo (Format XIMPORT) +FIX: Accountancy - Some problems of length with general & subledger account +FIX: add DISTINCT +FIX: an approved holiday can be canceled by an admin. +FIX: autocalculation of the supplier price in main currency. +FIX: better sql request +FIX: cannot add time spend when column ref is not displayed +FIX: compatibility postgre sql +FIX: holiday card: hooks uninitialized +FIX: Invoice - Missing button to reopen an abandoned situation invoice +FIX: invoice validation: when checking if any VAT rate has a negative amount, prevent false positives with -1.0E-14 amounts +FIX: list of categories in stats of supplier invoices +FIX: Manage credit note on situation invoice for calculate margin +FIX: method_exists needs object at first param +FIX: move fetch_optionnal into $ac_static->fetch() +FIX: multicompany transverse mode compatibility +FIX: on supplier order, JOIN with product fourn price table must be done with fk_soc too to avoid display several times a same line (because of same supplier product ref) +FIX: postgre filter select search extrafield +FIX: products/services card: hidden extrafields were overridden +FIX: shipping validation workflow: 'ORDER_NEW' trigger called from wrong object +FIX: task time: can't filter by user with pgsql + show error message +FIX: task time: keep on using natural_search +FIX: wrong users count in multicompany transverse mode + + ***** ChangeLog for 13.0.4 compared to 13.0.3 ***** FIX: Allow disabling of a module (not a dangerous action) even if there is problem with token (due to bugged modules). diff --git a/composer.json b/composer.json index 130fda34945..8d82f530df8 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "nnnick/chartjs" : "^2.9", "stripe/stripe-php" : "6.43.1", "maximebf/debugbar" : "1.15.1", - "symfony/var-dumper" : "3" + "symfony/var-dumper" : "3.2" }, "require-dev" : { "php-parallel-lint/php-parallel-lint" : "^0", diff --git a/composer.lock b/composer.lock index 3e867f8f186..5f761cb63fe 100644 --- a/composer.lock +++ b/composer.lock @@ -591,7 +591,7 @@ }, { "name": "symfony/var-dumper", - "version": "v3.0.0", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", @@ -616,7 +616,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 4f80f06d444..7ce22e790c3 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -168,6 +168,18 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php - protected $default_monospaced_font = 'courier'; + protected $default_monospaced_font = 'freemono'; +* In tecnickcom/tcpdf/include/tcpdf_static, in function intToRoman, right at the beginning + of the function, replace: + + $roman = ''; + +with: + + $roman = ''; + if ($number >= 4000) { + // do not represent numbers above 4000 in Roman numerals + return strval($number); + } @@ -188,7 +200,10 @@ with: with } elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1]) >= 2)) { - +* Fix php fatal error on php 8.0 on tcpdi.php + while (list($k, $v) = each($value[1])) { +with + foreach ($value[1] as $k => $v) { JSGANTT: -------- diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index c9849f9f54f..c2ac133069d 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -38,6 +38,7 @@ $cancel = GETPOST('cancel', 'alpha'); $id = GETPOST('id', 'int'); $rowid = GETPOST('rowid', 'int'); $massaction = GETPOST('massaction', 'aZ09'); +$optioncss = GETPOST('optioncss', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'accountingaccountlist'; // To manage different context of search $search_account = GETPOST('search_account', 'alpha'); @@ -51,14 +52,14 @@ $confirm = GETPOST('confirm', 'alpha'); $chartofaccounts = GETPOST('chartofaccounts', 'int'); -$permissiontoadd = $user->rights->accounting->chartofaccount; -$permissiontodelete = $user->rights->accounting->chartofaccount; +$permissiontoadd = !empty($user->rights->accounting->chartofaccount); +$permissiontodelete = !empty($user->rights->accounting->chartofaccount); // Security check if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->accounting->chartofaccount) { +if (empty($user->rights->accounting->chartofaccount)) { accessforbidden(); } @@ -438,43 +439,37 @@ if ($resql) { print $searchpicto; print ''; print ''; - $totalarray = array(); print ''; if (!empty($arrayfields['aa.account_number']['checked'])) { print_liste_field_titre($arrayfields['aa.account_number']['label'], $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder); - $totalarray['nbfield']++; } if (!empty($arrayfields['aa.label']['checked'])) { print_liste_field_titre($arrayfields['aa.label']['label'], $_SERVER["PHP_SELF"], "aa.label", "", $param, '', $sortfield, $sortorder); - $totalarray['nbfield']++; } if (!empty($arrayfields['aa.labelshort']['checked'])) { print_liste_field_titre($arrayfields['aa.labelshort']['label'], $_SERVER["PHP_SELF"], "aa.labelshort", "", $param, '', $sortfield, $sortorder); - $totalarray['nbfield']++; } if (!empty($arrayfields['aa.account_parent']['checked'])) { print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left '); - $totalarray['nbfield']++; } if (!empty($arrayfields['aa.pcg_type']['checked'])) { print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type,aa.account_number', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help'], 1); - $totalarray['nbfield']++; } if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (!empty($arrayfields['aa.reconcilable']['checked'])) { print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder); - $totalarray['nbfield']++; } } if (!empty($arrayfields['aa.active']['checked'])) { print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder); - $totalarray['nbfield']++; } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; $accountstatic = new AccountingAccount($db); $accountparent = new AccountingAccount($db); + $totalarray = array(); + $totalarray['nbfield'] = 0; $i = 0; while ($i < min($num, $limit)) { diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index f19afb12899..97a460beaac 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -78,7 +78,7 @@ $search_country_id = GETPOST('search_country_id', 'int'); if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->accounting->chartofaccount) { +if (empty($user->rights->accounting->chartofaccount)) { accessforbidden(); } diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 4d69eae7db8..9430bf33439 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -48,7 +48,7 @@ $label = GETPOST('label', 'alpha'); if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->accounting->chartofaccount) { +if (empty($user->rights->accounting->chartofaccount)) { accessforbidden(); } diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 2e369e19de1..d914b825b7f 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2017 Alexandre Spangaro + * Copyright (C) 2011-2021 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -91,19 +91,19 @@ $tabsql[32] = "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account $tabsqlsort = array(); $tabsqlsort[32] = "position ASC"; -// Nom des champs en resultat de select pour affichage du dictionnaire +// Name of the fields in the result of select to display the dictionary $tabfield = array(); $tabfield[32] = "code,label,range_account,category_type,formula,position,country"; -// Nom des champs d'edition pour modification d'un enregistrement +// Name of editing fields for record modification $tabfieldvalue = array(); $tabfieldvalue[32] = "code,label,range_account,category_type,formula,position,country_id"; -// Nom des champs dans la table pour insertion d'un enregistrement +// Name of the fields in the table for inserting a record $tabfieldinsert = array(); $tabfieldinsert[32] = "code,label,range_account,category_type,formula,position,fk_country"; -// Nom du rowid si le champ n'est pas de type autoincrement +// Name of the rowid if the field is not of type autoincrement // Example: "" if id field is "rowid" and has autoincrement on // "nameoffield" if id field is not "rowid" or has not autoincrement on $tabrowid = array(); @@ -151,7 +151,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($value == 'range_account' && empty($_POST['range_account'])) { continue; } - if ($value == 'country' || $value == 'country_id') { + if (($value == 'country' || $value == 'country_id') && (!empty($_POST['country_id']))) { continue; } if (!GETPOSTISSET($value) || GETPOST($value) == '') { @@ -176,6 +176,9 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($fieldnamekey == 'category_type') { $fieldnamekey = 'Calculated'; } + if ($fieldnamekey == 'country') { + $fieldnamekey = 'Country'; + } setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); } @@ -263,7 +266,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { } } - // Si verif ok et action modify, on modifie la ligne + // If check ok and action modify, we modify the line if ($ok && GETPOST('actionmodify', 'alpha')) { if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; @@ -430,12 +433,12 @@ print load_fiche_titre($titre, $linkback, $titlepicto); print ''.$langs->trans("AccountingAccountGroupsDesc", $langs->transnoentitiesnoconv("ByPersonalizedAccountGroups")).'

'; -// Confirmation de la suppression de la ligne +// Confirmation of the deletion of the line if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id.($search_country_id > 0 ? '&search_country_id='.$search_country_id : ''), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); } -// Complete requete recherche valeurs avec critere de tri +// Complete search query with sorting criteria $sql = $tabsql[$id]; if ($search_country_id > 0) { @@ -634,14 +637,14 @@ if ($resql) { // Title of lines print ''; foreach ($fieldlist as $field => $value) { - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees - $showfield = 1; // By defaut + // Determines the name of the field in relation to the possible names + // in data dictionaries + $showfield = 1; // By default $class = "left"; $sortable = 1; $valuetoshow = ''; - $valuetoshow = ucfirst($fieldlist[$field]); // By defaut + $valuetoshow = ucfirst($fieldlist[$field]); // By default $valuetoshow = $langs->trans($valuetoshow); // try to translate if ($fieldlist[$field] == 'source') { $valuetoshow = $langs->trans("Contact"); @@ -741,7 +744,7 @@ if ($resql) { print ''; } else { $tmpaction = 'view'; - $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error = $hookmanager->error; $errors = $hookmanager->errors; diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index 8efb869ffaf..437ff1b7116 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -109,7 +109,7 @@ foreach ($list_account_main as $key) { print ''; // Value print ''; // Do not force class=right, or it align also the content of the select box - print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1); + print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1); print ''; print ''; } diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 061752c11c5..5d78036159a 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -186,7 +186,7 @@ foreach ($list_account as $key) { print ''.$label.''; // Value print ''; // Do not force class=right, or it align also the content of the select box - print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 'accounts'); + print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 'accounts'); print ''; print ''; } diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 4338d7ad803..44c5309f531 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -52,7 +52,7 @@ $langs->loadLangs(array("admin", "compta")); if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->accounting->fiscalyear->write) { // If we can read accounting records, we should be able to see fiscal year. +if (empty($user->rights->accounting->fiscalyear->write)) { // If we can read accounting records, we should be able to see fiscal year. accessforbidden(); } diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index d472350fab7..77ec988143a 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -33,7 +33,7 @@ $langs->loadLangs(array("admin", "compta")); if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->accounting->fiscalyear->write) { +if (empty($user->rights->accounting->fiscalyear->write)) { accessforbidden(); } diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 45b5acc7c8a..309dc094e82 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2019 Alexandre Spangaro + * Copyright (C) 2013-2021 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -260,6 +260,22 @@ $linkback = ''; //$linkback = '' . $langs->trans("BackToModuleList") . ''; print load_fiche_titre($title, $linkback, 'accountancy'); +// Show message if accountancy hidden options are activated to help to resolve some problems +if (!$user->admin) { + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + print '
' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '
'; + } + if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { + print '
' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '
'; + } + if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { + print '
' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '
'; + } + if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + print '
' . $langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED") . '
'; + } +} + print '
'; print ''; print ''; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 66e3f3b73e4..e60deef59a3 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -612,7 +612,7 @@ if ($id) { print ''; } else { $tmpaction = 'view'; - $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error = $hookmanager->error; $errors = $hookmanager->errors; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index a842c294937..d98357bc93c 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -41,7 +41,7 @@ $langs->loadLangs(array("companies", "compta", "accountancy", "products")); if (empty($conf->accounting->enabled)) { accessforbidden(); } -if (!$user->rights->accounting->bind->write) { +if (empty($user->rights->accounting->bind->write)) { accessforbidden(); } @@ -70,6 +70,7 @@ $search_onpurchase = GETPOST('search_onpurchase', 'alpha'); $accounting_product_mode = GETPOST('accounting_product_mode', 'alpha'); $btn_changeaccount = GETPOST('changeaccount', 'alpha'); $btn_changetype = GETPOST('changetype', 'alpha'); +$optioncss = GETPOST('optioncss', 'alpha'); if (empty($accounting_product_mode)) { $accounting_product_mode = 'ACCOUNTANCY_SELL'; @@ -253,35 +254,35 @@ $form = new FormAccounting($db); // so we need to get those the rowid of those default value first $accounting = new AccountingAccount($db); // TODO: we should need to check if result is already exists accountaccount rowid..... -$aarowid_servbuy = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1); -$aarowid_servbuy_intra = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT, 1); -$aarowid_servbuy_export = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT, 1); -$aarowid_prodbuy = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1); -$aarowid_prodbuy_intra = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT, 1); -$aarowid_prodbuy_export = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT, 1); -$aarowid_servsell = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1); -$aarowid_servsell_intra = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT, 1); -$aarowid_servsell_export = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT, 1); -$aarowid_prodsell = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT, 1); -$aarowid_prodsell_intra = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT, 1); -$aarowid_prodsell_export = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT, 1); +$aarowid_servbuy = $accounting->fetch('', getDolGlobalString('ACCOUNTING_SERVICE_BUY_ACCOUNT'), 1); +$aarowid_servbuy_intra = $accounting->fetch('', getDolGlobalString('ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT'), 1); +$aarowid_servbuy_export = $accounting->fetch('', getDolGlobalString('ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT'), 1); +$aarowid_prodbuy = $accounting->fetch('', getDolGlobalString('ACCOUNTING_PRODUCT_BUY_ACCOUNT'), 1); +$aarowid_prodbuy_intra = $accounting->fetch('', getDolGlobalString('ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT'), 1); +$aarowid_prodbuy_export = $accounting->fetch('', getDolGlobalString('ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT'), 1); +$aarowid_servsell = $accounting->fetch('', getDolGlobalString('ACCOUNTING_SERVICE_SOLD_ACCOUNT'), 1); +$aarowid_servsell_intra = $accounting->fetch('', getDolGlobalString('ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT'), 1); +$aarowid_servsell_export = $accounting->fetch('', getDolGlobalString('ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT'), 1); +$aarowid_prodsell = $accounting->fetch('', getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_ACCOUNT'), 1); +$aarowid_prodsell_intra = $accounting->fetch('', getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT'), 1); +$aarowid_prodsell_export = $accounting->fetch('', getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT'), 1); -$aacompta_servbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servbuy_intra = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servbuy_export = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodbuy_intra = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodbuy_export = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servsell_intra = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servsell_export = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodsell_intra = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodsell_export = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servbuy = getDolGlobalString('ACCOUNTING_SERVICE_BUY_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_servbuy_intra = getDolGlobalString('ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_servbuy_export = getDolGlobalString('ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_prodbuy = getDolGlobalString('ACCOUNTING_PRODUCT_BUY_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_prodbuy_intra = getDolGlobalString('ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_prodbuy_export = getDolGlobalString('ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_servsell = getDolGlobalString('ACCOUNTING_SERVICE_SOLD_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_servsell_intra = getDolGlobalString('ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_servsell_export = getDolGlobalString('ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_prodsell = getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_prodsell_intra = getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT', $langs->trans("CodeNotDef")); +$aacompta_prodsell_export = getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT', $langs->trans("CodeNotDef")); llxHeader('', $langs->trans("ProductsBinding")); -$pcgverid = $conf->global->CHARTOFACCOUNTS; +$pcgverid = getDolGlobalString('CHARTOFACCOUNTS'); $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); if (empty($pcgvercode)) { $pcgvercode = $pcgverid; diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index c3308393c27..cc0d4de9f31 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -36,6 +36,7 @@ $cancel = GETPOST('cancel', 'alpha'); $id = GETPOST('id', 'int'); $rowid = GETPOST('rowid', 'int'); $massaction = GETPOST('massaction', 'aZ09'); +$optioncss = GETPOST('optioncss', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'accountingsubaccountlist'; // To manage different context of search $search_subaccount = GETPOST('search_subaccount', 'alpha'); @@ -46,7 +47,7 @@ $search_type = GETPOST('search_type', 'int'); if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->accounting->chartofaccount) { +if (empty($user->rights->accounting->chartofaccount)) { accessforbidden(); } @@ -367,6 +368,7 @@ if ($resql) { print "\n"; $totalarray = array(); + $totalarray['nbfield'] = 0; $i = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index c71958691bd..b772da3ce08 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -512,10 +512,10 @@ if ($action == 'create') { print ''; - print '
'; + print '
'; print '
'; - print ''; + print '
'; // Doc type if (!empty($object->doc_type)) { @@ -591,7 +591,7 @@ if ($action == 'create') { */ print "
\n"; - print '
'; + print '
'; print dol_get_fiche_end(); diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index ed3c69c18bc..50116b94b23 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -1,10 +1,10 @@ - * Copyright (C) 2013-2020 Alexandre Spangaro - * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2021 Alexandre Spangaro + * Copyright (C) 2013-2021 Florian Henry * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Ari Elbaz (elarifr) - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -738,10 +738,11 @@ class AccountingAccount extends CommonObject * @param Facture $facture Facture * @param FactureLigne $factureDet Facture Det * @param array $accountingAccount array of Account account + * @param string $type Customer / Supplier * * @return array Accounting accounts suggested */ - public function getAccountingCodeToBind(Societe $buyer, $seller, Product $product, Facture $facture, FactureLigne $factureDet, $accountingAccount = array()) + public function getAccountingCodeToBind(Societe $buyer, $seller, Product $product, Facture $facture, FactureLigne $factureDet, $accountingAccount = array(), $type = '') { global $conf; global $hookmanager; @@ -750,84 +751,116 @@ class AccountingAccount extends CommonObject $hookmanager->initHooks(array('accoutancyBindingCalculation')); // Execute hook accoutancyBindingCalculation - $parameters = array('buyer' => $buyer, 'seller' => $seller, 'product' => $product, 'facture' => $facture, 'factureDet' => $factureDet ,'accountingAccount'=>$accountingAccount); + $parameters = array('buyer' => $buyer, 'seller' => $seller, 'product' => $product, 'facture' => $facture, 'factureDet' => $factureDet ,'accountingAccount'=>$accountingAccount, $type); $reshook = $hookmanager->executeHooks('accoutancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { + if ($type=='customer') { + $const_name = "SOLD"; + } elseif ($type=='supplier') { + $const_name = "BUY"; + } + require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; $isBuyerInEEC = isInEEC($buyer); $isSellerInEEC = isInEEC($seller); - $code_sell_l = ''; - $code_sell_p = ''; - $code_sell_t = ''; + $code_l = ''; + $code_p = ''; + $code_t = ''; $suggestedid = ''; // Level 1: Search suggested default account for product/service $suggestedaccountingaccountbydefaultfor = ''; if ($factureDet->product_type == 1) { if ($buyer->country_code == $seller->country_code || empty($buyer->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) - $code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = ''; } else { if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) { // European intravat sale, but with a VAT - $code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = 'eecwithvat'; } elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) { // European intravat sale, without VAT intra community number - $code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber'; } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale - $code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_INTRA_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_INTRA_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = 'eec'; } else { // Foreign sale - $code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_EXPORT_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_SERVICE_' . $const_name . '_EXPORT_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = 'export'; } } } elseif ($factureDet->product_type == 0) { if ($buyer->country_code == $seller->country_code || empty($buyer->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) - $code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = ''; } else { if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) { // European intravat sale, but with a VAT - $code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = 'eecwithvat'; } elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) { // European intravat sale, without VAT intra community number - $code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber'; } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale - $code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_INTRA_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_INTRA_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = 'eec'; } else { - $code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : ''); + $code_l = (!empty($conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_EXPORT_ACCOUNT'}) ? $conf->global->{'ACCOUNTING_PRODUCT_' . $const_name . '_EXPORT_ACCOUNT'} : ''); $suggestedaccountingaccountbydefaultfor = 'export'; } } } - if ($code_sell_l == -1) { - $code_sell_l = ''; + if ($code_l == -1) { + $code_l = ''; } // Level 2: Search suggested account for product/service (similar code exists in page index.php to make automatic binding) $suggestedaccountingaccountfor = ''; - if ((($buyer->country_code == $seller->country_code) || empty($buyer->country_code)) && !empty($product->accountancy_code_sell)) { // If buyer in same country than seller (if not defined, we assume it is same country) - $code_sell_p = $product->accountancy_code_sell; + if ((($buyer->country_code == $seller->country_code) || empty($buyer->country_code))) { + // If buyer in same country than seller (if not defined, we assume it is same country) + if ($type=='customer' && !empty($product->accountancy_code_sell)) { + $code_p = $product->accountancy_code_sell; + } elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) { + $code_p = $product->accountancy_code_sell; + } $suggestedid = $accountingAccount['dom']; $suggestedaccountingaccountfor = 'prodserv'; } else { - if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0 && !empty($product->accountancy_code_sell)) { // European intravat sale, but with VAT - $code_sell_p = $product->accountancy_code_sell; + if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) { + // European intravat sale, but with VAT + if ($type=='customer' && !empty($product->accountancy_code_sell)) { + $code_p = $product->accountancy_code_sell; + } elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) { + $code_p = $product->accountancy_code_sell; + } $suggestedid = $accountingAccount['dom']; $suggestedaccountingaccountfor = 'eecwithvat'; - } elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra) && !empty($product->accountancy_code_sell)) { // European intravat sale, without VAT intra community number - $code_sell_p = $product->accountancy_code_sell; + } elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) { + // European intravat sale, without VAT intra community number + if ($type=='customer' && !empty($product->accountancy_code_sell)) { + $code_p = $product->accountancy_code_sell; + } elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) { + $code_p = $product->accountancy_code_sell; + } $suggestedid = $accountingAccount['dom']; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ? $suggestedaccountingaccountfor = 'eecwithoutvatnumber'; - } elseif ($isSellerInEEC && $isBuyerInEEC && !empty($product->accountancy_code_sell_intra)) { // European intravat sale - $code_sell_p = $product->accountancy_code_sell_intra; + } elseif ($isSellerInEEC && $isBuyerInEEC && !empty($product->accountancy_code_sell_intra)) { + // European intravat sale + if ($type=='customer' && !empty($product->accountancy_code_sell_intra)) { + $code_p = $product->accountancy_code_sell_intra; + } elseif ($type=='supplier' && !empty($product->accountancy_code_buy_intra)) { + $code_p = $product->accountancy_code_buy_intra; + } $suggestedid = $accountingAccount['intra']; $suggestedaccountingaccountfor = 'eec'; - } elseif (!empty($product->accountancy_code_sell_export)) { // Foreign sale - $code_sell_p = $product->accountancy_code_sell_export; + } else { + // Foreign sale + // European intravat sale + if ($type=='customer' && !empty($product->accountancy_code_sell_export)) { + $code_p = $product->accountancy_code_sell_export; + } elseif ($type=='supplier' && !empty($product->accountancy_code_sell_export)) { + $code_p = $product->accountancy_code_sell_export; + } $suggestedid = $accountingAccount['export']; $suggestedaccountingaccountfor = 'export'; } @@ -836,7 +869,7 @@ class AccountingAccount extends CommonObject // Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding) if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { if (!empty($buyer->code_compta)) { - $code_sell_t = $buyer->code_compta; + $code_t = $buyer->code_compta; $suggestedid = $accountingAccount['thirdparty']; $suggestedaccountingaccountfor = 'thridparty'; } @@ -850,33 +883,33 @@ class AccountingAccount extends CommonObject return -1; } - $code_sell_l = $accountdeposittoventilated->ref; + $code_l = $accountdeposittoventilated->ref; $suggestedid = $accountdeposittoventilated->rowid; $suggestedaccountingaccountfor = 'deposit'; } - if (empty($suggestedid) && empty($code_sell_p) && !empty($code_sell_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) { - if (empty($this->accountingaccount_codetotid_cache[$code_sell_l])) { + if (empty($suggestedid) && empty($code_p) && !empty($code_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) { + if (empty($this->accountingaccount_codetotid_cache[$code_l])) { $tmpaccount = new self($this->db); - $result = $tmpaccount->fetch(0, $code_sell_l, 1); + $result = $tmpaccount->fetch(0, $code_l, 1); if ($result < 0) { return -1; } if ($tmpaccount->id > 0) { $suggestedid = $tmpaccount->id; } - $this->accountingaccount_codetotid_cache[$code_sell_l] = $tmpaccount->id; + $this->accountingaccount_codetotid_cache[$code_l] = $tmpaccount->id; } else { - $suggestedid = $this->accountingaccount_codetotid_cache[$code_sell_l]; + $suggestedid = $this->accountingaccount_codetotid_cache[$code_l]; } } return array( 'suggestedaccountingaccountbydefaultfor' => $suggestedaccountingaccountbydefaultfor, 'suggestedaccountingaccountfor' => $suggestedaccountingaccountfor, 'suggestedid' => $suggestedid, - 'code_sell_l' => $code_sell_l, - 'code_sell_p' => $code_sell_p, - 'code_sell_t' => $code_sell_t, + 'code_l' => $code_l, + 'code_p' => $code_p, + 'code_t' => $code_t, ); } else { if (is_array($hookmanager->resArray) && !empty($hookmanager->resArray)) { diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index c80e1088e14..9cda04f6155 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -937,7 +937,6 @@ class BookKeeping extends CommonObject $line->piece_num = $obj->piece_num; $line->date_creation = $this->db->jdate($obj->date_creation); $line->date_export = $this->db->jdate($obj->date_export); - $line->date_validation = $this->db->jdate($obj->date_validated); $line->date_validation = $this->db->jdate($obj->date_validation); $this->lines[] = $line; @@ -1090,7 +1089,6 @@ class BookKeeping extends CommonObject $line->date_lim_reglement = $this->db->jdate($obj->date_lim_reglement); $line->date_modification = $this->db->jdate($obj->date_modification); $line->date_export = $this->db->jdate($obj->date_export); - $line->date_validation = $this->db->jdate($obj->date_validated); $line->date_validation = $this->db->jdate($obj->date_validation); $this->lines[] = $line; @@ -1752,7 +1750,6 @@ class BookKeeping extends CommonObject $line->date_creation = $obj->date_creation; $line->date_modification = $obj->date_modification; $line->date_export = $obj->date_export; - $line->date_validation = $obj->date_validated; $line->date_validation = $obj->date_validation; $this->linesmvt[] = $line; @@ -1817,7 +1814,6 @@ class BookKeeping extends CommonObject $line->sens = $obj->sens; $line->code_journal = $obj->code_journal; $line->piece_num = $obj->piece_num; - $line->date_validation = $obj->date_validated; $line->date_validation = $obj->date_validation; $this->linesexport[] = $line; diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index a7220d01a28..fdcc6f54ab3 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -63,7 +63,7 @@ if (empty($conf->accounting->enabled)) { if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->accounting->fiscalyear->write) { +if (empty($user->rights->accounting->fiscalyear->write)) { accessforbidden(); } diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 7c3cc2cf0e2..23958820b64 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -43,7 +43,7 @@ if (empty($conf->accounting->enabled)) { if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->accounting->bind->write) { +if (empty($user->rights->accounting->bind->write)) { accessforbidden(); } @@ -73,12 +73,23 @@ $action = GETPOST('action', 'aZ09'); $chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version'); +// Security check +if (empty($conf->accounting->enabled)) { + accessforbidden(); +} +if ($user->socid > 0) { + accessforbidden(); +} +if (empty($user->rights->accounting->mouvements->lire)) { + accessforbidden(); +} + /* * Actions */ -if ($action == 'clean' || $action == 'validatehistory') { +if (($action == 'clean' || $action == 'validatehistory') && $user->rights->accounting->bind->write) { // Clean database $db->begin(); $sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet as fd"; @@ -165,6 +176,7 @@ if ($action == 'validatehistory') { } dol_syslog('htdocs/accountancy/customer/index.php'); + $result = $db->query($sql); if (!$result) { $error++; @@ -209,12 +221,11 @@ if ($action == 'validatehistory') { $product_static->accountancy_code_buy_intra = $objp->code_buy_intra; $product_static->accountancy_code_buy_export = $objp->code_buy_export; $product_static->tva_tx = $objp->tva_tx_prod; - $product_static->tva_tx = $objp->tva_tx_prod; $facture_static->ref = $objp->ref; $facture_static->id = $objp->facid; $facture_static->type = $objp->ftype; - $facture_static->datef = $objp->datef; + $facture_static->date = $objp->datef; $facture_static_det->id = $objp->rowid; $facture_static_det->total_ht = $objp->total_ht; @@ -223,7 +234,7 @@ if ($action == 'validatehistory') { $facture_static_det->product_type = $objp->type_l; $facture_static_det->desc = $objp->description; - $accoutinAccountArray = array( + $accountingAccountArray = array( 'dom'=>$objp->aarowid, 'intra'=>$objp->aarowid_intra, 'export'=>$objp->aarowid_export, @@ -232,7 +243,7 @@ if ($action == 'validatehistory') { $code_sell_p_notset = ''; $code_sell_t_notset = ''; - $return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accoutinAccountArray); + $return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer'); if (!is_array($return) && $return<0) { setEventMessage($accountingAccount->error, 'errors'); } else { diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 9a942bc3eaa..020fbab1e4d 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2021 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) - * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2021 Florian Henry * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2016 Laurent Destailleur * @@ -192,10 +192,10 @@ if ($massaction == 'ventil' && $user->rights->accounting->bind->write) { dol_syslog("accountancy/customer/list.php", LOG_DEBUG); if ($db->query($sql)) { - $msg .= '
'.$langs->trans("Lineofinvoice", $monId).' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'; + $msg .= '
'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'; $ok++; } else { - $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice", $monId).' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'.$sql.'
'; + $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'.$sql.'
'; $ko++; } } @@ -554,12 +554,11 @@ if ($result) { $product_static->accountancy_code_buy_intra = $objp->code_buy_intra; $product_static->accountancy_code_buy_export = $objp->code_buy_export; $product_static->tva_tx = $objp->tva_tx_prod; - $product_static->tva_tx = $objp->tva_tx_prod; $facture_static->ref = $objp->ref; $facture_static->id = $objp->facid; $facture_static->type = $objp->ftype; - $facture_static->datef = $objp->datef; + $facture_static->date = $objp->datef; $facture_static_det->id = $objp->rowid; $facture_static_det->total_ht = $objp->total_ht; @@ -568,7 +567,7 @@ if ($result) { $facture_static_det->product_type = $objp->type_l; $facture_static_det->desc = $objp->description; - $accoutinAccountArray = array( + $accountingAccountArray = array( 'dom'=>$objp->aarowid, 'intra'=>$objp->aarowid_intra, 'export'=>$objp->aarowid_export, @@ -577,7 +576,7 @@ if ($result) { $code_sell_p_notset = ''; $code_sell_t_notset = ''; - $return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accoutinAccountArray); + $return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer'); if (!is_array($return) && $return<0) { setEventMessage($accountingAccount->error, 'errors'); } else { @@ -614,7 +613,7 @@ if ($result) { // Ref Invoice print ''.$facture_static->getNomUrl(1).''; - print ''.dol_print_date($db->jdate($facture_static->datef), 'day').''; + print ''.dol_print_date($db->jdate($facture_static->date), 'day').''; // Ref Product print ''; diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index 5e409f303ea..4147762aff4 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2020 Alexandre Spangaro + * Copyright (C) 2013-2021 Florian Henry + * Copyright (C) 2013-2021 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; // Load translation files required by the page $langs->loadLangs(array("compta", "bills", "other", "accountancy")); @@ -40,10 +41,11 @@ if (empty($conf->accounting->enabled)) { if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->accounting->bind->write) { +if (empty($user->rights->accounting->bind->write)) { accessforbidden(); } +$accountingAccount = new AccountingAccount($db); $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); if (GETPOST("year", 'int')) { @@ -97,6 +99,7 @@ if (($action == 'clean' || $action == 'validatehistory') && $user->rights->accou $sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid='.$conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity.')'; $sql1 .= ' AND fd.fk_facture_fourn IN (SELECT rowid FROM '.MAIN_DB_PREFIX.'facture_fourn WHERE entity = '.$conf->entity.')'; $sql1 .= ' AND fk_code_ventilation <> 0'; + dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG); $resql1 = $db->query($sql1); if (!$resql1) { @@ -163,7 +166,7 @@ if ($action == 'validatehistory') { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON " . $alias_product_perentity . ".accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON " . $alias_product_perentity . ".accountancy_code_buy_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON " . $alias_product_perentity . ".accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON " . $alias_product_perentity . ".accountancy_code_buy = aa4.account_number AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON " . $alias_societe_perentity . ".accountancy_code_buy = aa4.account_number AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity; $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql .= " AND l.product_type <= 2"; if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { @@ -181,27 +184,74 @@ if ($action == 'validatehistory') { $isBuyerInEEC = isInEEC($mysoc); + $thirdpartystatic = new Societe($db); + $facture_static = new FactureFournisseur($db); + $facture_static_det = new SupplierInvoiceLine($db); + $product_static = new Product($db); + $i = 0; while ($i < min($num_lines, 10000)) { // No more than 10000 at once $objp = $db->fetch_object($result); - $isSellerInEEC = isInEEC($objp); + $thirdpartystatic->id = $objp->socid; + $thirdpartystatic->name = $objp->name; + $thirdpartystatic->client = $objp->client; + $thirdpartystatic->fournisseur = $objp->fournisseur; + $thirdpartystatic->code_client = $objp->code_client; + $thirdpartystatic->code_compta_client = $objp->code_compta_client; + $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; + $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; + $thirdpartystatic->email = $objp->email; + $thirdpartystatic->country_code = $objp->country_code; + $thirdpartystatic->tva_intra = $objp->tva_intra; + $thirdpartystatic->code_compta = $objp->company_code_sell; - // Level 2: Search suggested account for product/service (similar code exists in page list.php to make manual binding) - $suggestedaccountingaccountfor = ''; - if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) - $objp->code_buy_p = $objp->code_buy; - $objp->aarowid_suggest = $objp->aarowid; - $suggestedaccountingaccountfor = ''; + $product_static->ref = $objp->product_ref; + $product_static->id = $objp->product_id; + $product_static->type = $objp->type; + $product_static->label = $objp->product_label; + $product_static->status = $objp->status; + $product_static->status_buy = $objp->status_buy; + $product_static->accountancy_code_sell = $objp->code_sell; + $product_static->accountancy_code_sell_intra = $objp->code_sell_intra; + $product_static->accountancy_code_sell_export = $objp->code_sell_export; + $product_static->accountancy_code_buy = $objp->code_buy; + $product_static->accountancy_code_buy_intra = $objp->code_buy_intra; + $product_static->accountancy_code_buy_export = $objp->code_buy_export; + $product_static->tva_tx = $objp->tva_tx_prod; + + $facture_static->ref = $objp->ref; + $facture_static->id = $objp->facid; + $facture_static->type = $objp->ftype; + $facture_static->datef = $objp->datef; + + $facture_static_det->id = $objp->rowid; + $facture_static_det->total_ht = $objp->total_ht; + $facture_static_det->tva_tx = $objp->tva_tx_line; + $facture_static_det->vat_src_code = $objp->vat_src_code; + $facture_static_det->product_type = $objp->type_l; + $facture_static_det->desc = $objp->description; + + $accountingAccountArray = array( + 'dom'=>$objp->aarowid, + 'intra'=>$objp->aarowid_intra, + 'export'=>$objp->aarowid_export, + 'thirdparty' =>$objp->aarowid_thirdparty); + + $code_buy_p_notset = ''; + $code_buy_t_notset = ''; + + $return = $accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'supplier'); + if (!is_array($return) && $return<0) { + setEventMessage($accountingAccount->error, 'errors'); } else { - if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale - $objp->code_buy_p = $objp->code_buy_intra; - $objp->aarowid_suggest = $objp->aarowid_intra; - $suggestedaccountingaccountfor = 'eec'; - } else { // Foreign sale - $objp->code_buy_p = $objp->code_buy_export; - $objp->aarowid_suggest = $objp->aarowid_export; - $suggestedaccountingaccountfor = 'export'; + $suggestedid=$return['suggestedid']; + $suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor']; + + if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') { + $suggestedid=$return['suggestedid']; + } else { + $suggestedid=0; } } @@ -216,8 +266,8 @@ if ($action == 'validatehistory') { if ($objp->aarowid_suggest > 0) { $sqlupdate = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det"; - $sqlupdate .= " SET fk_code_ventilation = ".((int) $objp->aarowid_suggest); - $sqlupdate .= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".((int) $objp->rowid); + $sqlupdate .= " SET fk_code_ventilation = ".((int) $suggestedid); + $sqlupdate .= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".((int) $facture_static_det->id); $resqlupdate = $db->query($sqlupdate); if (!$resqlupdate) { diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index e02a1ab6b54..20230c7cfad 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2021 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) - * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2021 Florian Henry * Copyright (C) 2014 Juanjo Menent s * Copyright (C) 2016 Laurent Destailleur * @@ -46,6 +46,7 @@ $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); +$optioncss = GETPOST('optioncss', 'alpha'); // Select Box $mesCasesCochees = GETPOST('toselect', 'array'); @@ -97,10 +98,7 @@ if (!$sortorder) { $hookmanager->initHooks(array('accountancysupplierlist')); $formaccounting = new FormAccounting($db); -$accounting = new AccountingAccount($db); -// TODO: we should need to check if result is a really exist accountaccount rowid..... -$aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1); -$aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1); +$accountingAccount = new AccountingAccount($db); $chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version'); @@ -522,9 +520,9 @@ if ($result) { $thirdpartystatic = new Societe($db); $facturefourn_static = new FactureFournisseur($db); + $facturefourn_static_det = new SupplierInvoiceLine($db); $product_static = new Product($db); - $isBuyerInEEC = isInEEC($mysoc); $accountingaccount_codetotid_cache = array(); @@ -547,6 +545,8 @@ if ($result) { $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; $thirdpartystatic->email = $objp->email; $thirdpartystatic->country_code = $objp->country_code; + $thirdpartystatic->tva_intra = $objp->tva_intra; + $thirdpartystatic->code_compta_fournisseur = $objp->company_code_buy; $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; @@ -560,95 +560,63 @@ if ($result) { $product_static->accountancy_code_buy = $objp->code_buy; $product_static->accountancy_code_buy_intra = $objp->code_buy_intra; $product_static->accountancy_code_buy_export = $objp->code_buy_export; + $product_static->tva_tx = $objp->tva_tx_prod; $facturefourn_static->ref = $objp->ref; $facturefourn_static->id = $objp->facid; $facturefourn_static->type = $objp->ftype; $facturefourn_static->label = $objp->invoice_label; + $facturefourn_static_det->id = $objp->rowid; + $facturefourn_static_det->total_ht = $objp->total_ht; + $facturefourn_static_det->tva_tx_line = $objp->tva_tx_line; + $facturefourn_static_det->vat_src_code = $objp->vat_src_code; + $facturefourn_static_det->product_type = $objp->type_l; + $facturefourn_static_det->desc = $objp->description; + $code_buy_p_notset = ''; $code_buy_t_notset = ''; $objp->aarowid_suggest = ''; // Will be set later - $isSellerInEEC = isInEEC($objp); + $accountingAccountArray = array( + 'dom'=>$objp->aarowid, + 'intra'=>$objp->aarowid_intra, + 'export'=>$objp->aarowid_export, + 'thirdparty' =>$objp->aarowid_thirdparty); - // Level 1: Search suggested default account for product/service - $suggestedaccountingaccountbydefaultfor = ''; - if ($objp->type_l == 1) { - if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) - $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = ''; - } else { - if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale - $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = 'eec'; - } else { // Foreign sale - $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = 'export'; - } - } - } elseif ($objp->type_l == 0) { - if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) - $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = ''; - } else { - if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale - $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = 'eec'; - } else { - $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = 'export'; - } - } - } - if ($objp->code_sell_l == -1) { - $objp->code_sell_l = ''; - } + $code_buy_p_notset = ''; + $code_buy_t_notset = ''; - // Level 2: Search suggested account for product/service (similar code exists in page index.php to make automatic binding) - $suggestedaccountingaccountfor = ''; - if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) - $objp->code_buy_p = $objp->code_buy; - $objp->aarowid_suggest = $objp->aarowid; - $suggestedaccountingaccountfor = ''; + $return=$accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facturefourn_static, $facturefourn_static_det, $accountingAccountArray, 'supplier'); + if (!is_array($return) && $return<0) { + setEventMessage($accountingAccount->error, 'errors'); } else { - if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale - $objp->code_buy_p = $objp->code_buy_intra; - $objp->aarowid_suggest = $objp->aarowid_intra; - $suggestedaccountingaccountfor = 'eec'; - } else { // Foreign sale - $objp->code_buy_p = $objp->code_buy_export; - $objp->aarowid_suggest = $objp->aarowid_export; - $suggestedaccountingaccountfor = 'export'; - } + $suggestedid=$return['suggestedid']; + $suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor']; + $suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor']; + $code_buy_l=$return['code_buy_l']; + $code_buy_p=$return['code_buy_p']; + $code_buy_t=$return['code_buy_t']; } + //var_dump($return); - // Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding) - if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { - if (!empty($objp->company_code_buy)) { - $objp->code_buy_t = $objp->company_code_buy; - $objp->aarowid_suggest = $objp->aarowid_thirdparty; - $suggestedaccountingaccountfor = ''; - } - } - - if (!empty($objp->code_buy_p)) { + if (!empty($code_buy_p)) { // Value was defined previously } else { $code_buy_p_notset = 'color:orange'; } - if (empty($objp->code_buy_l) && empty($objp->code_buy_p)) { + if (empty($code_buy_l) && empty($code_buy_p)) { $code_buy_p_notset = 'color:red'; } - // $objp->code_buy_l is now default code of product/service - // $objp->code_buy_p is now code of product/service - // $objp->code_buy_t is now code of thirdparty + // $code_buy_l is now default code of product/service + // $code_buy_p is now code of product/service + // $code_buy_t is now code of thirdparty print ''; // Line id - print ''.$objp->rowid.''; + print ''.$facturefourn_static_det->id.''; // Ref Invoice print ''.$facturefourn_static->getNomUrl(1).''; @@ -658,23 +626,23 @@ if ($result) { print ''; */ - print ''.dol_print_date($db->jdate($objp->datef), 'day').''; + print ''.dol_print_date($db->jdate($facturefourn_static_det->datef), 'day').''; // Ref Product print ''; if ($product_static->id > 0) { print $product_static->getNomUrl(1); } - if ($objp->product_label) { - print '
'.$objp->product_label.''; + if ($product_static->product_label) { + print '
'.$product_static->product_label.''; } print ''; // Description print ''; - $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description)); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($facturefourn_static_det->desc)); $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; - print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description); + print $form->textwithtooltip(dol_trunc($text, $trunclength), $facturefourn_static_det->desc); print ''; print ''; @@ -686,7 +654,7 @@ if ($result) { $code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red'; } print ''; - print vatrate($objp->tva_tx_line.($objp->vat_src_code ? ' ('.$objp->vat_src_code.')' : '')); + print vatrate($facturefourn_static_det->tva_tx_line.($facturefourn_static_det->vat_src_code ? ' ('.$facturefourn_static_det->vat_src_code.')' : '')); print ''; // Thirdparty @@ -703,26 +671,26 @@ if ($result) { // Found accounts print ''; - $s = '1. '.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; + $s = '1. '.(($facturefourn_static_det->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; $shelp = ''; if ($suggestedaccountingaccountbydefaultfor == 'eec') { $shelp .= $langs->trans("SaleEEC"); } elseif ($suggestedaccountingaccountbydefaultfor == 'export') { $shelp .= $langs->trans("SaleExport"); } - $s .= ($objp->code_buy_l > 0 ? length_accountg($objp->code_buy_l) : ''.$langs->trans("NotDefined").''); + $s .= ($code_buy_l > 0 ? length_accountg($code_buy_l) : ''.$langs->trans("NotDefined").''); print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); - if ($objp->product_id > 0) { + if ($product_static->id > 0) { print '
'; - $s = '2. '.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; - $shelp = ''; + $s = '2. '.(($facturefourn_static_det->product_type == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; + $shelp = ''; $ttype = 'help'; if ($suggestedaccountingaccountfor == 'eec') { $shelp = $langs->trans("SaleEEC"); } elseif ($suggestedaccountingaccountfor == 'export') { $shelp = $langs->trans("SaleExport"); } - $s .= (empty($objp->code_buy_p) ? ''.$langs->trans("NotDefined").'' : length_accountg($objp->code_buy_p)); - print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); + $s .= (empty($code_buy_p) ? ''.$langs->trans("NotDefined").'' : length_accountg($code_buy_p)); + print $form->textwithpicto($s, $shelp, 1, $ttype, '', 0, 2, '', 1); } else { print '
'; $s = '2. '.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; @@ -732,35 +700,26 @@ if ($result) { } if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { print '
'; - $s = '3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': '; + $s = '3. '.(($facturefourn_static_det->product_type == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': '; $shelp = ''; - $s .= ($objp->code_buy_t > 0 ? length_accountg($objp->code_buy_t) : ''.$langs->trans("NotDefined").''); + $s .= ($code_buy_t > 0 ? length_accountg($code_buy_t) : ''.$langs->trans("NotDefined").''); print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); } print ''; // Suggested accounting account print ''; - $suggestedid = $objp->aarowid_suggest; - if (empty($suggestedid) && empty($objp->code_buy_p) && !empty($objp->code_buy_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) { - if (empty($accountingaccount_codetotid_cache[$objp->code_buy_l])) { - $tmpaccount = new AccountingAccount($db); - $tmpaccount->fetch(0, $objp->code_buy_l, 1); - if ($tmpaccount->id > 0) { - $suggestedid = $tmpaccount->id; - } - $accountingaccount_codetotid_cache[$objp->code_buy_l] = $tmpaccount->id; - } else { - $suggestedid = $accountingaccount_codetotid_cache[$objp->code_buy_l]; - } - } - print $formaccounting->select_account($suggestedid, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'); + print $formaccounting->select_account($suggestedid, 'codeventil'.$facturefourn_static_det->id, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'); print ''; // Column with checkbox print ''; - $ischecked = $objp->aarowid_suggest; - print ''; + if (!empty($suggestedid)) { + $ischecked = 1; + } else { + $ischecked = 0; + } + print ''; print ''; print ''; diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php index 0ff0919652d..39587521c4d 100644 --- a/htdocs/adherents/admin/member.php +++ b/htdocs/adherents/admin/member.php @@ -228,7 +228,7 @@ print "\n"; // Allow members to change type on renewal forms /* To test during next beta print ''.$langs->trans("MemberAllowchangeOfType").''; -print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1); +print $form->selectyesno('MEMBER_ALLOW_CHANGE_OF_TYPE', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1); print "\n"; */ diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 0cdecb3645f..cf0d82b2c7b 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -928,20 +928,20 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->state_id = GETPOST('state_id', 'int'); // We set country_id, country_code and country for the selected country - $object->country_id = GETPOST('country_id', 'int') ?GETPOST('country_id', 'int') : $mysoc->country_id; + $object->country_id = GETPOST('country_id', 'int') ? GETPOST('country_id', 'int') : $mysoc->country_id; if ($object->country_id) { $tmparray = getCountry($object->country_id, 'all'); $object->country_code = $tmparray['code']; $object->country = $tmparray['label']; } + $soc = new Societe($db); if (!empty($socid)) { - $object = new Societe($db); if ($socid > 0) { - $object->fetch($socid); + $soc->fetch($socid); } - if (!($object->id > 0)) { + if (!($soc->id > 0)) { $langs->load("errors"); print($langs->trans('ErrorRecordNotFound')); exit; @@ -1024,7 +1024,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "\n"; // Company - print ''.$langs->trans("Company").''; + print ''.$langs->trans("Company").''; // Civility print ''.$langs->trans("UserTitle").''; @@ -1048,7 +1048,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // EMail print ''.(!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? '' : '').$langs->trans("EMail").(!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? '' : '').''; - print ''.img_picto('', 'object_email').' '; + print ''.img_picto('', 'object_email').' '; // Website print ''.$form->editfieldkey('Web', 'member_url', '', $object, 0).''; @@ -1056,21 +1056,25 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Address print ''.$langs->trans("Address").''; - print ''; + print ''; print ''; // Zip / Town print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; - print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6); + print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $soc->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6); print ' '; - print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id')); + print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $soc->town), 'town', array('zipcode', 'selectcountry_id', 'state_id')); print ''; // Country - $object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id; - print ''.$langs->trans('Country').''; + if (empty($soc->country_id)) { + $soc->country_id = $mysoc->country_id; + $soc->country_code = $mysoc->country_code; + $soc->state_id = $mysoc->state_id; + } + print ''.$langs->trans('Country').''; print img_picto('', 'country', 'class="pictofixedwidth"'); - print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $object->country_id, 'country_id'); + print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $soc->country_id, 'country_id'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } @@ -1079,9 +1083,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // State if (empty($conf->global->MEMBER_DISABLE_STATE)) { print ''.$langs->trans('State').''; - if ($object->country_id) { + if ($soc->country_id) { print img_picto('', 'state', 'class="pictofixedwidth"'); - print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code); + print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $soc->state_id, $soc->country_code); } else { print $countrynotdefined; } @@ -1090,7 +1094,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Pro phone print ''.$langs->trans("PhonePro").''; - print ''.img_picto('', 'object_phoning').' '; + print ''.img_picto('', 'object_phoning').' '; // Personal phone print ''.$langs->trans("PhonePerso").''; @@ -1779,10 +1783,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; - print '
'; + print '
'; print '
'; - print ''; + print '
'; // Birth Date print ''; @@ -1868,7 +1872,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "
'.$langs->trans("DateOfBirth").''.dol_print_date($object->birth, 'day').'
\n"; - print "
\n"; + print "\n"; print '
'; print dol_get_fiche_end(); @@ -2012,7 +2016,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Generated documents $filename = dol_sanitizeFileName($object->ref); - //$filename = 'tmp_cards.php'; $filedir = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member'); $urlsource = $_SERVER['PHP_SELF'].'?id='.$object->id; $genallowed = $user->rights->adherent->lire; @@ -2042,20 +2045,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print showOnlinePaymentUrl('membersubscription', $object->ref); } - print '
'; + print '
'; $MAX = 10; - $morehtmlright = ''; - $morehtmlright .= $langs->trans("SeeAll"); - $morehtmlright .= ''; + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, $object->element, $socid, 1, 'listactions', $MAX, '', $morehtmlright); + $somethingshown = $formactions->showactions($object, $object->element, $socid, 1, 'listactions', $MAX, '', $morehtmlcenter); - print '
'; + print ''; } // Presend form diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 4c26e34dd8d..271cb09fa81 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -39,6 +39,7 @@ $day = dol_print_date($now, '%d'); $foruserid = GETPOST('foruserid', 'alphanohtml'); $foruserlogin = GETPOST('foruserlogin', 'alphanohtml'); $mode = GETPOST('mode', 'aZ09'); +$modelcard = GETPOST("modelcard", 'aZ09'); // Doc template to use for business cards $model = GETPOST("model", 'aZ09'); // Doc template to use for business cards $modellabel = GETPOST("modellabel", 'aZ09'); // Doc template to use for address sheet $mesg = ''; @@ -84,10 +85,10 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) { $sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1"; $sql .= " AND d.entity IN (".getEntity('adherent').")"; if (is_numeric($foruserid)) { - $sql .= " AND d.rowid=".(int) $foruserid; + $sql .= " AND d.rowid = ".(int) $foruserid; } if ($foruserlogin) { - $sql .= " AND d.login='".$db->escape($foruserlogin)."'"; + $sql .= " AND d.login = '".$db->escape($foruserlogin)."'"; } $sql .= " ORDER BY d.rowid ASC"; @@ -143,7 +144,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) { '__MONTH__'=>$month, '__DAY__'=>$day, '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, - '__SERVER__'=>"http://".$_SERVER["SERVER_NAME"]."/" + '__SERVER__'=>"https://".$_SERVER["SERVER_NAME"]."/" ); complete_substitutions_array($substitutionarray, $langs, $adherentstatic); @@ -155,7 +156,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) { $textright = make_substitutions($conf->global->ADHERENT_CARD_TEXT_RIGHT, $substitutionarray); if (is_numeric($foruserid) || $foruserlogin) { - $nb = $_Avery_Labels[$model]['NX'] * $_Avery_Labels[$model]['NY']; + $nb = $_Avery_Labels[$model]['NX'] * $_Avery_Labels[$model]['NY']; // $_Avery_Labels is defined into an include if ($nb <= 0) { $nb = 1; // Protection to avoid empty page } @@ -209,7 +210,19 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) { } // Build and output PDF - if (empty($mode) || $mode == 'card' || $mode == 'cardlogin') { + $outputlangs = $langs; + + if (empty($mode) || $mode == 'card') { + if (!count($arrayofmembers)) { + $mesg = $langs->trans("ErrorRecordNotFound"); + } + if (empty($modelcard) || $modelcard == '-1') { + $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_CARD_TYPE")); + } + if (!$mesg) { + $result = members_card_pdf_create($db, $arrayofmembers, $modelcard, $outputlangs, '', 'standard', 'tmp_cards'); + } + } elseif ($mode == 'cardlogin') { if (!count($arrayofmembers)) { $mesg = $langs->trans("ErrorRecordNotFound"); } @@ -217,7 +230,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_CARD_TYPE")); } if (!$mesg) { - $result = members_card_pdf_create($db, $arrayofmembers, $model, $outputlangs); + $result = members_card_pdf_create($db, $arrayofmembers, $model, $outputlangs, '', 'standard', 'tmp_cards_login'); } } elseif ($mode == 'label') { if (!count($arrayofmembers)) { @@ -275,7 +288,7 @@ foreach (array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards] = $_Avery_Labels[$codecards]['name']; } asort($arrayoflabels); -print $form->selectarray('model', $arrayoflabels, (GETPOST('model') ? GETPOST('model') : (empty($conf->global->ADHERENT_CARD_TYPE) ? '' : $conf->global->ADHERENT_CARD_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1); +print $form->selectarray('modelcard', $arrayoflabels, (GETPOST('modelcard') ? GETPOST('modelcard') : (empty($conf->global->ADHERENT_CARD_TYPE) ? '' : $conf->global->ADHERENT_CARD_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1); print '
'; print ''; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 0d1d1bae48b..537e28f19a6 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2338,12 +2338,12 @@ class Adherent extends CommonObject } } elseif ($status == self::STATUS_RESILIATED) { $statusType = 'status6'; - $labelStatus = $langs->trans("MemberStatusResiliated"); - $labelStatusShort = $langs->trans("MemberStatusResiliatedShort"); + $labelStatus = $langs->transnoentitiesnoconv("MemberStatusResiliated"); + $labelStatusShort = $langs->transnoentitiesnoconv("MemberStatusResiliatedShort"); } elseif ($status == self::STATUS_EXCLUDED) { $statusType = 'status10'; - $labelStatus = $langs->trans("MemberStatusExcluded"); - $labelStatusShort = $langs->trans("MemberStatusExcludedShort"); + $labelStatus = $langs->transnoentitiesnoconv("MemberStatusExcluded"); + $labelStatusShort = $langs->transnoentitiesnoconv("MemberStatusExcludedShort"); } return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 88dbf6e2b39..90b34e604be 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -737,10 +737,10 @@ class AdherentType extends CommonObject } if (empty($this->labelStatus) || empty($this->labelStatusShort)) { - $this->labelStatus[0] = $langs->trans("ActivityCeased"); - $this->labelStatus[1] = $langs->trans("InActivity"); - $this->labelStatusShort[0] = $langs->trans("ActivityCeased"); - $this->labelStatusShort[1] = $langs->trans("InActivity"); + $this->labelStatus[0] = $langs->transnoentitiesnoconv("ActivityCeased"); + $this->labelStatus[1] = $langs->transnoentitiesnoconv("InActivity"); + $this->labelStatusShort[0] = $langs->transnoentitiesnoconv("ActivityCeased"); + $this->labelStatusShort[1] = $langs->transnoentitiesnoconv("InActivity"); } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index e777108c491..38ad3f037b9 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -70,7 +70,7 @@ class AdherentStats extends Stats $this->where .= " m.statut != -1"; $this->where .= " AND p.fk_adherent = m.rowid AND m.entity IN (".getEntity('adherent').")"; - //if (!$user->rights->societe->client->voir && !$user->socid) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .((int) $user->id); + //if (empty($user->rights->societe->client->voir) && !$user->socid) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .((int) $user->id); if ($this->memberid) { $this->where .= " AND m.rowid = ".((int) $this->memberid); } @@ -91,7 +91,7 @@ class AdherentStats extends Stats $sql = "SELECT date_format(p.dateadh,'%m') as dm, count(*)"; $sql .= " FROM ".$this->from; - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE ".dolSqlDateFilter('p.dateadh', 0, 0, (int) $year, 1); $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -111,7 +111,7 @@ class AdherentStats extends Stats $sql = "SELECT date_format(p.dateadh,'%Y') as dm, count(*)"; $sql .= " FROM ".$this->from; - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); @@ -132,7 +132,7 @@ class AdherentStats extends Stats $sql = "SELECT date_format(p.dateadh,'%m') as dm, sum(p.".$this->field.")"; $sql .= " FROM ".$this->from; - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE ".dolSqlDateFilter('p.dateadh', 0, 0, (int) $year, 1); $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -153,7 +153,7 @@ class AdherentStats extends Stats $sql = "SELECT date_format(p.dateadh,'%m') as dm, avg(p.".$this->field.")"; $sql .= " FROM ".$this->from; - //if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (empty($user->rights->societe->client->voir) && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE ".dolSqlDateFilter('p.dateadh', 0, 0, (int) $year, 1); $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -174,7 +174,7 @@ class AdherentStats extends Stats $sql = "SELECT date_format(p.dateadh,'%Y') as year, count(*) as nb, sum(".$this->field.") as total, avg(".$this->field.") as avg"; $sql .= " FROM ".$this->from; - //if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (empty($user->rights->societe->client->voir) && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY year"; $sql .= $this->db->order('year', 'DESC'); diff --git a/htdocs/adherents/htpasswd.php b/htdocs/adherents/htpasswd.php index e1f580a3656..60639193295 100644 --- a/htdocs/adherents/htpasswd.php +++ b/htdocs/adherents/htpasswd.php @@ -36,7 +36,7 @@ $sortorder = GETPOST('sortorder', 'aZ09'); if (empty($conf->adherent->enabled)) { accessforbidden(); } -if (!$user->rights->adherent->export) { +if (empty($user->rights->adherent->export)) { accessforbidden(); } diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index d55845b40c1..fe21b8577ef 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -962,7 +962,7 @@ while ($i < min($num, $limit)) { // Firstname if (!empty($arrayfields['d.firstname']['checked'])) { print ''; - print $memberstatic->getNomUrl(0, 0, 'card', 'fistname'); + print $memberstatic->getNomUrl(0, 0, 'card', 'firstname'); //print $obj->firstname; print "\n"; if (!$i) { diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index e751a7b5c65..3490f61d006 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -161,40 +161,40 @@ if ($mode) { while ($i < $num) { $obj = $db->fetch_object($resql); if ($mode == 'memberbycountry') { - $data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? $langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))), - 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))), - 'code'=>$obj->code, - 'nb'=>$obj->nb, - 'lastdate'=>$db->jdate($obj->lastdate), - 'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate) + $data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'code'=>$obj->code, + 'nb'=>$obj->nb, + 'lastdate'=>$db->jdate($obj->lastdate), + 'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate) ); } if ($mode == 'memberbyregion') { //+ $data[] = array( - 'label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? $langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))), - 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))), - 'label2'=>($obj->label2 ? $obj->label2 : $langs->trans("Unknown")), + 'label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label :''.$langs->trans("Unknown").'')), + 'label2'=>($obj->label2 ? $obj->label2 : ''.$langs->trans("Unknown").''), 'nb'=>$obj->nb, 'lastdate'=>$db->jdate($obj->lastdate), 'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate) ); } if ($mode == 'memberbystate') { - $data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? $langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))), - 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))), - 'label2'=>($obj->label2 ? $obj->label2 : $langs->trans("Unknown")), - 'nb'=>$obj->nb, - 'lastdate'=>$db->jdate($obj->lastdate), - 'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate) + $data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label2'=>($obj->label2 ? $obj->label2 : ''.$langs->trans("Unknown").''), + 'nb'=>$obj->nb, + 'lastdate'=>$db->jdate($obj->lastdate), + 'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate) ); } if ($mode == 'memberbytown') { - $data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? $langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))), - 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : $langs->trans("Unknown"))), - 'label2'=>($obj->label2 ? $obj->label2 : $langs->trans("Unknown")), - 'nb'=>$obj->nb, - 'lastdate'=>$db->jdate($obj->lastdate), - 'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate) + $data[] = array('label'=>(($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label2'=>($obj->label2 ? $obj->label2 : ''.$langs->trans("Unknown").''), + 'nb'=>$obj->nb, + 'lastdate'=>$db->jdate($obj->lastdate), + 'lastsubscriptiondate'=>$db->jdate($obj->lastsubscriptiondate) ); } diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index ed79978552f..d0776bc3459 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -210,7 +210,7 @@ print ''; print ''; -print '
'; +print '
'; // Show graphs @@ -225,7 +225,7 @@ if ($mesg) { print ''; -print '
'; +print ''; print '
'; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index c51fa86cec6..4c7a24afc44 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -557,10 +557,10 @@ if ($rowid > 0) { print ''; print ''; - print '
'; + print '
'; print '
'; - print ''; + print '
'; // Birthday print ''; @@ -652,7 +652,7 @@ if ($rowid > 0) { print "
'.$langs->trans("DateOfBirth").''.dol_print_date($object->birth, 'day').'
\n"; - print "
\n"; + print "\n"; print '
'; print dol_get_fiche_end(); @@ -963,7 +963,7 @@ if ($rowid > 0) { if ($adht->subscription) { // Amount - print ''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->currency).''; + print ''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->currency) .''; // Label print ''.$langs->trans("Label").''; diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index b0a6e40d3ca..5967d670856 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -48,7 +48,7 @@ $note = GETPOST('note', 'alpha'); $typeid = (int) GETPOST('typeid', 'int'); $amount = price2num(GETPOST('amount', 'alpha'), 'MT'); -if (!$user->rights->adherent->cotisation->lire) { +if (empty($user->rights->adherent->cotisation->lire)) { accessforbidden(); } @@ -59,7 +59,7 @@ $permissiontoedit = $user->rights->adherent->cotisation->creer; // Used by the i $hookmanager->initHooks(array('subscriptioncard', 'globalcard')); // Security check -$result = restrictedArea($user, 'subscription', 0); // TODO Check on object id +$result = restrictedArea($user, 'subscription', 0); // TODO Check on object id /* @@ -388,7 +388,7 @@ if ($rowid && $action != 'edit') { if ($linktoelem) print ($somethingshown?'':'
').$linktoelem; */ - print '
'; + print '
'; // List of actions on element /* @@ -397,7 +397,7 @@ if ($rowid && $action != 'edit') { $somethingshown = $formactions->showactions($object, $object->element, $socid, 1); */ - print '
'; + print ''; } // End of page diff --git a/htdocs/adherents/subscription/info.php b/htdocs/adherents/subscription/info.php index 080e2c0330c..9eb431320cd 100644 --- a/htdocs/adherents/subscription/info.php +++ b/htdocs/adherents/subscription/info.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "members", "bills", "users")); -if (!$user->rights->adherent->lire) { +if (empty($user->rights->adherent->lire)) { accessforbidden(); } diff --git a/htdocs/adherents/tpl/linkedobjectblock.tpl.php b/htdocs/adherents/tpl/linkedobjectblock.tpl.php index 7aa2f39a3ff..3acb14a4cdb 100644 --- a/htdocs/adherents/tpl/linkedobjectblock.tpl.php +++ b/htdocs/adherents/tpl/linkedobjectblock.tpl.php @@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) { exit; } -echo "\n"; +echo "\n"; global $user; @@ -35,7 +35,7 @@ $total = 0; foreach ($linkedObjectBlock as $key => $objectlink) { echo ''; echo ''.$langs->trans("Subscription").''; - echo ''.$objectlink->getNomUrl(1).''; + echo ''.$objectlink->getNomUrl(1).''; echo ''; echo ''.dol_print_date($objectlink->dateh, 'day').''; echo ''; diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php index 88f45c9c20e..256f29b6b81 100644 --- a/htdocs/adherents/type_translation.php +++ b/htdocs/adherents/type_translation.php @@ -76,11 +76,11 @@ if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $user->rights->ad if ($forcelangprod == $current_lang) { $object->label = GETPOST("libelle", 'alphanohtml'); $object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml')); - $object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); + //$object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); } else { $object->multilangs[$forcelangprod]["label"] = GETPOST("libelle", 'alphanohtml'); $object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml')); - $object->multilangs[$forcelangprod]["other"] = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); + //$object->multilangs[$forcelangprod]["other"] = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); } // backup into database diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index 5be2b3d6eea..221c57ab027 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -94,7 +94,7 @@ $formcompany = new FormCompany($db); $countrynotdefined = ''.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; print ''.$langs->trans("AccountantDesc")."
\n"; -print "
\n"; +print "

\n"; /** * Edit parameters @@ -115,7 +115,7 @@ print ''; print ''; print ''; -print ''."\n"; +print ''."\n"; // Name print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 5cffc0257e1..bdafaed48fa 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -378,7 +378,7 @@ $head = company_admin_prepare_head(); print dol_get_fiche_head($head, 'company', $langs->trans("Company"), -1, 'company'); print ''.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Save"))."
\n"; -print "
\n"; +print "

\n"; /** @@ -457,7 +457,7 @@ print ''."\n"; // Email print ''; +print ''; print ''."\n"; // Web diff --git a/htdocs/admin/company_socialnetworks.php b/htdocs/admin/company_socialnetworks.php index 57c75b352f8..80e152bd045 100644 --- a/htdocs/admin/company_socialnetworks.php +++ b/htdocs/admin/company_socialnetworks.php @@ -104,13 +104,11 @@ print ''; print ''; print ''; -// Social networks -print '
'; print '
'; print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 8060398574c..1cce5388f90 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -83,26 +83,26 @@ if ($action == 'set') { dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity); $defaultValues = new DefaultValues($db); - $result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete','t.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity)); - if (!is_array($result) && $result<0) { + $result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete', 't.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity)); + if (!is_array($result) && $result < 0) { setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); - } elseif (count($result)>0) { + } elseif (count($result) > 0) { foreach ($result as $defval) { - $defaultValues->id=$defval->id; + $defaultValues->id = $defval->id; $resultDel = $defaultValues->delete($user); - if ($resultDel<0) { + if ($resultDel < 0) { setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); } } } - $defaultValues->type='createform'; - $defaultValues->entity=$conf->entity; - $defaultValues->user_id=0; - $defaultValues->page='comm/action/card.php'; - $defaultValues->param='complete'; - $defaultValues->value=GETPOST('AGENDA_EVENT_DEFAULT_STATUS'); - $resultCreat=$defaultValues->create($user); - if ($resultCreat<0) { + $defaultValues->type = 'createform'; + $defaultValues->entity = $conf->entity; + $defaultValues->user_id = 0; + $defaultValues->page = 'comm/action/card.php'; + $defaultValues->param = 'complete'; + $defaultValues->value = GETPOST('AGENDA_EVENT_DEFAULT_STATUS'); + $resultCreat = $defaultValues->create($user); + if ($resultCreat < 0) { setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); } } elseif ($action == 'specimen') { // For orders @@ -355,13 +355,13 @@ print '
'.$langs->trans("AGENDA_EVENT_DEFAULT_STATUS").' '."\n"; -$defval='na'; +$defval = 'na'; $defaultValues = new DefaultValues($db); -$result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete','t.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity)); -if (!is_array($result) && $result<0) { +$result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete', 't.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity)); +if (!is_array($result) && $result < 0) { setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); -} elseif (count($result)>0) { - $defval=reset($result)->value; +} elseif (count($result) > 0) { + $defval = reset($result)->value; } $formactions->form_select_status_action('agenda', $defval, 1, "AGENDA_EVENT_DEFAULT_STATUS", 0, 1, 'maxwidth200'); print '
'; print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth'); -print '
'; print ''; -print ''; +print ''; print "\n"; @@ -133,7 +131,6 @@ foreach ($listofnetworks as $key => $value) { print "
'.$langs->trans("SocialNetworksInformation").''.$langs->trans("Url").''.$langs->trans("SocialNetworkId").''.$langs->trans("SocialNetworksInformation").''.$langs->trans("Url").''.$langs->trans("SocialNetworkId").'
"; print ''; -print '
'; print $form->buttonsSaveCancel("Save", ''); diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 84cae83efec..a632d5f1a41 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -259,7 +259,7 @@ if ($result) { print "\n"; - print ''.$obj->name.''."\n"; + print ''.$obj->name.''."\n"; // Value print ''; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index ec39fed5fbc..851b1f1970b 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2011-2020 Alexandre Spangaro + * Copyright (C) 2011-2021 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * Copyright (C) 2019-2020 Frédéric France @@ -220,7 +220,7 @@ $tabsql[21] = "SELECT c.rowid as rowid, c.code, c.label, c.active, c.position FR $tabsql[22] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason"; $tabsql[23] = "SELECT t.rowid as rowid, t.taux, t.revenuestamp_type, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid"; $tabsql[24] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource"; -$tabsql[25] = "SELECT rowid as rowid, code, label, active, module FROM ".MAIN_DB_PREFIX."c_type_container as t WHERE t.entity IN (".getEntity('c_type_container').")"; +$tabsql[25] = "SELECT rowid as rowid, code, label, active, module FROM ".MAIN_DB_PREFIX."c_type_container as t WHERE t.entity = ".getEntity($tabname[25]); //$tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units"; $tabsql[27] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcomm"; $tabsql[28] = "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newbymonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid"; @@ -232,8 +232,8 @@ $tabsql[33] = "SELECT rowid, pos, code, label, active FROM ".MAIN_DB_PREFIX."c_h $tabsql[34] = "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PREFIX."c_hrm_function"; $tabsql[35] = "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c"; $tabsql[36] = "SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, r.active, r.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_range r"; -$tabsql[37] = "SELECT r.rowid, r.code, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r"; -$tabsql[38] = "SELECT rowid, entity, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks"; +$tabsql[37] = "SELECT r.rowid, r.code, r.sortorder, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r"; +$tabsql[38] = "SELECT s.rowid, s.entity, s.code, s.label, s.url, s.icon, s.active FROM ".MAIN_DB_PREFIX."c_socialnetworks as s WHERE s.entity = ".getEntity($tabname[38]); $tabsql[39] = "SELECT code, label as libelle, sortorder, active FROM ".MAIN_DB_PREFIX."c_prospectcontactlevel"; $tabsql[40] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcommcontact"; $tabsql[41] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_transport_mode"; @@ -278,7 +278,7 @@ $tabsqlsort[33] = "code ASC"; $tabsqlsort[34] = "code ASC"; $tabsqlsort[35] = "c.label ASC"; $tabsqlsort[36] = "r.fk_c_exp_tax_cat ASC, r.range_ik ASC"; -$tabsqlsort[37] = "r.unit_type ASC, r.scale ASC, r.code ASC"; +$tabsqlsort[37] = "sortorder ASC"; $tabsqlsort[38] = "rowid, code ASC"; $tabsqlsort[39] = "sortorder ASC"; $tabsqlsort[40] = "code ASC"; @@ -324,7 +324,7 @@ $tabfield[33] = "code,label"; $tabfield[34] = "code,label"; $tabfield[35] = "label"; $tabfield[36] = "range_ik,fk_c_exp_tax_cat"; -$tabfield[37] = "code,label,short_label,unit_type,scale"; +$tabfield[37] = "code,label,short_label,unit_type,scale,sortorder"; $tabfield[38] = "code,label,url,icon,entity"; $tabfield[39] = "code,libelle,sortorder"; $tabfield[40] = "code,libelle,picto"; @@ -370,7 +370,7 @@ $tabfieldvalue[33] = "code,label"; $tabfieldvalue[34] = "code,label"; $tabfieldvalue[35] = "label"; $tabfieldvalue[36] = "range_ik,fk_c_exp_tax_cat"; -$tabfieldvalue[37] = "code,label,short_label,unit_type,scale"; +$tabfieldvalue[37] = "code,label,short_label,unit_type,scale,sortorder"; $tabfieldvalue[38] = "code,label,url,icon"; $tabfieldvalue[39] = "code,libelle,sortorder"; $tabfieldvalue[40] = "code,libelle,picto"; @@ -417,7 +417,7 @@ $tabfieldinsert[33] = "code,label"; $tabfieldinsert[34] = "code,label"; $tabfieldinsert[35] = "label"; $tabfieldinsert[36] = "range_ik,fk_c_exp_tax_cat"; -$tabfieldinsert[37] = "code,label,short_label,unit_type,scale"; +$tabfieldinsert[37] = "code,label,short_label,unit_type,scale,sortorder"; $tabfieldinsert[38] = "code,label,url,icon,entity"; $tabfieldinsert[39] = "code,label,sortorder"; $tabfieldinsert[40] = "code,libelle,picto"; @@ -1464,6 +1464,10 @@ if ($id) { print $tdsoffields; + // Line to enter new values + print ''; + print ''; + $obj = new stdClass(); // If data was already input, we define them in obj to populate input fields. if (GETPOST('actionadd')) { @@ -1483,9 +1487,6 @@ if ($id) { unset($fieldlist[2]); // Remove field ??? if dictionary Regions } - // Line to enter new values - print ''; - print ''; if (empty($reshook)) { fieldList($fieldlist, $obj, $tabname[$id], 'add'); @@ -1984,7 +1985,7 @@ if ($id) { } } } elseif ($value == 'fk_c_exp_tax_cat') { - $valuetoshow = getDictvalue(MAIN_DB_PREFIX.'c_exp_tax_cat', 'label', $valuetoshow); + $valuetoshow = getDictionaryValue(MAIN_DB_PREFIX.'c_exp_tax_cat', 'label', $valuetoshow); $valuetoshow = $langs->trans($valuetoshow); } elseif ($tabname[$id] == MAIN_DB_PREFIX.'c_exp_tax_cat') { $valuetoshow = $langs->trans($valuetoshow); diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 5e7a229fee3..25446dbed4d 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -307,7 +307,7 @@ class Dolistore } } else { //need update - $version = ''.$langs->trans( + $version = ''.$langs->trans( 'CompatibleAfterUpdate', DOL_VERSION, $product->dolibarr_min, diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index ddfa847d813..af137a1ecdb 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -530,7 +530,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index 6216820166e..b98f3775aad 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -107,6 +107,8 @@ $head = security_prepare_head(); print dol_get_fiche_head($head, 'audit', '', -1); +print '
'; + print ''; print ""; print getTitleFieldOfList("LogEvents", 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, '')."\n"; diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 67627a94af8..bddaf58475a 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -257,11 +257,12 @@ foreach ($rules as $rule) { if ($rule->fk_c_type_fees == -1) { echo $langs->trans('AllExpenseReport'); } else { - $key = getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'code', $rule->fk_c_type_fees, false, 'id'); - if ($key != $langs->trans($key)) { + $key = getDictionaryValue(MAIN_DB_PREFIX.'c_type_fees', 'code', $rule->fk_c_type_fees, false, 'id'); + if ($key && $key != $langs->trans($key)) { echo $langs->trans($key); } else { - echo $langs->trans(getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'label', $rule->fk_c_type_fees, false, 'id')); // TODO check to return trans of 'code' + $value = getDictionaryValue(MAIN_DB_PREFIX.'c_type_fees', 'label', $rule->fk_c_type_fees, false, 'id'); + echo $langs->trans($value ? $value : 'Undefined'); // TODO check to return trans of 'code' } } } diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index 2bcd4977716..8eb2f93c13c 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -20,7 +20,7 @@ */ /** - * \file hrm/admin/setup.php + * \file htdocs/admin/hrm.php * \ingroup hrm * \brief HrmTest setup page. */ diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 3dcfb66031d..697f8fa2130 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -299,6 +299,8 @@ $head = ihm_prepare_head(); print dol_get_fiche_head($head, $mode, '', -1, ''); +print '
'; + clearstatcache(); if ($mode == 'template') { @@ -451,11 +453,11 @@ if ($mode == 'other') { print '
' . "\n"; print ''; - print '
'; print '
'; print ''; print '
'; + print '
'; print '
'; // Other @@ -577,9 +579,9 @@ if ($mode == 'login') { print '
'; print ''; - print ''; @@ -630,7 +632,6 @@ if ($mode == 'login') { print ''; } -print '
'; print '
'; print ''; print '
'; diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index affedf1f43c..daf20ce5aa2 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -83,7 +83,8 @@ if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INF $setupcompanynotcomplete = 1; } print img_picto('', 'company', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit&token='.newToken()), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup")); -print '

'.$langs->trans("SetupDescription3b"); +print '

'; +print $langs->trans("SetupDescription3b"); if (!empty($setupcompanynotcomplete)) { $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"), 'style="padding-right: 6px;"'); @@ -92,6 +93,7 @@ if (!empty($setupcompanynotcomplete)) { print '
'; print '
'; print '
'; +print '
'; // Show info setup module print img_picto('', 'cog', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules")); diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 0769ee5c0a0..59b7eb8b463 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -105,7 +105,7 @@ foreach ($list as $key) { // Value print ''; -/* -print ''; -*/ - -print '
'; + print '
'; print $langs->trans("Parameter"); - print ''; + print ''; print $langs->trans("Value"); print '
'; if (!empty($conf->accounting->enabled)) { - print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1); + print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1); } else { print ''; } diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 1c38ec8e6d7..1283c5698d3 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -292,7 +292,7 @@ if ($action == 'edit') { print dol_get_fiche_head($head, 'common', '', -1); print ''.$langs->trans("EMailsDesc")."
\n"; - print "
\n"; + print "

\n"; clearstatcache(); @@ -543,7 +543,7 @@ if ($action == 'edit') { print dol_get_fiche_head($head, 'common', '', -1); print ''.$langs->trans("EMailsDesc")."
\n"; - print "
\n"; + print "

\n"; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; @@ -829,23 +829,23 @@ if ($action == 'edit') { if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') { if (!empty($conf->global->MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD)) { // List of string to add in SPF if the setup use the mail method. Example 'include:sendgrid.net include:spf.mydomain.com' - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD); + $text .= ($text ? '

' : '').''.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD); } else { // MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is list of IPs where email is sent from. Example: '1.2.3.4, [aaaa:bbbb:cccc:dddd]'. if (!empty($conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS)) { // List of IP show as record to add in SPF if we use the mail method - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS); + $text .= ($text ? '

' : '').''.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS); } } } else { if (!empty($conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS)) { // List of IP show as record to add as allowed IP if we use the smtp method. Value is '1.2.3.4, [aaaa:bbbb:cccc:dddd]' // TODO Add a key to allow to show the IP/name of server detected dynamically - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMail2", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS); + $text .= ($text ? '

' : '').''.$langs->trans("WarningPHPMail2", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS); } if (!empty($conf->global->MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD)) { // Should be required only if you have preset the Dolibarr to use your own SMTP and you want to warn users to update their domain name to match your SMTP server. // List of string to add in SPF if we use the smtp method. Example 'include:spf.mydomain.com' - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD); + $text .= ($text ? '

' : '').''.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD); } } diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 360ea07defd..015b943ac04 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -243,7 +243,7 @@ if ($action == 'edit') { print dol_get_fiche_head($head, 'common_emailing', '', -1); print ''.$langs->trans("EMailsDesc")."
\n"; - print "
\n"; + print "

\n"; clearstatcache(); @@ -412,7 +412,7 @@ if ($action == 'edit') { print dol_get_fiche_head($head, 'common_emailing', '', -1); print ''.$langs->trans("EMailsDesc")."
\n"; - print "
\n"; + print "

\n"; print '
'; print ''; diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 9cabe4a8e98..d3441cf2e21 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -597,7 +597,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 2c35faea3b1..b896c8962b4 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -894,7 +894,7 @@ if ($resql) { $valuetoshow = $langs->trans("Content"); $showfield = 0; } if ($fieldlist[$field] == 'content_lines') { - $valuetoshow = $langs->trans("ContentLines"); $showfield = 0; + $valuetoshow = $langs->trans("ContentForLines"); $showfield = 0; } // Show fields @@ -973,6 +973,14 @@ if ($resql) { $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 500, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%'); print $doleditor->Create(1); } + if ($tmpfieldlist == 'content_lines') { + print $form->textwithpicto($langs->trans("ContentForLines"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).'
'; + $okforextended = true; + if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) + $okforextended = false; + $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%'); + print $doleditor->Create(1); + } print ''; print ''; print ''; @@ -1114,35 +1122,6 @@ if ($resql) { //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin } print ''; - - /* - $fieldsforcontent = array('content'); - if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) - { - $fieldsforcontent = array('content', 'content_lines'); - } - foreach ($fieldsforcontent as $tmpfieldlist) - { - $showfield = 1; - $align = "left"; - $valuetoshow = $obj->{$tmpfieldlist}; - - $class = 'tddict'; - // Show value for field - if ($showfield) { - - print ''; - print ''; - - } - }*/ - print "\n"; } diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index ce4bc76c20d..a94bb9c4276 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -232,7 +232,7 @@ if ($action == 'edit') { print dol_get_fiche_head($head, 'common_ticket', '', -1); print ''.$langs->trans("EMailsDesc")."
\n"; - print "
\n"; + print "

\n"; clearstatcache(); @@ -387,7 +387,7 @@ if ($action == 'edit') { print dol_get_fiche_head($head, 'common_ticket', '', -1); print ''.$langs->trans("EMailsDesc")."
\n"; - print "
\n"; + print "

\n"; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; // To create an artificial CR for the current tr we are on - $okforextended = true; - if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) - $okforextended = false; - $doleditor = new DolEditor($tmpfieldlist.'-'.$i, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%', 1); - print $doleditor->Create(1); - print '
'; print ''; diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 8137c34e1e6..1b06e9dd25e 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -97,6 +97,10 @@ if ($action == 'setvalue' && $user->admin) { $error++; } + $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE", GETPOST("notif_disable", "alphawithlgt"), 'chaine', 0, '', $conf->entity); + if ($result < 0) { + $error++; + } if (!$error) { $db->commit(); @@ -199,6 +203,29 @@ if (!empty($conf->global->NOTIFICATION_EMAIL_FROM) && !isValidEmail($conf->globa } print ''; print ''; + +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print $langs->trans("NotificationDisableConfirmMessageUser").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER", $arrval, $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER); +} +print '
'; +print $langs->trans("NotificationDisableConfirmMessageFix").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX", $arrval, $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX); +} +print '
'; print $form->buttonsSaveCancel("Save", ''); diff --git a/htdocs/admin/openinghours.php b/htdocs/admin/openinghours.php index e6bc6ee8f1d..fb7dddc092c 100644 --- a/htdocs/admin/openinghours.php +++ b/htdocs/admin/openinghours.php @@ -81,7 +81,7 @@ $head = company_admin_prepare_head(); print dol_get_fiche_head($head, 'openinghours', $langs->trans("Company"), -1, 'company'); print ''.$langs->trans("OpeningHoursDesc")."
\n"; -print "
\n"; +print "

\n"; if (empty($action) || $action == 'edit' || $action == 'updateedit') { /** @@ -92,7 +92,7 @@ if (empty($action) || $action == 'edit' || $action == 'updateedit') { print ''; print ''; - print ''."\n"; + print ''."\n"; print ''; +print ''; + print '
'.$langs->trans("Day").''.$langs->trans("Value").'
'.$langs->trans("Day").''.$langs->trans("Value").'
'; print $form->textwithpicto($langs->trans("Monday"), $langs->trans("OpeningHoursFormatDesc")); diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index be45a2101f5..073a88f2cd0 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2012-2107 Juanjo Menent * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton * * 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 @@ -165,6 +166,10 @@ if ($action == 'update') { dolibarr_set_const($db, "PDF_SHOW_LINK_TO_ONLINE_PAYMENT", GETPOST('PDF_SHOW_LINK_TO_ONLINE_PAYMENT', 'alpha'), 'chaine', 0, '', $conf->entity); } + if (GETPOSTISSET('PDF_USE_A')) { + dolibarr_set_const($db, "PDF_USE_A", GETPOST('PDF_USE_A', 'alpha'), 'chaine', 0, '', $conf->entity); + } + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); @@ -534,6 +539,14 @@ if ($conf->use_javascript_ajax) { } print '
'.$langs->trans("PDF_USE_A").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('PDF_USE_A'); +} else { + print $form->selectyesno('PDF_USE_A', (empty($conf->global->PDF_USE_A) ? 0 : $conf->global->PDF_USE_A), 1); +} +print '
'; print '
'; diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index 3883e885619..f42c49a4bfe 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -41,17 +41,12 @@ if (!$user->admin) { } $action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'alpha'); /* * Actions */ -if ($cancel) { - $action = ''; -} - if ($action == 'update') { if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTTERM')) { dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTTERM", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTTERM"), 'chaine', 0, '', $conf->entity); @@ -62,6 +57,9 @@ if ($action == 'update') { if (GETPOSTISSET('MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) { dolibarr_set_const($db, "MAIN_GENERATE_PROPOSALS_WITH_PICTURE", GETPOST("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), 'chaine', 0, '', $conf->entity); } + if (GETPOSTISSET('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) { + dolibarr_set_const($db, "MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", GETPOST("MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", 'int'), 'chaine', 0, '', $conf->entity); + } setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -92,45 +90,47 @@ $tooltiptext = ''; print ''.$form->textwithpicto($langs->trans("PDFOtherDesc"), $tooltiptext)."
\n"; print "
\n"; -print load_fiche_titre($langs->trans("Proposal"), '', ''); +if (!empty($conf->propal->enabled)) { + print load_fiche_titre($langs->trans("Proposal"), '', ''); -print ''; -print ''; -print ''; + print ''; + print ''; + print ''; -print '
'; -print ''; -print ''; + print '
'; + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print ''; -print ''; + + /* + print ''; + */ + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"); -print ' ('.$langs->trans("RandomlySelectedIfSeveral").')'; -print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE); + print '
'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"); + print ' ('.$langs->trans("RandomlySelectedIfSeveral").')'; + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE); + } + print '
'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING); + } + print '
'; + print '
'; } -print '
'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING); -} -print '
'; +print '
'; +print ''; print '
'; -/* - print $form->buttonsSaveCancel(); -*/ - print ''; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index e09dd13b045..207642fe8e3 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -102,11 +102,11 @@ if ($action == "set") { } $res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity); - if (! ($res > 0)) { + if (!($res > 0)) { $error++; } - if (! $error) { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 635fb2e1e7b..451771f7a98 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -95,6 +95,7 @@ $head = security_prepare_head(); print dol_get_fiche_head($head, 'proxy', '', -1); +print '
'; if ($conf->use_javascript_ajax) { print "\n".' + + id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
'; + print '
'; $MAXEVENT = 10; @@ -703,7 +746,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element, $socid, 1, '', $MAXEVENT, '', $morehtmlright); - print '
'; + print ''; } //Select mail models is same action as presend diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index 4a94dc7ce86..3cc0dc1753a 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -655,7 +655,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index a4ab56c2a66..fd8d4a19a75 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1139,6 +1139,7 @@ class BOMLine extends CommonObjectLine 'rowid' => array('type'=>'integer', 'label'=>'LineID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), 'fk_bom' => array('type'=>'integer:BillOfMaterials:societe/class/bom.class.php', 'label'=>'BillOfMaterials', 'enabled'=>1, 'visible'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1,), 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), + 'fk_bom_child' => array('type'=>'integer:BOM:bom/class/bom.class.php', 'label'=>'BillOfMaterials', 'enabled'=>1, 'visible'=>-1, 'position'=>40, 'notnull'=>-1,), 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,), 'qty' => array('type'=>'double(24,8)', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'position'=>100, 'notnull'=>1, 'isameasure'=>'1',), 'qty_frozen' => array('type'=>'smallint', 'label'=>'QuantityFrozen', 'enabled'=>1, 'visible'=>1, 'default'=>0, 'position'=>105, 'css'=>'maxwidth50imp', 'help'=>'QuantityConsumedInvariable'), @@ -1163,6 +1164,11 @@ class BOMLine extends CommonObjectLine */ public $fk_product; + /** + * @var int Id of parent bom + */ + public $fk_bom_child; + /** * @var string description */ diff --git a/htdocs/bom/tpl/linkedobjectblock.tpl.php b/htdocs/bom/tpl/linkedobjectblock.tpl.php index 946563f7b81..c42da9bdb19 100644 --- a/htdocs/bom/tpl/linkedobjectblock.tpl.php +++ b/htdocs/bom/tpl/linkedobjectblock.tpl.php @@ -24,7 +24,7 @@ if (empty($conf) || !is_object($conf)) { exit; } -print "\n"; +print "\n"; global $user, $db; global $noMoreLinkedObjectBlockAfter; diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php index 210ab695ec8..fc8c811379c 100644 --- a/htdocs/bom/tpl/objectline_create.tpl.php +++ b/htdocs/bom/tpl/objectline_create.tpl.php @@ -88,15 +88,14 @@ print ''; // Predefined product/service if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { - if ($forceall >= 0 && $freelines) { - echo '
'; + if (!empty($conf->global->BOM_SUB_BOM)) { + print $langs->trans("Product"); } echo ''; - $filtertype = ''; - if (!empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) { - $filtertype = '1'; + $filtertype = 0; + if (!empty($object->element) && $object->element == 'contrat' && empty($conf->global->STOCK_SUPPORT_SERVICES)) { + $filtertype = -1; } - $statustoshow = -1; if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) { // hide products in closed warehouse, but show products for internal transfer @@ -107,6 +106,13 @@ if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { echo ''; } +if (!empty($conf->global->BOM_SUB_BOM)) { + print '
'.$langs->trans("or").' '.$langs->trans("BOM"); + // TODO Add component to select a BOM + print ''; +} +print ''; + $coldisplay++; print ''; @@ -128,7 +134,7 @@ print ''; $coldisplay++; print ''; -print ''; +print ''; print ''; $coldisplay++; diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php index 46b57e89243..e5f24fa994f 100644 --- a/htdocs/bom/tpl/objectline_edit.tpl.php +++ b/htdocs/bom/tpl/objectline_edit.tpl.php @@ -124,7 +124,7 @@ print ''; $coldisplay++; print ''; -print ''; +print ''; $coldisplay++; print ''; @@ -133,9 +133,8 @@ print ''; $coldisplay += $colspan; print ''; $coldisplay += $colspan; -print ''; -print '
'; -print ''; +print ''; +print ''; print ''; print ''; diff --git a/htdocs/bom/tpl/objectline_title.tpl.php b/htdocs/bom/tpl/objectline_title.tpl.php index d1b29ee03b0..dff3a38ccd2 100644 --- a/htdocs/bom/tpl/objectline_title.tpl.php +++ b/htdocs/bom/tpl/objectline_title.tpl.php @@ -39,6 +39,8 @@ if (empty($object) || !is_object($object)) { exit; } print "\n"; + + // Title line print "\n"; @@ -49,8 +51,13 @@ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print ' '; } -// Description -print ''.$langs->trans('Description').''; +// Product or sub-bom +print ''.$langs->trans('Description'); +if (!empty($conf->global->BOM_SUB_BOM)) { + print '   '.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'  '; + print ''.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").' '; +} +print ''; // Qty print ''.$form->textwithpicto($langs->trans('Qty'), $langs->trans("QtyRequiredIfNoLoss")).''; diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index 9ef77fb0d98..82626c12fec 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -80,9 +80,17 @@ print '
'; $coldisplay++; $tmpproduct = new Product($object->db); $tmpproduct->fetch($line->fk_product); -print $tmpproduct->getNomUrl(1); -print ' - '.$tmpproduct->label; +$tmpbom = new BOM($object->db); +$res = $tmpbom->fetch($line->fk_bom_child); +if ($tmpbom->id > 0) { + print $tmpbom->getNomUrl(1); + print '' . (empty($conf->global->BOM_SHOW_ALL_BOM_BY_DEFAULT) ? '(+)' : '(-)') . ' '; +} else { + print $tmpproduct->getNomUrl(1); + print ' - '.$tmpproduct->label; +} print ''; + print ''; $coldisplay++; echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price @@ -111,7 +119,8 @@ $coldisplay++; echo $line->efficiency; print ''; -print ''; +$total_cost = 0; +print ''; $coldisplay++; echo price($line->total_cost); print ''; @@ -166,6 +175,93 @@ if ($action == 'selectlines') { print ''; +// Select of all the sub-BOM lines +$sql = 'SELECT rowid, fk_bom_child, fk_product FROM '.MAIN_DB_PREFIX.'bom_bomline AS bl'; +$sql.= ' WHERE fk_bom ='. (int) $tmpbom->id; +$resql = $object->db->query($sql); + +if ($resql) { + // Loop on all the sub-BOM lines if they exist + while ($obj = $object->db->fetch_object($resql)) { + $sub_bom_product = new Product($object->db); + $sub_bom_product->fetch($obj->fk_product); + + $sub_bom = new BOM($object->db); + $sub_bom->fetch($obj->fk_bom_child); + + $sub_bom_line = new BOMLine($object->db); + $sub_bom_line->fetch($obj->rowid); + + //If hidden conf is set, we show directly all the sub-BOM lines + if (empty($conf->global->BOM_SHOW_ALL_BOM_BY_DEFAULT)) { + print ''; + } else { + print ''; + } + + // Product + print ''.$sub_bom_product->getNomUrl(1).''; + + // Sub-BOM + if ($sub_bom_line->fk_bom_child > 0) { + print ''.$sub_bom->getNomUrl(1).''; + } else { + print ' '; + } + + // Qty + print ''.price($sub_bom_line->qty * $line->qty, 0, '', 0, 0).''; + if ($sub_bom_line->qty_frozen > 0) { + print ''.$sub_bom_line->qty_frozen.''; + } else { + print ' '; + } + + // Disable stock change + if ($sub_bom_line->disable_stock_change > 0) { + print ''.$sub_bom_line->disable_stock_change.''; + } else { + print ' '; + } + + // Efficiency + print ''.$sub_bom_line->efficiency.''; + + // Cost price if it's defined + if ($sub_bom_product->cost_price > 0) { + print ''.price($sub_bom_product->cost_price * $line->qty).''; + $total_cost.= $sub_bom_product->cost_price * $line->qty; + } elseif ($sub_bom_product->pmp > 0) { // PMP if cost price isn't defined + print ''.price($sub_bom_product->pmp * $line->qty).''; + $total_cost.= $sub_bom_product->pmp * $line->qty; + } else { // Minimum purchase price if cost price and PMP aren't defined + $sql_supplier_price = 'SELECT MIN(price) AS min_price FROM '.MAIN_DB_PREFIX.'product_fournisseur_price'; + $sql_supplier_price.= ' WHERE fk_product = '. (int) $sub_bom_product->id; + $resql_supplier_price = $object->db->query($sql_supplier_price); + if ($resql_supplier_price) { + $obj = $object->db->fetch_object($resql_supplier_price); + print ''.price($obj->min_price * $line->qty).''; + $total_cost+= $obj->min_price * $line->qty; + } + } + + print ''; + print ''; + print ''; + } +} + +// Replace of the total_cost value by the sum of all sub-BOM lines total_cost +if ($total_cost > 0) { + $line->total_cost = price($total_cost); + ?> + + showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"', 'colspan'=>$coldisplay), '', '', 1, 'line'); diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index d725a659e08..289916a07c2 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; $langs->loadLangs(array('bookmarks', 'other')); // Security check -if (!$user->rights->bookmark->lire) { +if (empty($user->rights->bookmark->lire)) { restrictedArea($user, 'bookmarks'); } @@ -154,9 +154,9 @@ if ($action == 'create') { print ''; print ''; - print load_fiche_titre($langs->trans("NewBookmark")); + print load_fiche_titre($langs->trans("NewBookmark"), '', 'bookmark'); - print dol_get_fiche_head($head, $hselected, $langs->trans("Bookmark"), -1, 'bookmark'); + print dol_get_fiche_head(null, 'bookmark', '', 0, ''); print ''; @@ -164,23 +164,23 @@ if ($action == 'create') { dol_set_focus('#titlebookmark'); // Url - print ''; + print ''; // Target print ''; // Owner print ''; + print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 0, '', 0, ($user->admin ? '' : array($user->id)), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300 widthcentpercentminusx'); + print ''; // Position print ''; + print 'position).'">'; + print ''; print '
'.$langs->trans("UrlOrLink").''.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'
'.$langs->trans("UrlOrLink").''.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'
'.$langs->trans("BehaviourOnClick").''; $liste = array(0=>$langs->trans("ReplaceWindow"), 1=>$langs->trans("OpenANewWindow")); - print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOST('target', 'int') : 1); + print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOST('target', 'int') : 1, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth300'); print ''.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'
'.$langs->trans("Visibility").''; - print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 0, '', 0, ($user->admin ? '' : array($user->id)), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300'); - print ' 
'.$langs->trans("Position").''; - print 'position).'">'; - print ' 
'; diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 17be6be9cef..8a5de8f4d91 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -35,7 +35,7 @@ $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search // Security check -if (!$user->rights->bookmark->lire) { +if (empty($user->rights->bookmark->lire)) { restrictedArea($user, 'bookmarks'); } $optioncss = GETPOST('optioncss', 'alpha'); diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 44b812b4d96..ec3d75dee1a 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -266,7 +266,7 @@ if ($user->rights->categorie->creer) { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } print ''; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index d5c135279bf..e6a94b21701 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -244,7 +244,6 @@ class Categorie extends CommonObject * @see Categorie::TYPE_ACTIONCOMM * @see Categorie::TYPE_WEBSITE_PAGE * @see Categorie::TYPE_TICKET - */ public $type; @@ -385,8 +384,8 @@ class Categorie extends CommonObject } } else { dol_print_error($this->db); - $this->error=$this->db->lasterror; - $this->errors[]=$this->db->lasterror; + $this->error = $this->db->lasterror; + $this->errors[] = $this->db->lasterror; return -1; } } @@ -626,12 +625,18 @@ class Categorie extends CommonObject } $arraydelete = array( - 'categorie_societe' => 'fk_categorie', - 'categorie_fournisseur' => 'fk_categorie', 'categorie_product' => 'fk_categorie', + 'categorie_fournisseur' => 'fk_categorie', + 'categorie_societe' => 'fk_categorie', 'categorie_member' => 'fk_categorie', 'categorie_contact' => 'fk_categorie', + 'categorie_user' => 'fk_categorie', + 'categorie_project' => 'fk_categorie', 'categorie_account' => 'fk_categorie', + 'categorie_website_page' => 'fk_categorie', + 'categorie_warehouse' => 'fk_categorie', + 'categorie_actioncomm' => 'fk_categorie', + 'categorie_ticket' => 'fk_categorie', 'bank_class' => 'fk_categ', 'categorie_lang' => 'fk_category', 'categorie' => 'rowid', @@ -728,8 +733,6 @@ class Categorie extends CommonObject } } - - // Call trigger $this->context = array('linkto'=>$obj); // Save object we want to link category to into category instance to provide information to trigger $result = $this->call_trigger('CATEGORY_LINK', $user); diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 8ebb9f43b1e..9231e215b7f 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -173,7 +173,12 @@ if ($elemid && $action == 'addintocategory' && (($type == Categorie::TYPE_PRODUCT && ($user->rights->produit->creer || $user->rights->service->creer)) || ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer) || ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) || - ($type == Categorie::TYPE_TICKET && $user->rights->ticket->write) + ($type == Categorie::TYPE_TICKET && $user->rights->ticket->write) || + ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer) || + ($type == Categorie::TYPE_MEMBER && $user->rights->projet->creer) || + ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) || + ($type == Categorie::TYPE_USER && $user->rights->user->user->creer) || + ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer) )) { if ($type == Categorie::TYPE_PRODUCT) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -191,6 +196,26 @@ if ($elemid && $action == 'addintocategory' && require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php'; $newobject = new Ticket($db); $elementtype = 'ticket'; + } elseif ($type == Categorie::TYPE_PROJECT) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + $newobject = new Project($db); + $elementtype = 'project'; + } elseif ($type == Categorie::TYPE_MEMBER) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; + $newobject = new Adherent($db); + $elementtype = 'member'; + } elseif ($type == Categorie::TYPE_CONTACT) { + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; + $newobject = new Contact($db); + $elementtype = 'contact'; + } elseif ($type == Categorie::TYPE_USER) { + require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; + $newobject = new User($db); + $elementtype = 'user'; + } elseif ($type == Categorie::TYPE_ACCOUNT) { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + $newobject = new User($db); + $elementtype = 'bank_account'; } $result = $newobject->fetch($elemid); @@ -199,7 +224,7 @@ if ($elemid && $action == 'addintocategory' && if ($result >= 0) { setEventMessages($langs->trans("WasAddedSuccessfully", $newobject->ref), null, 'mesgs'); } else { - if ($cat->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->trans("ObjectAlreadyLinkedToCategory"), null, 'warnings'); } else { setEventMessages($object->error, $object->errors, 'errors'); @@ -538,6 +563,7 @@ if ($type == Categorie::TYPE_PRODUCT) { } } +// List of customers if ($type == Categorie::TYPE_CUSTOMER) { $permission = $user->rights->societe->creer; @@ -611,7 +637,7 @@ if ($type == Categorie::TYPE_CUSTOMER) { } } - +// List of suppliers if ($type == Categorie::TYPE_SUPPLIER) { $permission = $user->rights->societe->creer; @@ -696,6 +722,26 @@ if ($type == Categorie::TYPE_MEMBER) { if ($prods < 0) { dol_print_error($db, $object->error, $object->errors); } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddMemberIntoCategory").'  '; + print $form->selectMembers('', 'elemid'); + print '
'; + print '
'; + } + print '
'; print ''; print ''; @@ -752,6 +798,25 @@ if ($type == Categorie::TYPE_CONTACT) { if ($contacts < 0) { dol_print_error($db, $object->error, $object->errors); } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddContactIntoCategory").'  '; + print $form->selectContacts('', '', 'elemid'); + print '
'; + print '
'; + } print '
'; print ''; print ''; @@ -770,7 +835,7 @@ if ($type == Categorie::TYPE_CONTACT) { print ''."\n"; print ''."\n"; - if (count($contacts) > 0) { + if (is_array($contacts) && count($contacts) > 0) { $i = 0; foreach ($contacts as $key => $contact) { $i++; @@ -817,6 +882,26 @@ if ($type == Categorie::TYPE_ACCOUNT) { if ($accounts < 0) { dol_print_error($db, $object->error, $object->errors); } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("Ref").'
'; + print ''; + print ''; + print '
'; + print $langs->trans("AddAccountIntoCategory").'  '; + $form->select_comptes('', 'elemid'); + print '
'; + print '
'; + } + print '
'; print ''; print ''; @@ -874,6 +959,26 @@ if ($type == Categorie::TYPE_PROJECT) { if ($objects < 0) { dol_print_error($db, $object->error, $object->errors); } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddProjectIntoCategory").'  '; + $form->selectProjects('', 'elemid'); + print '
'; + print '
'; + } + print '
'; print ''; print ''; @@ -930,6 +1035,25 @@ if ($type == Categorie::TYPE_USER) { if ($users < 0) { dol_print_error($db, $object->error, $object->errors); } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddProjectIntoCategory").'  '; + print $form->select_dolusers('', 'elemid'); + print '
'; + print '
'; + } print '
'; print ''; print ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index e56a2e89fcf..347b45253d9 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -75,8 +75,13 @@ if ($complete == 'na' || $complete == -2) { $complete = -1; } -$datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int')); -$datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int')); +if ($fulldayevent) { + $datep = dol_mktime('00', '00', 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int')); + $datef = dol_mktime('23', '59', '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int')); +} else { + $datep = dol_mktime($aphour, $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int')); + $datef = dol_mktime($p2hour, $p2min, '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int')); +} // Security check $socid = GETPOST('socid', 'int'); @@ -967,7 +972,7 @@ if ($action == 'create') { print ''; print ''; if ($backtopage) { - print ''; + print ''; } if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) { print ''; @@ -1298,7 +1303,7 @@ if ($action == 'create') { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } print ''; @@ -2209,10 +2214,10 @@ if ($id > 0) { print $formfile->showdocuments('actions', $object->id, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 0, 0, '', '', '', $object->default_lang); - print '
'; + print '
'; - print '
'; + print ''; } } } diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 4a7128fa865..3e2520f43da 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1327,10 +1327,10 @@ class ActionComm extends CommonObject $sql = "SELECT count(a.id) as nb"; } $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; } - if (!$user->rights->agenda->allactions->read) { + if (empty($user->rights->agenda->allactions->read)) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_resources AS ar ON a.id = ar.fk_actioncomm AND ar.element_type ='user' AND ar.fk_element = ".((int) $user->id); } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; @@ -1339,13 +1339,13 @@ class ActionComm extends CommonObject $sql .= " AND a.percent >= 0 AND a.percent < 100"; } $sql .= " AND a.entity IN (".getEntity('agenda').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".((int) $user->id).")"; } if ($user->socid) { $sql .= " AND a.fk_soc = ".((int) $user->socid); } - if (!$user->rights->agenda->allactions->read) { + if (empty($user->rights->agenda->allactions->read)) { $sql .= " AND (a.fk_user_author = ".((int) $user->id)." OR a.fk_user_action = ".((int) $user->id)." OR a.fk_user_done = ".((int) $user->id); $sql .= " OR ar.fk_element = ".((int) $user->id); $sql .= ")"; @@ -1465,18 +1465,18 @@ class ActionComm extends CommonObject // phpcs:enable global $langs; - $labelStatus = $langs->trans('StatusNotApplicable'); + $labelStatus = $langs->transnoentitiesnoconv('StatusNotApplicable'); if ($percent == -1 && !$hidenastatus) { - $labelStatus = $langs->trans('StatusNotApplicable'); + $labelStatus = $langs->transnoentitiesnoconv('StatusNotApplicable'); } elseif ($percent == 0) { - $labelStatus = $langs->trans('StatusActionToDo').' (0%)'; + $labelStatus = $langs->transnoentitiesnoconv('StatusActionToDo').' (0%)'; } elseif ($percent > 0 && $percent < 100) { - $labelStatus = $langs->trans('StatusActionInProcess').' ('.$percent.'%)'; + $labelStatus = $langs->transnoentitiesnoconv('StatusActionInProcess').' ('.$percent.'%)'; } elseif ($percent >= 100) { - $labelStatus = $langs->trans('StatusActionDone').' (100%)'; + $labelStatus = $langs->transnoentitiesnoconv('StatusActionDone').' (100%)'; } - $labelStatusShort = $langs->trans('StatusNotApplicable'); + $labelStatusShort = $langs->transnoentitiesnoconv('StatusNotApplicable'); if ($percent == -1 && !$hidenastatus) { $labelStatusShort = $langs->trans('NA'); } elseif ($percent == 0) { diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index e675c93d472..aa693d2e41f 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -228,18 +228,18 @@ class ActionCommReminder extends CommonObject // phpcs:enable global $langs; - $labelStatus = $langs->trans('ToDo'); + $labelStatus = $langs->transnoentitiesnoconv('ToDo'); if ($status == 1) { - $labelStatus = $langs->trans('Done'); + $labelStatus = $langs->transnoentitiesnoconv('Done'); } elseif ($status == -1) { - $labelStatus = $langs->trans('Error'); + $labelStatus = $langs->transnoentitiesnoconv('Error'); } - $labelStatusShort = $langs->trans('ToDo'); + $labelStatusShort = $langs->transnoentitiesnoconv('ToDo'); if ($status == 1) { - $labelStatus = $langs->trans('Done'); + $labelStatus = $langs->transnoentitiesnoconv('Done'); } elseif ($status == -1) { - $labelStatus = $langs->trans('Error'); + $labelStatus = $langs->transnoentitiesnoconv('Error'); } $statusType = 'status5'; diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 4c4d44c3a6e..855571e834b 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -201,9 +201,9 @@ if ($object->id > 0) { // Date start print ''.$langs->trans("DateActionStart").''; if (!$object->fulldayevent) { - print dol_print_date($object->datep, 'dayhour'); + print dol_print_date($object->datep, 'dayhour', 'tzuser'); } else { - print dol_print_date($object->datep, 'day'); + print dol_print_date($object->datep, 'day', 'tzuser'); } if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) { print img_warning($langs->trans("Late")); @@ -214,9 +214,9 @@ if ($object->id > 0) { // Date end print ''.$langs->trans("DateActionEnd").''; if (!$object->fulldayevent) { - print dol_print_date($object->datef, 'dayhour'); + print dol_print_date($object->datef, 'dayhour', 'tzuser'); } else { - print dol_print_date($object->datef, 'day'); + print dol_print_date($object->datef, 'day', 'tzuser'); } if ($object->percentage > 0 && $object->percentage < 100 && $object->datef && $object->datef < ($now - $delay_warning)) { print img_warning($langs->trans("Late")); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index e79edcf8e23..5f7349fab3c 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -86,13 +86,13 @@ if ($socid < 0) { } $canedit = 1; -if (!$user->rights->agenda->myactions->read) { +if (empty($user->rights->agenda->myactions->read)) { accessforbidden(); } -if (!$user->rights->agenda->allactions->read) { +if (empty($user->rights->agenda->allactions->read)) { $canedit = 0; } -if (!$user->rights->agenda->allactions->read || $filter == 'mine') { // If no permission to see all, we show only affected to me +if (empty($user->rights->agenda->allactions->read) || $filter == 'mine') { // If no permission to see all, we show only affected to me $filtert = $user->id; } @@ -490,7 +490,7 @@ print ''; $viewmode = ''; $viewmode .= ''; //$viewmode .= ''; -$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"'); +$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; @@ -660,7 +660,7 @@ $sql .= ' a.fk_soc, a.fk_contact, a.fk_project,'; $sql .= ' a.fk_element, a.elementtype,'; $sql .= ' ca.code as type_code, ca.libelle as type_label, ca.color as type_color, ca.type as type_type, ca.picto as type_picto'; $sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; } // We must filter on resource table @@ -711,7 +711,7 @@ if ($resourceid > 0) { if ($pid) { $sql .= " AND a.fk_project=".((int) $pid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".((int) $user->id).")"; } if ($socid > 0) { diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index e07574bacf5..985a403b086 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -136,13 +136,13 @@ if ($socid < 0) { } $canedit = 1; -if (!$user->rights->agenda->myactions->read) { +if (empty($user->rights->agenda->myactions->read)) { accessforbidden(); } -if (!$user->rights->agenda->allactions->read) { +if (empty($user->rights->agenda->allactions->read)) { $canedit = 0; } -if (!$user->rights->agenda->allactions->read || $filter == 'mine') { // If no permission to see all, we show only affected to me +if (empty($user->rights->agenda->allactions->read) || $filter == 'mine') { // If no permission to see all, we show only affected to me $filtert = $user->id; } @@ -414,7 +414,7 @@ $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_extrafields as ef ON (a.id = ef.fk_object)"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; @@ -468,7 +468,7 @@ if ($resourceid > 0) { if ($pid) { $sql .= " AND a.fk_project=".((int) $pid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".((int) $user->id).")"; } if ($socid > 0) { @@ -625,22 +625,6 @@ print $nav; //print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); //print dol_get_fiche_end(); -// Add link to show birthdays -/* -$link = ''; -if (empty($conf->use_javascript_ajax)) -{ - $newparam=$param; // newparam is for birthday links - $newparam=preg_replace('/showbirthday=[0-1]/i','showbirthday='.(empty($showbirthday)?1:0),$newparam); - if (! preg_match('/showbirthday=/i',$newparam)) $newparam.='&showbirthday=1'; - $link=''; - if (empty($showbirthday)) $link.=$langs->trans("AgendaShowBirthdayEvents"); - else $link.=$langs->trans("AgendaHideBirthdayEvents"); - $link.=''; -} -*/ $s = $newtitle; @@ -656,7 +640,7 @@ if (empty($reshook)) { $viewmode = ''; $viewmode .= ''; //$viewmode .= ''; -$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"'); +$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index b1fecbf6475..7cdb056c595 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -80,13 +80,13 @@ if ($socid < 0) { } $canedit = 1; -if (!$user->rights->agenda->myactions->read) { +if (empty($user->rights->agenda->myactions->read)) { accessforbidden(); } -if (!$user->rights->agenda->allactions->read) { +if (empty($user->rights->agenda->allactions->read)) { $canedit = 0; } -if (!$user->rights->agenda->allactions->read || $filter == 'mine') { // If no permission to see all, we show only affected to me +if (empty($user->rights->agenda->allactions->read) || $filter == 'mine') { // If no permission to see all, we show only affected to me $filtert = $user->id; } @@ -416,7 +416,7 @@ $massactionbutton = ''; $viewmode = ''; $viewmode .= ''; //$viewmode .= ''; -$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"'); +$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; @@ -506,7 +506,7 @@ $sql .= ' a.transparency, a.priority, a.fulldayevent, a.location,'; $sql .= ' a.fk_soc, a.fk_contact, a.fk_element, a.elementtype, a.fk_project,'; $sql .= ' ca.code, ca.libelle as type_label, ca.color, ca.type as type_type, ca.picto as type_picto'; $sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; } // We must filter on resource table @@ -557,7 +557,7 @@ if ($resourceid > 0) { if ($pid) { $sql .= " AND a.fk_project=".((int) $pid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".((int) $user->id).")"; } if ($socid > 0) { @@ -965,8 +965,8 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s // We are in a particular day for $username, now we scan all events foreach ($eventarray as $daykey => $notused) { $annee = dol_print_date($daykey, '%Y'); - $mois = dol_print_date($daykey, '%m'); - $jour = dol_print_date($daykey, '%d'); + $mois = dol_print_date($daykey, '%m'); + $jour = dol_print_date($daykey, '%d'); if ($day == $jour && $month == $mois && $year == $annee) { // Is it the day we are looking for when calling function ? // Scan all event for this date diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 2791d5a0b51..060b4f8d7d1 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -80,13 +80,13 @@ if ($socid < 0) { } $canedit = 1; -if (!$user->rights->agenda->myactions->read) { +if (empty($user->rights->agenda->myactions->read)) { accessforbidden(); } -if (!$user->rights->agenda->allactions->read) { +if (empty($user->rights->agenda->allactions->read)) { $canedit = 0; } -if (!$user->rights->agenda->allactions->read || $filter == 'mine') { // If no permission to see all, we show only affected to me +if (empty($user->rights->agenda->allactions->read) || $filter == 'mine') { // If no permission to see all, we show only affected to me $filtert = $user->id; } @@ -426,7 +426,7 @@ $massactionbutton = ''; $viewmode = ''; $viewmode .= ''; //$viewmode .= ''; -$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoactionview block"'); +$viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; @@ -533,7 +533,7 @@ $sql .= ' a.transparency, a.priority, a.fulldayevent, a.location,'; $sql .= ' a.fk_soc, a.fk_contact, a.fk_element, a.elementtype, a.fk_project,'; $sql .= ' ca.code, ca.libelle as type_label, ca.color, ca.type as type_type, ca.picto as type_picto'; $sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; } // We must filter on resource table @@ -584,7 +584,7 @@ if ($resourceid > 0) { if ($pid) { $sql .= " AND a.fk_project = ".((int) $pid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".((int) $user->id).")"; } if ($socid > 0) { @@ -802,7 +802,7 @@ $currentdaytoshow = $firstdaytoshow; echo '
'; while ($currentdaytoshow < $lastdaytoshow) { - echo ''; + echo '
'; echo ''; echo '
'; @@ -829,7 +829,7 @@ while ($currentdaytoshow < $lastdaytoshow) { // Filter on days print img_picto('', 'clock', 'class="fawidth30 inline-block paddingleft"'); print ''.$langs->trans("DaysOfWeek").''; - print "\n".'
'; + print "\n".'
'; print ''; if (empty($conf->dol_use_jmobile)) { print ' - '; diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index be96a22e41a..38dd976f53c 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -682,7 +682,7 @@ if ($object->id > 0) { print "
"; } - print '
'; + print '
'; print '
'; $boxstat = ''; @@ -1341,7 +1341,7 @@ if ($object->id > 0) { print $hookmanager->resPrint; } - print '
'; + print ''; print '
'; print dol_get_fiche_end(); diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 52f6e675c5f..57a88bef157 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -82,14 +82,14 @@ if ($type == "f") { $sql = "SELECT s.rowid, s.nom as name, st.libelle as stcomm"; $sql .= ", p.rowid as cidp, p.name, p.firstname, p.email, p.phone"; $sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st,"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; } $sql .= " ".MAIN_DB_PREFIX."socpeople as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; $sql .= " WHERE s.fk_stcomm = st.id"; $sql .= " AND p.entity IN (".getEntity('socpeople').")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($type == "c") { diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 2603b520c77..aad02f2bd07 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -129,13 +129,13 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.entity IN (".getEntity($propalstatic->element).")"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut = ".Propal::STATUS_DRAFT; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -226,13 +226,13 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.entity IN (".getEntity($supplierproposalstatic->element).")"; $sql .= " AND p.fk_statut = ".SupplierProposal::STATUS_DRAFT; $sql .= " AND p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -322,13 +322,13 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.entity IN (".getEntity($orderstatic->element).")"; $sql .= " AND c.fk_statut = ".Commande::STATUS_DRAFT; $sql .= " AND c.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -419,13 +419,13 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE cf.entity IN (".getEntity($supplierorderstatic->element).")"; $sql .= " AND cf.fk_statut = ".CommandeFournisseur::STATUS_DRAFT; $sql .= " AND cf.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -511,7 +511,7 @@ if (!empty($conf->ficheinter->enabled)) { $sql = "SELECT f.rowid, f.ref, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; @@ -520,7 +520,7 @@ if (!empty($conf->ficheinter->enabled)) { if ($socid) { $sql .= " AND f.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -548,7 +548,6 @@ if (!empty($conf->ficheinter->enabled)) { } print '
'; -print '
'; /* * Last modified customers or prospects @@ -561,12 +560,12 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire) { $sql .= ", s.canvas"; $sql .= ", s.datec, s.tms"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.entity IN (".getEntity($companystatic->element).")"; $sql .= " AND s.client IN (".Societe::CUSTOMER.", ".Societe::PROSPECT.", ".Societe::CUSTOMER_AND_PROSPECT.")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -657,12 +656,12 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S $sql .= ", s.canvas"; $sql .= ", s.datec as dc, s.tms as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.entity IN (".getEntity($companystatic->element).")"; $sql .= " AND s.fournisseur = ".Societe::SUPPLIER; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -762,13 +761,13 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) { // T $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."product as p"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.entity IN (".getEntity($staticcontrat->element).")"; $sql .= " AND c.fk_soc = s.rowid"; $sql .= " AND c.fk_product = p.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -837,13 +836,13 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.entity IN (".getEntity($propalstatic->element).")"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut = ".Propal::STATUS_VALIDATED; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -953,13 +952,13 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.entity IN (".getEntity($orderstatic->element).")"; $sql .= " AND c.fk_soc = s.rowid"; $sql .= " AND c.fk_statut IN (".Commande::STATUS_VALIDATED.", ".Commande::STATUS_SHIPMENTONPROCESS.")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -1057,7 +1056,6 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { } } -print '
'; print '
'; print ''; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 614bedb8268..1ba96690f2a 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -726,7 +726,7 @@ if ($action == 'create') { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'create'); } print ''; diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 2f9ef25af31..cb900f7ac7b 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -776,8 +776,8 @@ class Mailing extends CommonObject global $langs; $langs->load("mailing"); - $labelStatus = $langs->trans($this->statuts[$status]); - $labelStatusShort = $langs->trans($this->statuts[$status]); + $labelStatus = $langs->transnoentitiesnoconv($this->statuts[$status]); + $labelStatusShort = $langs->transnoentitiesnoconv($this->statuts[$status]); $statusType = 'status'.$status; if ($status == 2) { @@ -808,16 +808,16 @@ class Mailing extends CommonObject $labelStatus = array(); $labelStatusShort = array(); - $labelStatus[-1] = $langs->trans('MailingStatusError'); - $labelStatus[0] = $langs->trans('MailingStatusNotSent'); - $labelStatus[1] = $langs->trans('MailingStatusSent'); - $labelStatus[2] = $langs->trans('MailingStatusRead'); - $labelStatus[3] = $langs->trans('MailingStatusNotContact'); - $labelStatusShort[-1] = $langs->trans('MailingStatusError'); - $labelStatusShort[0] = $langs->trans('MailingStatusNotSent'); - $labelStatusShort[1] = $langs->trans('MailingStatusSent'); - $labelStatusShort[2] = $langs->trans('MailingStatusRead'); - $labelStatusShort[3] = $langs->trans('MailingStatusNotContact'); + $labelStatus[-1] = $langs->transnoentitiesnoconv('MailingStatusError'); + $labelStatus[0] = $langs->transnoentitiesnoconv('MailingStatusNotSent'); + $labelStatus[1] = $langs->transnoentitiesnoconv('MailingStatusSent'); + $labelStatus[2] = $langs->transnoentitiesnoconv('MailingStatusRead'); + $labelStatus[3] = $langs->transnoentitiesnoconv('MailingStatusNotContact'); + $labelStatusShort[-1] = $langs->transnoentitiesnoconv('MailingStatusError'); + $labelStatusShort[0] = $langs->transnoentitiesnoconv('MailingStatusNotSent'); + $labelStatusShort[1] = $langs->transnoentitiesnoconv('MailingStatusSent'); + $labelStatusShort[2] = $langs->transnoentitiesnoconv('MailingStatusRead'); + $labelStatusShort[3] = $langs->transnoentitiesnoconv('MailingStatusNotContact'); $statusType = 'status'.$status; if ($status == -1) { diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 66860669e2d..bd1a83e9959 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -141,8 +141,7 @@ if (is_resource($handle)) { print "
"; -//print ''; -print '
'; +print '
'; /* @@ -193,7 +192,7 @@ if ($result) { } -print '
'; +print ''; $parameters = array('user' => $user); diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 647412e113a..0c5dad703c3 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -715,7 +715,6 @@ if (empty($reshook)) { if (!$error) { $db->commit(); - if ($deposit && empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $deposit->fetch($deposit->id); // Reload to get new records $outputlangs = $langs; @@ -1610,8 +1609,6 @@ if ($action == 'create') { } } - $object = new Propal($db); - print ''; print ''; print ''; @@ -2253,6 +2250,8 @@ if ($action == 'create') { $absolute_discount = price2num($absolute_discount, 'MT'); $absolute_creditnote = price2num($absolute_creditnote, 'MT'); + $caneditfield = ($object->statut != Propal::STATUS_SIGNED && $object->statut != Propal::STATUS_BILLED); + $thirdparty = $soc; $discount_type = 0; $backtopage = urlencode($_SERVER["PHP_SELF"].'?id='.$object->id); @@ -2266,12 +2265,12 @@ if ($action == 'create') { print ''; - if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { + if ($action != 'editdate' && $usercancreate && $caneditfield) { print ''; } print '
'; print $langs->trans('DatePropal'); print 'id.'">'.img_edit($langs->trans('SetDate'), 1).'
'; print ''; - if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdate' && $usercancreate) { + if ($action == 'editdate' && $usercancreate && $caneditfield) { print ''; print ''; print ''; @@ -2293,12 +2292,12 @@ if ($action == 'create') { print ''; - if ($action != 'editecheance' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { + if ($action != 'editecheance' && $usercancreate && $caneditfield) { print ''; } print '
'; print $langs->trans('DateEndPropal'); print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).'
'; print ''; - if ($object->statut == Propal::STATUS_DRAFT && $action == 'editecheance' && $usercancreate) { + if ($action == 'editecheance' && $usercancreate && $caneditfield) { print ''; print ''; print ''; @@ -2323,12 +2322,12 @@ if ($action == 'create') { print ''; - if ($action != 'editconditions' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { + if ($action != 'editconditions' && $usercancreate && $caneditfield) { print ''; } print '
'; print $langs->trans('PaymentConditionsShort'); print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetConditions'), 1).'
'; print ''; - if ($object->statut == Propal::STATUS_DRAFT && $action == 'editconditions' && $usercancreate) { + if ($action == 'editconditions' && $usercancreate && $caneditfield) { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent); } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent); @@ -2342,12 +2341,12 @@ if ($action == 'create') { print ''; - if ($action != 'editmode' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { + if ($action != 'editmode' && $usercancreate && $caneditfield) { print ''; } print '
'; print $langs->trans('PaymentMode'); print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetMode'), 1).'
'; print ''; - if ($object->statut == Propal::STATUS_DRAFT && $action == 'editmode' && $usercancreate) { + if ($action == 'editmode' && $usercancreate && $caneditfield) { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none'); @@ -2357,26 +2356,27 @@ if ($action == 'create') { // Delivery date $langs->load('deliveries'); print ''; - print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate, 'datepicker'); + print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate && $caneditfield, 'datepicker'); print ''; - print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate, 'datepicker'); + print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate && $caneditfield, 'datepicker'); print ''; print ''; // Delivery delay print ''; print ''; - if ($action != 'editavailability' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { + if ($action != 'editavailability' && $usercancreate && $caneditfield) { print ''; } print '
'; - print $langs->trans('AvailabilityPeriod'); if (!empty($conf->commande->enabled)) { - print ' ('.$langs->trans('AfterOrder').')'; + print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod').' ('.$langs->trans('AfterOrder').')'); + } else { + print $langs->trans('AvailabilityPeriod'); } print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1).'
'; print ''; - if ($object->statut == Propal::STATUS_DRAFT && $action == 'editavailability' && $usercancreate) { + if ($action == 'editavailability' && $usercancreate && $caneditfield) { $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1); } else { $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'none', 1); @@ -2391,12 +2391,12 @@ if ($action == 'create') { print ''; - if ($action != 'editshippingmethod' && $usercancreate) { + if ($action != 'editshippingmethod' && $usercancreate && $caneditfield) { print ''; } print '
'; print $langs->trans('SendingMethod'); print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).'
'; print ''; - if ($action == 'editshippingmethod' && $usercancreate) { + if ($action == 'editshippingmethod' && $usercancreate && $caneditfield) { $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1); } else { $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'none'); @@ -2428,12 +2428,12 @@ if ($action == 'create') { print ''; - if ($action != 'editdemandreason' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { + if ($action != 'editdemandreason' && $usercancreate) { print ''; } print '
'; print $langs->trans('Source'); print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1).'
'; print ''; - if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdemandreason' && $usercancreate) { + if ($action == 'editdemandreason' && $usercancreate) { $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1); } else { $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'none'); @@ -2530,13 +2530,13 @@ if ($action == 'create') { if ($totalWeight) { print ''.$langs->trans("CalculatedWeight").''; print ''; - print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); + print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no', 0); print ''; } if ($totalVolume) { print ''.$langs->trans("CalculatedVolume").''; print ''; - print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no'); + print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no', 0); print ''; } @@ -2546,7 +2546,7 @@ if ($action == 'create') { print '
'; print $langs->trans('IncotermLabel'); print ''; - if ($usercancreate) { + if ($action != 'editincoterm' && $usercancreate && $caneditfield) { print ''.img_edit().''; } else { print ' '; @@ -2554,10 +2554,10 @@ if ($action == 'create') { print '
'; print ''; print ''; - if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); - } else { + if ($action == 'editincoterm' && $usercancreate && $caneditfield) { print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); + } else { + print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); } print ''; } @@ -2569,7 +2569,6 @@ if ($action == 'create') { print ''; print '
'; - print '
'; print '
'; print ''; @@ -2628,7 +2627,6 @@ if ($action == 'create') { $formmargin->displayMarginInfos($object); } - print ''; print ''; print ''; @@ -2861,14 +2859,14 @@ if ($action == 'create') { print showOnlineSignatureUrl('proposal', $object->ref).'
'; } - print '
'; + print '
'; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'propal', $socid, 1); - print '
'; + print ''; } // Presend form diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index bcb8fe07e24..f062fa78b72 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2570,8 +2570,13 @@ class Propal extends CommonObject $outputlangs->setDefaultLang($newlang); } + // PDF + $hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0); + $hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0); + $hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0); + //$ret=$object->fetch($id); // Reload to get new records - $this->generateDocument($modelpdf, $outputlangs); + $this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } if (!$error) { @@ -2658,8 +2663,13 @@ class Propal extends CommonObject $outputlangs->setDefaultLang($newlang); } + // PDF + $hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0); + $hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0); + $hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0); + //$ret=$object->fetch($id); // Reload to get new records - $this->generateDocument($modelpdf, $outputlangs); + $this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } $this->oldcopy = clone $this; @@ -2776,17 +2786,17 @@ class Propal extends CommonObject $sql = "SELECT s.rowid, s.nom as name, s.client,"; $sql .= " p.rowid as propalid, p.fk_statut, p.total_ht, p.ref, p.remise, "; $sql .= " p.datep as dp, p.fin_validite as datelimite"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user"; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.entity IN (".getEntity('propal').")"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut = c.id"; - if (!$user->rights->societe->client->voir && !$socid) { //restriction + if (empty($user->rights->societe->client->voir) && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -3290,7 +3300,7 @@ class Propal extends CommonObject $sql = "SELECT p.rowid, p.ref, p.datec as datec, p.fin_validite as datefin, p.total_ht"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON p.fk_soc = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = " AND"; @@ -3467,7 +3477,7 @@ class Propal extends CommonObject $sql = "SELECT count(p.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index 181e5b545f8..2b8c5d9047d 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -93,7 +93,7 @@ class PropaleStats extends Stats } //$this->where.= " AND p.fk_soc = s.rowid AND p.entity = ".$conf->entity; $this->where .= ($this->where ? ' AND ' : '')."p.entity IN (".getEntity('propal').")"; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($this->socid) { @@ -129,7 +129,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -154,7 +154,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -178,7 +178,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, SUM(p.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -203,7 +203,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, AVG(p.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -226,7 +226,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%Y') as year, COUNT(*) as nb, SUM(".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -252,7 +252,7 @@ class PropaleStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index de2e4a1d64c..e170f873961 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -81,13 +81,13 @@ if (!empty($conf->propal->enabled)) { $sql .= ", s.rowid as socid, s.nom as name, s.client, s.canvas, s.code_client, s.email, s.entity, s.code_compta"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.entity IN (".getEntity($propalstatic->element).")"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut =".Propal::STATUS_DRAFT; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -146,7 +146,6 @@ if (!empty($conf->propal->enabled)) { print ''; print '
'; -print '
'; /* * Last modified proposals @@ -156,7 +155,7 @@ $sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, date_cloture as datec"; $sql .= ", s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.entity IN (".getEntity($propalstatic->element).")"; @@ -165,7 +164,7 @@ $sql .= " AND c.fk_soc = s.rowid"; if ($socid) { $sql .= " AND c.fk_soc = ".((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY c.tms DESC"; @@ -232,13 +231,13 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { $sql .= ", p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity($propalstatic->element).")"; $sql .= " AND p.fk_statut = ".Propal::STATUS_VALIDATED; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -317,12 +316,12 @@ if (! empty($conf->propal->enabled)) $sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as name, s.rowid as socid"; $sql.=" FROM ".MAIN_DB_PREFIX."propal as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (empty($user->rights->societe->client->voir) && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.fk_soc = s.rowid"; $sql.= " AND c.entity = ".$conf->entity; $sql.= " AND c.fk_statut = 1"; if ($socid) $sql.= " AND c.fk_soc = ".((int) $socid); - if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .((int) $user->id); + if (empty($user->rights->societe->client->voir) && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .((int) $user->id); $sql.= " ORDER BY c.rowid DESC"; $resql=$db->query($sql); @@ -392,12 +391,12 @@ if (! empty($conf->propal->enabled)) $sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (empty($user->rights->societe->client->voir) && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.fk_soc = s.rowid"; $sql.= " AND c.entity = ".$conf->entity; $sql.= " AND c.fk_statut = 2 "; if ($socid) $sql.= " AND c.fk_soc = ".((int) $socid); - if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .((int) $user->id); + if (empty($user->rights->societe->client->voir) && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .((int) $user->id); $sql.= " ORDER BY c.rowid DESC"; $resql=$db->query($sql); @@ -456,7 +455,6 @@ if (! empty($conf->propal->enabled)) } */ -print '
'; print '
'; print ''; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 282fbe3ec22..9ff4d1d315d 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -509,7 +509,7 @@ $sql .= ' p.note_public, p.note_private,'; $sql .= ' p.fk_cond_reglement,p.deposit_percent,p.fk_mode_reglement,p.fk_shipping_method,p.fk_input_reason,'; $sql .= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,"; $sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity as user_entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender'; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user"; } if (!empty($search_categ_cus) && $search_categ_cus != '-1') { @@ -547,7 +547,7 @@ $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON p.fk_user_author = u.rowid'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as pr ON pr.rowid = p.fk_projet"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_availability as ava on (ava.rowid = p.fk_availability)"; // We'll need this table joined to the select in order to filter by sale -if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { +if ($search_sale > 0 || (empty($user->rights->societe->client->voir) && !$socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } if ($search_user > 0) { @@ -562,7 +562,7 @@ $sql .= $hookmanager->resPrint; $sql .= ' WHERE p.fk_soc = s.rowid'; $sql .= ' AND p.entity IN ('.getEntity('propal').')'; -if (!$user->rights->societe->client->voir && !$socid) { //restriction +if (empty($user->rights->societe->client->voir) && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index c1975e309f5..36d9af8f9b4 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -111,7 +111,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenamenb = $dir.'/proposalsnbinyear-'.$user->id.'-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsnbinyear-'.$user->id.'-'.$year.'.png'; } else { @@ -147,7 +147,7 @@ if (!$mesg) { $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, 0); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenameamount = $dir.'/proposalsamountinyear-'.$user->id.'-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsamountinyear-'.$user->id.'-'.$year.'.png'; } else { @@ -182,7 +182,7 @@ if (!$mesg) { $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); $fileurl_avg = ''; -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') { $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; @@ -347,7 +347,7 @@ foreach ($data as $val) { print '
'; print '
'; -print '
'; +print '
'; // Show graphs @@ -364,7 +364,7 @@ if ($mesg) { print ''; -print '
'; +print ''; print '
'; diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index 829effed6a2..adc9de9339e 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -30,7 +30,7 @@ if (empty($conf) || !is_object($conf)) { } -print "\n"; +print "\n"; global $user; diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index d2f60c36212..1e1caa796b5 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -80,13 +80,13 @@ if (!empty($conf->propal->enabled)) { $sql = "SELECT count(*) as cc, st.libelle, st.picto, st.id"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st "; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.fk_stcomm = st.id"; $sql .= " AND s.client IN (2, 3)"; $sql .= " AND s.entity IN (".getEntity($companystatic->element).")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " GROUP BY st.id"; @@ -122,13 +122,13 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { $sql = "SELECT p.rowid, p.ref, p.price, s.nom as sname"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.fk_statut = 0"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('propal').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -163,8 +163,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { } -//print ''; -print '
'; +print '
'; /* @@ -183,14 +182,14 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."c_propalst as c"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut = c.id"; $sql .= " AND p.fk_statut = 1"; $sql .= " AND p.entity IN (".getEntity('propal').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -244,12 +243,12 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { */ $sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.fk_stcomm = 1"; $sql .= " AND s.entity IN (".getEntity($companystatic->element).")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY s.tms ASC"; @@ -280,8 +279,7 @@ if ($resql) { } -//print ''; -print '
'; +print ''; // End of page llxFooter(); diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index bcb0fefa7b8..b2900e65575 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -250,7 +250,6 @@ if ($socid > 0) { if ($isCustomer) { print ''; // class="fichehalfleft" print '
'; - print '
'; print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } @@ -298,7 +297,6 @@ if ($socid > 0) { } if ($isCustomer) { - print '
'; // class="ficheaddleft" print '
'; // class="fichehalfright" print ''; // class="fichecenter" } diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index e9419480ed6..4404f9758a6 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -532,7 +532,6 @@ if ($socid > 0) { if ($isCustomer) { print ''; // class="fichehalfleft" print '
'; - print '
'; print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } @@ -667,7 +666,6 @@ if ($socid > 0) { } if ($isCustomer) { - print '
'; // class="ficheaddleft" print '
'; // class="fichehalfright" print ''; // class="fichecenter" } @@ -843,7 +841,6 @@ if ($socid > 0) { if ($isCustomer) { print ''; // class="fichehalfleft" print '
'; - print '
'; print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } @@ -1000,7 +997,6 @@ if ($socid > 0) { } if ($isCustomer) { - print '
'; // class="ficheaddleft" print '
'; // class="fichehalfright" print ''; // class="fichecenter" } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 80782a53a81..6429338c3d1 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1548,13 +1548,13 @@ if ($action == 'create' && $usercancreate) { $deposit_percent = (!empty($objectsrc->deposit_percent) ? $objectsrc->deposit_percent : (!empty($soc->deposit_percent) ? $soc->deposit_percent : null)); $mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); $fk_account = (!empty($objectsrc->fk_account) ? $objectsrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0)); - $availability_id = (!empty($objectsrc->availability_id) ? $objectsrc->availability_id : (!empty($soc->availability_id) ? $soc->availability_id : 0)); + $availability_id = (!empty($objectsrc->availability_id) ? $objectsrc->availability_id : 0); $shipping_method_id = (!empty($objectsrc->shipping_method_id) ? $objectsrc->shipping_method_id : (!empty($soc->shipping_method_id) ? $soc->shipping_method_id : 0)); $warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0)); $demand_reason_id = (!empty($objectsrc->demand_reason_id) ? $objectsrc->demand_reason_id : (!empty($soc->demand_reason_id) ? $soc->demand_reason_id : 0)); $remise_percent = (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_percent) ? $soc->remise_percent : 0)); $remise_absolue = (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0)); - $dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER) ?-1 : ''; + $dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER) ? -1 : ''; $date_delivery = (!empty($objectsrc->delivery_date) ? $objectsrc->delivery_date : ''); if (empty($date_delivery)) { @@ -1581,7 +1581,7 @@ if ($action == 'create' && $usercancreate) { $deposit_percent = $soc->deposit_percent; $mode_reglement_id = $soc->mode_reglement_id; $fk_account = $soc->fk_account; - $availability_id = $soc->availability_id; + $availability_id = 0; $shipping_method_id = $soc->shipping_method_id; $warehouse_id = $soc->warehouse_id; $demand_reason_id = $soc->demand_reason_id; @@ -1701,13 +1701,19 @@ if ($action == 'create' && $usercancreate) { print "\n"; print ''; + // Delivery delay + print ''.$langs->trans('AvailabilityPeriod').''; + print img_picto('', 'clock', 'class="pictofixedwidth"'); + $form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx'); + print ''; + // Terms of the settlement print ''.$langs->trans('PaymentConditionsShort').''; print img_picto('', 'paiment'); $form->select_conditions_paiements($cond_reglement_id, 'cond_reglement_id', 1, 1, 0, '', $deposit_percent); print ''; - // Mode de reglement + // Payment mode print ''.$langs->trans('PaymentMode').''; print img_picto('', 'bank', 'class="pictofixedwidth"'); $form->select_types_paiements($mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx'); @@ -1720,12 +1726,6 @@ if ($action == 'create' && $usercancreate) { print ''; } - // Delivery delay - print ''.$langs->trans('AvailabilityPeriod').''; - print img_picto('', 'clock', 'class="pictofixedwidth"'); - $form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx'); - print ''; - // Shipping Method if (!empty($conf->expedition->enabled)) { print ''.$langs->trans('SendingMethod').''; @@ -1792,7 +1792,7 @@ if ($action == 'create' && $usercancreate) { } }; - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } // Template to use by default @@ -2307,7 +2307,7 @@ if ($action == 'create' && $usercancreate) { print '
'; } else { print $object->date ? dol_print_date($object->date, 'day') : ' '; - if ($object->hasDelay()) { + if ($object->hasDelay() && empty($object->delivery_date)) { // If there is a delivery date planned, warning should be on this date print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); } } @@ -2335,6 +2335,18 @@ if ($action == 'create' && $usercancreate) { print ''; print ''; + // Delivery delay + print ''; + $editenable = $usercancreate; + print $form->editfieldkey("AvailabilityPeriod", 'availability', '', $object, $editenable); + print ''; + if ($action == 'editavailability') { + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1); + } else { + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'none', 1); + } + print ''; + // Shipping Method if (!empty($conf->expedition->enabled)) { print ''; @@ -2368,6 +2380,18 @@ if ($action == 'create' && $usercancreate) { print ''; } + // Source reason (why we have an order) + print ''; + $editenable = $usercancreate; + print $form->editfieldkey("Source", 'demandreason', '', $object, $editenable); + print ''; + if ($action == 'editdemandreason') { + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1); + } else { + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'none'); + } + print ''; + // Terms of payment print ''; $editenable = $usercancreate; @@ -2433,30 +2457,6 @@ if ($action == 'create' && $usercancreate) { } } - // Delivery delay - print ''; - $editenable = $usercancreate; - print $form->editfieldkey("AvailabilityPeriod", 'availability', '', $object, $editenable); - print ''; - if ($action == 'editavailability') { - $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1); - } else { - $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'none', 1); - } - print ''; - - // Source reason (why we have an ordrer) - print ''; - $editenable = $usercancreate; - print $form->editfieldkey("Channel", 'demandreason', '', $object, $editenable); - print ''; - if ($action == 'editdemandreason') { - $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1); - } else { - $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'none'); - } - print ''; - // TODO Order mode (how we receive order). Not yet implemented /* print ''; @@ -2526,7 +2526,6 @@ if ($action == 'create' && $usercancreate) { print ''; print '
'; - print '
'; print '
'; print ''; @@ -2583,7 +2582,6 @@ if ($action == 'create' && $usercancreate) { } - print ''; print ''; print ''; // Close fichecenter @@ -2822,14 +2820,14 @@ if ($action == 'create' && $usercancreate) { print showOnlinePaymentUrl('order', $object->ref).'
'; } - print '
'; + print '
'; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'order', $socid, 1); - print '
'; + print ''; } // Presend form diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 0887c22a8f3..6d0b5a5d297 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -981,6 +981,7 @@ class Orders extends DolibarrApi if (!DolibarrApiAccess::$user->rights->expedition->lire) { throw new RestException(401); } + $obj_ret = array(); $sql = "SELECT e.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; $sql .= " JOIN ".MAIN_DB_PREFIX."expeditiondet as edet"; @@ -1054,7 +1055,6 @@ class Orders extends DolibarrApi if ($result <= 0) { throw new RestException(500, 'Error on creating expedition lines:'.$this->db->lasterror()); } - $i++; } return $shipment->id; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 6ae091bc031..e3cb73d205c 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2688,16 +2688,16 @@ class Commande extends CommonOrder $sql = "SELECT s.rowid, s.nom as name, s.client,"; $sql .= " c.rowid as cid, c.ref"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user"; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.entity IN (".getEntity('commande').")"; $sql .= " AND c.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { //restriction + if (empty($user->rights->societe->client->voir) && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -3516,7 +3516,7 @@ class Commande extends CommonOrder $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.date_livraison as delivery_date, c.fk_statut, c.total_ht"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON c.fk_soc = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = " AND"; @@ -3926,7 +3926,7 @@ class Commande extends CommonOrder $sql = "SELECT count(co.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as co"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON co.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 8ac89d5a18f..d02d56175ff 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -93,7 +93,7 @@ class CommandeStats extends Stats //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where .= ($this->where ? ' AND ' : '').'c.entity IN ('.getEntity('commande').')'; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($this->socid) { @@ -128,7 +128,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -153,7 +153,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -177,7 +177,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%m') as dm, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -202,7 +202,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%m') as dm, AVG(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -225,7 +225,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%Y') as year, COUNT(*) as nb, SUM(c.".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -249,7 +249,7 @@ class CommandeStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 3ecaa0fbee1..96efda7c187 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -77,16 +77,16 @@ $thirdpartystatic = new Societe($db); $sql = "SELECT s.rowid, s.nom as name, s.client, s.town, s.datec, s.datea"; $sql .= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta "; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st, ".MAIN_DB_PREFIX."commande as c"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.fk_stcomm = st.id AND c.fk_soc = s.rowid"; $sql .= " AND s.entity IN (".getEntity('societe').")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if (GETPOST("search_nom")) { diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index a794d79e743..03644fe5690 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -94,7 +94,7 @@ if (!empty($conf->commande->enabled)) { $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -103,7 +103,7 @@ if (!empty($conf->commande->enabled)) { if ($socid) { $sql .= " AND c.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -146,7 +146,7 @@ if (!empty($conf->commande->enabled)) { } -print '
'; +print '
'; $max = 5; @@ -162,7 +162,7 @@ $sql .= ", s.code_client"; $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -171,7 +171,7 @@ $sql .= " AND c.entity IN (".getEntity('commande').")"; if ($socid) { $sql .= " AND c.fk_soc = ".((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY c.tms DESC"; @@ -246,7 +246,7 @@ if (!empty($conf->commande->enabled)) { $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -255,7 +255,7 @@ if (!empty($conf->commande->enabled)) { if ($socid) { $sql .= " AND c.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY c.rowid DESC"; @@ -335,7 +335,7 @@ if (!empty($conf->commande->enabled)) { $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -344,7 +344,7 @@ if (!empty($conf->commande->enabled)) { if ($socid) { $sql .= " AND c.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY c.rowid DESC"; @@ -414,7 +414,7 @@ if (!empty($conf->commande->enabled)) { } -print '
'; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardOrders', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 216e1aa0bfb..736ca396a89 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -465,7 +465,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = c.fk_projet"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON c.fk_user_author = u.rowid'; // We'll need this table joined to the select in order to filter by sale -if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { +if ($search_sale > 0 || (empty($user->rights->societe->client->voir) && !$socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } if ($search_user > 0) { @@ -486,7 +486,7 @@ if ($search_product_category > 0) { if ($socid > 0) { $sql .= ' AND s.rowid = '.((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($search_ref) { diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index a9c38e1531c..8a3a6a142aa 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -42,7 +42,7 @@ $mode = GETPOSTISSET("mode") ? GETPOST("mode", 'aZ09') : 'customer'; if ($mode == 'customer' && !$user->rights->commande->lire) { accessforbidden(); } -if ($mode == 'supplier' && !$user->rights->fournisseur->commande->lire) { +if ($mode == 'supplier' && empty($user->rights->fournisseur->commande->lire)) { accessforbidden(); } @@ -112,7 +112,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenamenb = $dir.'/ordersnbinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') { $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$user->id.'-'.$year.'.png'; @@ -158,7 +158,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear); //var_dump($data); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenameamount = $dir.'/ordersamountinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') { $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$user->id.'-'.$year.'.png'; @@ -202,7 +202,7 @@ if (!$mesg) { $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') { $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; @@ -401,7 +401,7 @@ print '
'; print '
'; -print '
'; +print '
'; // Show graphs @@ -418,7 +418,7 @@ if ($mesg) { print ''; -print '
'; +print ''; print '
'; print dol_get_fiche_end(); diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 211702059cb..aba881a63c6 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) { exit; } -print "\n"; +print "\n"; global $user; global $noMoreLinkedObjectBlockAfter; diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index fddf7a2879f..8abbdaa0dd3 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -578,7 +578,7 @@ print '
'; foreach ($listofchoices as $choice => $val) { if (empty($val['enabled'])) { - continue; // list not qualified + continue; // list not qualified } $disabled = ''; if (empty($val['perms'])) { diff --git a/htdocs/compta/bank/account_statement_document.php b/htdocs/compta/bank/account_statement_document.php index 03209ad7673..0a979e01d39 100644 --- a/htdocs/compta/bank/account_statement_document.php +++ b/htdocs/compta/bank/account_statement_document.php @@ -120,6 +120,8 @@ if (GETPOST("rel") == 'prev') { $found = true; } +$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php + /* * Actions diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index d771b307234..36a9d17315a 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -448,9 +448,9 @@ if ($result < 0) { print '
'; // do not use class="center" here, it will have no effect for the js graph inside. print $show1; - print '
'; // do not use class="center" here, it will have no effect for the js graph inside. + print '
'; // do not use class="center" here, it will have no effect for the js graph inside. print $show2; - print '
'; + print ''; print '
'; } diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php index 94ae0134a9d..6edee79f86b 100644 --- a/htdocs/compta/bank/bilan.php +++ b/htdocs/compta/bank/bilan.php @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'categories')); -if (!$user->rights->banque->lire) { +if (empty($user->rights->banque->lire)) { accessforbidden(); } diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 32b0ec5cb8a..c543b9edd9b 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -463,7 +463,7 @@ if ($action == 'create') { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } print ''; @@ -698,7 +698,6 @@ if ($action == 'create') { print ''; print '
'; - print '
'; print '
'; print ''; @@ -795,7 +794,6 @@ if ($action == 'create') { print '
'; } - print '
'; print '
'; print ''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 8396979e247..685c78f5f1b 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1125,12 +1125,12 @@ class Account extends CommonObject $langs->load('banks'); if ($status == self::STATUS_OPEN) { - $label = $langs->trans("StatusAccountOpened"); - $labelshort = $langs->trans("StatusAccountOpened"); + $label = $langs->transnoentitiesnoconv("StatusAccountOpened"); + $labelshort = $langs->transnoentitiesnoconv("StatusAccountOpened"); $statusType = 'status4'; } else { - $label = $langs->trans("StatusAccountClosed"); - $labelshort = $langs->trans("StatusAccountClosed"); + $label = $langs->transnoentitiesnoconv("StatusAccountClosed"); + $labelshort = $langs->transnoentitiesnoconv("StatusAccountClosed"); $statusType = 'status5'; } diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index ec46002b031..7dce00005f3 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -74,6 +74,8 @@ if ($id > 0 || !empty($ref)) { $result = restrictedArea($user, 'banque', $object->id, 'bank_account', '', ''); +$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php + /* * Actions diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index c61f6e50bff..e8514c1e96e 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -39,7 +39,7 @@ if ($user->socid) { $socid = $user->socid; } $result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype); -if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) { +if (empty($user->rights->banque->lire) && !$user->rights->banque->consolidate) { accessforbidden(); } diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index 05aed6a215e..5567678c366 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -67,7 +67,7 @@ if ($user->socid) { $socid = $user->socid; } $result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype); -if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) { +if (empty($user->rights->banque->lire) && !$user->rights->banque->consolidate) { accessforbidden(); } diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index cd6e6cfd365..ea656141639 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -506,6 +506,8 @@ print "\n"; $totalarray = array(); $totalarray['nbfield'] = 0; +$totalarray['val'] = array('balance'=>0); +$total = array(); $found = 0; $i = 0; $lastcurrencycode = ''; @@ -714,7 +716,11 @@ foreach ($accounts as $key => $type) { print ''; - $total[$objecttmp->currency_code] += $solde; + if (empty($total[$objecttmp->currency_code])) { + $total[$objecttmp->currency_code] = $solde; + } else { + $total[$objecttmp->currency_code] += $solde; + } $i++; } diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 3b078698728..d4245594447 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -540,7 +540,7 @@ if ($id) { array('type' => 'date', 'name' => 'clone_date_value', 'label' => $langs->trans("DateValue"), 'value' => -1), array('type' => 'other', 'tdclass'=>'fieldrequired', 'name' => 'clone_accountid', 'label' => $langs->trans("BankAccount"), 'value' => $form->select_comptes($object->fk_account, "accountid", 0, '', 1, '', 0, 'minwidth200', 1)), array('type' => 'text', 'name' => 'clone_amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount)), - array('type' => 'select', 'name' => 'clone_sens', 'label' => $langs->trans("Sens") . ' ' . $set_value_help, 'values' => $sensarray, 'default' => $object->sens), + array('type' => 'select', 'name' => 'clone_sens', 'label' => $langs->trans("Sens").' '.$set_value_help, 'values' => $sensarray, 'default' => $object->sens), ); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneVariousPayment', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 350); diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index 5f55f4c2559..ad199caaf5a 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -69,6 +69,9 @@ $object->fetch($id, $ref); $upload_dir = $conf->bank->dir_output.'/'.dol_sanitizeFileName($object->id); $modulepart = 'banque'; +$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php + + /* * Actions diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index eebe3e4832f..c7b74abfc39 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -647,9 +647,10 @@ if (empty($action) || $action == "view" || $action == "close") { print ''; print ''; - print '
'; + print '
>'; print '
'; - print ''; + + print '
'; print '
'; print $langs->trans("DateCreationShort"); @@ -667,7 +668,7 @@ if (empty($action) || $action == "view" || $action == "close") { } print "
\n"; - print '
'; + print '
'; print '
'; diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index dbaaf882bfb..89781fcb211 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -22,27 +22,6 @@ * \brief List page for cashcontrol */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification - require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -81,7 +60,7 @@ $pagenext = $page + 1; // Initialize technical objects $object = new CashControl($db); $extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->monmodule->dir_output.'/temp/massgeneration/'.$user->id; +//$diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('cashcontrol')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels @@ -141,16 +120,16 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); -$permissiontoread = ($user->rights->cashdesk->run || $user->rights->takepos->run); -$permissiontoadd = ($user->rights->cashdesk->run || $user->rights->takepos->run); -$permissiontodelete = ($user->rights->cashdesk->run || $user->rights->takepos->run); +$permissiontoread = (!empty($user->rights->cashdesk->run) || !empty($user->rights->takepos->run)); +$permissiontoadd = (!empty($user->rights->cashdesk->run) || !empty($user->rights->takepos->run)); +$permissiontodelete = (!empty($user->rights->cashdesk->run) || !empty($user->rights->takepos->run)); // Security check if ($user->socid > 0) { // Protection if external user //$socid = $user->socid; accessforbidden(); } -if (!$user->rights->cashdesk->run && !$user->rights->takepos->run) { +if (empty($user->rights->cashdesk->run) && empty($user->rights->takepos->run)) { accessforbidden(); } @@ -223,7 +202,7 @@ $sql .= $object->getFieldList('t'); // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } // Add fields from hooks @@ -341,7 +320,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs'); +llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'classforhorizontalscrolloftabs'); $arrayofselected = is_array($toselect) ? $toselect : array(); @@ -578,7 +557,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index 27f3b974a79..5308c8df1d6 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -378,10 +378,10 @@ class CashControl extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[0] = $langs->trans('Draft'); - $this->labelStatus[1] = $langs->trans('Closed'); - $this->labelStatusShort[0] = $langs->trans('Draft'); - $this->labelStatusShort[1] = $langs->trans('Closed'); + $this->labelStatus[0] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[1] = $langs->transnoentitiesnoconv('Closed'); + $this->labelStatusShort[0] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[1] = $langs->transnoentitiesnoconv('Closed'); } $statusType = 'status0'; diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 504e5638abc..b39364690a6 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -94,16 +94,16 @@ if ($mode == 'search') { $sql = "SELECT s.rowid, s.nom as name, s.client, s.town, s.datec, s.datea"; $sql .= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta "; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.fk_stcomm = st.id AND s.client in (1, 3)"; $sql .= " AND s.entity IN (".getEntity('societe').")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if (dol_strlen($stcomm)) { diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index cdb4b5f0f0f..2a16d6e4f49 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -42,12 +42,6 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -// Security check -if ($user->socid) { - $socid = $user->socid; -} -$result = restrictedArea($user, 'deplacement', $id, ''); - // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -74,6 +68,14 @@ $object->fetch($id, $ref); $upload_dir = $conf->deplacement->dir_output.'/'.dol_sanitizeFileName($object->ref); $modulepart = 'trip'; +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'deplacement', $id, ''); + +$permissiontoadd = $user->rights->deplacement->creer; // Used by the include of actions_dellink.inc.php + /* * Actions diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 12351032b53..d588b7bff80 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -141,7 +141,7 @@ print ''; -print '
'; +print '
'; $max = 10; @@ -150,7 +150,7 @@ $langs->load("boxes"); $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut"; $sql .= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u"; -if (!$user->rights->societe->client->voir && !$user->socid) { +if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE u.rowid = d.fk_user"; @@ -158,7 +158,7 @@ $sql .= " AND d.entity = ".$conf->entity; if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) { $sql .= ' AND d.fk_user IN ('.$db->sanitize(join(',', $childids)).')'; } -if (!$user->rights->societe->client->voir && !$user->socid) { +if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -212,7 +212,7 @@ if ($result) { } -print '
'; +print ''; // End of page llxFooter(); diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 428eacbc93a..e7593406ad6 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -96,7 +96,7 @@ $sql .= " u.lastname, u.firstname"; // Qui $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= ", ".MAIN_DB_PREFIX."deplacement as d"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON d.fk_soc = s.rowid"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; } $sql .= " WHERE d.fk_user = u.rowid"; @@ -104,7 +104,7 @@ $sql .= " AND d.entity = ".$conf->entity; if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) { $sql .= ' AND d.fk_user IN ('.$db->sanitize(join(',', $childids)).')'; } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND (sc.fk_user = ".((int) $user->id)." OR d.fk_soc IS NULL) "; } if ($socid) { diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index edc590119ef..8e4860bd2f2 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -163,7 +163,7 @@ if (!$mesg) { $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') { $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; @@ -302,7 +302,7 @@ foreach ($data as $val) { print ''; print ''; -print '
'; +print '
'; // Show graphs @@ -319,7 +319,7 @@ if ($mesg) { print ''; -print '
'; +print ''; print '
'; diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 28143d0340a..fe534e3dd82 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -1443,7 +1443,6 @@ if ($action == 'create') { print ''; print '
'; - print '
'; print '
'; @@ -1591,7 +1590,6 @@ if ($action == 'create') { print '
'; } - print '
'; print '
'; print ''; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 81e242c242d..103225abda4 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2846,6 +2846,16 @@ if (empty($reshook)) { * View */ +if (empty($object->id)) { + llxHeader(); + $head = facture_prepare_head($object); + $langs->load('errors'); + echo dol_get_fiche_head($head, 'compta', $langs->trans("InvoiceCustomer"), -1, 'bill'), + '
' . $langs->trans("ErrorRecordNotFound") . '
'; + llxFooter(); + exit; +} + $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); @@ -3662,7 +3672,7 @@ if ($action == 'create') { } }; - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } // Template to use by default @@ -3868,6 +3878,15 @@ if ($action == 'create') { // $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); $resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); + // Multicurrency + if (!empty($conf->multicurrency->enabled)) { + $multicurrency_totalpaye = $object->getSommePaiement(1); + $multicurrency_totalcreditnotes = $object->getSumCreditNotesUsed(1); + $multicurrency_totaldeposits = $object->getSumDepositsUsed(1); + $multicurrency_resteapayer = price2num($object->multicurrency_total_ttc - $multicurrency_totalpaye - $multicurrency_totalcreditnotes - $multicurrency_totaldeposits, 'MT'); + $resteapayer = price2num($multicurrency_resteapayer / $object->multicurrency_tx, 'MT'); + } + if ($object->paye) { $resteapayer = 0; } @@ -4095,6 +4114,8 @@ if ($action == 'create') { $i++; $close[$i]['code'] = 'badcustomer'; $i++; + $close[$i]['code'] = 'bankcharge'; + $i++; $close[$i]['code'] = 'other'; $i++; // Help @@ -4103,6 +4124,8 @@ if ($action == 'create') { $i++; $close[$i]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); $i++; + $close[$i]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBankChargeDesc"); + $i++; $close[$i]['label'] = $langs->trans("Other"); $i++; // Texte @@ -4111,6 +4134,8 @@ if ($action == 'create') { $i++; $close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1); $i++; + $close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBankCharge", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1); + $i++; $close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("Other"), $close[$i]['label'], 1); $i++; // arrayreasons[code]=reason @@ -4636,7 +4661,6 @@ if ($action == 'create') { print ''; print '
'; - print '
'; print ''."\n"; print ''; @@ -5198,7 +5222,6 @@ if ($action == 'create') { $formmargin->displayMarginInfos($object); } - print ''; print ''; print ''; @@ -5609,14 +5632,14 @@ if ($action == 'create') { print showOnlinePaymentUrl('invoice', $object->ref).'
'; } - print '
'; + print '
'; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'invoice', $socid, 1); - print '
'; + print ''; } diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 92615658a58..100334e046a 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -126,8 +126,8 @@ class FactureRec extends CommonInvoice public $suspended; // status - public $auto_validate; // 0 to create in draft, 1 to create and validate the new invoice - public $generate_pdf; // 1 to generate PDF on invoice generation (default) + public $auto_validate; // 0 to create in draft, 1 to create and validate the new invoice + public $generate_pdf; // 1 to generate PDF on invoice generation (default) /** * @var int 1 if status is draft @@ -303,8 +303,8 @@ class FactureRec extends CommonInvoice $sql .= ", ".((int) $facsrc->socid); $sql .= ", ".((int) $conf->entity); $sql .= ", '".$this->db->idate($now)."'"; - $sql .= ", ".(!empty($facsrc->amount) ? ((float) $facsrc->amount) : '0'); - $sql .= ", ".(!empty($facsrc->remise) ? ((float) $this->remise) : '0'); + $sql .= ", ".(!empty($facsrc->total_ttc) ? ((float) $facsrc->total_ttc) : '0'); + $sql .= ", ".(!empty($facsrc->remise_absolue) ? ((float) $this->remise_absolue) : '0'); $sql .= ", ".(!empty($this->note_private) ? ("'".$this->db->escape($this->note_private)."'") : "NULL"); $sql .= ", ".(!empty($this->note_public) ? ("'".$this->db->escape($this->note_public)."'") : "NULL"); $sql .= ", ".(!empty($this->model_pdf) ? ("'".$this->db->escape($this->model_pdf)."'") : "NULL"); @@ -712,12 +712,12 @@ class FactureRec extends CommonInvoice //$line->code_ventilation = $objp->fk_code_ventilation; $line->fk_product_fournisseur_price = $objp->fk_product_fournisseur_price; - $line->fk_fournprice = $objp->fk_product_fournisseur_price; // For backward compatibility + $line->fk_fournprice = $objp->fk_product_fournisseur_price; // For backward compatibility $marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $objp->fk_product_fournisseur_price, $objp->pa_ht); $line->buyprice = $marginInfos[0]; - $line->pa_ht = $marginInfos[0]; // For backward compatibility + $line->pa_ht = $marginInfos[0]; // For backward compatibility $line->marge_tx = $marginInfos[1]; $line->marque_tx = $marginInfos[2]; $line->rang = $objp->rang; @@ -1461,56 +1461,55 @@ class FactureRec extends CommonInvoice global $langs; $langs->load('bills'); - $labelStatus = $langs->trans('Active'); + $labelStatus = $langs->transnoentitiesnoconv('Active'); $statusType = 'status0'; //print "$recur,$status,$mode,$alreadypaid,$type"; if ($mode == 0) { - $prefix = ''; if ($recur) { if ($status == self::STATUS_SUSPENDED) { - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { - $labelStatus = $langs->trans('Active'); + $labelStatus = $langs->transnoentitiesnoconv('Active'); } } else { if ($status == self::STATUS_SUSPENDED) { - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { - $labelStatus = $langs->trans("Draft"); + $labelStatus = $langs->transnoentitiesnoconv("Draft"); } } } elseif ($mode == 1) { $prefix = 'Short'; if ($recur) { if ($status == self::STATUS_SUSPENDED) { - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { - $labelStatus = $langs->trans('Active'); + $labelStatus = $langs->transnoentitiesnoconv('Active'); } } else { if ($status == self::STATUS_SUSPENDED) { - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { - $labelStatus = $langs->trans("Draft"); + $labelStatus = $langs->transnoentitiesnoconv("Draft"); } } } elseif ($mode == 2) { if ($recur) { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { $statusType = 'status4'; - $labelStatus = $langs->trans('Active'); + $labelStatus = $langs->transnoentitiesnoconv('Active'); } } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { $statusType = 'status0'; - $labelStatus = $langs->trans('Draft'); + $labelStatus = $langs->transnoentitiesnoconv('Draft'); } } } elseif ($mode == 3) { @@ -1518,18 +1517,18 @@ class FactureRec extends CommonInvoice $prefix = 'Short'; if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { $statusType = 'status4'; - $labelStatus = $langs->trans('Active'); + $labelStatus = $langs->transnoentitiesnoconv('Active'); } } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { $statusType = 'status0'; - $labelStatus = $langs->trans('Draft'); + $labelStatus = $langs->transnoentitiesnoconv('Draft'); } } } elseif ($mode == 4) { @@ -1537,18 +1536,18 @@ class FactureRec extends CommonInvoice if ($recur) { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { $statusType = 'status4'; - $labelStatus = $langs->trans('Active'); + $labelStatus = $langs->transnoentitiesnoconv('Active'); } } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { $statusType = 'status0'; - $labelStatus = $langs->trans('Draft'); + $labelStatus = $langs->transnoentitiesnoconv('Draft'); } } } elseif ($mode == 5 || $mode == 6) { @@ -1559,25 +1558,23 @@ class FactureRec extends CommonInvoice if ($recur) { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { $statusType = 'status4'; - $labelStatus = $langs->trans('Active'); + $labelStatus = $langs->transnoentitiesnoconv('Active'); } } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; - $labelStatus = $langs->trans('Disabled'); + $labelStatus = $langs->transnoentitiesnoconv('Disabled'); } else { $statusType = 'status0'; - $labelStatus = $langs->trans('Draft'); + $labelStatus = $langs->transnoentitiesnoconv('Draft'); } } } - if (empty($labelStatusShort)) { - $labelStatusShort = $labelStatus; - } + $labelStatusShort = $labelStatus; return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } @@ -1933,14 +1930,14 @@ class FactureLigneRec extends CommonInvoiceLine public $fk_product_fournisseur_price; - public $fk_fournprice; // For backward compatibility + public $fk_fournprice; // For backward compatibility public $rang; public $desc; public $description; - public $fk_product_type; // Use instead product_type + public $fk_product_type; // Use instead product_type public $fk_contract_line; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 5efe95f61bd..d1fbfc47a1a 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1846,8 +1846,11 @@ class Facture extends CommonInvoice $hookmanager->initHooks(array('invoicedao')); $parameters = array('id'=>$this->id, 'getnomurl'=>$result, 'notooltip' => $notooltip, 'addlinktonotes' => $addlinktonotes, 'save_lastsearch_value'=> $save_lastsearch_value, 'target' => $target); $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) $result = $hookmanager->resPrint; - else $result .= $hookmanager->resPrint; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -4341,16 +4344,16 @@ class Facture extends CommonInvoice $sql = "SELECT s.rowid, s.nom as name, s.client,"; $sql .= " f.rowid as fid, f.ref as ref, f.datef as df"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user"; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.entity IN (".getEntity('invoice').")"; $sql .= " AND f.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { //restriction + if (empty($user->rights->societe->client->voir) && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -4540,7 +4543,7 @@ class Facture extends CommonInvoice $sql = "SELECT f.rowid, f.date_lim_reglement as datefin,f.fk_statut, f.total_ht"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON f.fk_soc = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = " AND"; @@ -4787,7 +4790,7 @@ class Facture extends CommonInvoice $sql = "SELECT count(f.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 1e6457104ea..a54cd1a6668 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -85,7 +85,7 @@ class FactureStats extends Stats $this->where = " f.fk_statut >= 0"; $this->where .= " AND f.entity IN (".getEntity('invoice').")"; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $this->where .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($mode == 'customer') { @@ -129,7 +129,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(f.datef,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -155,7 +155,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(f.datef,'%Y') as dm, COUNT(*), SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -180,7 +180,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(datef,'%m') as dm, SUM(f.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -206,7 +206,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(datef,'%m') as dm, AVG(f.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -229,7 +229,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(datef,'%Y') as year, COUNT(*) as nb, SUM(f.".$this->field.") as total, AVG(f.".$this->field.") as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -253,7 +253,7 @@ class FactureStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; @@ -281,7 +281,7 @@ class FactureStats extends Stats $startYear = $endYear - $numberYears; $sql = "SELECT date_format(datef,'%Y') as dm, SUM(f.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= $this->join; diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 4381557cd28..230999f18fe 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -100,6 +100,16 @@ if ($action == 'addcontact' && $user->rights->facture->creer) { * View */ +if (empty($object->id)) { + llxHeader(); + $head = facture_prepare_head($object); + $langs->load('errors'); + echo dol_get_fiche_head($head, 'contact', $langs->trans("InvoiceCustomer"), -1, 'bill'), + '
' . $langs->trans("ErrorRecordNotFound") . '
'; + llxFooter(); + exit; +} + $title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('ContactsAddresses'); $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $helpurl); diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index c9b6f9a39a8..c194f5dc997 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -92,6 +92,16 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; * View */ +if (empty($object->id)) { + llxHeader(); + $head = facture_prepare_head($object); + $langs->load('errors'); + echo dol_get_fiche_head($head, 'documents', $langs->trans("InvoiceCustomer"), -1, 'bill'), + '
' . $langs->trans("ErrorRecordNotFound") . '
'; + llxFooter(); + exit; +} + $title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents'); $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; diff --git a/htdocs/compta/facture/index.php b/htdocs/compta/facture/index.php index 790b9d334c3..0a526e39e1e 100644 --- a/htdocs/compta/facture/index.php +++ b/htdocs/compta/facture/index.php @@ -73,7 +73,6 @@ if ($tmp) { print ''; print '
'; -print '
'; $tmp = getCustomerInvoiceLatestEditTable($maxLatestEditCount, $socid); if ($tmp) { @@ -87,7 +86,6 @@ if ($tmp) { print '
'; } -print '
'; print '
'; print ''; diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 69322187e59..c38e9722267 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -62,6 +62,16 @@ $result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', $field * View */ +if (empty($object->id)) { + llxHeader(); + $head = facture_prepare_head($object); + $langs->load('errors'); + echo dol_get_fiche_head($head, 'info', $langs->trans("InvoiceCustomer"), -1, 'bill'), + '
' . $langs->trans("ErrorRecordNotFound") . '
'; + llxFooter(); + exit; +} + $form = new Form($db); $title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info'); diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index e5c7fdafd0c..12f554f4c5c 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -291,12 +291,12 @@ $sql = preg_replace('/,\s*$/', '', $sql); $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_rec as f"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture_rec_extrafields as ef ON ef.fk_object = f.rowid"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= ' AND f.entity IN ('.getEntity('invoice').')'; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($search_ref) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 852589dbd1a..84ad5bd0f31 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -116,7 +116,7 @@ $search_date_startyear = GETPOST('search_date_startyear', 'int'); $search_date_endday = GETPOST('search_date_endday', 'int'); $search_date_endmonth = GETPOST('search_date_endmonth', 'int'); $search_date_endyear = GETPOST('search_date_endyear', 'int'); -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_date_valid_startday = GETPOST('search_date_valid_startday', 'int'); $search_date_valid_startmonth = GETPOST('search_date_valid_startmonth', 'int'); @@ -124,7 +124,7 @@ $search_date_valid_startyear = GETPOST('search_date_valid_startyear', 'int'); $search_date_valid_endday = GETPOST('search_date_valid_endday', 'int'); $search_date_valid_endmonth = GETPOST('search_date_valid_endmonth', 'int'); $search_date_valid_endyear = GETPOST('search_date_valid_endyear', 'int'); -$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver +$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear); $search_datelimit_startday = GETPOST('search_datelimit_startday', 'int'); $search_datelimit_startmonth = GETPOST('search_datelimit_startmonth', 'int'); @@ -242,10 +242,10 @@ $arrayfields = array( 'f.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>292), 'multicurrency_dynamount_payed'=>array('label'=>'MulticurrencyAlreadyPaid', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>295), 'multicurrency_rtp'=>array('label'=>'MulticurrencyRemainderToPay', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>296), // Not enabled by default because slow - 'total_pa' => array('label' => ($conf->global->MARGIN_TYPE == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)), - 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)), - 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)), - 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)), + 'total_pa' => array('label' => ($conf->global->MARGIN_TYPE == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (empty($conf->margin->enabled) || empty($user->rights->margins->liretous) ? 0 : 1)), + 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (empty($conf->margin->enabled) || empty($user->rights->margins->liretous) ? 0 : 1)), + 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (empty($conf->margin->enabled) || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)), + 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (empty($conf->margin->enabled) || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)), 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), 'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>502), 'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))), @@ -380,11 +380,11 @@ if ($action == 'makepayment_confirm' && $user->rights->facture->paiement) { require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; $arrayofselected = is_array($toselect) ? $toselect : array(); if (!empty($arrayofselected)) { - $bankid=GETPOST('bankid', 'int'); - $paiementid=GETPOST('paiementid', 'int'); - $paiementdate=dol_mktime(12, 0, 0, GETPOST('datepaimentmonth', 'int'), GETPOST('datepaimentday', 'int'), GETPOST('datepaimentyear', 'year')); + $bankid = GETPOST('bankid', 'int'); + $paiementid = GETPOST('paiementid', 'int'); + $paiementdate = dol_mktime(12, 0, 0, GETPOST('datepaimentmonth', 'int'), GETPOST('datepaimentday', 'int'), GETPOST('datepaimentyear', 'year')); foreach ($arrayofselected as $toselectid) { - $errorpayment=0; + $errorpayment = 0; $facture = new Facture($db); $result = $facture->fetch($toselectid); if ($result < 0) { @@ -397,7 +397,7 @@ if ($action == 'makepayment_confirm' && $user->rights->facture->paiement) { $totaldeposits = $facture->getSumDepositsUsed(); $totalpay = $paiementAmount + $totalcreditnotes + $totaldeposits; $remaintopay = price2num($facture->total_ttc - $totalpay); - if ($remaintopay!=0) { + if ($remaintopay != 0) { $resultBank = $facture->setBankAccount($bankid); if ($resultBank < 0) { setEventMessage($facture->error, 'errors'); @@ -410,12 +410,12 @@ if ($action == 'makepayment_confirm' && $user->rights->facture->paiement) { $paiement->paiementid = $paiementid; $paiement_id = $paiement->create($user, 1, $facture->thirdparty); if ($paiement_id < 0) { - setEventMessage($facture->ref . ' ' . $paiement->error, 'errors'); + setEventMessage($facture->ref.' '.$paiement->error, 'errors'); $errorpayment++; } else { $result = $paiement->addPaymentToBank($user, 'payment', '', $bankid, '', ''); if ($result < 0) { - setEventMessages($facture->ref . ' ' . $paiement->error, $paiement->errors, 'errors'); + setEventMessages($facture->ref.' '.$paiement->error, $paiement->errors, 'errors'); $errorpayment++; } } @@ -555,7 +555,7 @@ $sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as u if (!$sall) { $sql .= ', SUM(pf.amount) as dynamount_payed, SUM(pf.multicurrency_amount) as multicurrency_dynamount_payed'; } -if ($search_categ_cus && $search_categ_cus!=-1) { +if ($search_categ_cus && $search_categ_cus != -1) { $sql .= ", cc.fk_categorie, cc.fk_soc"; } // Add fields from extrafields @@ -592,7 +592,7 @@ if ($search_product_category > 0) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = f.fk_projet"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid'; // We'll need this table joined to the select in order to filter by sale -if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { +if ($search_sale > 0 || (empty($user->rights->societe->client->voir) && !$socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } if ($search_user > 0) { @@ -606,7 +606,7 @@ $sql .= $hookmanager->resPrint; $sql .= ' WHERE f.fk_soc = s.rowid'; $sql .= ' AND f.entity IN ('.getEntity('invoice').')'; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($search_product_category > 0) { @@ -801,7 +801,7 @@ if (!$sall) { $sql .= ' country.code,'; $sql .= " p.rowid, p.ref, p.title,"; $sql .= " u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender"; - if ($search_categ_cus && $search_categ_cus!=-1) { + if ($search_categ_cus && $search_categ_cus != -1) { $sql .= ", cc.fk_categorie, cc.fk_soc"; } // Add fields from extrafields @@ -821,7 +821,7 @@ if (!$sall) { // Add HAVING from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook -$sql .= !empty($hookmanager->resPrint) ? (" HAVING 1=1 " . $hookmanager->resPrint) : ""; +$sql .= !empty($hookmanager->resPrint) ? (" HAVING 1=1 ".$hookmanager->resPrint) : ""; $sql .= ' ORDER BY '; $listfield = explode(',', $sortfield); @@ -914,7 +914,7 @@ if ($resql) { if ($search_date_valid_endyear) { $param .= '&search_date_valid_endyear='.urlencode($search_date_valid_endyear); } - if ($search_datelimit_startday) { + if ($search_datelimit_startday) { $param .= '&search_datelimit_startday='.urlencode($search_datelimit_startday); } if ($search_datelimit_startmonth) { @@ -1059,7 +1059,7 @@ if ($resql) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } } - if (in_array($massaction, array('presend', 'predelete' ,'makepayment'))) { + if (in_array($massaction, array('presend', 'predelete', 'makepayment'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); @@ -1097,7 +1097,7 @@ if ($resql) { $trackid = 'inv'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($massaction=='makepayment') { + if ($massaction == 'makepayment') { $formconfirm = ''; $formquestion = array( // 'text' => $langs->trans("ConfirmClone"), @@ -1719,7 +1719,13 @@ if ($resql) { print 'ref)); + print 'parent.place=\''.$place.'\''; + } + print '});"'; } print '>'; diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 40bb97fa236..8355d81fe0b 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -77,6 +77,16 @@ if (empty($reshook)) { * View */ +if (empty($object->id)) { + llxHeader(); + $head = facture_prepare_head($object); + $langs->load('errors'); + echo dol_get_fiche_head($head, 'note', $langs->trans("InvoiceCustomer"), -1, 'bill'), + '
' . $langs->trans("ErrorRecordNotFound") . '
'; + llxFooter(); + exit; +} + $title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes'); $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $helpurl); diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 084d24ebfdb..c49d98baafe 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -71,7 +71,7 @@ $hookmanager->initHooks(array('directdebitcard', 'globalcard')); if ($type == 'bank-transfer') { $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture', 'fk_soc', $fieldid, $isdraft); - if (!$user->rights->fournisseur->facture->lire) { + if (empty($user->rights->fournisseur->facture->lire)) { accessforbidden(); } } else { @@ -607,7 +607,6 @@ if ($object->id > 0) { print ''; print '
'; - print '
'; print '
'; print '
'; @@ -672,7 +671,6 @@ if ($object->id > 0) { print '
'; - print '
'; print '
'; print ''; diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 5fe028e1268..babadfe7366 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -46,7 +46,7 @@ $mode = GETPOST("mode") ? GETPOST("mode") : 'customer'; if ($mode == 'customer' && !$user->rights->facture->lire) { accessforbidden(); } -if ($mode == 'supplier' && !$user->rights->fournisseur->facture->lire) { +if ($mode == 'supplier' && empty($user->rights->fournisseur->facture->lire)) { accessforbidden(); } @@ -110,6 +110,10 @@ if ($mode == 'supplier') { if ($object_status != '' && $object_status >= 0) { $stats->where .= ' AND f.fk_statut IN ('.$db->sanitize($object_status).')'; } + if (is_array($custcats) && !empty($custcats)) { + $stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_fournisseur as cat ON (f.fk_soc = cat.fk_soc)'; + $stats->where .= ' AND cat.fk_categorie IN ('.$db->sanitize(implode(',', $custcats)).')'; + } } // Build graphic number of object @@ -119,10 +123,10 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); $filenamenb = $dir."/invoicesnbinyear-".$year.".png"; if ($mode == 'customer') { - $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$year.'.png'; + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$year.'.png'; } if ($mode == 'supplier') { - $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicesnbinyear-'.$year.'.png'; + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicesnbinyear-'.$year.'.png'; } $px1 = new DolGraph(); @@ -188,7 +192,7 @@ if (!$mesg) { $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') { $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; @@ -388,7 +392,7 @@ foreach ($data as $val) { print ''; print ''; -print '
'; +print '
'; // Show graphs @@ -405,7 +409,7 @@ if ($mesg) { print ''; -print '
'; +print ''; print '
'; diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index bcfece64157..0b22e31be4b 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) { exit; } -print "\n"; +print "\n"; global $user; global $noMoreLinkedObjectBlockAfter; diff --git a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php index 7c9683c8b8c..d222dfd21dc 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php @@ -24,7 +24,7 @@ if (empty($conf) || !is_object($conf)) { } -print "\n"; +print "\n"; global $user; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 7f3865906c8..332f68c1293 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -112,7 +112,7 @@ print getCustomerInvoiceDraftTable($max, $socid); print '
'; print getDraftSupplierTable($max, $socid); -print '
'; +print '
'; // Latest modified customer invoices @@ -129,12 +129,12 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) { $sql .= ", sum(pf.amount) as am"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays, ".MAIN_DB_PREFIX."facture as f"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.rowid = f.fk_soc"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -279,12 +279,12 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql .= ", SUM(pf.amount) as am"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.rowid = ff.fk_soc"; $sql .= " AND ff.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -589,7 +589,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user $sql .= ", c.rowid, c.ref, c.facture, c.fk_statut as status, c.total_ht, c.total_tva, c.total_ttc,"; $sql .= " cc.rowid as country_id, cc.code as country_code"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."commande as c"; @@ -597,7 +597,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture AS f ON el.fk_target = f.rowid AND el.targettype = 'facture'"; $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -749,7 +749,7 @@ if ($resql) { } -print '
'; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardAccountancy', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index e2a96f4fb5b..35c6aa399fe 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -64,7 +64,7 @@ if ($cancel && !$id) { exit; } -if ($action == 'add' && $cancel) { +if ($action == 'add' && !$cancel) { $db->begin(); $datev = dol_mktime(12, 0, 0, GETPOST("datevmonth"), GETPOST("datevday"), GETPOST("datevyear")); diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index f9ea0ac02d9..234073cdb38 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -568,8 +568,7 @@ print ''; print ''; -print '
'; - +print '
'; /* diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 0f49b8d5823..2740b09427a 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -131,7 +131,7 @@ if (empty($reshook)) { } elseif (substr($key, 0, 21) == 'multicurrency_amount_') { $cursorfacid = substr($key, 21); $multicurrency_amounts[$cursorfacid] = price2num(GETPOST($key)); - $multicurrency_totalpayment += $multicurrency_amounts[$cursorfacid]; + $multicurrency_totalpayment += floatval($multicurrency_amounts[$cursorfacid]); if (!empty($multicurrency_amounts[$cursorfacid])) { $atleastonepaymentnotnull++; } diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 1d8fd5b3392..c66edfc8fe1 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -1005,10 +1005,10 @@ class RemiseCheque extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; $langs->load('compta'); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('ToValidate'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('ToValidate'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Validated'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('ToValidate'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('ToValidate'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); } $statusType = 'status'.$status; diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 8bde7fac19e..e4aad2c5bf4 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -83,7 +83,7 @@ if ($resql) { } -print '
'; +print '
'; $max = 10; @@ -145,7 +145,7 @@ if ($resql) { } -print '
'; +print ''; // End of page llxFooter(); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 59aae0a4015..f5160c51757 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -201,11 +201,11 @@ if (GETPOST("orphelins", "alpha")) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON pf.fk_facture = f.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; } $sql .= " WHERE p.entity IN (".getEntity('invoice').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND sc.fk_user = ".((int) $user->id); } if ($socid > 0) { diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 492404a9380..cf02c2aeb74 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -39,7 +39,7 @@ if ($user->socid > 0) { } $dir = $conf->facture->dir_output.'/payments'; -if (!$user->rights->societe->client->voir || $socid) { +if (empty($user->rights->societe->client->voir) || $socid) { $dir .= '/private/'.$user->id; // If user has no permission to see all, output dir is specific to user } diff --git a/htdocs/compta/paymentbybanktransfer/index.php b/htdocs/compta/paymentbybanktransfer/index.php index 009f99fccf1..b939c59a053 100644 --- a/htdocs/compta/paymentbybanktransfer/index.php +++ b/htdocs/compta/paymentbybanktransfer/index.php @@ -98,7 +98,7 @@ $sql .= " pfd.date_demande, pfd.amount,"; $sql .= " s.nom as name, s.email, s.rowid as socid, s.tva_intra"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; @@ -111,7 +111,7 @@ if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND pfd.traite = 0"; $sql .= " AND pfd.ext_payment_id IS NULL"; $sql .= " AND pfd.fk_facture_fourn = f.rowid"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -174,7 +174,7 @@ if ($resql) { } -print '
'; +print '
'; /* @@ -233,7 +233,7 @@ if ($result) { } -print '
'; +print ''; // End of page llxFooter(); diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index f4b4b725ed3..a8836d215b2 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -2346,16 +2346,16 @@ class BonPrelevement extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('StatusWaiting'); - $this->labelStatus[self::STATUS_TRANSFERED] = $langs->trans('StatusTrans'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('StatusWaiting'); - $this->labelStatusShort[self::STATUS_TRANSFERED] = $langs->trans('StatusTrans'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('StatusWaiting'); + $this->labelStatus[self::STATUS_TRANSFERED] = $langs->transnoentitiesnoconv('StatusTrans'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('StatusWaiting'); + $this->labelStatusShort[self::STATUS_TRANSFERED] = $langs->transnoentitiesnoconv('StatusTrans'); if ($this->type == 'bank-transfer') { - $this->labelStatus[self::STATUS_DEBITED] = $langs->trans('StatusDebited'); - $this->labelStatusShort[self::STATUS_DEBITED] = $langs->trans('StatusDebited'); + $this->labelStatus[self::STATUS_DEBITED] = $langs->transnoentitiesnoconv('StatusDebited'); + $this->labelStatusShort[self::STATUS_DEBITED] = $langs->transnoentitiesnoconv('StatusDebited'); } else { - $this->labelStatus[self::STATUS_CREDITED] = $langs->trans('StatusCredited'); - $this->labelStatusShort[self::STATUS_CREDITED] = $langs->trans('StatusCredited'); + $this->labelStatus[self::STATUS_CREDITED] = $langs->transnoentitiesnoconv('StatusCredited'); + $this->labelStatusShort[self::STATUS_CREDITED] = $langs->transnoentitiesnoconv('StatusCredited'); } } diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index dfd8a920f93..0093db77c32 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -137,11 +137,11 @@ class LignePrelevement return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { if ($status == 0) { - return img_picto($langs->trans($this->statuts[$status]), 'statut1', 'class="valignmiddle"').' '.$langs->trans($this->statuts[$status]); // Waiting + return img_picto($langs->trans($this->statuts[$status]), 'statut1', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->statuts[$status]); // Waiting } elseif ($status == 2) { - return img_picto($langs->trans($this->statuts[$status]), 'statut6', 'class="valignmiddle"').' '.$langs->trans($this->statuts[$status]); // Credited + return img_picto($langs->trans($this->statuts[$status]), 'statut6', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->statuts[$status]); // Credited } elseif ($status == 3) { - return img_picto($langs->trans($this->statuts[$status]), 'statut8', 'class="valignmiddle"').' '.$langs->trans($this->statuts[$status]); // Refused + return img_picto($langs->trans($this->statuts[$status]), 'statut8', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->statuts[$status]); // Refused } } elseif ($mode == 2) { if ($status == 0) { @@ -153,11 +153,11 @@ class LignePrelevement } } elseif ($mode == 3) { if ($status == 0) { - return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut1', 'class="valignmiddle"'); + return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut1', 'class="valignmiddle"'); } elseif ($status == 2) { - return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut6', 'class="valignmiddle"'); + return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut6', 'class="valignmiddle"'); } elseif ($status == 3) { - return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8', 'class="valignmiddle"'); + return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut8', 'class="valignmiddle"'); } } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 03dfd0288bd..42bf73eaae6 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -90,10 +90,10 @@ if (empty($reshook)) { } } if ($action == 'create') { - $default_account=($type == 'bank-transfer' ? 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' : 'PRELEVEMENT_ID_BANKACCOUNT'); + $default_account = ($type == 'bank-transfer' ? 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' : 'PRELEVEMENT_ID_BANKACCOUNT'); if ($id_bankaccount != $conf->global->{$default_account}) { - $res = dolibarr_set_const($db, $default_account, $id_bankaccount, 'chaine', 0, '', $conf->entity); //Set as default + $res = dolibarr_set_const($db, $default_account, $id_bankaccount, 'chaine', 0, '', $conf->entity); //Set as default } require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index cb10e9248f1..5ac0c07ede7 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -137,12 +137,12 @@ if ($type != 'bank-transfer') { } $sql .= " ".MAIN_DB_PREFIX."societe as s,"; $sql .= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.rowid = f.fk_soc"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 067f76ed2c8..35c49df8d1e 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -220,6 +220,9 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; + if ($limit > 0 && $limit != $conf->liste_limit) { + $param.='&limit='.urlencode($limit); + } $param = "&id=".urlencode($id); // Lines of title fields diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 93f2305c60f..92ae9b827e0 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -98,7 +98,7 @@ $sql .= " pfd.date_demande, pfd.amount,"; $sql .= " s.nom as name, s.email, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " , ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; @@ -111,7 +111,7 @@ if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND pfd.traite = 0"; $sql .= " AND pfd.ext_payment_id IS NULL"; $sql .= " AND pfd.fk_facture = f.rowid"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -174,7 +174,7 @@ if ($resql) { } -print '
'; +print '
'; /* @@ -235,7 +235,7 @@ if ($result) { } -print '
'; +print ''; // End of page llxFooter(); diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index f2f192271ac..b5aca49aaae 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -9,6 +9,7 @@ * Copyright (C) 2014 Florian Henry * Copyright (C) 2018 Frédéric France * Copyright (C) 2020 Maxime DEMAREST + * Copyright (C) 2021 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +34,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -366,7 +368,7 @@ if ($modecompta == 'BOOKKEEPING') { } } else { /* - * Factures clients + * Customer invoices */ print ''.$langs->trans("CustomersInvoices").''; @@ -386,8 +388,8 @@ if ($modecompta == 'BOOKKEEPING') { } } elseif ($modecompta == 'RECETTES-DEPENSES') { /* - * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les - * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) + * List of payments (old payments are not seen by this query because, on older versions, they were not linked via payment_invoice. + * old versions, they were not linked via payment_invoice. They are added later) */ $sql = "SELECT s.nom as name, s.rowid as socid, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -434,7 +436,7 @@ if ($modecompta == 'BOOKKEEPING') { dol_print_error($db); } - // On ajoute les paiements clients anciennes version, non lie par paiement_facture + // We add the old customer payments, not linked by payment_invoice if ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT 'Autres' as name, '0' as idp, sum(p.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -673,7 +675,7 @@ if ($modecompta == 'BOOKKEEPING') { /* - * Charges sociales non deductibles + * Social / Fiscal contributions who are not deductible */ print ''.$langs->trans("SocialContributionsNondeductibles").''; @@ -760,7 +762,7 @@ if ($modecompta == 'BOOKKEEPING') { /* - * Charges sociales deductibles + * Social / Fiscal contributions who are deductible */ print ''.$langs->trans("SocialContributionsDeductibles").''; @@ -860,15 +862,27 @@ if ($modecompta == 'BOOKKEEPING') { $column = 'p.datep'; } - $sql = "SELECT u.rowid, u.firstname, u.lastname, p.fk_user, p.label as label, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount"; + $sql = "SELECT u.rowid, u.firstname, u.lastname, s.fk_user as fk_user, p.label as label, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount"; + $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as p"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."salary as s ON s.rowid=p.fk_salary"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=s.fk_user"; + $sql .= " WHERE p.entity IN (".getEntity('payment_salary').")"; + if (!empty($date_start) && !empty($date_end)) { + $sql .= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'"; + } + $sql .= " GROUP BY u.rowid, u.firstname, u.lastname, s.fk_user, p.label, dm"; + + // For backward compatibility with old module salary + $sql .= " UNION "; + $sql .= " SELECT u.rowid, u.firstname, u.lastname, p.fk_user as fk_user, p.label as label, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as p"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user"; $sql .= " WHERE p.entity IN (".getEntity('payment_salary').")"; if (!empty($date_start) && !empty($date_end)) { $sql .= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'"; } - $sql .= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm"; + $newsortfield = $sortfield; if ($newsortfield == 's.nom, s.rowid') { $newsortfield = 'u.firstname, u.lastname'; @@ -900,7 +914,10 @@ if ($modecompta == 'BOOKKEEPING') { print ' '; - print "".$langs->trans("Salary")." fk_user."\">".$obj->firstname." ".$obj->lastname."\n"; + $userstatic = new User($db); + $userstatic->fetch($obj->fk_user); + + print "".$langs->trans("Salary")." getFullName($langs))."\">".$obj->firstname." ".$obj->lastname."\n"; if ($modecompta == 'CREANCES-DETTES') { print ''.price(-$obj->amount).''; @@ -931,7 +948,7 @@ if ($modecompta == 'BOOKKEEPING') { /* - * Expense + * Expense report */ if (!empty($conf->expensereport->enabled)) { @@ -1087,7 +1104,7 @@ if ($modecompta == 'BOOKKEEPING') { } /* - * Payement Loan + * Payment Loan */ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { @@ -1208,7 +1225,7 @@ if ($modecompta == 'BOOKKEEPING') { print ''.price($amount)."\n"; print "\n"; - // VAT to retreive + // VAT to retrieve $amount = 0; $sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total_tva) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 1223ad3ec36..e7e9840af61 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -612,7 +612,6 @@ if ($id > 0) { print ''; print '
'; - print '
'; $nbcols = 3; if (!empty($conf->banque->enabled)) { @@ -722,7 +721,6 @@ if ($id > 0) { dol_print_error($db); } - print '
'; print '
'; print ''; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 0cb7220cfd7..42f850cff5e 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -525,15 +525,15 @@ class ChargeSociales extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_UNPAID] = $langs->trans('Unpaid'); - $this->labelStatus[self::STATUS_PAID] = $langs->trans('Paid'); + $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('Unpaid'); + $this->labelStatus[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Paid'); if ($status == self::STATUS_UNPAID && $alreadypaid > 0) { - $this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); } - $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('Unpaid'); - $this->labelStatusShort[self::STATUS_PAID] = $langs->trans('Paid'); + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('Unpaid'); + $this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Paid'); if ($status == self::STATUS_UNPAID && $alreadypaid > 0) { - $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); } } diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index fa95b08faca..9a4b50e3474 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -600,7 +600,7 @@ class PaymentSocialContribution extends CommonObject $result = $acc->add_url_line( $bank_line_id, $socialcontrib->fk_user, - DOL_URL_ROOT . '/user/card.php?id=', + DOL_URL_ROOT.'/user/card.php?id=', $fuser->getFullName($langs), 'user' ); diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 1fbfdfa296a..d0cf3a1f34c 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -78,6 +78,8 @@ if ($user->socid) { } $result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges'); +$permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php + /* * Actions diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 83740385f2b..4264f786d3a 100755 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -614,7 +614,6 @@ if ($id) { print ''; print '
'; - print '
'; $nbcols = 3; if (!empty($conf->banque->enabled)) { @@ -717,7 +716,6 @@ if ($id) { dol_print_error($db); } - print '
'; print '
'; print ''; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 4ca16ceeecf..8628d7d7836 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -866,15 +866,15 @@ class Tva extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid'); - $this->labelStatus[self::STATUS_PAID] = $langs->trans('BillStatusPaid'); + $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid'); + $this->labelStatus[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid'); if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) { - $this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); } - $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid'); - $this->labelStatusShort[self::STATUS_PAID] = $langs->trans('BillStatusPaid'); + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid'); + $this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid'); if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) { - $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); } } diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index e2f0dcec96d..67de87d0c21 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -79,6 +79,8 @@ if ($user->socid) { } $result = restrictedArea($user, 'tax', '', 'tva', 'charges'); +$permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php + /* * Actions @@ -86,7 +88,7 @@ $result = restrictedArea($user, 'tax', '', 'tva', 'charges'); include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; -if ($action == 'setlib' && $user->rights->tax->charges->creer) { +if ($action == 'setlib' && $permissiontoadd) { $object->fetch($id); $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); if ($result < 0) { diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index e1ac3f96a2d..fed0cf209c1 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -514,7 +514,7 @@ if ($refresh === true) { print ''; - print '
'; + print '
'; /* @@ -544,7 +544,7 @@ if ($refresh === true) { pt($db, $sql, $langs->trans("Month")); - print '
'; + print ''; } llxFooter(); diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 8ae2deae1cf..62f2262e2d6 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -296,7 +296,7 @@ if (empty($reshook)) { if (empty($error) && $id > 0) { $db->commit(); if (!empty($backtopage)) { - $url = $backtopage; + $url = str_replace('__ID__', $id, $backtopage); } else { $url = 'card.php?id='.$id; } @@ -545,8 +545,8 @@ $formcompany = new FormCompany($db); $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; +$objsoc = new Societe($db); if ($socid > 0) { - $objsoc = new Societe($db); $objsoc->fetch($socid); } @@ -818,7 +818,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } print ''; print ''; - print ''.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2)).''; + print ''; + print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2)); + print ''; print ''; } @@ -1095,8 +1097,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } print ''; print ''; + print ''; $useempty = (isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2)); - print ''.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $object->no_email), 1, false, $useempty).''; + print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $object->no_email), 1, false, $useempty); + print ''; print ''; } @@ -1323,7 +1327,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - print ''.$langs->trans("No_Email").''.yn($object->no_email).''; + print ''.$langs->trans("No_Email").''; + if ($object->email) { + print yn($object->no_email); + } else { + print ''.$langs->trans("EMailNotDefined").''; + } + print ''; } print ''.$langs->trans("ContactVisibility").''; @@ -1381,10 +1391,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } - print '
'; + print '
'; print '
'; - print ''; + print '
'; // Categories if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { @@ -1462,7 +1472,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "
"; - print '
'; + print ''; print '
'; print dol_get_fiche_end(); @@ -1518,7 +1528,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if ($action != 'presend') { print '
'; - print '
'; + print '
'; $MAXEVENT = 10; @@ -1529,7 +1539,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'contact', $object->socid, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for thirdparty - print '
'; + print ''; } // Presend form diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 1aecac97f19..fa1dfb93c7a 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -383,7 +383,7 @@ class Contact extends CommonObject $sql = "SELECT count(sp.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE sp.fk_soc = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); @@ -1558,8 +1558,8 @@ class Contact extends CommonObject $statusType = 'status5'; } - $label = $langs->trans($labelStatus[$status]); - $labelshort = $langs->trans($labelStatusShort[$status]); + $label = $langs->transnoentitiesnoconv($labelStatus[$status]); + $labelshort = $langs->transnoentitiesnoconv($labelStatusShort[$status]); return dolGetStatus($label, $labelshort, '', $statusType, $mode); } diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 3005c6b7827..1870e7b8d9c 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -49,12 +49,6 @@ if (!empty($canvas)) { $objcanvas->getCanvas('contact', 'contactcard', $canvas); } -// Security check -if ($user->socid) { - $socid = $user->socid; -} -$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission - // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); @@ -91,6 +85,15 @@ $modulepart = 'contact'; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('contactdocument')); +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission + +$permissiontoadd = $user->rights->societe->contact->creer; // Used by the include of actions_dellink.inc.php + + /* * Actions */ diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 71e888540b2..82a2161f89f 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -204,6 +204,12 @@ if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { $arrayfields['s.nom'] = array('label'=>"ThirdParty", 'position'=>25, 'checked'=>1); } +$arrayfields['unsubscribed'] = array( + 'label'=>'No_Email', + 'checked'=>0, + 'enabled'=>(!empty($conf->mailing->enabled)), + 'position'=>41); + if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { @@ -355,7 +361,7 @@ if ($resql) { } $sql = "SELECT s.rowid as socid, s.nom as name,"; -$sql .= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.address, p.zip, p.town, p.poste, p.email, p.no_email,"; +$sql .= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.address, p.zip, p.town, p.poste, p.email,"; $sql .= " p.socialnetworks, p.photo,"; $sql .= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,"; $sql .= " st.libelle as stcomm, st.picto as stcomm_picto, p.fk_stcommcontact as stcomm_id, p.fk_prospectcontactlevel,"; @@ -366,6 +372,9 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } +if (!empty($conf->mailing->enabled)) { + $sql .= ", (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) as unsubscribed"; +} // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -386,11 +395,11 @@ if (!empty($search_categ_thirdparty) && $search_categ_thirdparty != '-1') { if (!empty($search_categ_supplier) && $search_categ_supplier != '-1') { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs2 ON s.rowid = cs2.fk_soc"; // We need this table joined to the select in order to filter by categ } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; } $sql .= ' WHERE p.entity IN ('.getEntity('socpeople').')'; -if (!$user->rights->societe->client->voir && !$socid) { //restriction +if (empty($user->rights->societe->client->voir) && !$socid) { //restriction $sql .= " AND (sc.fk_user = ".((int) $user->id)." OR p.fk_soc IS NULL)"; } if (!empty($userid)) { // propre au commercial @@ -499,8 +508,11 @@ if (strlen($search_town)) { if (count($search_roles) > 0) { $sql .= " AND p.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".$db->sanitize(implode(',', $search_roles))."))"; } -if ($search_no_email != '' && $search_no_email >= 0) { - $sql .= " AND p.no_email = ".((int) $search_no_email); +if ($search_no_email != -1 && $search_no_email > 0) { + $sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) > 0"; +} +if ($search_no_email != -1 && $search_no_email == 0) { + $sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) = 0 AND p.email IS NOT NULL AND p.email <> ''"; } if ($search_status != '' && $search_status >= 0) { $sql .= " AND p.statut = ".((int) $search_status); @@ -568,75 +580,75 @@ llxHeader('', $title, $help_url); $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { - $param .= '&contextpage='.$contextpage; + $param .= '&contextpage='.urlencode($contextpage); } if ($limit > 0 && $limit != $conf->liste_limit) { - $param .= '&limit='.$limit; + $param .= '&limit='.((int) $limit); } -$param .= '&begin='.urlencode($begin).'&userid='.urlencode($userid).'&contactname='.urlencode($sall); -$param .= '&type='.urlencode($type).'&view='.urlencode($view); +$param .= '&begin='.urlencode($begin).'&userid='.urlencode($userid).'&contactname='.urlencode($sall); +$param .= '&type='.urlencode($type).'&view='.urlencode($view); if (!empty($search_categ) && $search_categ != '-1') { - $param .= '&search_categ='.urlencode($search_categ); + $param .= '&search_categ='.urlencode($search_categ); } if (!empty($search_categ_thirdparty) && $search_categ_thirdparty != '-1') { - $param .= '&search_categ_thirdparty='.urlencode($search_categ_thirdparty); + $param .= '&search_categ_thirdparty='.urlencode($search_categ_thirdparty); } if (!empty($search_categ_supplier) && $search_categ_supplier != '-1') { - $param .= '&search_categ_supplier='.urlencode($search_categ_supplier); + $param .= '&search_categ_supplier='.urlencode($search_categ_supplier); } if ($sall != '') { - $param .= '&sall='.urlencode($sall); + $param .= '&sall='.urlencode($sall); } if ($search_id > 0) { - $param .= "&search_id=".urlencode($search_id); + $param .= "&search_id=".urlencode($search_id); } if ($search_lastname != '') { - $param .= '&search_lastname='.urlencode($search_lastname); + $param .= '&search_lastname='.urlencode($search_lastname); } if ($search_firstname != '') { - $param .= '&search_firstname='.urlencode($search_firstname); + $param .= '&search_firstname='.urlencode($search_firstname); } if ($search_societe != '') { - $param .= '&search_societe='.urlencode($search_societe); + $param .= '&search_societe='.urlencode($search_societe); } if ($search_address != '') { - $param .= '&search_address='.urlencode($search_address); + $param .= '&search_address='.urlencode($search_address); } if ($search_zip != '') { - $param .= '&search_zip='.urlencode($search_zip); + $param .= '&search_zip='.urlencode($search_zip); } if ($search_town != '') { - $param .= '&search_town='.urlencode($search_town); + $param .= '&search_town='.urlencode($search_town); } if ($search_country != '') { $param .= "&search_country=".urlencode($search_country); } if ($search_poste != '') { - $param .= '&search_poste='.urlencode($search_poste); + $param .= '&search_poste='.urlencode($search_poste); } if ($search_phone_pro != '') { - $param .= '&search_phone_pro='.urlencode($search_phone_pro); + $param .= '&search_phone_pro='.urlencode($search_phone_pro); } if ($search_phone_perso != '') { - $param .= '&search_phone_perso='.urlencode($search_phone_perso); + $param .= '&search_phone_perso='.urlencode($search_phone_perso); } if ($search_phone_mobile != '') { - $param .= '&search_phone_mobile='.urlencode($search_phone_mobile); + $param .= '&search_phone_mobile='.urlencode($search_phone_mobile); } if ($search_fax != '') { - $param .= '&search_fax='.urlencode($search_fax); + $param .= '&search_fax='.urlencode($search_fax); } if ($search_email != '') { - $param .= '&search_email='.urlencode($search_email); + $param .= '&search_email='.urlencode($search_email); } if ($search_no_email != '') { - $param .= '&search_no_email='.urlencode($search_no_email); + $param .= '&search_no_email='.urlencode($search_no_email); } if ($search_status != '') { - $param .= '&search_status='.urlencode($search_status); + $param .= '&search_status='.urlencode($search_status); } if ($search_priv == '0' || $search_priv == '1') { - $param .= "&search_priv=".urlencode($search_priv); + $param .= "&search_priv=".urlencode($search_priv); } if ($search_stcomm != '') { $param .= '&search_stcomm='.urlencode($search_stcomm); @@ -843,7 +855,7 @@ if (!empty($arrayfields['p.email']['checked'])) { print ''; print ''; } -if (!empty($arrayfields['p.no_email']['checked'])) { +if (!empty($arrayfields['unsubscribed']['checked'])) { print ''; print $form->selectarray('search_no_email', array('-1'=>'', '0'=>$langs->trans('No'), '1'=>$langs->trans('Yes')), $search_no_email); print ''; @@ -965,8 +977,8 @@ if (!empty($arrayfields['p.fax']['checked'])) { if (!empty($arrayfields['p.email']['checked'])) { print_liste_field_titre($arrayfields['p.email']['label'], $_SERVER["PHP_SELF"], "p.email", $begin, $param, '', $sortfield, $sortorder); } -if (!empty($arrayfields['p.no_email']['checked'])) { - print_liste_field_titre($arrayfields['p.no_email']['label'], $_SERVER["PHP_SELF"], "p.no_email", $begin, $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['unsubscribed']['checked'])) { + print_liste_field_titre($arrayfields['unsubscribed']['label'], $_SERVER["PHP_SELF"], "unsubscribed", $begin, $param, '', $sortfield, $sortorder, 'center '); } if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -1155,8 +1167,14 @@ while ($i < min($num, $limit)) { } } // No EMail - if (!empty($arrayfields['p.no_email']['checked'])) { - print ''.yn($obj->no_email).''; + if (!empty($arrayfields['unsubscribed']['checked'])) { + print ''; + if (empty($obj->email)) { + //print ''.$langs->trans("NoEmail").''; + } else { + print yn(($obj->unsubscribed > 0) ? 1 : 0); + } + print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 9d8cdb78912..b7648da956d 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -505,8 +505,8 @@ if (empty($reshook)) { $desc = $prod->description; //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time - if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { - $product_desc=''; + if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { + $product_desc = ''; } if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { @@ -2137,7 +2137,7 @@ if ($action == 'create') { $linktoelem = $form->showLinkToObjectBlock($object, null, array('contrat')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
'; + print '
'; $MAXEVENT = 10; @@ -2148,7 +2148,7 @@ if ($action == 'create') { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'contract', $socid, 1, 'listactions', $MAXEVENT, '', $morehtmlcenter); - print '
'; + print ''; } // Presend form diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index a7a42ca7350..fe8edd30ea4 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1729,85 +1729,77 @@ class Contrat extends CommonObject } } - $sql = "UPDATE ".MAIN_DB_PREFIX."contratdet set description='".$this->db->escape($desc)."'"; - $sql .= ",price_ht='".price2num($price)."'"; - $sql .= ",subprice='".price2num($subprice)."'"; - $sql .= ",remise='".price2num($remise)."'"; - $sql .= ",remise_percent='".price2num($remise_percent)."'"; - $sql .= ",qty='".$qty."'"; - $sql .= ",tva_tx='".price2num($tvatx)."'"; - $sql .= ",localtax1_tx='".price2num($localtax1tx)."'"; - $sql .= ",localtax2_tx='".price2num($localtax2tx)."'"; - $sql .= ",localtax1_type='".$this->db->escape($localtax1_type)."'"; - $sql .= ",localtax2_type='".$this->db->escape($localtax2_type)."'"; - $sql .= ", total_ht='".price2num($total_ht)."'"; - $sql .= ", total_tva='".price2num($total_tva)."'"; - $sql .= ", total_localtax1='".price2num($total_localtax1)."'"; - $sql .= ", total_localtax2='".price2num($total_localtax2)."'"; - $sql .= ", total_ttc='".price2num($total_ttc)."'"; + $sql = "UPDATE ".MAIN_DB_PREFIX."contratdet set description = '".$this->db->escape($desc)."'"; + $sql .= ",price_ht = ".((float) price2num($price)); + $sql .= ",subprice = ".((float) price2num($subprice)); + $sql .= ",remise = ".((float) price2num($remise)); + $sql .= ",remise_percent = ".((float) price2num($remise_percent)); + $sql .= ",qty = ".((float) $qty); + $sql .= ",tva_tx = ".((float) price2num($tvatx)); + $sql .= ",localtax1_tx = ".((float) price2num($localtax1tx)); + $sql .= ",localtax2_tx = ".((float) price2num($localtax2tx)); + $sql .= ",localtax1_type='".$this->db->escape($localtax1_type); + $sql .= ",localtax2_type='".$this->db->escape($localtax2_type); + $sql .= ", total_ht = ".((float) price2num($total_ht)); + $sql .= ", total_tva = ".((float) price2num($total_tva)); + $sql .= ", total_localtax1 = ".((float) price2num($total_localtax1)); + $sql .= ", total_localtax2 = ".((float) price2num($total_localtax2)); + $sql .= ", total_ttc = ".((float) price2num($total_ttc)); $sql .= ", fk_product_fournisseur_price=".($fk_fournprice > 0 ? $fk_fournprice : "null"); - $sql .= ", buy_price_ht='".price2num($pa_ht)."'"; + $sql .= ", buy_price_ht = ".((float) price2num($pa_ht)); if ($date_start > 0) { - $sql .= ",date_ouverture_prevue='".$this->db->idate($date_start)."'"; + $sql .= ",date_ouverture_prevue = '".$this->db->idate($date_start)."'"; } else { - $sql .= ",date_ouverture_prevue=null"; + $sql .= ",date_ouverture_prevue = null"; } if ($date_end > 0) { - $sql .= ",date_fin_validite='".$this->db->idate($date_end)."'"; + $sql .= ",date_fin_validite = '".$this->db->idate($date_end)."'"; } else { - $sql .= ",date_fin_validite=null"; + $sql .= ",date_fin_validite = null"; } if ($date_debut_reel > 0) { - $sql .= ",date_ouverture='".$this->db->idate($date_debut_reel)."'"; + $sql .= ",date_ouverture = '".$this->db->idate($date_debut_reel)."'"; } else { - $sql .= ",date_ouverture=null"; + $sql .= ",date_ouverture = null"; } if ($date_fin_reel > 0) { - $sql .= ",date_cloture='".$this->db->idate($date_fin_reel)."'"; + $sql .= ",date_cloture = '".$this->db->idate($date_fin_reel)."'"; } else { - $sql .= ",date_cloture=null"; + $sql .= ",date_cloture = null"; } - $sql .= ", fk_unit=".($fk_unit ? "'".$this->db->escape($fk_unit)."'" : "null"); + $sql .= ", fk_unit = ".($fk_unit > 0 ? ((int) $fk_unit) : "null"); $sql .= " WHERE rowid = ".((int) $rowid); dol_syslog(get_class($this)."::updateline", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { - $result = $this->update_statut($user); - if ($result >= 0) { - if (is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used - $contractline = new ContratLigne($this->db); - $contractline->fetch($rowid); - $contractline->fetch_optionals(); + if (is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used + $contractline = new ContratLigne($this->db); + $contractline->fetch($rowid); - // We replace values in $contractline->array_options only for entries defined into $array_options - foreach ($array_options as $key => $value) { - $contractline->array_options[$key] = $array_options[$key]; - } - - $result = $contractline->insertExtraFields(); - if ($result < 0) { - $this->error[] = $contractline->error; - $error++; - } + // We replace values in $contractline->array_options only for entries defined into $array_options + foreach ($array_options as $key => $value) { + $contractline->array_options[$key] = $array_options[$key]; } - if (empty($error)) { - // Call trigger - $result = $this->call_trigger('LINECONTRACT_UPDATE', $user); - if ($result < 0) { - $this->db->rollback(); - return -3; - } - // End call triggers - - $this->db->commit(); - return 1; + $result = $contractline->insertExtraFields(); + if ($result < 0) { + $this->error[] = $contractline->error; + $error++; } - } else { - $this->db->rollback(); - dol_syslog(get_class($this)."::updateline Erreur -2"); - return -2; + } + + if (empty($error)) { + // Call trigger + $result = $this->call_trigger('LINECONTRACT_UPDATE', $user); + if ($result < 0) { + $this->db->rollback(); + return -3; + } + // End call triggers + + $this->db->commit(); + return 1; } } else { $this->db->rollback(); @@ -2187,7 +2179,7 @@ class Contrat extends CommonObject $this->from = " FROM ".MAIN_DB_PREFIX."contrat as c"; $this->from .= ", ".MAIN_DB_PREFIX."contratdet as cd"; $this->from .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $this->from .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } @@ -2218,7 +2210,7 @@ class Contrat extends CommonObject if ($user->socid) { $sql .= " AND c.fk_soc = ".((int) $user->socid); } - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -2286,7 +2278,7 @@ class Contrat extends CommonObject $sql = "SELECT count(c.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; @@ -2545,7 +2537,7 @@ class Contrat extends CommonObject if (!$error) { foreach ($this->lines as $line) { - $result = $clonedObj->addline($line->desc, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit); + $result = $clonedObj->addline($line->description, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit); if ($result < 0) { $error++; $this->error = $clonedObj->error; @@ -2770,20 +2762,20 @@ class ContratLigne extends CommonObjectLine $langs->load("contracts"); if ($status == self::STATUS_INITIAL) { - $labelStatus = $langs->trans("ServiceStatusInitial"); - $labelStatusShort = $langs->trans("ServiceStatusInitial"); + $labelStatus = $langs->transnoentities("ServiceStatusInitial"); + $labelStatusShort = $langs->transnoentities("ServiceStatusInitial"); } elseif ($status == self::STATUS_OPEN && $expired == -1) { - $labelStatus = $langs->trans("ServiceStatusRunning"); - $labelStatusShort = $langs->trans("ServiceStatusRunning"); + $labelStatus = $langs->transnoentities("ServiceStatusRunning"); + $labelStatusShort = $langs->transnoentities("ServiceStatusRunning"); } elseif ($status == self::STATUS_OPEN && $expired == 0) { - $labelStatus = $langs->trans("ServiceStatusNotLate"); - $labelStatusShort = $langs->trans("ServiceStatusNotLateShort"); + $labelStatus = $langs->transnoentities("ServiceStatusNotLate"); + $labelStatusShort = $langs->transnoentities("ServiceStatusNotLateShort"); } elseif ($status == self::STATUS_OPEN && $expired == 1) { - $labelStatus = $langs->trans("ServiceStatusLate"); - $labelStatusShort = $langs->trans("ServiceStatusLateShort"); + $labelStatus = $langs->transnoentities("ServiceStatusLate"); + $labelStatusShort = $langs->transnoentities("ServiceStatusLateShort"); } elseif ($status == self::STATUS_CLOSED) { - $labelStatus = $langs->trans("ServiceStatusClosed"); - $labelStatusShort = $langs->trans("ServiceStatusClosed"); + $labelStatus = $langs->transnoentities("ServiceStatusClosed"); + $labelStatusShort = $langs->transnoentities("ServiceStatusClosed"); } $statusType = 'status'.$status; diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 690b5432a1b..c54823ee142 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -84,6 +84,8 @@ $modulepart = 'contract'; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('contractcard', 'globalcard')); +$permissiontoadd = $user->rights->contrat->creer; // Used by the include of actions_dellink.inc.php + /* * Actions diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index b85cda094f3..99739260b36 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -92,7 +92,7 @@ $vals = array(); $sql = "SELECT count(cd.rowid) as nb, cd.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid"; @@ -101,7 +101,7 @@ $sql .= " AND c.entity IN (".getEntity('contract', 0).")"; if ($user->socid) { $sql .= ' AND c.fk_soc = '.((int) $user->socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " GROUP BY cd.statut"; @@ -129,7 +129,7 @@ if ($resql) { $sql = "SELECT count(cd.rowid) as nb, cd.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid"; @@ -138,7 +138,7 @@ $sql .= " AND c.entity IN (".getEntity('contract', 0).")"; if ($user->socid) { $sql .= ' AND c.fk_soc = '.((int) $user->socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " GROUP BY cd.statut"; @@ -240,13 +240,13 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { $sql = "SELECT c.rowid, c.ref,"; $sql .= " s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.rowid = c.fk_soc"; $sql .= " AND c.entity IN (".getEntity('contract', 0).")"; $sql .= " AND c.statut = 0"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -298,7 +298,7 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { } -print '
'; +print '
'; // Last modified contracts @@ -311,7 +311,7 @@ $sql .= " sum(".$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AN $sql .= " sum(".$db->ifsql("cd.statut=5", 1, 0).') as nb_closed,'; $sql .= " c.rowid as cid, c.ref, c.datec, c.tms, c.statut, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; } $sql .= " ".MAIN_DB_PREFIX."contrat as c"; @@ -319,7 +319,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contra $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('contract', 0).")"; $sql .= " AND c.statut > 0"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -386,7 +386,7 @@ $sql .= " s.nom as name,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity"; $sql .= " FROM (".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd"; @@ -394,7 +394,7 @@ $sql .= ") LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; $sql .= " WHERE c.entity IN (".getEntity('contract', 0).")"; $sql .= " AND cd.fk_contrat = c.rowid"; $sql .= " AND c.fk_soc = s.rowid"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -466,7 +466,7 @@ $sql .= " s.nom as name,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity"; $sql .= " FROM (".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd"; @@ -476,7 +476,7 @@ $sql .= " AND c.statut = 1"; $sql .= " AND cd.statut = 0"; $sql .= " AND cd.fk_contrat = c.rowid"; $sql .= " AND c.fk_soc = s.rowid"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -547,7 +547,7 @@ $sql .= " s.nom as name,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity"; $sql .= " FROM (".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd"; @@ -558,7 +558,7 @@ $sql .= " AND cd.statut = 4"; $sql .= " AND cd.date_fin_validite < '".$db->idate($now)."'"; $sql .= " AND cd.fk_contrat = c.rowid"; $sql .= " AND c.fk_soc = s.rowid"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -622,7 +622,7 @@ if ($resql) { } -print '
'; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardContracts', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 7e19ec13e22..cee0faf95aa 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -255,7 +255,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; -if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { +if ($search_sale > 0 || (empty($user->rights->societe->client->voir) && !$socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."contrat as c"; @@ -281,7 +281,7 @@ if ($search_product_category > 0) { if ($socid) { $sql .= " AND s.rowid = ".((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($search_date_start) { diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 0c06a194fd4..5bd98ded8c4 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -218,7 +218,7 @@ $sql = "SELECT c.rowid as cid, c.ref, c.statut as cstatut, c.ref_customer, c.ref $sql .= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur,"; $sql .= " cd.rowid, cd.description, cd.statut,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as label, p.fk_product_type as ptype, p.entity as pentity,"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " sc.fk_soc, sc.fk_user,"; } $sql .= " cd.date_ouverture_prevue,"; @@ -244,7 +244,7 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // N $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c,"; $sql .= " ".MAIN_DB_PREFIX."societe as s,"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; } $sql .= " ".MAIN_DB_PREFIX."contratdet as cd"; @@ -261,7 +261,7 @@ if ($search_product_category > 0) { $sql .= " AND cp.fk_categorie = ".((int) $search_product_category); } $sql .= " AND c.fk_soc = s.rowid"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($mode == "0") { diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index 8715a8ce4cc..fad5b67cf27 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php @@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) { } -print "\n"; +print "\n"; global $user; diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index e4483258b92..6fd84f4eda3 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -73,7 +73,7 @@ if ($action == 'add' && !empty($permissiontoadd)) { if (in_array($object->fields[$key]['type'], array('text', 'html'))) { $value = GETPOST($key, 'restricthtml'); } elseif ($object->fields[$key]['type'] == 'date') { - $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); // for date without hour, we use gmt + $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); // for date without hour, we use gmt } elseif ($object->fields[$key]['type'] == 'datetime') { $value = dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), GETPOST($key.'sec', 'int'), GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int'), 'tzuserrel'); } elseif ($object->fields[$key]['type'] == 'duration') { @@ -87,7 +87,7 @@ if ($action == 'add' && !empty($permissiontoadd)) { $value = $tmparraykey[GETPOST($key)].','.GETPOST($key.'2'); } else { if ($key == 'lang') { - $value = GETPOST($key, 'aZ09')?GETPOST($key, 'aZ09'):""; + $value = GETPOST($key, 'aZ09') ?GETPOST($key, 'aZ09') : ""; } else { $value = GETPOST($key, 'alphanohtml'); } @@ -190,7 +190,7 @@ if ($action == 'update' && !empty($permissiontoadd)) { $value = GETPOST($key, 'restricthtml'); } } elseif ($object->fields[$key]['type'] == 'date') { - $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); // for date without hour, we use gmt + $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); // for date without hour, we use gmt } elseif ($object->fields[$key]['type'] == 'datetime') { $value = dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), GETPOST($key.'sec', 'int'), GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int'), 'tzuserrel'); } elseif ($object->fields[$key]['type'] == 'duration') { diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index ad9ca441e8a..86d4e923131 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -36,8 +36,19 @@ if (GETPOST('uploadform', 'int') && empty($_POST) && empty($_FILES)) { die; } +if ((GETPOST('sendit', 'alpha') + || GETPOST('linkit', 'restricthtml') + || ($action == 'confirm_deletefile' && $confirm == 'yes') + || ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha')) + || ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha'))) && empty($permissiontoadd)) { + dol_syslog('The file actions_linkedfiles.inc.php was included but paramater $permissiontoadd as not set before.'); + print 'The file actions_linkedfiles.inc.php was included but paramater $permissiontoadd as not set before.'; + die; +} + + // Submit file/link -if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && (!isset($permissiontoadd) || $permissiontoadd)) { +if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && !empty($permissiontoadd)) { if (!empty($_FILES)) { if (is_array($_FILES['userfile']['tmp_name'])) { $userfiles = $_FILES['userfile']['tmp_name']; @@ -75,7 +86,7 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && (!is } } } -} elseif (GETPOST('linkit', 'restricthtml') && !empty($conf->global->MAIN_UPLOAD_DOC) && (!isset($permissiontoadd) || $permissiontoadd)) { +} elseif (GETPOST('linkit', 'restricthtml') && !empty($conf->global->MAIN_UPLOAD_DOC) && !empty($permissiontoadd)) { $link = GETPOST('link', 'alpha'); if ($link) { if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://' && substr($link, 0, 7) != 'file://' && substr($link, 0, 7) != 'davs://') { @@ -87,7 +98,7 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && (!is // Delete file/link -if ($action == 'confirm_deletefile' && $confirm == 'yes' && (!isset($permissiontoadd) || $permissiontoadd)) { +if ($action == 'confirm_deletefile' && $confirm == 'yes' && !empty($permissiontoadd)) { $urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). if (GETPOST('section', 'alpha')) { // For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir @@ -158,7 +169,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && (!isset($permissiont exit; } } -} elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha') && (!isset($permissiontoadd) || $permissiontoadd)) { +} elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha') && !empty($permissiontoadd)) { require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $langs->load('link'); $link = new Link($db); @@ -176,7 +187,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && (!isset($permissiont } else { //error fetching } -} elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha') && (!isset($permissiontoadd) || $permissiontoadd)) { +} elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha') && !empty($permissiontoadd)) { // For documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. if (!empty($upload_dir)) { $filenamefrom = dol_sanitizeFileName(GETPOST('renamefilefrom', 'alpha'), '_', 0); // Do not remove accents diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 2a42d4a3d00..63b4b3f7fc6 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -205,19 +205,21 @@ if ($type == 'directory') { 'product', 'tax', 'project', + 'project_task', 'fichinter', 'user', 'expensereport', 'holiday', 'recruitment-recruitmentcandidature', 'banque', + 'chequereceipt', 'mrp-mo' ); $parameters = array('modulepart'=>$module); $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); - if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) { - $automodules[]=$hookmanager->resArray['module']; + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) { + $automodules[] = $hookmanager->resArray['module']; } // TODO change for multicompany sharing @@ -243,6 +245,8 @@ if ($type == 'directory') { $upload_dir = $conf->tax->dir_output; } elseif ($module == 'project') { $upload_dir = $conf->projet->dir_output; + } elseif ($module == 'project_task') { + $upload_dir = $conf->projet->dir_output; } elseif ($module == 'fichinter') { $upload_dir = $conf->ficheinter->dir_output; } elseif ($module == 'user') { @@ -255,8 +259,10 @@ if ($type == 'directory') { $upload_dir = $conf->recruitment->dir_output.'/recruitmentcandidature'; } elseif ($module == 'banque') { $upload_dir = $conf->bank->dir_output; + } elseif ($module == 'chequereceipt') { + $upload_dir = $conf->bank->dir_output.'/checkdeposits'; } elseif ($module == 'mrp-mo') { - $upload_dir = $conf->mrp->dir_output.'/mo'; + $upload_dir = $conf->mrp->dir_output; } else { $parameters = array('modulepart'=>$module); $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); diff --git a/htdocs/core/ajax/onlineSign.php b/htdocs/core/ajax/onlineSign.php new file mode 100644 index 00000000000..488b5051ea5 --- /dev/null +++ b/htdocs/core/ajax/onlineSign.php @@ -0,0 +1,132 @@ +. + */ + +/** + * \file /htdocs/core/ajax/onlineSign.php + * \brief File to make Ajax action on Knowledge Management + */ + +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Disables token renewal +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +// Do not check anti CSRF attack test +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +// If there is no need to load and show top and left menu +if (!defined("NOLOGIN")) { + define("NOLOGIN", '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +include '../../main.inc.php'; + +$action = GETPOST('action', 'aZ09'); +$signature = GETPOST('signaturebase64'); +$ref = GETPOST('ref', 'aZ09'); +$mode = GETPOST('mode', 'aZ09'); +$error = 0; +$response = ""; +/* + * Actions + */ + +// None + + +/* + * View + */ + +if ($action == "importSignature") { + if (!empty($signature) && $signature[0] == "image/png;base64") { + $signature = $signature[1]; + $data = base64_decode($signature); + $upload_dir = DOL_DATA_ROOT."/".$mode."/".$ref."/"; + $date = dol_print_date(dol_now(), "%Y%m%d%H%M%S"); + $filename = "signatures/".$date."_signature.png"; + if (!is_dir($upload_dir."signatures/")) { + if (!mkdir($upload_dir."signatures/")) { + $response ="error mkdir"; + $error++; + } + } + if (!$error) { + $return = file_put_contents($upload_dir.$filename, $data); + if ($return == false) { + $response = 'error file_put_content'; + } else { + if ($mode == "propale") { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + $object = new Propal($db); + $object->fetch(0, $ref); + + $pdf = pdf_getInstance(); + $pdf->Open(); + $pdf->AddPage(); + $pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf"); + + $tppl = $pdf->importPage(1); + $pdf->useTemplate($tppl); + $pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15); + $pdf->Close(); + $pdf->Output($upload_dir.$ref."_signed-".$date.".pdf", "F"); + + $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; + $sql .= " SET fk_statut = ".((int) $object::STATUS_SIGNED).", note_private = '".$object->note_private."', date_signature='".$db->idate(dol_now())."'"; + $sql .= " WHERE rowid = ".((int) $object->id); + + dol_syslog(__METHOD__, LOG_DEBUG); + $resql = $db->query($sql); + if (!$resql) { + $error++; + } else { + $num = $db->affected_rows($resql); + } + + if (!$error) { + $db->commit(); + $response = "success"; + setEventMessage("PropalSigned"); + } else { + $db->rollback(); + $response = "error sql"; + } + } + } + } + } else { + $response = 'error signature_not_found'; + } +} +echo $response; diff --git a/htdocs/core/bookmarks_page.php b/htdocs/core/bookmarks_page.php new file mode 100644 index 00000000000..af2ba15829c --- /dev/null +++ b/htdocs/core/bookmarks_page.php @@ -0,0 +1,131 @@ + + * + * This file is a modified version of datepicker.php from phpBSM to fix some + * bugs, to add new features and to dramatically increase speed. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/core/bookmarks_page.php + * \brief File to return a page with the complete list of bookmarks (all search input fields) + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', 1); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); +} +//if (! defined('NOLOGIN')) define('NOLOGIN',1); // Not disabled cause need to load personalized language +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', 1); +} +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); + +require_once '../main.inc.php'; + +if (GETPOST('lang', 'aZ09')) { + $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php +} + +$langs->load("main"); + +$right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right'); +$left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); + + +/* + * View + */ + +$title = $langs->trans("Bookmarks"); + +// URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests +$head = ''."\n"; +$arrayofjs = array(); +$arrayofcss = array(); +top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); + + + +print ''."\n"; +print '
'; +//print '
'; + +$nbofsearch = 0; + +// Instantiate hooks of thirdparty module +$hookmanager->initHooks(array('bookmarks')); + +// Define $bookmarks +$bookmarkList = ''; +$searchForm = ''; + +$arrayresult = array(); +//include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; + + + +// Menu with list of bookmarks +$sql = "SELECT rowid, title, url, target FROM ".MAIN_DB_PREFIX."bookmark"; +$sql .= " WHERE (fk_user = ".((int) $user->id)." OR fk_user is NULL OR fk_user = 0)"; +$sql .= " AND entity IN (".getEntity('bookmarks').")"; +$sql .= " ORDER BY position"; +if ($resql = $db->query($sql)) { + $bookmarkList = ''; + + $searchForm .= ''; +} else { + dol_print_error($db); +} + + +// Execute hook printBookmarks +$parameters = array('bookmarks'=>$bookmarkList); +$reshook = $hookmanager->executeHooks('printBookmarks', $parameters); // Note that $action and $object may have been modified by some hooks +if (empty($reshook)) { + $bookmarkList .= $hookmanager->resPrint; +} else { + $bookmarkList = $hookmanager->resPrint; +} + + +print "\n"; +print "\n"; +print '
'; +print ''; +print '
'."\n"; +print $bookmarkList; +print '
'."\n"; +print '
'; +print "\n\n"; + +print '
'; +print ''."\n"; + +$db->close(); diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index 64a2314560c..ee41df3cdd2 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -92,20 +92,20 @@ class box_actions extends ModeleBoxes $sql .= ", s.code_client, s.code_compta, s.client"; $sql .= ", s.logo, s.email, s.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm AS ta, ".MAIN_DB_PREFIX."actioncomm AS a"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; $sql .= " WHERE a.fk_action = ta.id"; $sql .= " AND a.entity IN (".getEntity('actioncomm').")"; $sql .= " AND a.percent >= 0 AND a.percent < 100"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".((int) $user->id).")"; } if ($user->socid) { $sql .= " AND s.rowid = ".((int) $user->socid); } - if (!$user->rights->agenda->allactions->read) { + if (empty($user->rights->agenda->allactions->read)) { $sql .= " AND (a.fk_user_author = ".((int) $user->id)." OR a.fk_user_action = ".((int) $user->id)." OR a.fk_user_done = ".((int) $user->id).")"; } $sql .= " ORDER BY a.datec DESC"; @@ -162,7 +162,7 @@ class box_actions extends ModeleBoxes $this->info_box_contents[$line][2] = array( 'td' => 'class="center nowraponall"', - 'text' => dol_print_date($datelimite, "dayhour", 'tzuserrel'), + 'text' => $datelimite ? dol_print_date($datelimite, "dayhour", 'tzuserrel') : '', 'asis' => 1 ); diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index a858111d76d..487c2170a4a 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -113,13 +113,13 @@ class box_activity extends ModeleBoxes if ($refresh) { $sql = "SELECT p.fk_statut, SUM(p.total_ttc) as Mnttot, COUNT(*) as nb"; $sql .= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ")"; $sql .= " WHERE p.entity IN (".getEntity('propal').")"; $sql .= " AND p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { @@ -203,13 +203,13 @@ class box_activity extends ModeleBoxes if ($refresh) { $sql = "SELECT c.fk_statut, sum(c.total_ttc) as Mnttot, count(*) as nb"; $sql .= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ")"; $sql .= " WHERE c.entity IN (".getEntity('commande').")"; $sql .= " AND c.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { @@ -291,12 +291,12 @@ class box_activity extends ModeleBoxes if ($refresh) { $sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb"; $sql .= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ")"; $sql .= " WHERE f.entity IN (".getEntity('invoice').')'; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 995f017f5f1..74ba5a9d4c9 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -92,12 +92,12 @@ class box_clients extends ModeleBoxes $sql .= ", s.logo, s.email, s.entity"; $sql .= ", s.datec, s.tms, s.status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.client IN (1, 3)"; $sql .= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 4d47f703fff..abf9baf06f3 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -101,7 +101,7 @@ class box_commandes extends ModeleBoxes $sql .= ", c.total_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -109,7 +109,7 @@ class box_commandes extends ModeleBoxes if (!empty($conf->global->ORDER_BOX_LAST_ORDERS_VALIDATED_ONLY)) { $sql .= " AND c.fk_statut = 1"; } - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 97090895500..0d774faf569 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -103,11 +103,11 @@ class box_contacts extends ModeleBoxes if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); } - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE sp.entity IN (".getEntity('socpeople').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 9bb794b94fa..8eeb1b93323 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -86,12 +86,12 @@ class box_contracts extends ModeleBoxes $sql .= " c.rowid, c.ref, c.statut as fk_statut, c.date_contrat, c.datec, c.fin_validite, c.date_cloture"; $sql .= ", c.ref_customer, c.ref_supplier"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_customers_outstanding_bill_reached.php b/htdocs/core/boxes/box_customers_outstanding_bill_reached.php index 87be4a10c2d..22fafb4633c 100644 --- a/htdocs/core/boxes/box_customers_outstanding_bill_reached.php +++ b/htdocs/core/boxes/box_customers_outstanding_bill_reached.php @@ -35,7 +35,7 @@ class box_customers_outstanding_bill_reached extends ModeleBoxes public $boxcode = "customersoutstandingbillreached"; public $boximg = "object_company"; public $boxlabel = "BoxCustomersOutstandingBillReached"; - public $depends = array("facture","societe"); + public $depends = array("facture", "societe"); /** * @var DoliDB Database handler. @@ -93,12 +93,12 @@ class box_customers_outstanding_bill_reached extends ModeleBoxes $sql .= ", s.outstanding_limit"; $sql .= ", s.datec, s.tms, s.status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.client IN (1, 3)"; $sql .= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 6bdeabda212..e1d2860b212 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -100,13 +100,13 @@ class box_factures extends ModeleBoxes $sql .= ", s.logo, s.email, s.entity"; $sql .= ", s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6"; $sql .= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ")"; $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 70640efeb78..ae905d5d468 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -100,12 +100,12 @@ class box_factures_fourn extends ModeleBoxes $sql .= ', f.date_lim_reglement as datelimite, f.tms, f.type'; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND f.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index 74f9a3a46aa..cfef8801414 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -95,14 +95,14 @@ class box_factures_fourn_imp extends ModeleBoxes $sql .= ", f.tms"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ",".MAIN_DB_PREFIX."facture_fourn as f"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND f.entity = ".$conf->entity; $sql .= " AND f.paye = 0"; $sql .= " AND fk_statut = 1"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index c78e5b7dec9..9a8e764f208 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -108,7 +108,7 @@ class box_factures_imp extends ModeleBoxes if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); } - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."facture as f"; @@ -117,7 +117,7 @@ class box_factures_imp extends ModeleBoxes $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND f.paye = 0"; $sql .= " AND fk_statut = 1"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index 3b62361343a..e0bdaf709ce 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -89,13 +89,13 @@ class box_ficheinter extends ModeleBoxes $sql .= ", s.code_client, s.code_compta, s.client"; $sql .= ", s.logo, s.email, s.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir) { + if (empty($user->rights->societe->client->voir)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."fichinter as f"; $sql .= " WHERE f.fk_soc = s.rowid "; $sql .= " AND f.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index c0516c1cf4c..4f297135b26 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -87,12 +87,12 @@ class box_fournisseurs extends ModeleBoxes $sql .= ", s.logo, s.email, s.entity"; $sql .= ", s.datec, s.tms, s.status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.fournisseur = 1"; $sql .= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php index 28c3b22788d..fd89e732937 100644 --- a/htdocs/core/boxes/box_funnel_of_prospection.php +++ b/htdocs/core/boxes/box_funnel_of_prospection.php @@ -24,7 +24,7 @@ * \ingroup projet * \brief Module to show the funnel of prospection */ -include_once DOL_DOCUMENT_ROOT . "/core/boxes/modules_boxes.php"; +include_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php"; /** * Class to manage the box to show last projet @@ -91,8 +91,8 @@ class box_funnel_of_prospection extends ModeleBoxes $badgeStatus7 = '#baa32b'; $badgeStatus8 = '#993013'; $badgeStatus9 = '#e7f0f0'; - if (file_exists(DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php')) { - include DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php'; + if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) { + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; } $listofoppstatus = array(); $listofopplabel = array(); @@ -100,7 +100,7 @@ class box_funnel_of_prospection extends ModeleBoxes $colorseriesstat = array(); $bordercolorseries = array(); $sql = "SELECT cls.rowid, cls.code, cls.percent, cls.label"; - $sql .= " FROM " . MAIN_DB_PREFIX . "c_lead_status as cls"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_lead_status as cls"; $sql .= " WHERE active=1"; $sql .= " AND cls.code <> 'LOST'"; $sql .= $this->db->order('cls.rowid', 'ASC'); @@ -148,14 +148,14 @@ class box_funnel_of_prospection extends ModeleBoxes $this->max = $max; $this->info_box_head = array( - 'text' => $langs->trans("Statistics") . ' - ' . $langs->trans("BoxTitleFunnelOfProspection"), + 'text' => $langs->trans("Statistics").' - '.$langs->trans("BoxTitleFunnelOfProspection"), 'graph' => '1' ); if ($user->rights->projet->lire || !empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $sql = "SELECT p.fk_opp_status as opp_status, cls.code, COUNT(p.rowid) as nb, SUM(p.opp_amount) as opp_amount, SUM(p.opp_amount * p.opp_percent) as ponderated_opp_amount"; - $sql .= " FROM " . MAIN_DB_PREFIX . "projet as p, " . MAIN_DB_PREFIX . "c_lead_status as cls"; - $sql .= " WHERE p.entity IN (" . getEntity('project') . ")"; + $sql .= " FROM ".MAIN_DB_PREFIX."projet as p, ".MAIN_DB_PREFIX."c_lead_status as cls"; + $sql .= " WHERE p.entity IN (".getEntity('project').")"; $sql .= " AND p.fk_opp_status = cls.rowid"; $sql .= " AND p.fk_statut = 1"; // Opend projects only $sql .= " AND cls.code NOT IN ('LOST')"; @@ -200,14 +200,14 @@ class box_funnel_of_prospection extends ModeleBoxes $liststatus = array(); $data = array(''); $customlabels = array(); - $total=0; + $total = 0; foreach ($listofstatus as $status) { $customlabel = ''; $labelStatus = ''; if ($status != 7) { $code = dol_getIdFromCode($this->db, $status, 'c_lead_status', 'rowid', 'code'); if ($code) { - $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code); + $labelStatus = $langs->transnoentitiesnoconv("OppStatus".$code); } if (empty($labelStatus)) { $labelStatus = $listofopplabel[$status]; @@ -218,16 +218,16 @@ class box_funnel_of_prospection extends ModeleBoxes $liststatus[] = $labelStatus; if (!$conf->use_javascript_ajax) { $stringtoprint .= ''; - $stringtoprint .= '' . $labelStatus . ''; - $stringtoprint .= '' . price((isset($valsamount[$status]) ? (float) $valsamount[$status] : 0), 0, '', 1, -1, -1, $conf->currency) . ''; + $stringtoprint .= ''.$labelStatus.''; + $stringtoprint .= ''.price((isset($valsamount[$status]) ? (float) $valsamount[$status] : 0), 0, '', 1, -1, -1, $conf->currency).''; $stringtoprint .= "\n"; } } - $customlabels[]=$customlabel; + $customlabels[] = $customlabel; } $dataseries[] = $data; if ($conf->use_javascript_ajax) { - include_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $dolgraph = new DolGraph(); $dolgraph->SetMinValue(0); $dolgraph->SetData($dataseries); @@ -273,7 +273,7 @@ class box_funnel_of_prospection extends ModeleBoxes 'tr' => 'class="oddeven"', 'td' => 'class="left "', 'maxlength' => 500, - 'text' => $langs->trans("OpportunityTotalAmount") . ' (' . $langs->trans("WonLostExcluded") . ')' + 'text' => $langs->trans("OpportunityTotalAmount").' ('.$langs->trans("WonLostExcluded").')' ); $this->info_box_contents[$line][] = array( 'tr' => 'class="oddeven"', @@ -286,7 +286,7 @@ class box_funnel_of_prospection extends ModeleBoxes 'tr' => 'class="oddeven"', 'td' => 'class="left "', 'maxlength' => 500, - 'text' => $form->textwithpicto($langs->trans("OpportunityPonderatedAmount") . ' (' . $langs->trans("WonLostExcluded") . ')', $langs->trans("OpportunityPonderatedAmountDesc"), 1) + 'text' => $form->textwithpicto($langs->trans("OpportunityPonderatedAmount").' ('.$langs->trans("WonLostExcluded").')', $langs->trans("OpportunityPonderatedAmountDesc"), 1) ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index fe01eae730b..18ffe022610 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -99,7 +99,7 @@ class box_graph_invoices_permonth extends ModeleBoxes if ($user->socid) { $socid = $user->socid; } - if (!$user->rights->societe->client->voir || $socid) { + if (empty($user->rights->societe->client->voir) || $socid) { $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user } diff --git a/htdocs/core/boxes/box_graph_invoices_peryear.php b/htdocs/core/boxes/box_graph_invoices_peryear.php index 22d9ad956e7..9126cfcfb37 100644 --- a/htdocs/core/boxes/box_graph_invoices_peryear.php +++ b/htdocs/core/boxes/box_graph_invoices_peryear.php @@ -93,7 +93,7 @@ class box_graph_invoices_peryear extends ModeleBoxes $prefix = ''; $socid = 0; if ($user->socid) $socid = $user->socid; - if (!$user->rights->societe->client->voir || $socid) $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user + if (empty($user->rights->societe->client->voir) || $socid) $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user if ($user->rights->facture->lire) { $mesg = ''; diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 5ecc26c3f90..3d8cb88938d 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -98,7 +98,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes if ($user->socid) { $socid = $user->socid; } - if (!$user->rights->societe->client->voir || $socid) { + if (empty($user->rights->societe->client->voir) || $socid) { $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user } diff --git a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php index baa822dcf29..1c0e7a6e3ff 100644 --- a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php +++ b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php @@ -65,6 +65,8 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes public function loadBox($max = 5) { global $conf, $user, $langs; + $dataseries = array(); + $graphtoshow = ""; $badgeStatus0 = '#cbd3d3'; // draft $badgeStatus1 = '#bc9526'; // validated @@ -78,14 +80,14 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes $badgeStatus7 = '#baa32b'; $badgeStatus8 = '#993013'; $badgeStatus9 = '#e7f0f0'; - if (file_exists(DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php')) { - include DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php'; + if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) { + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; } $this->max = $max; $param_day = 'DOLUSERCOOKIE_ticket_last_days'; - if ($_POST[$param_day]) { + if (!empty($_POST[$param_day])) { if ($_POST[$param_day] >= 15) { $days = 14; } else { @@ -95,28 +97,27 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes $days = 7; } require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"; - $text = $langs->trans("BoxTicketLastXDays", $days).' ' . img_picto('', 'filter.png', 'id="idsubimgDOLUSERCOOKIE_ticket_last_days" class="linkobject"'); + $text = $langs->trans("BoxTicketLastXDays", $days).' '.img_picto('', 'filter.png', 'id="idsubimgDOLUSERCOOKIE_ticket_last_days" class="linkobject"'); $this->info_box_head = array( 'text' => $text, 'limit' => dol_strlen($text) ); $today = date_time_set(date_create(), 0, 0); $todayformat = date('Y-m-d', date_timestamp_get($today)); - $intervaltosub = new DateInterval('P' . dol_escape_htmltag($days - 1) . 'D'); + $intervaltosub = new DateInterval('P'.dol_escape_htmltag($days - 1).'D'); $intervaltoadd = new DateInterval('P1D'); $minimumdatec = date_sub($today, $intervaltosub); $minimumdatecformated = date('Y-m-d', date_timestamp_get($minimumdatec)); if ($user->rights->ticket->read) { $sql = "SELECT CAST(t.datec AS DATE) as datec, COUNT(t.datec) as nb"; - $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; - $sql .= " WHERE CAST(t.datec AS DATE) > DATE_SUB(CURRENT_DATE, INTERVAL " . $days . " DAY)"; + $sql .= " FROM ".MAIN_DB_PREFIX."ticket as t"; + $sql .= " WHERE CAST(t.datec AS DATE) > DATE_SUB(CURRENT_DATE, INTERVAL ".$days." DAY)"; $sql .= " GROUP BY CAST(t.datec AS DATE)"; $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - $dataseries = array(); while ($i < $num) { $objp = $this->db->fetch_object($resql); while ($minimumdatecformated < $objp->datec) { @@ -147,12 +148,12 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes }); '; $stringtoshow .= '
'; // hideobject is to start hidden - $stringtoshow .= '
'; - $stringtoshow .= ''; + $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ' ' . $langs->trans("Days"); - $stringtoshow .= ''; + $stringtoshow .= ' '.$langs->trans("Days"); + $stringtoshow .= ''; $stringtoshow .= '
'; $stringtoshow .= '
'; @@ -180,21 +181,21 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes $px1->mode = 'depth'; $px1->draw('idgraphticketlastxdays'); - $graphtoshow= $px1->show($totalnb ? 0 : 1); + $graphtoshow = $px1->show($totalnb ? 0 : 1); } if ($totalnb) { $stringtoshow .= $graphtoshow; } $stringtoshow .= ''; if ($totalnb) { - $this->info_box_contents[][]=array( + $this->info_box_contents[][] = array( 'td' => 'center', 'text' => $stringtoshow ); } else { $this->info_box_contents[0][0] = array( 'td' => 'class="center opacitymedium"', - 'text' => $stringtoshow . $langs->trans("BoxNoTicketLastXDays", $days) + 'text' => $stringtoshow.$langs->trans("BoxNoTicketLastXDays", $days) ); } } else { diff --git a/htdocs/core/boxes/box_graph_new_vs_close_ticket.php b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php index a4bf2d6990f..435cc76451e 100644 --- a/htdocs/core/boxes/box_graph_new_vs_close_ticket.php +++ b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php @@ -2,7 +2,7 @@ /* Module descriptor for ticket system * Copyright (C) 2013-2016 Jean-François FERRY * 2016 Christophe Battarel - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019-2021 Frédéric France * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ */ /** - * \file core/boxes/box_nb_ticket_last_x_days.php + * \file htdocs/core/boxes/box_graph_new_vs_close_ticket.php * \ingroup ticket * \brief This box shows the number of new daily tickets the last X days */ @@ -98,10 +98,10 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes $num = $this->db->num_rows($resql); if ($num > 0) { $objp = $this->db->fetch_object($resql); - $data[] = array($langs->trans('TicketCreatedToday'), $objp->nb); + $data[] = array($langs->transnoentitiesnoconv('TicketCreatedToday'), $objp->nb); $totalnb += $objp->nb; } else { - $data[] = array($langs->trans('TicketCreatedToday'), 0); + $data[] = array($langs->transnoentitiesnoconv('TicketCreatedToday'), 0); } } else { dol_print_error($this->db); @@ -116,10 +116,10 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes $num = $this->db->num_rows($resql); if ($num > 0) { $objp = $this->db->fetch_object($resql); - $data[] = array($langs->trans('TicketClosedToday'), $objp->nb); + $data[] = array($langs->transnoentitiesnoconv('TicketClosedToday'), $objp->nb); $totalnb += $objp->nb; } else { - $data[] = array($langs->trans('TicketClosedToday'), 0); + $data[] = array($langs->transnoentitiesnoconv('TicketClosedToday'), 0); } } else { dol_print_error($this->db); diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 48f0bd67ec3..0fd27c377d5 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -99,7 +99,7 @@ class box_graph_orders_permonth extends ModeleBoxes if ($user->socid) { $socid = $user->socid; } - if (!$user->rights->societe->client->voir || $socid) { + if (empty($user->rights->societe->client->voir) || $socid) { $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user } diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index a394834cd97..be58b1e983c 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -98,7 +98,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes if ($user->socid) { $socid = $user->socid; } - if (!$user->rights->societe->client->voir || $socid) { + if (empty($user->rights->societe->client->voir) || $socid) { $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user } diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 8a95761ea08..03899fb922f 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -101,7 +101,7 @@ class box_graph_propales_permonth extends ModeleBoxes if ($user->socid) { $socid = $user->socid; } - if (!$user->rights->societe->client->voir || $socid) { + if (empty($user->rights->societe->client->voir) || $socid) { $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user } diff --git a/htdocs/core/boxes/box_graph_ticket_by_severity.php b/htdocs/core/boxes/box_graph_ticket_by_severity.php index 13cd0c40c86..5e69a49e88e 100644 --- a/htdocs/core/boxes/box_graph_ticket_by_severity.php +++ b/htdocs/core/boxes/box_graph_ticket_by_severity.php @@ -2,7 +2,7 @@ /* Module descriptor for ticket system * Copyright (C) 2013-2016 Jean-François FERRY * 2016 Christophe Battarel - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019-2021 Frédéric France * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ */ /** - * \file core/boxes/box_ticket_by_severity.php + * \file htdocs/core/boxes/box_graph_ticket_by_severity.php * \ingroup ticket * \brief This box shows open tickets by severity */ diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php index 57e54594255..300a13803c5 100644 --- a/htdocs/core/boxes/box_last_modified_ticket.php +++ b/htdocs/core/boxes/box_last_modified_ticket.php @@ -96,7 +96,7 @@ class box_last_modified_ticket extends ModeleBoxes $sql .= " WHERE t.entity IN (".getEntity('ticket').')'; // $sql.= " AND e.rowid = er.fk_event"; - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = " .((int) $user->id); + //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = " .((int) $user->id); if ($user->socid) { $sql .= " AND t.fk_soc = ".((int) $user->socid); } diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php index 39086464f73..25cb353b268 100644 --- a/htdocs/core/boxes/box_last_ticket.php +++ b/htdocs/core/boxes/box_last_ticket.php @@ -95,7 +95,7 @@ class box_last_ticket extends ModeleBoxes $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=t.fk_soc"; $sql .= " WHERE t.entity IN (".getEntity('ticket').")"; // $sql.= " AND e.rowid = er.fk_event"; - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); + //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); if ($user->socid) { $sql .= " AND t.fk_soc= ".((int) $user->socid); } diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index f14ab699690..63a4e90cdd0 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -94,7 +94,7 @@ class box_project extends ModeleBoxes // Get list of project id allowed to user (in a string list separated by coma) $projectsListId = ''; - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid); } @@ -102,7 +102,7 @@ class box_project extends ModeleBoxes $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " WHERE p.entity IN (".getEntity('project').")"; // Only current entity or severals if permission ok $sql .= " AND p.fk_statut = 1"; // Only open projects - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; // public and assigned to, or restricted to company for external users } diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 6599116a980..51d313b7254 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -90,12 +90,12 @@ class box_propales extends ModeleBoxes $sql .= ", p.rowid, p.ref, p.fk_statut as status, p.datep as dp, p.datec, p.fin_validite, p.date_cloture, p.total_ht, p.total_tva, p.total_ttc, p.tms"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('propal').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 06d42e34b18..a46713a3206 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -93,12 +93,12 @@ class box_prospect extends ModeleBoxes $sql .= ", s.fk_stcomm"; $sql .= ", s.datec, s.tms, s.status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.client IN (2, 3)"; $sql .= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 320932a0c6f..c72a378a1a2 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -95,7 +95,7 @@ class box_services_contracts extends ModeleBoxes $sql .= " INNER JOIN ".MAIN_DB_PREFIX."contrat as c ON s.rowid = c.fk_soc"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= ")"; diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index 433c566ad31..4353fb7eb02 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -86,7 +86,7 @@ class box_services_expired extends ModeleBoxes $sql .= " s.nom as name, s.rowid as socid, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,"; $sql .= " MIN(cd.date_fin_validite) as date_line, COUNT(cd.rowid) as nb_services"; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe s, ".MAIN_DB_PREFIX."contratdet as cd"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE cd.statut = 4 AND cd.date_fin_validite <= '".$this->db->idate($now)."'"; @@ -95,7 +95,7 @@ class box_services_expired extends ModeleBoxes if ($user->socid) { $sql .= ' AND c.fk_soc = '.((int) $user->socid); } - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " GROUP BY c.rowid, c.ref, c.statut, c.date_contrat, c.ref_customer, c.ref_supplier, s.nom, s.rowid"; diff --git a/htdocs/core/boxes/box_shipments.php b/htdocs/core/boxes/box_shipments.php index 2b6adfe3bdc..d0ddf1f8dcb 100644 --- a/htdocs/core/boxes/box_shipments.php +++ b/htdocs/core/boxes/box_shipments.php @@ -101,7 +101,7 @@ class box_shipments extends ModeleBoxes $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping' AND el.sourcetype IN ('commande')"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid AND el.sourcetype IN ('commande') AND el.targettype = 'shipping'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; } $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; @@ -111,7 +111,7 @@ class box_shipments extends ModeleBoxes if ($user->socid > 0) { $sql.= " AND s.rowid = ".((int) $user->socid); } - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND sc.fk_user = ".((int) $user->id); } else { $sql .= " ORDER BY e.date_delivery, e.ref DESC "; diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index b3451d9b6c3..2cc34a9255b 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -92,12 +92,12 @@ class box_supplier_orders extends ModeleBoxes $sql .= ", c.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('supplier_order').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php index 8125a848fd0..f9d2de4b7fc 100644 --- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php +++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php @@ -92,13 +92,14 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes $sql .= ", c.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('supplier_order').")"; + $sql .= " AND c.date_livraison IS NOT NULL"; $sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($user->socid) { @@ -161,7 +162,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes $this->info_box_contents[$line][] = array( 'td' => 'class="right"', - 'text' => $delayIcon.' '.dol_print_date($delivery_date, 'day', 'tzuserrel').'', + 'text' => $delayIcon.' '.($delivery_date ? dol_print_date($delivery_date, 'day', 'tzuserrel') : '').'', 'asis' => 1 ); diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index 0c349ad3e4c..e86a1206902 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -145,7 +145,7 @@ class box_task extends ModeleBoxes // Get list of project id allowed to user (in a string list separated by coma) $projectsListId = ''; - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid); } @@ -168,7 +168,7 @@ class box_task extends ModeleBoxes $sql .= " AND p.fk_statut = ".Project::STATUS_VALIDATED; $sql .= " AND (pt.progress < 100 OR pt.progress IS NULL ) "; // 100% is done and not displayed $sql .= " AND p.usage_task = 1 "; - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; // public and assigned to, or restricted to company for external users } diff --git a/htdocs/core/boxes/box_validated_projects.php b/htdocs/core/boxes/box_validated_projects.php index 3f2b2cdc221..574ee7b7d80 100644 --- a/htdocs/core/boxes/box_validated_projects.php +++ b/htdocs/core/boxes/box_validated_projects.php @@ -101,7 +101,7 @@ class box_validated_projects extends ModeleBoxes // Get list of project id allowed to user (in a string list separated by coma) $projectsListId = ''; - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid); } diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 3b98d3f3356..c7a5beae245 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -970,8 +970,8 @@ abstract class CommonInvoiceLine extends CommonObjectLine public $date_end_fill; // If set to 1, when invoice is created from a template invoice, it will also auto set the field date_end at creation public $buy_price_ht; - public $buyprice; // For backward compatibility - public $pa_ht; // For backward compatibility + public $buyprice; // For backward compatibility + public $pa_ht; // For backward compatibility public $marge_tx; public $marque_tx; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f0b150f281a..6460fd16e41 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1851,7 +1851,7 @@ abstract class CommonObject $result = false; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX.$table; - $sql .= " WHERE ".$field." = '".$key."'"; + $sql .= " WHERE ".$field." = '".$this->db->escape($key)."'"; if (!empty($element)) { $sql .= " AND entity IN (".getEntity($element).")"; } else { @@ -2048,19 +2048,19 @@ abstract class CommonObject if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { $tmparray = explode('@', $this->ismultientitymanaged); $sql .= ", ".MAIN_DB_PREFIX.$tmparray[1]." as ".($tmparray[1] == 'societe' ? 's' : 'parenttable'); // If we need to link to this table to limit select to entity - } elseif ($restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) { + } elseif ($restrictiononfksoc == 1 && $this->element != 'societe' && empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid - } elseif ($restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) { + } elseif ($restrictiononfksoc == 2 && $this->element != 'societe' && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid } - if ($restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) { + if ($restrictiononfksoc && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$aliastablesociete.".rowid = sc.fk_soc"; } $sql .= " WHERE te.".$fieldid." < '".$this->db->escape($fieldid == 'rowid' ? $this->id : $this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) - if ($restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) { + if ($restrictiononfksoc == 1 && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND sc.fk_user = ".((int) $user->id); } - if ($restrictiononfksoc == 2 && !$user->rights->societe->client->voir && !$socid) { + if ($restrictiononfksoc == 2 && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND (sc.fk_user = ".((int) $user->id).' OR te.fk_soc IS NULL)'; } if (!empty($filter)) { @@ -2072,7 +2072,7 @@ abstract class CommonObject if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { $tmparray = explode('@', $this->ismultientitymanaged); $sql .= " AND te.".$tmparray[0]." = ".($tmparray[1] == "societe" ? "s" : "parenttable").".rowid"; // If we need to link to this table to limit select to entity - } elseif ($restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) { + } elseif ($restrictiononfksoc == 1 && $this->element != 'societe' && empty($user->rights->societe->client->voir) && !$socid) { $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { @@ -2118,19 +2118,19 @@ abstract class CommonObject if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { $tmparray = explode('@', $this->ismultientitymanaged); $sql .= ", ".MAIN_DB_PREFIX.$tmparray[1]." as ".($tmparray[1] == 'societe' ? 's' : 'parenttable'); // If we need to link to this table to limit select to entity - } elseif ($restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) { + } elseif ($restrictiononfksoc == 1 && $this->element != 'societe' && empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid - } elseif ($restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) { + } elseif ($restrictiononfksoc == 2 && $this->element != 'societe' && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid } - if ($restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) { + if ($restrictiononfksoc && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$aliastablesociete.".rowid = sc.fk_soc"; } $sql .= " WHERE te.".$fieldid." > '".$this->db->escape($fieldid == 'rowid' ? $this->id : $this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) - if ($restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) { + if ($restrictiononfksoc == 1 && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND sc.fk_user = ".((int) $user->id); } - if ($restrictiononfksoc == 2 && !$user->rights->societe->client->voir && !$socid) { + if ($restrictiononfksoc == 2 && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND (sc.fk_user = ".((int) $user->id).' OR te.fk_soc IS NULL)'; } if (!empty($filter)) { @@ -2142,7 +2142,7 @@ abstract class CommonObject if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { $tmparray = explode('@', $this->ismultientitymanaged); $sql .= " AND te.".$tmparray[0]." = ".($tmparray[1] == "societe" ? "s" : "parenttable").".rowid"; // If we need to link to this table to limit select to entity - } elseif ($restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) { + } elseif ($restrictiononfksoc == 1 && $this->element != 'societe' && empty($user->rights->societe->client->voir) && !$socid) { $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { @@ -6091,7 +6091,6 @@ abstract class CommonObject } $sql .= ")"; - $resql = $this->db->query($sql); if (!$resql) { $this->error = $this->db->lasterror(); @@ -6345,6 +6344,11 @@ abstract class CommonObject $this->array_options["options_".$key] = $this->db->idate($this->array_options["options_".$key]); } break; + case 'boolean': + if (empty($this->array_options["options_".$key])) { + $this->array_options["options_".$key] = null; + } + break; /* case 'link': $param_list = array_keys($attributeParam['options']); @@ -6499,7 +6503,7 @@ abstract class CommonObject $out = ''; $type = ''; - $isDependList=0; + $isDependList = 0; $param = array(); $param['options'] = array(); $reg = array(); @@ -6807,7 +6811,7 @@ abstract class CommonObject if (!empty($InfoFieldList[3]) && $parentField) { $parent = $parentName.':'.$obj->{$parentField}; - $isDependList=1; + $isDependList = 1; } $out .= '\n"; + $optJson = array('key'=>$outkey, 'value'=>$outref, 'type'=>$outtypem); + } + + + /** + * Return list of members in Ajax if Ajax activated or go to selectTicketsList + * + * @param int $selected Preselected tickets + * @param string $htmlname Name of HTML select field (must be unique in page). + * @param string $filtertype To add a filter + * @param int $limit Limit on number of returned lines + * @param int $status Ticket status + * @param string $selected_input_value Value of preselected input text (for use with ajax) + * @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) + * @param array $ajaxoptions Options for ajax_autocompleter + * @param int $socid Thirdparty Id (to get also price dedicated to this customer) + * @param string $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. + * @param int $forcecombo Force to use combo box + * @param string $morecss Add more css on select + * @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) + * @param string $nooutput No print, return the output into a string + * @return void|string + */ + public function selectMembers($selected = '', $htmlname = 'adherentid', $filtertype = '', $limit = 0, $status = 1, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $selected_combinations = null, $nooutput = 0) + { + global $langs, $conf; + + $out = ''; + + // check parameters + if (is_null($ajaxoptions)) $ajaxoptions = array(); + + if (!empty($conf->use_javascript_ajax) && !empty($conf->global->TICKET_USE_SEARCH_TO_SELECT)) { + $placeholder = ''; + + if ($selected && empty($selected_input_value)) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; + $adherenttmpselect = new Member($this->db); + $adherenttmpselect->fetch($selected); + $selected_input_value = $adherenttmpselect->ref; + unset($adherenttmpselect); + } + + $out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/adherents/ajax/adherents.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 1, $ajaxoptions); + + if (empty($hidelabel)) $out .= $langs->trans("RefOrLabel").' : '; + elseif ($hidelabel > 1) { + $placeholder = ' placeholder="'.$langs->trans("RefOrLabel").'"'; + if ($hidelabel == 2) { + $out .= img_picto($langs->trans("Search"), 'search'); + } + } + $out .= 'global->PRODUCT_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; + if ($hidelabel == 3) { + $out .= img_picto($langs->trans("Search"), 'search'); + } + } else { + $out .= $this->selectMembersList($selected, $htmlname, $filtertype, $limit, $status, 0, $socid, $showempty, $forcecombo, $morecss); + } + + if (empty($nooutput)) print $out; + else return $out; + } + + /** + * Return list of adherents. + * Called by selectMembers. + * + * @param int $selected Preselected adherent + * @param string $htmlname Name of select html + * @param string $filtertype Filter on adherent type + * @param int $limit Limit on number of returned lines + * @param string $filterkey Filter on adherent ref or subject + * @param int $status Ticket status + * @param int $outputmode 0=HTML select string, 1=Array + * @param string $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. + * @param int $forcecombo Force to use combo box + * @param string $morecss Add more css on select + * @return array Array of keys for json + */ + public function selectMembersList($selected = '', $htmlname = 'adherentid', $filtertype = '', $limit = 20, $filterkey = '', $status = 1, $outputmode = 0, $showempty = '1', $forcecombo = 0, $morecss = '') + { + global $langs, $conf, $user, $db; + + $out = ''; + $outarray = array(); + + $selectFields = " p.rowid, p.ref"; + + $sql = "SELECT "; + $sql .= $selectFields; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent as p"; + $sql .= ' WHERE p.entity IN ('.getEntity('adherent').')'; + + // Add criteria on ref/label + if ($filterkey != '') { + $sql .= ' AND ('; + $prefix = empty($conf->global->TICKET_DONOTSEARCH_ANYWHERE) ? '%' : ''; // Can use index if PRODUCT_DONOTSEARCH_ANYWHERE is on + // For natural search + $scrit = explode(' ', $filterkey); + $i = 0; + if (count($scrit) > 1) $sql .= "("; + foreach ($scrit as $crit) { + if ($i > 0) $sql .= " AND "; + $sql .= "p.ref LIKE '".$this->db->escape($prefix.$crit)."%'"; + $sql .= ""; + $i++; + } + if (count($scrit) > 1) $sql .= ")"; + $sql .= ')'; + } + + $sql .= $this->db->plimit($limit, 0); + + // Build output string + dol_syslog(get_class($this)."::selectMembersList search adherents", LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; + + $num = $this->db->num_rows($result); + + $events = null; + + if (!$forcecombo) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $out .= ajax_combobox($htmlname, $events, $conf->global->PROJECT_USE_SEARCH_TO_SELECT); + } + + $out .= ''; + + $this->db->free($result); + + if (empty($outputmode)) return $out; + return $outarray; + } else { + dol_print_error($db); + } + } + + /** + * constructMemberListOption. + * This define value for &$opt and &$optJson. + * + * @param resource $objp Result set of fetch + * @param string $opt Option (var used for returned value in string option format) + * @param string $optJson Option (var used for returned value in json format) + * @param string $selected Preselected value + * @param string $filterkey Filter key to highlight + * @return void + */ + protected function constructMemberListOption(&$objp, &$opt, &$optJson, $selected, $filterkey = '') + { + global $langs, $conf, $user, $db; + + $outkey = ''; + $outval = ''; + $outref = ''; + $outlabel = ''; + $outtype = ''; + + $label = $objp->label; + + $outkey = $objp->rowid; + $outref = $objp->ref; + $outlabel = $objp->label; + $outtype = $objp->fk_product_type; + + $opt = '\n"; + $optJson = array('key'=>$outkey, 'value'=>$outref, 'type'=>$outtypem); + } /** * Generic method to select a component from a combo list. @@ -7075,7 +7490,7 @@ class Form $sql .= " INNER JOIN ".MAIN_DB_PREFIX.$tmparray[1]." as parenttable ON parenttable.rowid = t.".$tmparray[0]; } if ($objecttmp->ismultientitymanaged === 'fk_soc@societe') { - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } } @@ -7103,7 +7518,7 @@ class Form } } if ($objecttmp->ismultientitymanaged === 'fk_soc@societe') { - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND t.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } } @@ -7722,7 +8137,7 @@ class Form } } else { // There is no list of fields already customized for user foreach ($array as $key => $val) { - if ($array[$key]['checked'] < 0) { + if (!empty($array[$key]['checked']) && $array[$key]['checked'] < 0) { $array[$key]['checked'] = 0; } } @@ -7750,7 +8165,7 @@ class Form } // Note: $val['checked'] <> 0 means we must show the field into the combo list - $listoffieldsforselection .= '
  • '; + $listoffieldsforselection .= '
  • '; $listcheckedstring .= (empty($val['checked']) ? '' : $key.','); } } @@ -8312,7 +8727,7 @@ class Form */ public function showrefnav($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $morehtmlright = '') { - global $langs, $conf, $hookmanager, $extralanguages; + global $conf, $langs, $hookmanager, $extralanguages; $ret = ''; if (empty($fieldid)) { @@ -8324,7 +8739,7 @@ class Form // Preparing gender's display if there is one $addgendertxt = ''; - if (!empty($object->gender)) { + if (property_exists($object, 'gender') && !empty($object->gender)) { $addgendertxt = ' '; switch ($object->gender) { case 'man': @@ -8338,6 +8753,15 @@ class Form break; } } + /* + $addadmin = ''; + if (property_exists($object, 'admin')) { + if (!empty($conf->multicompany->enabled) && !empty($object->admin) && empty($object->entity)) { + $addadmin .= img_picto($langs->trans("SuperAdministratorDesc"), "redstar", 'class="paddingleft"'); + } elseif (!empty($object->admin)) { + $addadmin .= img_picto($langs->trans("AdministratorDesc"), "star", 'class="paddingleft"'); + } + }*/ // Add where from hooks if (is_object($hookmanager)) { @@ -8470,7 +8894,7 @@ class Form $ret .= dol_htmlentities($fullname).$addgendertxt.((!empty($object->societe) && $object->societe != $fullname) ? ' ('.dol_htmlentities($object->societe).')' : ''); } } elseif (in_array($object->element, array('contact', 'user', 'usergroup'))) { - $ret .= dol_htmlentities($object->getFullName($langs)).$addgendertxt; + $ret .= dol_htmlentities($object->getFullName($langs)); } elseif (in_array($object->element, array('action', 'agenda'))) { $ret .= $object->ref.'
    '.$object->label; } elseif (in_array($object->element, array('adherent_type'))) { @@ -8718,7 +9142,7 @@ class Form } $ret .= ''; if ($object->photo) { - $ret .= ''; + $ret .= ''; } $ret .= ''; $ret .= '
    '.$langs->trans("Delete").'



    '; @@ -9355,11 +9779,12 @@ class Form * * @param string $save_label Alternative label for save button * @param string $cancel_label Alternative label for cancel button - * @param array $morefields Add additional buttons between save and cancel + * @param array $morebuttons Add additional buttons between save and cancel * @param bool $withoutdiv Option to remove enclosing centered div + * @param string $morecss More CSS * @return string Html code with the buttons */ - public function buttonsSaveCancel($save_label = 'Save', $cancel_label = 'Cancel', $morefields = array(), $withoutdiv = 0) + public function buttonsSaveCancel($save_label = 'Save', $cancel_label = 'Cancel', $morebuttons = array(), $withoutdiv = 0, $morecss = '') { global $langs; @@ -9383,8 +9808,8 @@ class Form !empty($save_label) ? $buttons[] = $save : ''; - if (!empty($morefields)) { - $buttons[] = $morefields; + if (!empty($morebuttons)) { + $buttons[] = $morebuttons; } !empty($cancel_label) ? $buttons[] = $cancel : ''; @@ -9393,7 +9818,7 @@ class Form foreach ($buttons as $button) { $addclass = empty($button['addclass']) ? '' : $button['addclass']; - $retstring .= ''; + $retstring .= ''; } $retstring .= $withoutdiv ? '': ''; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 0590566582d..d4f4779a606 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -314,7 +314,7 @@ class FormActions $tmpa = dol_getdate($actioncomm->datep); $tmpb = dol_getdate($actioncomm->datef); if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { - if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) { + if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes']) { print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel'); } } else { diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index 5db615f4654..1909a4fb6c3 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -104,7 +104,7 @@ class FormContract while ($i < $num) { $obj = $this->db->fetch_object($resql); // If we ask to filter on a company and user has no permission to see all companies and project is linked to another company, we hide project. - if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && !$user->rights->societe->lire) { + if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($user->rights->societe->lire)) { // Do nothing } else { $labeltoshow = dol_trunc($obj->ref, 18); diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 1bd622d173f..ffa441c0527 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -500,7 +500,7 @@ class FormFile $modellist = array(); if ($modulepart == 'company') { - $showempty = 1; // can have no template active + $showempty = 1; // can have no template active if (is_array($genallowed)) { $modellist = $genallowed; } else { @@ -564,7 +564,7 @@ class FormFile $modellist = ModelePDFFactures::liste_modeles($this->db); } } elseif ($modulepart == 'contract') { - $showempty = 1; // can have no template active + $showempty = 1; // can have no template active if (is_array($genallowed)) { $modellist = $genallowed; } else { @@ -628,7 +628,7 @@ class FormFile $modellist = ModelePDFSuppliersOrders::liste_modeles($this->db); } } elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') { - $showempty = 1; // can have no template active + $showempty = 1; // can have no template active if (is_array($genallowed)) { $modellist = $genallowed; } else { @@ -1678,6 +1678,9 @@ class FormFile } elseif ($modulepart == 'project') { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $object_instance = new Project($this->db); + } elseif ($modulepart == 'project_task') { + include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; + $object_instance = new Task($this->db); } elseif ($modulepart == 'fichinter') { include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; $object_instance = new Fichinter($this->db); @@ -1696,13 +1699,16 @@ class FormFile } elseif ($modulepart == 'banque') { include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $object_instance = new Account($this->db); + } elseif ($modulepart == 'chequereceipt') { + include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; + $object_instance = new RemiseCheque($this->db); } elseif ($modulepart == 'mrp-mo') { include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; $object_instance = new Mo($this->db); } else { $parameters = array('modulepart'=>$modulepart); $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); - if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) { + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) { if (array_key_exists('classpath', $hookmanager->resArray) && !empty($hookmanager->resArray['classpath'])) { dol_include_once($hookmanager->resArray['classpath']); if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) { @@ -1750,14 +1756,19 @@ class FormFile $id = (isset($reg[1]) ? $reg[1] : ''); } elseif ($modulepart == 'invoice_supplier') { preg_match('/([^\/]+)\/[^\/]+$/', $relativefile, $reg); - $ref = (isset($reg[1]) ? $reg[1] : ''); if (is_numeric($ref)) { + $ref = (isset($reg[1]) ? $reg[1] : ''); + if (is_numeric($ref)) { $id = $ref; $ref = ''; } - } elseif ($modulepart == 'user' || $modulepart == 'holiday') { + } elseif ($modulepart == 'user') { // $ref may be also id with old supplier invoices preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $id = (isset($reg[1]) ? $reg[1] : ''); + } elseif ($modulepart == 'project_task') { + // $ref of task is the sub-directory of the project + $reg = explode("/", $relativefile); + $ref = (isset($reg[1]) ? $reg[1] : ''); } elseif (in_array($modulepart, array( 'invoice', 'propal', @@ -1767,17 +1778,20 @@ class FormFile 'contract', 'product', 'project', + 'project_task', 'fichinter', 'expensereport', 'recruitment-recruitmentcandidature', 'mrp-mo', - 'banque'))) { + 'banque', + 'chequereceipt', + 'holiday'))) { preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = (isset($reg[1]) ? $reg[1] : ''); } else { - $parameters = array('modulepart'=>$modulepart,'fileinfo'=>$file); + $parameters = array('modulepart'=>$modulepart, 'fileinfo'=>$file); $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); - if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) { + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) { if (array_key_exists('ref', $hookmanager->resArray) && !empty($hookmanager->resArray['ref'])) { $ref = $hookmanager->resArray['ref']; } diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php index b9564c6aa52..60656128b64 100644 --- a/htdocs/core/class/html.formintervention.class.php +++ b/htdocs/core/class/html.formintervention.class.php @@ -99,7 +99,7 @@ class FormIntervention while ($i < $num) { $obj = $this->db->fetch_object($resql); // If we ask to filter on a company and user has no permission to see all companies and project is linked to another company, we hide project. - if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && !$user->rights->societe->lire) { + if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($user->rights->societe->lire)) { // Do nothing } else { $labeltoshow = dol_trunc($obj->ref, 18); diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 823e90fcac3..0478b4e215f 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -157,6 +157,8 @@ class FormMail extends Form public $lines_model; + public $withoptiononeemailperrecipient; + /** * Constructor @@ -689,9 +691,9 @@ class FormMail extends Form $out .= ''; $out .= $langs->trans("GroupEmails"); $out .= ''; - $out .= ' withoptiononeemailperrecipient > 0 ? ' checked="checked"' : '').'> '; - $out .= $langs->trans("OneEmailPerRecipient"); - $out .= ''; + $out .= ' withoptiononeemailperrecipient > 0 ? ' checked="checked"' : '').'> '; + $out .= ''; + $out .= ''; $out .= ' - '; $out .= $langs->trans("WarningIfYouCheckOneRecipientPerEmail"); $out .= ''; @@ -771,12 +773,11 @@ class FormMail extends Form if (!empty($this->withmaindocfile)) { if ($this->withmaindocfile == 1) { - $out .= ''; + $out .= ''; + } elseif ($this->withmaindocfile == -1) { + $out .= ''; } - if ($this->withmaindocfile == -1) { - $out .= ''; - } - $out .= ' '.$langs->trans("JoinMainDoc").'.
    '; + $out .= '
    '; } if (is_numeric($this->withfile)) { @@ -792,6 +793,7 @@ class FormMail extends Form if (count($listofpaths)) { foreach ($listofpaths as $key => $val) { $relativepathtofile = substr($val, (strlen(DOL_DATA_ROOT) - strlen($val))); + if ($conf->entity > 1) { $relativepathtofile = str_replace($conf->entity.'/', '', $relativepathtofile); } @@ -802,6 +804,7 @@ class FormMail extends Form $out .= '
    '; // Preview of attachment $out .= img_mime($listofnames[$key]).' '.$listofnames[$key]; + $out .= $formfile->showPreview(array(), $formfile_params[2], $formfile_params[4]); if (!$this->withfilereadonly) { $out .= ' '; @@ -1522,7 +1525,7 @@ class FormMail extends Form $product = new Product($this->db); $product->fetch($line->fk_product, '', '', 1); $product->fetch_optionals(); - if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + if (is_array($extrafields->attributes[$product->table_element]['label']) && count($extrafields->attributes[$product->table_element]['label']) > 0) { foreach ($extrafields->attributes[$product->table_element]['label'] as $key => $label) { $substit_line['__PRODUCT_EXTRAFIELD_'.strtoupper($key).'__'] = $product->array_options['options_'.$key]; } diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index 02972f39630..e77ebe3498c 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -207,7 +207,7 @@ class FormMargin return; } - if (!$user->rights->margins->liretous) { + if (empty($user->rights->margins->liretous)) { return; } diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 18b42c597bf..34ea7b0a2e8 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -207,7 +207,7 @@ class FormProjets while ($i < $num) { $obj = $this->db->fetch_object($resql); // If we ask to filter on a company and user has no permission to see all companies and project is linked to another company, we hide project. - if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && !$user->rights->societe->lire) { + if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($user->rights->societe->lire)) { // Do nothing } else { if ($discard_closed == 1 && $obj->fk_statut == 2 && $obj->rowid != $selected) { // We discard closed except if selected diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 5ce2dd0fca7..b9f320b7db8 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -753,9 +753,27 @@ class FormTicket print ajax_combobox('select'.$htmlname); } elseif ($htmlname!='') { + $selectedgroups = array(); + $groupvalue = ""; $groupticket=GETPOST($htmlname, 'aZ09'); $child_id=GETPOST($htmlname.'_child_id', 'aZ09')?GETPOST($htmlname.'_child_id', 'aZ09'):0; - + if (!empty($groupticket)) { + $tmpgroupticket = $groupticket; + $sql = "SELECT ctc.rowid, ctc.fk_parent, ctc.code FROM ".MAIN_DB_PREFIX."c_ticket_category as ctc WHERE ctc.code = '".$this->db->escape($tmpgroupticket)."'"; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + $selectedgroups[] = $obj->code; + while ($obj->fk_parent > 0) { + $sql = "SELECT ctc.rowid, ctc.fk_parent, ctc.code FROM ".MAIN_DB_PREFIX."c_ticket_category as ctc WHERE ctc.rowid ='".$this->db->escape($obj->fk_parent)."'"; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + $selectedgroups[] = $obj->code; + } + } + } + } $arrayidused = array(); $arrayidusedconcat = array(); $arraycodenotparent = array(); @@ -794,7 +812,11 @@ class FormTicket $grouplabel = $label; $isparent = $obj->isparent; - $iselected = $groupticket == $obj->code ?'selected':''; + if (is_array($selectedgroups)) { + $iselected = in_array($obj->code, $selectedgroups) ?'selected':''; + } else { + $iselected = $groupticket == $obj->code ?'selected':''; + } $stringtoprint .= ''; if ($isparent == 'NOTPARENT') { $arraycodenotparent[] = $groupvalue; @@ -868,10 +890,14 @@ class FormTicket if ($isparent == 'NOTPARENT') { $arraycodenotparent[] = $groupvalue; } - $iselected = $groupticket == $obj->code ?'selected':''; + if (is_array($selectedgroups)) { + $iselected = in_array($obj->code, $selectedgroups) ?'selected':''; + } else { + $iselected = $groupticket == $obj->code ?'selected':''; + } $stringtoprint .= ''; if (empty($tabscript[$groupcodefather])) { - $tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ?'_child_'.$levelid-1:'').'")[0].value == "'.dol_escape_js($groupcodefather).'"){ + $tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ?'_child_'.$levelid-1:'').'").val() == "'.dol_escape_js($groupcodefather).'"){ $(".'.$htmlname.'_'.dol_escape_htmltag($fatherid).'_child_'.$levelid.'").show() console.log("We show childs tickets of '.$groupcodefather.' group ticket") }else{ @@ -889,23 +915,15 @@ class FormTicket $stringtoprint .=''; $stringtoprint .= ajax_combobox($htmlname); diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index bdd0f79a0aa..adde51c4974 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -151,7 +151,7 @@ class InfoBox $box->rowid = (empty($obj->rowid) ? '' : $obj->rowid); $box->id = (empty($obj->box_id) ? '' : $obj->box_id); $box->position = ((isset($obj->position) && $obj->position == '') ? '' : (isset($obj->position) ? $obj->position : '')); // '0' must stay '0' - $box->box_order = (empty($obj->box_order) ? '' : $obj->box_order); + $box->box_order = (empty($obj->box_order) ? '' : $obj->box_order); $box->fk_user = (empty($obj->fk_user) ? 0 : $obj->fk_user); $box->sourcefile = $relsourcefile; $box->class = $boxname; @@ -215,7 +215,7 @@ class InfoBox /** * Save order of boxes for area and user * - * @param DoliDB $dbs Database handler + * @param DoliDB $dbs Database handler * @param int $zone Name of area (0 for Homepage, ...) * @param string $boxorder List of boxes with correct order 'A:123,456,...-B:789,321...' * @param int $userid Id of user diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 019618366d1..a88f673405c 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -108,10 +108,26 @@ class Notify */ public function confirmMessage($action, $socid, $object) { - global $langs; + global $conf, $langs; $langs->load("mails"); $listofnotiftodo = $this->getNotificationsArray($action, $socid, $object, 0); + if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER)) { + foreach ($listofnotiftodo as $val) { + if ($val['type'] == 'touser') { + unset($listofnotiftodo[$val['email']]); + //$listofnotiftodo = array_merge($listofnotiftodo); + } + } + } + if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX)) { + foreach ($listofnotiftodo as $val) { + if ($val['type'] == 'tofixedemail') { + unset($listofnotiftodo[$val['email']]); + //$listofnotiftodo = array_merge($listofnotiftodo); + } + } + } $texte = ''; $nb = -1; diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 4743d4559b6..c287aae1c2f 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1422,7 +1422,7 @@ class SMTPs $this->_msgContent[$strType]['dataText'] = $strContentAltText; if ($this->getMD5flag()) { - $this->_msgContent[$strType]['md5'] = dol_hash($strContent, 3); + $this->_msgContent[$strType]['md5'] = dol_hash($strContent, 3); } //} } @@ -1622,7 +1622,7 @@ class SMTPs $this->_msgContent['image'][$strImageName]['data'] = $strContent; if ($this->getMD5flag()) { - $this->_msgContent['image'][$strImageName]['md5'] = dol_hash($strContent, 3); + $this->_msgContent['image'][$strImageName]['md5'] = dol_hash($strContent, 3); } } } diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index fd89a00a810..d56fcddafa7 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2021 Regis Houssin * * 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 @@ -202,7 +203,7 @@ class Utils require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Check compression parameter - if (!in_array($compression, array('none', 'gz', 'bz', 'zip'))) { + if (!in_array($compression, array('none', 'gz', 'bz', 'zip', 'zstd'))) { $langs->load("errors"); $this->error = $langs->transnoentitiesnoconv("ErrorBadValueForParameter", $compression, "Compression"); return -1; @@ -248,9 +249,10 @@ class Utils $compression = $compression ? $compression : 'none'; if ($compression == 'gz') { $outputfile .= '.gz'; - } - if ($compression == 'bz') { + } elseif ($compression == 'bz') { $outputfile .= '.bz2'; + } elseif ($compression == 'zstd') { + $outputfile .= '.zst'; } $outputerror = $outputfile.'.err'; dol_mkdir($conf->admin->dir_output.'/backup'); @@ -337,12 +339,12 @@ class Utils $fullcommandclear = $command." ".$paramclear." 2>&1"; if ($compression == 'none') { $handle = fopen($outputfile, 'w'); - } - if ($compression == 'gz') { + } elseif ($compression == 'gz') { $handle = gzopen($outputfile, 'w'); - } - if ($compression == 'bz') { + } elseif ($compression == 'bz') { $handle = bzopen($outputfile, 'w'); + } elseif ($compression == 'zstd') { + $handle = fopen($outputfile, 'w'); } $ok = 0; @@ -408,12 +410,12 @@ class Utils if ($compression == 'none') { fclose($handle); - } - if ($compression == 'gz') { + } elseif ($compression == 'gz') { gzclose($handle); - } - if ($compression == 'bz') { + } elseif ($compression == 'bz') { bzclose($handle); + } elseif ($compression == 'zstd') { + fclose($handle); } if (!empty($conf->global->MAIN_UMASK)) { @@ -428,12 +430,12 @@ class Utils // Get errorstring if ($compression == 'none') { $handle = fopen($outputfile, 'r'); - } - if ($compression == 'gz') { + } elseif ($compression == 'gz') { $handle = gzopen($outputfile, 'r'); - } - if ($compression == 'bz') { + } elseif ($compression == 'bz') { $handle = bzopen($outputfile, 'r'); + } elseif ($compression == 'zstd') { + $handle = fopen($outputfile, 'r'); } if ($handle) { // Get 2048 first chars of error message. @@ -443,12 +445,12 @@ class Utils // Close file if ($compression == 'none') { fclose($handle); - } - if ($compression == 'gz') { + } elseif ($compression == 'gz') { gzclose($handle); - } - if ($compression == 'bz') { + } elseif ($compression == 'bz') { bzclose($handle); + } elseif ($compression == 'zstd') { + fclose($handle); } if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg)) { // No error $errormsg = ''; diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index 1de4fef0176..997132ca132 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -258,12 +258,12 @@ print ' window.getSelection().removeAllRanges(); /* Show message */ - var lastchild = this.parentNode.lastChild; + var lastchild = this.parentNode.lastChild; /* .parentNode is clipboardCP and last child is clipboardCPText */ var tmp = lastchild.innerHTML if (succeed) { - lastchild.innerHTML = \''.dol_escape_js($langs->trans('CopiedToClipboard')).'\'; + lastchild.innerHTML = \'
    '.dol_escape_js($langs->trans('CopiedToClipboard')).'
    \'; } else { - lastchild.innerHTML = \''.dol_escape_js($langs->trans('Error')).'\'; + lastchild.innerHTML = \'
    '.dol_escape_js($langs->trans('Error')).'
    \'; } setTimeout(() => { lastchild.innerHTML = tmp; }, 1000); }); diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 68af901a757..21afb5f3490 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -103,7 +103,7 @@ function length_accountg($account) return $account; } - $g = $conf->global->ACCOUNTING_LENGTH_GACCOUNT; + $g = getDolGlobalInt('ACCOUNTING_LENGTH_GACCOUNT'); if (!is_empty($g)) { // Clean parameters $i = strlen($account); @@ -142,7 +142,7 @@ function length_accounta($accounta) return $accounta; } - $a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT; + $a = getDolGlobalInt('ACCOUNTING_LENGTH_AACCOUNT'); if (!is_empty($a)) { // Clean parameters $i = strlen($accounta); diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index c97d80dda4d..842d7333bbd 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -834,7 +834,7 @@ function translation_prepare_head() $h++; $head[$h][0] = DOL_URL_ROOT."/admin/translation.php?mode=overwrite"; - $head[$h][1] = $langs->trans("TranslationOverwriteKey").''; + $head[$h][1] = ''.$langs->trans("TranslationOverwriteKey").''; $head[$h][2] = 'overwrite'; $h++; @@ -1127,7 +1127,7 @@ function activateModule($value, $withdeps = 1) if (!count($ret['errors'])) { $ret['nbmodules']++; - $ret['nbperms'] += count($objMod->rights); + $ret['nbperms'] += (is_array($objMod->rights)?count($objMod->rights):0); } return $ret; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 048335201ee..667a2808f58 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -162,12 +162,12 @@ function show_array_actions_to_do($max = 5) $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN "; $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -278,12 +278,12 @@ function show_array_last_actions_done($max = 5) $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN "; $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action "; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; $sql .= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index cf0752738a5..903bb08f655 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -46,6 +46,8 @@ */ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLength = 2, $autoselect = 0, $ajaxoptions = array(), $moreparams = '') { + global $conf; + if (empty($minLength)) { $minLength = 1; } diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 8fe9352457b..d4028e2196b 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -115,9 +115,10 @@ function getServerTimeZoneInt($refgmtdate = 'now') * @param int $time Date timestamp (or string with format YYYY-MM-DD) * @param int $duration_value Value of delay to add * @param int $duration_unit Unit of added delay (d, m, y, w, h, i) + * @param int $ruleforendofmonth Change the behavior of PHP over data-interval, 0 or 1 * @return int New timestamp */ -function dol_time_plus_duree($time, $duration_value, $duration_unit) +function dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth = 0) { global $conf; @@ -166,7 +167,31 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit) } else { $date->add($interval); } + //Change the behavior of PHP over data-interval when the result of this function is Feb 29 (non-leap years), 30 or Feb 31 (php returns March 1, 2 or 3 respectively) + if ($ruleforendofmonth == 1 && $duration_unit == 'm') { + $timeyear = dol_print_date($time, '%Y'); + $timemonth = dol_print_date($time, '%m'); + $timetotalmonths = (($timeyear * 12) + $timemonth); + $monthsexpected = ($timetotalmonths + $duration_value); + + $newtime = $date->getTimestamp(); + + $newtimeyear = dol_print_date($newtime, '%Y'); + $newtimemonth = dol_print_date($newtime, '%m'); + $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth); + + if ($monthsexpected < $newtimetotalmonths) { + $newtimehours = dol_print_date($newtime, '%H'); + $newtimemins = dol_print_date($newtime, '%M'); + $newtimesecs = dol_print_date($newtime, '%S'); + + $datelim = dol_mktime($newtimehours, $newtimemins, $newtimesecs, $newtimemonth, 1, $newtimeyear); + $datelim -= (3600 * 24); + + $date->setTimestamp($datelim); + } + } return $date->getTimestamp(); } @@ -656,7 +681,7 @@ function dol_get_first_day_week($day, $month, $year, $gm = false) function getGMTEasterDatetime($year) { $base = new DateTime("$year-03-21", new DateTimeZone("UTC")); - $days = easter_days($year); // Return number of days between 21 march and easter day. + $days = easter_days($year); // Return number of days between 21 march and easter day. $tmp = $base->add(new DateInterval("P{$days}D")); return $tmp->getTimestamp(); } diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php index 8e27ef12466..3287227a05d 100644 --- a/htdocs/core/lib/expensereport.lib.php +++ b/htdocs/core/lib/expensereport.lib.php @@ -140,12 +140,10 @@ function expensereport_admin_prepare_head() $head[$h][2] = 'expensereport'; $h++; - if (!empty($conf->global->MAIN_USE_EXPENSE_RULE)) { - $head[$h][0] = DOL_URL_ROOT."/admin/expensereport_rules.php"; - $head[$h][1] = $langs->trans("ExpenseReportsRules"); - $head[$h][2] = 'expenserules'; - $h++; - } + $head[$h][0] = DOL_URL_ROOT."/admin/expensereport_rules.php"; + $head[$h][1] = $langs->trans("ExpenseReportsRules"); + $head[$h][2] = 'expenserules'; + $h++; if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { $head[$h][0] = DOL_URL_ROOT."/admin/expensereport_ik.php"; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 1a2823fb933..2bd4ada3ad0 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2012-2015 Regis Houssin + * Copyright (C) 2012-2021 Regis Houssin * Copyright (C) 2012-2016 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Raphaël Doursenaud @@ -107,7 +107,7 @@ function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excl if ($dir = opendir($newpath)) { $filedate = ''; $filesize = ''; - + $fileperm = ''; while (false !== ($file = readdir($dir))) { // $file is always a basename (into directory $newpath) if (!utf8_check($file)) { $file = utf8_encode($file); // To be sure data is stored in utf8 in memory @@ -1971,6 +1971,9 @@ function dol_compress_file($inputfile, $outputfile, $mode = "gz", &$errorstring } elseif ($mode == 'bz') { $foundhandler = 1; $compressdata = bzcompress($data, 9); + } elseif ($mode == 'zstd') { + $foundhandler = 1; + $compressdata = zstd_compress($data, 9); } elseif ($mode == 'zip') { if (class_exists('ZipArchive') && !empty($conf->global->MAIN_USE_ZIPARCHIVE_FOR_ZIP_COMPRESS)) { $foundhandler = 1; @@ -2719,13 +2722,14 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } - $original_file = $conf->expedition->dir_output."/sending/".$original_file; + $original_file = $conf->expedition->dir_output."/".(strpos('sending/', $original_file) === 0 ? '' : 'sending/').$original_file; + //$original_file = $conf->expedition->dir_output."/".$original_file; } elseif (($modulepart == 'livraison' || $modulepart == 'delivery') && !empty($conf->expedition->dir_output)) { // Delivery Note Wrapping if ($fuser->rights->expedition->delivery->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } - $original_file = $conf->expedition->dir_output."/receipt/".$original_file; + $original_file = $conf->expedition->dir_output."/".(strpos('receipt/', $original_file) === 0 ? '' : 'receipt/').$original_file; } elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) { // Wrapping pour les actions if ($fuser->rights->agenda->myactions->{$read} || preg_match('/^specimen/i', $original_file)) { @@ -2863,6 +2867,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($fuser->admin) { $accessallowed = 1; // If user is admin } + $tmpmodulepart = explode('-', $modulepart); if (!empty($tmpmodulepart[1])) { $modulepart = $tmpmodulepart[0]; @@ -2942,6 +2947,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, ); $reshook = $hookmanager->executeHooks('checkSecureAccess', $parameters, $object); if ($reshook > 0) { + if (!empty($hookmanager->resArray['original_file'])) { + $original_file = $hookmanager->resArray['original_file']; + } if (!empty($hookmanager->resArray['accessallowed'])) { $accessallowed = $hookmanager->resArray['accessallowed']; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index fd04488f3f2..22f59b0ed33 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -44,25 +44,27 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; /** * Return dolibarr global constant string value * @param string $key key to return value, return '' if not set + * @param string $default value to return * @return string */ -function getDolGlobalString($key) +function getDolGlobalString($key, $default = '') { global $conf; - // return $conf->global->$key ?? ''; - return (string) (empty($conf->global->$key) ? '' : $conf->global->$key); + // return $conf->global->$key ?? $default; + return (string) (empty($conf->global->$key) ? $default : $conf->global->$key); } /** * Return dolibarr global constant int value * @param string $key key to return value, return 0 if not set + * @param int $default value to return * @return int */ -function getDolGlobalInt($key) +function getDolGlobalInt($key, $default = 0) { global $conf; - // return $conf->global->$key ?? 0; - return (int) (empty($conf->global->$key) ? 0 : $conf->global->$key); + // return $conf->global->$key ?? $default; + return (int) (empty($conf->global->$key) ? $default : $conf->global->$key); } /** @@ -1071,7 +1073,7 @@ function dol_size($size, $type = '') /** * Clean a string to use it as a file name. - * Replace also '--' and ' -' strings, they are used for parameters separation. + * Replace also '--' and ' -' strings, they are used for parameters separation (Note: ' - ' is allowed). * * @param string $str String to clean * @param string $newstr String to replace bad chars with. @@ -1089,13 +1091,13 @@ function dol_sanitizeFileName($str, $newstr = '_', $unaccent = 1) $filesystem_forbidden_chars = array('<', '>', '/', '\\', '?', '*', '|', '"', ':', '°', '$', ';'); $tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars); $tmp = preg_replace('/\-\-+/', '_', $tmp); - $tmp = preg_replace('/\s+\-/', ' _', $tmp); + $tmp = preg_replace('/\s+\-([^\s])/', ' _$1', $tmp); return $tmp; } /** * Clean a string to use it as a path name. - * Replace also '--' and ' -' strings, they are used for parameters separation. + * Replace also '--' and ' -' strings, they are used for parameters separation (Note: ' - ' is allowed). * * @param string $str String to clean * @param string $newstr String to replace bad chars with @@ -1112,7 +1114,7 @@ function dol_sanitizePathName($str, $newstr = '_', $unaccent = 1) $filesystem_forbidden_chars = array('<', '>', '?', '*', '|', '"', '°', '$', ';'); $tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars); $tmp = preg_replace('/\-\-+/', '_', $tmp); - $tmp = preg_replace('/\s+\-/', ' _', $tmp); + $tmp = preg_replace('/\s+\-([^\s])/', ' _$1', $tmp); return $tmp; } @@ -2305,8 +2307,17 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs = } elseif ($tzoutput == 'tzuser' || $tzoutput == 'tzuserrel') { $to_gmt = true; $offsettzstring = (empty($_SESSION['dol_tz_string']) ? 'UTC' : $_SESSION['dol_tz_string']); // Example 'Europe/Berlin' or 'Indian/Reunion' - $offsettz = (empty($_SESSION['dol_tz']) ? 0 : $_SESSION['dol_tz']) * 60 * 60; // Will not be used anymore - $offsetdst = (empty($_SESSION['dol_dst']) ? 0 : $_SESSION['dol_dst']) * 60 * 60; // Will not be used anymore + + if (class_exists('DateTimeZone')) { + $user_date_tz = new DateTimeZone($offsettzstring); + $user_dt = new DateTime(); + $user_dt->setTimezone($user_date_tz); + $user_dt->setTimestamp($tzoutput == 'tzuser' ? dol_now() : $time); + $offsettz = $user_dt->getOffset(); + } else { // old method (The 'tzuser' was processed like the 'tzuserrel') + $offsettz = (empty($_SESSION['dol_tz']) ? 0 : $_SESSION['dol_tz']) * 60 * 60; // Will not be used anymore + $offsetdst = (empty($_SESSION['dol_dst']) ? 0 : $_SESSION['dol_dst']) * 60 * 60; // Will not be used anymore + } } } } @@ -5409,15 +5420,16 @@ function price2num($amount, $rounding = '', $option = 0) /** * Output a dimension with best unit * - * @param float $dimension Dimension - * @param int $unit Unit scale of dimension (Example: 0=kg, -3=g, -6=mg, 98=ounce, 99=pound, ...) - * @param string $type 'weight', 'volume', ... - * @param Translate $outputlangs Translate language object - * @param int $round -1 = non rounding, x = number of decimal + * @param float $dimension Dimension + * @param int $unit Unit scale of dimension (Example: 0=kg, -3=g, -6=mg, 98=ounce, 99=pound, ...) + * @param string $type 'weight', 'volume', ... + * @param Translate $outputlangs Translate language object + * @param int $round -1 = non rounding, x = number of decimal * @param string $forceunitoutput 'no' or numeric (-3, -6, ...) compared to $unit (In most case, this value is value defined into $conf->global->MAIN_WEIGHT_DEFAULT_UNIT) - * @return string String to show dimensions + * @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated. + * @return string String to show dimensions */ -function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round = -1, $forceunitoutput = 'no') +function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round = -1, $forceunitoutput = 'no', $use_short_label = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; @@ -5447,7 +5459,8 @@ function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round $unit = $forceunitoutput; }*/ - $ret = price($dimension, 0, $outputlangs, 0, 0, $round).' '.measuringUnitString(0, $type, $unit); + $ret = price($dimension, 0, $outputlangs, 0, 0, $round); + $ret .= ' '.measuringUnitString(0, $type, $unit, $use_short_label, $outputlangs); return $ret; } @@ -6627,7 +6640,8 @@ function dol_htmlentitiesbr_decode($stringtodecode, $pagecodeto = 'UTF-8') */ function dol_htmlcleanlastbr($stringtodecode) { - $ret = preg_replace('/(
    ||'."\n".'|'."\r".')+$/i', "", $stringtodecode); + $ret = preg_replace('/ $/i', "", $stringtodecode); // Because wysiwyg editor may add a   at end of last line + $ret = preg_replace('/(
    ||'."\n".'|'."\r".')+$/i', "", $ret); return $ret; } @@ -6663,7 +6677,7 @@ function dol_html_entity_decode($a, $b, $c = 'UTF-8', $keepsomeentities = 0) * @param bool $double_encode When double_encode is turned off, PHP will not encode existing html entities * @return string $ret Encoded string */ -function dol_htmlentities($string, $flags = null, $encoding = 'UTF-8', $double_encode = false) +function dol_htmlentities($string, $flags = ENT_QUOTES|ENT_SUBSTITUTE, $encoding = 'UTF-8', $double_encode = false) { return htmlentities($string, $flags, $encoding, $double_encode); } @@ -9099,11 +9113,12 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata = 0, $param /** * Make content of an input box selected when we click into input field. * - * @param string $htmlname Id of html object ('#idvalue' or '.classvalue') - * @param string $addlink Add a 'link to' after + * @param string $htmlname Id of html object ('#idvalue' or '.classvalue') + * @param string $addlink Add a 'link to' after + * @param string $textonlink Text to show on link or 'image' * @return string */ -function ajax_autoselect($htmlname, $addlink = '') +function ajax_autoselect($htmlname, $addlink = '', $textonlink = 'Link') { global $langs; $out = ''; if ($addlink) { - $out .= ' '.$langs->trans("Link").''; + if ($textonlink === 'image') { + $out .= ' '.img_picto('', 'globe').''; + } else { + $out .= ' '.$langs->trans("Link").''; + } } return $out; } @@ -9546,21 +9565,24 @@ function dol_mimetype($file, $default = 'application/octet-stream', $mode = 0) } /** - * Return value from dictionary + * Return the value of a filed into a dictionary for the record $id. + * This also set all the values into a cache for a next search. * - * @param string $tablename name of dictionary - * @param string $field the value to return - * @param int $id id of line - * @param bool $checkentity add filter on entity - * @param string $rowidfield name of the column rowid - * @return string + * @param string $tablename Name of dictionary + * @param string $field The name of field where to find the value to return + * @param int $id Id of line record + * @param bool $checkentity Add filter on entity + * @param string $rowidfield Name of the column rowid (to use for the filter on $id) + * @return string The value of field $field. This also set $dictvalues cache. */ -function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield = 'rowid') +function getDictionaryValue($tablename, $field, $id, $checkentity = false, $rowidfield = 'rowid') { - global $dictvalues, $db, $langs; + global $conf, $db; - if (!isset($dictvalues[$tablename])) { - $dictvalues[$tablename] = array(); + $dictvalues = (isset($conf->cache['dictvalues_'.$tablename]) ? $conf->cache['dictvalues_'.$tablename] : null); + + if (is_null($dictvalues)) { + $dictvalues = array(); $sql = "SELECT * FROM ".$tablename." WHERE 1 = 1"; // Here select * is allowed as it is generic code and we don't have list of fields if ($checkentity) { @@ -9570,20 +9592,20 @@ function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield $resql = $db->query($sql); if ($resql) { while ($obj = $db->fetch_object($resql)) { - $dictvalues[$tablename][$obj->{$rowidfield}] = $obj; + $dictvalues[$obj->{$rowidfield}] = $obj; } } else { dol_print_error($db); } + + $conf->cache['dictvalues_'.$tablename] = $dictvalues; } - if (!empty($dictvalues[$tablename][$id])) { - return $dictvalues[$tablename][$id]->{$field}; // Found - } else // Not found - { - if ($id > 0) { - return $id; - } + if (!empty($dictvalues[$id])) { + // Found + return $dictvalues[$id]->{$field}; + } else { + // Not found return ''; } } @@ -10500,9 +10522,9 @@ function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $tex $tag = 'span'; // Using div does not work when using the js copy code. if ($texttoshow) { - $result = '<'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).''.dol_escape_htmltag($texttoshow, 1, 1).''; + $result = '<'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).''.dol_escape_htmltag($texttoshow, 1, 1).''; } else { - $result = '<'.$tag.' class="clipboardCPValue">'.dol_escape_htmltag($valuetocopy, 1, 1).''; + $result = '<'.$tag.' class="clipboardCPValue">'.dol_escape_htmltag($valuetocopy, 1, 1).''; } return $result; diff --git a/htdocs/core/lib/import.lib.php b/htdocs/core/lib/import.lib.php index a9663795988..96ad79f03e6 100644 --- a/htdocs/core/lib/import.lib.php +++ b/htdocs/core/lib/import.lib.php @@ -3,7 +3,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville * Copyright (C) 2010 Regis Houssin * Copyright (C) 2010 Juanjo Menent - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,6 +24,7 @@ * \file htdocs/core/lib/import.lib.php * \brief Ensemble de fonctions de base pour le module import * \ingroup import + */ /** * Function to return list of tabs for import pages @@ -47,7 +48,7 @@ function import_prepare_head($param, $maxstep = 0) if ($i < 6) { $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step='.$i.$param; } else { - $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step=5'.$param; // For step6, link is to step 5 + $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step=5'.$param; // For step6, link is to step 5 } $head[$h][1] = $langs->trans("Step")." ".$i; $head[$h][2] = 'step'.$i; diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index 193c4c3acb7..8b61a690910 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -233,7 +233,7 @@ function getCustomerInvoicePieChart($socid = 0) $sql = "SELECT count(f.rowid), f.fk_statut"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture as f"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; @@ -241,7 +241,7 @@ function getCustomerInvoicePieChart($socid = 0) if ($user->socid) { $sql .= ' AND f.fk_soc = '.((int) $user->socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " GROUP BY f.fk_statut"; @@ -353,7 +353,7 @@ function getPurchaseInvoicePieChart($socid = 0) $sql = "SELECT count(f.rowid), f.fk_statut"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; @@ -361,7 +361,7 @@ function getPurchaseInvoicePieChart($socid = 0) if ($user->socid) { $sql .= ' AND f.fk_soc = '.((int) $user->socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " GROUP BY f.fk_statut"; @@ -518,8 +518,12 @@ function getNumberInvoicesPieChart($mode) $dataseries[$i]=array($langs->trans('NbOfOpenInvoices'), $obj->nblate30, $obj->nblate15 - $obj->nblate30, $obj->nblatenow - $obj->nblate15, $obj->nbnotlatenow - $obj->nbnotlate15, $obj->nbnotlate15 - $obj->nbnotlate30, $obj->nbnotlate30); $i++; } - foreach ($dataseries[0] as $key=>$value) { - $total += $value; + if (!empty($dataseries[0])) { + foreach ($dataseries[0] as $key => $value) { + if (is_numeric($value)) { + $total += $value; + } + } } $legend = array( $langs->trans('InvoiceLate30Days'), @@ -605,16 +609,16 @@ function getCustomerInvoiceDraftTable($maxCount = 500, $socid = 0) $sql .= ", s.rowid as socid, s.email"; $sql .= ", s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur"; $sql .= ", cc.rowid as country_id, cc.code as country_code"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = ".Facture::STATUS_DRAFT; $sql .= " AND f.entity IN (".getEntity('invoice').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -629,7 +633,7 @@ function getCustomerInvoiceDraftTable($maxCount = 500, $socid = 0) $sql .= " GROUP BY f.rowid, f.ref, f.datef, f.total_ht, f.total_tva, f.total_ttc, f.ref_client, f.type, f.fk_statut, f.paye,"; $sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur,"; $sql .= " cc.rowid, cc.code"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user"; } @@ -753,12 +757,12 @@ function getDraftSupplierTable($maxCount = 500, $socid = 0) $sql .= ", s.code_fournisseur, s.code_compta_fournisseur"; $sql .= ", cc.rowid as country_id, cc.code as country_code"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = ".FactureFournisseur::STATUS_DRAFT; $sql .= " AND f.entity IN (".getEntity('invoice').')'; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -875,7 +879,7 @@ function getCustomerInvoiceLatestEditTable($maxCount = 5, $socid = 0) $sql .= " s.nom as socname, s.rowid as socid, s.canvas, s.client"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; @@ -883,7 +887,7 @@ function getCustomerInvoiceLatestEditTable($maxCount = 5, $socid = 0) if ($socid) { $sql .= " AND f.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY f.tms DESC"; @@ -980,7 +984,7 @@ function getPurchaseInvoiceLatestEditTable($maxCount = 5, $socid = 0) $sql .= " s.nom as socname, s.rowid as socid, s.canvas, s.client"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; @@ -988,7 +992,7 @@ function getPurchaseInvoiceLatestEditTable($maxCount = 5, $socid = 0) if ($socid) { $sql .= " AND f.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY f.tms DESC"; @@ -1099,12 +1103,12 @@ function getCustomerInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0) $sql .= ", sum(pf.amount) as am"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays,".MAIN_DB_PREFIX."facture as f"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = ".Facture::STATUS_VALIDATED; $sql .= " AND f.entity IN (".getEntity('invoice').')'; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -1285,14 +1289,14 @@ function getPurchaseInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0) $sql .= ", sum(pf.amount) as am"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.rowid = ff.fk_soc"; $sql .= " AND ff.entity = ".$conf->entity; $sql .= " AND ff.paye = 0"; $sql .= " AND ff.fk_statut = ".FactureFournisseur::STATUS_VALIDATED; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index 1300c1b771f..557bbe6dcf5 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -76,7 +76,7 @@ function dol_setcache($memoryid, $data, $expire = 0) } } - if (!empty($conf->memcached->enabled) && class_exists('Memcached')) { + if (!empty($conf->memcached->enabled) && class_exists('Memcached')) { // Using a memcached server global $dolmemcache; if (empty($dolmemcache) || !is_object($dolmemcache)) { @@ -88,7 +88,7 @@ function dol_setcache($memoryid, $data, $expire = 0) } } - $memoryid = session_name() . '_' . $memoryid; + $memoryid = session_name().'_'.$memoryid; //$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false); $dolmemcache->add($memoryid, $data, $expire); // This fails if key already exists $rescode = $dolmemcache->getResultCode(); @@ -109,7 +109,7 @@ function dol_setcache($memoryid, $data, $expire = 0) } } - $memoryid = session_name() . '_' . $memoryid; + $memoryid = session_name().'_'.$memoryid; //$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false); $result = $dolmemcache->add($memoryid, $data, false, $expire); // This fails if key already exists if ($result) { @@ -154,7 +154,7 @@ function dol_getcache($memoryid) } } - $memoryid = session_name() . '_' . $memoryid; + $memoryid = session_name().'_'.$memoryid; //$m->setOption(Memcached::OPT_COMPRESSION, false); //print "Get memoryid=".$memoryid; $data = $m->get($memoryid); @@ -179,7 +179,7 @@ function dol_getcache($memoryid) } } - $memoryid = session_name() . '_' . $memoryid; + $memoryid = session_name().'_'.$memoryid; //$m->setOption(Memcached::OPT_COMPRESSION, false); $data = $m->get($memoryid); //print "memoryid=".$memoryid." - rescode=".$rescode." - data=".count($data)."\n
    "; @@ -187,7 +187,7 @@ function dol_getcache($memoryid) if ($data) { return $data; } else { - return null; // There is no way to make a difference between NOTFOUND and error when using Memcache. So do not use it, use Memcached instead. + return null; // There is no way to make a difference between NOTFOUND and error when using Memcache. So do not use it, use Memcached instead. } } elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { // This is a really not reliable cache ! Use Memcached instead. // Using shmop @@ -252,7 +252,7 @@ function dol_setshmop($memoryid, $data, $expire) } $shmkey = dol_getshmopaddress($memoryid); if (empty($shmkey)) { - return 0; // No key reserved for this memoryid, we can't cache this memoryid + return 0; // No key reserved for this memoryid, we can't cache this memoryid } $newdata = serialize($data); @@ -268,7 +268,7 @@ function dol_setshmop($memoryid, $data, $expire) shmop_close($handle); return ($shm_bytes_written1 + $shm_bytes_written2); } else { - print 'Error in shmop_open for memoryid=' . $memoryid . ' shmkey=' . $shmkey . ' 6+size=6+' . $size; + print 'Error in shmop_open for memoryid='.$memoryid.' shmkey='.$shmkey.' 6+size=6+'.$size; return -1; } } @@ -290,7 +290,7 @@ function dol_getshmop($memoryid) } $shmkey = dol_getshmopaddress($memoryid); if (empty($shmkey)) { - return null; // No key reserved for this memoryid, we can't cache this memoryid + return null; // No key reserved for this memoryid, we can't cache this memoryid } //print 'dol_getshmop memoryid='.$memoryid." shmkey=".$shmkey."
    \n"; @@ -304,7 +304,7 @@ function dol_getshmop($memoryid) } shmop_close($handle); } else { - return null; // Can't open existing block, so we suppose it was not created, so nothing were cached yet for the memoryid + return null; // Can't open existing block, so we suppose it was not created, so nothing were cached yet for the memoryid } return $data; } diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index f264eadaf58..0109847c59a 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -199,7 +199,7 @@ function getCustomerOrderPieChart($socid = 0) $sql = "SELECT count(c.rowid) as nb, c.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -207,7 +207,7 @@ function getCustomerOrderPieChart($socid = 0) if ($user->socid) { $sql .= ' AND c.fk_soc = '.((int) $user->socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " GROUP BY c.fk_statut"; diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php index 390961f5db2..2bb1cf1d0cf 100644 --- a/htdocs/core/lib/payments.lib.php +++ b/htdocs/core/lib/payments.lib.php @@ -99,7 +99,7 @@ function bankline_prepare_head($id) */ function payment_supplier_prepare_head(Paiement $object) { - global $langs, $conf; + global $db, $langs, $conf; $h = 0; $head = array(); @@ -120,6 +120,19 @@ function payment_supplier_prepare_head(Paiement $object) $head[$h][2] = 'info'; $h++; + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->fournisseur->payment->dir_output.'/'.$object->ref; + $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); + $nbLinks = Link::count($db, $object->element, $object->id); + $head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/document.php?id='.$object->id; + $head[$h][1] = $langs->trans('Documents'); + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } + $head[$h][2] = 'documents'; + $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'payment_supplier', 'remove'); return $head; @@ -173,8 +186,9 @@ function showOnlinePaymentUrl($type, $ref) $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'
    '; $url = getOnlinePaymentUrl(0, $type, $ref); - $out .= ''; + $out .= ''; $out .= ajax_autoselect("onlinepaymenturl", 0); return $out; } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index e9b2e558595..8293d3d1c65 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -177,8 +177,8 @@ function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P') //$metric=$arrayformat['unit']; $pdfa = false; // PDF-1.3 - if (!empty($conf->global->PDF_USE_1A)) { - $pdfa = true; // PDF1/A + if (!empty($conf->global->PDF_USE_A)) { + $pdfa = $conf->global->PDF_USE_A; // PDF/A-1 ou PDF/A-3 } if (class_exists('TCPDI')) { diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 9be293a81ab..28723ab87db 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -157,8 +157,8 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt if ($resql) { $obj = $db->fetch_object($resql); if ($obj) { - $localtax1_rate = (float) $obj->localtax1; // Use float to force to get first numeric value when value is x:y:z - $localtax2_rate = (float) $obj->localtax2; // Use float to force to get first numeric value when value is -19:-15:-9 + $localtax1_rate = (float) $obj->localtax1; // Use float to force to get first numeric value when value is x:y:z + $localtax2_rate = (float) $obj->localtax2; // Use float to force to get first numeric value when value is -19:-15:-9 $localtax1_type = $obj->localtax1_type; $localtax2_type = $obj->localtax2_type; //var_dump($localtax1_rate.' '.$localtax2_rate.' '.$localtax1_type.' '.$localtax2_type); @@ -443,7 +443,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt // initialize result array //for ($i=0; $i <= 18; $i++) $result[$i] = (float) $result[$i]; - dol_syslog('Price.lib::calcul_price_total MAIN_ROUNDING_RULE_TOT='.(empty($conf->global->MAIN_ROUNDING_RULE_TOT)?'':$conf->global->MAIN_ROUNDING_RULE_TOT).' pu='.$pu.' qty='.$qty.' price_base_type='.$price_base_type.' total_ht='.$result[0].'-total_vat='.$result[1].'-total_ttc='.$result[2]); + dol_syslog('Price.lib::calcul_price_total MAIN_ROUNDING_RULE_TOT='.(empty($conf->global->MAIN_ROUNDING_RULE_TOT) ? '' : $conf->global->MAIN_ROUNDING_RULE_TOT).' pu='.$pu.' qty='.$qty.' price_base_type='.$price_base_type.' total_ht='.$result[0].'-total_vat='.$result[1].'-total_ttc='.$result[2]); return $result; } diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 64cc72a8879..10c838b4c43 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -589,12 +589,12 @@ function measuring_units_string($scale = '', $measuring_style = '', $unit = 0, $ /** * Return translation label of a unit key * - * @param int $unit ID of unit (rowid in llx_c_units table) - * @param string $measuring_style Style of unit: 'weight', 'volume', ..., '' = 'net_measure' for option PRODUCT_ADD_NET_MEASURE - * @param string $scale Scale of unit: '0', '-3', '6', ... - * @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated. + * @param int $unit ID of unit (rowid in llx_c_units table) + * @param string $measuring_style Style of unit: 'weight', 'volume', ..., '' = 'net_measure' for option PRODUCT_ADD_NET_MEASURE + * @param string $scale Scale of unit: '0', '-3', '6', ... + * @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated. * @param Translate $outputlangs Language object - * @return string Unit string + * @return string Unit string * @see formproduct->selectMeasuringUnits() */ function measuringUnitString($unit, $measuring_style = '', $scale = '', $use_short_label = 0, $outputlangs = null) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 9d6b9c48192..c66bcdfc2d8 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -311,7 +311,7 @@ function project_prepare_head(Project $project, $moreparam = '') } $head[$h][0] = DOL_URL_ROOT.'/projet/info.php?id='.$project->id; - $head[$h][1] .= $langs->trans("Events"); + $head[$h][1] = $langs->trans("Events"); if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { $head[$h][1] .= '/'; $head[$h][1] .= $langs->trans("Agenda"); @@ -572,7 +572,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $numlines = count($lines); // We declare counter as global because we want to edit them into recursive call - global $total_projectlinesa_spent, $total_projectlinesa_planned, $total_projectlinesa_spent_if_planned, $total_projectlinesa_declared_if_planned, $total_projectlinesa_tobill, $total_projectlinesa_billed; + global $total_projectlinesa_spent, $total_projectlinesa_planned, $total_projectlinesa_spent_if_planned, $total_projectlinesa_declared_if_planned, $total_projectlinesa_tobill, $total_projectlinesa_billed, $total_budget_amount; if ($level == 0) { $total_projectlinesa_spent = 0; @@ -581,6 +581,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $total_projectlinesa_declared_if_planned = 0; $total_projectlinesa_tobill = 0; $total_projectlinesa_billed = 0; + $total_budget_amount = 0; } for ($i = 0; $i < $numlines; $i++) { @@ -651,6 +652,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $taskstatic->datee = $lines[$i]->date_end; // deprecated $taskstatic->planned_workload = $lines[$i]->planned_workload; $taskstatic->duration_effective = $lines[$i]->duration; + $taskstatic->budget_amount = $lines[$i]->budget_amount; if ($showproject) { @@ -850,6 +852,12 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } print ''; }*/ + if (count($arrayfields) > 0 && !empty($arrayfields['c.assigned']['checked'])) { + print ''; + print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); + $total_budget_amount += $lines[$i]->budget_amount; + print ''; + } // Contacts of task if (count($arrayfields) > 0 && !empty($arrayfields['c.assigned']['checked'])) { @@ -921,7 +929,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } } - if (($total_projectlinesa_planned > 0 || $total_projectlinesa_spent > 0 || $total_projectlinesa_tobill > 0 || $total_projectlinesa_billed > 0) + if (($total_projectlinesa_planned > 0 || $total_projectlinesa_spent > 0 || $total_projectlinesa_tobill > 0 || $total_projectlinesa_billed > 0 || $total_budget_amount > 0) && $level <= 0) { print ''; print ''.$langs->trans("Total").''; @@ -1021,6 +1029,13 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; } } + + if (count($arrayfields) > 0 && !empty($arrayfields['t.budget_amount']['checked'])) { + print ''; + print price($total_budget_amount, 0, $langs, 1, 0, 0, $conf->currency); + print ''; + } + // Contacts of task for backward compatibility, if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { print ''; diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index 038ab2a7911..c5d2a647a57 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -178,7 +178,7 @@ function getCustomerProposalPieChart($socid = 0) $sql = "SELECT count(p.rowid) as nb, p.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.entity IN (".getEntity($propalstatic->element).")"; @@ -186,7 +186,7 @@ function getCustomerProposalPieChart($socid = 0) if ($user->socid) { $sql .= ' AND p.fk_soc = '.((int) $user->socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " AND p.fk_statut IN (".$db->sanitize(implode(" ,", $listofstatus)).")"; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index be804dc184c..89fd9fe590b 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -279,12 +279,12 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f } if ($feature == 'societe') { - if (!$user->rights->societe->lire && !$user->rights->fournisseur->lire) { + if (empty($user->rights->societe->lire) && empty($user->rights->fournisseur->lire)) { $readok = 0; $nbko++; } } elseif ($feature == 'contact') { - if (!$user->rights->societe->contact->lire) { + if (empty($user->rights->societe->contact->lire)) { $readok = 0; $nbko++; } @@ -299,12 +299,12 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f $nbko++; } } elseif ($feature == 'cheque') { - if (!$user->rights->banque->cheque) { + if (empty($user->rights->banque->cheque)) { $readok = 0; $nbko++; } } elseif ($feature == 'projet') { - if (!$user->rights->projet->lire && !$user->rights->projet->all->lire) { + if (!$user->rights->projet->lire && empty($user->rights->projet->all->lire)) { $readok = 0; $nbko++; } @@ -314,7 +314,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f $nbko++; } } elseif ($feature == 'payment_supplier') { - if (!$user->rights->fournisseur->facture->lire) { + if (empty($user->rights->fournisseur->facture->lire)) { $readok = 0; $nbko++; } @@ -364,18 +364,18 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f // Check write permission from module (we need to know write permission to create but also to delete drafts record or to upload files) $createok = 1; $nbko = 0; - $wemustcheckpermissionforcreate = (GETPOST('sendit', 'alpha') || GETPOST('linkit', 'alpha') || GETPOST('action', 'aZ09') == 'create' || GETPOST('action', 'aZ09') == 'update') || GETPOST('roworder', 'alpha', 2); + $wemustcheckpermissionforcreate = (GETPOST('sendit', 'alpha') || GETPOST('linkit', 'alpha') || in_array(GETPOST('action', 'aZ09'), array('create', 'update', 'add_element_resource', 'confirm_delete_linked_resource')) || GETPOST('roworder', 'alpha', 2)); $wemustcheckpermissionfordeletedraft = ((GETPOST("action", "aZ09") == 'confirm_delete' && GETPOST("confirm", "aZ09") == 'yes') || GETPOST("action", "aZ09") == 'delete'); if ($wemustcheckpermissionforcreate || $wemustcheckpermissionfordeletedraft) { foreach ($featuresarray as $feature) { if ($feature == 'contact') { - if (!$user->rights->societe->contact->creer) { + if (empty($user->rights->societe->contact->creer)) { $createok = 0; $nbko++; } } elseif ($feature == 'produit|service') { - if (!$user->rights->produit->creer && !$user->rights->service->creer) { + if (empty($user->rights->produit->creer) && empty($user->rights->service->creer)) { $createok = 0; $nbko++; } @@ -385,22 +385,22 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f $nbko++; } } elseif ($feature == 'commande_fournisseur') { - if (!$user->rights->fournisseur->commande->creer || !$user->rights->supplier_order->creer) { + if (empty($user->rights->fournisseur->commande->creer) || empty($user->rights->supplier_order->creer)) { $createok = 0; $nbko++; } } elseif ($feature == 'banque') { - if (!$user->rights->banque->modifier) { + if (empty($user->rights->banque->modifier)) { $createok = 0; $nbko++; } } elseif ($feature == 'cheque') { - if (!$user->rights->banque->cheque) { + if (empty($user->rights->banque->cheque)) { $createok = 0; $nbko++; } } elseif ($feature == 'import') { - if (!$user->rights->import->run) { + if (empty($user->rights->import->run)) { $createok = 0; $nbko++; } @@ -417,6 +417,9 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f if ($subfeature == 'user' && $user->id == $objectid && $user->rights->user->self->password) { continue; // User can edit its own password } + if ($subfeature == 'user' && $user->id != $objectid && $user->rights->user->user->password) { + continue; // User can edit another user's password + } if (empty($user->rights->$feature->$subfeature->creer) && empty($user->rights->$feature->$subfeature->write) @@ -494,11 +497,11 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f $deleteok = 0; } } elseif ($feature == 'banque') { - if (!$user->rights->banque->modifier) { + if (empty($user->rights->banque->modifier)) { $deleteok = 0; } } elseif ($feature == 'cheque') { - if (!$user->rights->banque->cheque) { + if (empty($user->rights->banque->cheque)) { $deleteok = 0; } } elseif ($feature == 'ecm') { @@ -514,7 +517,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f $deleteok = 0; } } elseif ($feature == 'adherent') { - if (!$user->rights->adherent->supprimer) { + if (empty($user->rights->adherent->supprimer)) { $deleteok = 0; } } elseif (!empty($feature2)) { // This is for permissions on 2 levels @@ -615,7 +618,7 @@ function checkUserAccessToObject($user, array $featuresarray, $objectid = 0, $ta $checksoc = array('societe'); // Test for societe object $checkother = array('contact', 'agenda'); // Test on entity + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...). $checkproject = array('projet', 'project'); // Test for project object - $checktask = array('projet_task'); // Test for task object + $checktask = array('projet_task'); // Test for task object $nocheck = array('barcode', 'stock'); // No test //$checkdefault = 'all other not already defined'; // Test on entity + link to third party on field $dbt_keyfield. Not allowed if link is empty (Ex: invoice, orders...). @@ -662,7 +665,7 @@ function checkUserAccessToObject($user, array $featuresarray, $objectid = 0, $ta if ($user->socid <> $objectid) { return false; } - } elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) { + } elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && empty($user->rights->societe->client->voir))) { // If internal user: Check permission for internal users that are restricted on their objects $sql = "SELECT COUNT(sc.fk_soc) as nb"; $sql .= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -685,7 +688,7 @@ function checkUserAccessToObject($user, array $featuresarray, $objectid = 0, $ta $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.fk_soc = ".((int) $user->socid); - } elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) { + } elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && empty($user->rights->societe->client->voir))) { // If internal user: Check permission for internal users that are restricted on their objects $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -755,7 +758,7 @@ function checkUserAccessToObject($user, array $featuresarray, $objectid = 0, $ta $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql .= " WHERE dbt.rowid IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.".$dbt_keyfield." = ".((int) $user->socid); - } elseif (!empty($conf->societe->enabled) && !$user->rights->societe->client->voir) { + } elseif (!empty($conf->societe->enabled) && empty($user->rights->societe->client->voir)) { // If internal user: Check permission for internal users that are restricted on their objects if ($feature != 'ticket') { if (empty($dbt_keyfield)) { diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index e015313ad15..ab47bc02899 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -234,7 +234,7 @@ if (!function_exists('dol_loginfunction')) { if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); - } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { + } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); $width = 128; } elseif (!empty($mysoc->logo_squarred_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_small)) { diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index bcb430dac41..13df1ad8d9d 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -39,8 +39,9 @@ function showOnlineSignatureUrl($type, $ref) if ($url == $langs->trans("FeatureOnlineSignDisabled")) { $out .= $url; } else { - $out .= ''; + $out .= ''; } + $out .= ''.img_picto('', 'globe', 'class="paddingleft"').''; $out .= '
    '; $out .= ajax_autoselect("onlinesignatureurl", 0); return $out; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 65b77b482ee..587933fe8de 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1259,7 +1259,9 @@ class pdf_einstein extends ModelePDFCommandes global $conf, $langs, $hookmanager; $ltrdirection = 'L'; - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; + if ($outputlangs->trans("DIRECTION") == 'rtl') { + $ltrdirection = 'R'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies")); diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 184c99a95e7..9eeb76cc3cf 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -586,18 +586,22 @@ class ImportCsv extends ModeleImports $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getrefifauto') { - $defaultref = ''; - // TODO provide the $modTask (module of generation of ref) as parameter of import_insert function - $obj = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON; - if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php")) { - require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.'.php'; - $modTask = new $obj; - $defaultref = $modTask->getNextValue(null, null); - } - if (is_numeric($defaultref) && $defaultref <= 0) { + if (strtolower($newval) == 'auto') { $defaultref = ''; + + $classModForNumber = $objimport->array_import_convertvalue[0][$val]['class']; + $pathModForNumber = $objimport->array_import_convertvalue[0][$val]['path']; + + if (!empty($classModForNumber) && !empty($pathModForNumber) && is_readable(DOL_DOCUMENT_ROOT.$pathModForNumber)) { + require_once DOL_DOCUMENT_ROOT.$pathModForNumber; + $modForNumber = new $classModForNumber; + $defaultref = $modForNumber->getNextValue(null, null); + } + if (is_numeric($defaultref) && $defaultref <= 0) { + $defaultref = ''; + } + $newval = $defaultref; } - $newval = $defaultref; } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'compute') { $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); $class = $objimport->array_import_convertvalue[0][$val]['class']; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index aaca0d3bd77..0171eb83ea9 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -627,18 +627,22 @@ class ImportXlsx extends ModeleImports $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getrefifauto') { - $defaultref = ''; - // TODO provide the $modTask (module of generation of ref) as parameter of import_insert function - $obj = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON; - if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . $conf->global->PROJECT_TASK_ADDON . ".php")) { - require_once DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . $conf->global->PROJECT_TASK_ADDON . '.php'; - $modTask = new $obj; - $defaultref = $modTask->getNextValue(null, null); - } - if (is_numeric($defaultref) && $defaultref <= 0) { + if (strtolower($newval) == 'auto') { $defaultref = ''; + + $classModForNumber = $objimport->array_import_convertvalue[0][$val]['class']; + $pathModForNumber = $objimport->array_import_convertvalue[0][$val]['path']; + + if (!empty($classModForNumber) && !empty($pathModForNumber) && is_readable(DOL_DOCUMENT_ROOT.$pathModForNumber)) { + require_once DOL_DOCUMENT_ROOT.$pathModForNumber; + $modForNumber = new $classModForNumber; + $defaultref = $modForNumber->getNextValue(null, null); + } + if (is_numeric($defaultref) && $defaultref <= 0) { + $defaultref = ''; + } + $newval = $defaultref; } - $newval = $defaultref; } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'compute') { $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); $class = $objimport->array_import_convertvalue[0][$val]['class']; diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 2d41dfd9725..ef43f05b86a 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -79,8 +79,8 @@ class mailing_contacts1 extends MailingTargets $statssql[0] .= " count(distinct(c.email)) as nb"; $statssql[0] .= " FROM ".MAIN_DB_PREFIX."socpeople as c"; $statssql[0] .= " WHERE c.entity IN (".getEntity('socpeople').")"; - $statssql[0] .= " AND c.email != ''"; // Note that null != '' is false - $statssql[0] .= " AND c.no_email = 0"; + $statssql[0] .= " AND c.email <> ''"; // Note that null != '' is false + $statssql[0] .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = c.email) = 0"; $statssql[0] .= " AND c.statut = 1"; return $statssql; @@ -103,8 +103,7 @@ class mailing_contacts1 extends MailingTargets $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as c"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = c.fk_soc"; $sql .= " WHERE c.entity IN (".getEntity('socpeople').")"; - $sql .= " AND c.email != ''"; // Note that null != '' is false - $sql .= " AND c.no_email = 0"; + $sql .= " AND c.email <> ''"; // Note that null != '' is false $sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = c.email) = 0"; // exclude unsubscribed users $sql .= " AND c.statut = 1"; @@ -132,10 +131,9 @@ class mailing_contacts1 extends MailingTargets $sql = "SELECT sp.poste, count(distinct(sp.email)) AS nb"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; $sql .= " WHERE sp.entity IN (".getEntity('socpeople').")"; - /*$sql.= " AND sp.email != ''"; // Note that null != '' is false - $sql.= " AND sp.no_email = 0"; - $sql.= " AND sp.statut = 1";*/ - $sql .= " AND (sp.poste IS NOT NULL AND sp.poste != '')"; + $sql .= " AND sp.email <> ''"; // Note that null != '' is false + $sql .= " AND sp.statut = 1"; + $sql .= " AND (sp.poste IS NOT NULL AND sp.poste <> '')"; $sql .= " GROUP BY sp.poste"; $sql .= " ORDER BY sp.poste"; $resql = $this->db->query($sql); @@ -169,10 +167,9 @@ class mailing_contacts1 extends MailingTargets $sql .= " ".MAIN_DB_PREFIX."socpeople as sp,"; $sql .= " ".MAIN_DB_PREFIX."categorie as c,"; $sql .= " ".MAIN_DB_PREFIX."categorie_contact as cs"; - $sql .= " WHERE sp.statut = 1"; // Note that null != '' is false - //$sql.= " AND sp.no_email = 0"; - //$sql.= " AND sp.email != ''"; - //$sql.= " AND sp.entity IN (".getEntity('socpeople').")"; + $sql .= " WHERE sp.entity IN (".getEntity('socpeople').")"; + $sql .= " AND sp.email <> ''"; // Note that null != '' is false + $sql .= " AND sp.statut = 1"; $sql .= " AND cs.fk_categorie = c.rowid"; $sql .= " AND cs.fk_socpeople = sp.rowid"; $sql .= " GROUP BY c.label"; @@ -244,10 +241,9 @@ class mailing_contacts1 extends MailingTargets $sql .= " ".MAIN_DB_PREFIX."socpeople as sp,"; $sql .= " ".MAIN_DB_PREFIX."categorie as c,"; $sql .= " ".MAIN_DB_PREFIX."categorie_societe as cs"; - $sql .= " WHERE sp.statut = 1"; // Note that null != '' is false - //$sql.= " AND sp.no_email = 0"; - //$sql.= " AND sp.email != ''"; - //$sql.= " AND sp.entity IN (".getEntity('socpeople').")"; + $sql .= " WHERE sp.entity IN (".getEntity('socpeople').")"; + $sql .= " AND sp.email <> ''"; // Note that null != '' is false + $sql .= " AND sp.statut = 1"; $sql .= " AND cs.fk_categorie = c.rowid"; $sql .= " AND cs.fk_soc = sp.fk_soc"; $sql .= " GROUP BY c.label"; @@ -282,10 +278,9 @@ class mailing_contacts1 extends MailingTargets $sql .= " ".MAIN_DB_PREFIX."socpeople as sp,"; $sql .= " ".MAIN_DB_PREFIX."categorie as c,"; $sql .= " ".MAIN_DB_PREFIX."categorie_fournisseur as cs"; - $sql .= " WHERE sp.statut = 1"; // Note that null != '' is false - //$sql.= " AND sp.no_email = 0"; - //$sql.= " AND sp.email != ''"; - //$sql.= " AND sp.entity IN (".getEntity('socpeople').")"; + $sql .= " WHERE sp.entity IN (".getEntity('socpeople').")"; + $sql .= " AND sp.email <> ''"; // Note that null != '' is false + $sql .= " AND sp.statut = 1"; $sql .= " AND cs.fk_categorie = c.rowid"; $sql .= " AND cs.fk_soc = sp.fk_soc"; $sql .= " GROUP BY c.label"; @@ -391,7 +386,6 @@ class mailing_contacts1 extends MailingTargets } $sql .= " WHERE sp.entity IN (".getEntity('socpeople').")"; $sql .= " AND sp.email <> ''"; - $sql .= " AND sp.no_email = 0"; $sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = sp.email) = 0"; // Exclude unsubscribed email adresses $sql .= " AND sp.statut = 1"; diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index afbf1e22481..9df8d44daf1 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -224,7 +224,7 @@ class MailingTargets // This can't be abstract as it is used for some method $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql .= " SET statut=3"; - $sql .= " WHERE fk_mailing =" .((int) $mailing_id)." AND email IN (SELECT mu.email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe AS mu WHERE mu.entity IN ('".getEntity('mailing')."'))"; + $sql .= " WHERE fk_mailing = ".((int) $mailing_id)." AND email IN (SELECT mu.email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe AS mu WHERE mu.entity IN ('".getEntity('mailing')."'))"; dol_syslog(__METHOD__.":mailing update status to display emails that do not want to be contacted anymore", LOG_DEBUG); $result = $this->db->query($sql); diff --git a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php index 6ba84727b3f..593986d4b7d 100644 --- a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php +++ b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php @@ -195,9 +195,10 @@ class doc_generic_member_odt extends ModelePDFMember * @param string $srctemplatepath Full path of source filename for generator using a template file * @param string $mode Tell if doc module is called for 'member', ... * @param int $nooutput 1=Generate only file on disk and do not return it on response + * @param string $filename Name of output file (without extension) * @return int 1 if OK, <=0 if KO */ - public function write_file($object, $outputlangs, $srctemplatepath, $mode = 'member', $nooutput = 0) + public function write_file($object, $outputlangs, $srctemplatepath, $mode = 'member', $nooutput = 0, $filename = 'tmp_cards') { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 1d1a892cc56..15f3260c4d2 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -243,9 +243,10 @@ class pdf_standard extends CommonStickerGenerator * @param string $srctemplatepath Full path of source filename for generator using a template file. Example: '5161', 'AVERYC32010', 'CARD', ... * @param string $mode Tell if doc module is called for 'member', ... * @param int $nooutput 1=Generate only file on disk and do not return it on response + * @param string $filename Name of output file (without extension) * @return int 1=OK, 0=KO */ - public function write_file($object, $outputlangs, $srctemplatepath, $mode = 'member', $nooutput = 0) + public function write_file($object, $outputlangs, $srctemplatepath, $mode = 'member', $nooutput = 0, $filename = 'tmp_cards') { // phpcs:enable global $user, $conf, $langs, $mysoc, $_Avery_Labels; @@ -282,7 +283,7 @@ class pdf_standard extends CommonStickerGenerator '__MONTH__'=>$month, '__DAY__'=>$day, '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, - '__SERVER__'=>"http://".$_SERVER["SERVER_NAME"]."/" + '__SERVER__'=>"https://".$_SERVER["SERVER_NAME"]."/" ); complete_substitutions_array($substitutionarray, $langs); @@ -320,7 +321,10 @@ class pdf_standard extends CommonStickerGenerator dol_print_error('', 'ErrorBadTypeForCard'.$this->code); exit; } + $this->type = 'pdf'; + $filename .= '.pdf'; + // standard format or custom if ($this->Tformat['paper-size'] != 'custom') { $this->format = $this->Tformat['paper-size']; @@ -349,7 +353,7 @@ class pdf_standard extends CommonStickerGenerator return -1; } - $filename = 'tmp_cards.pdf'; + if (is_object($object)) { $outputdir = $conf->adherent->dir_output; $dir = $outputdir."/".get_exdir(0, 0, 0, 0, $object, 'member'); diff --git a/htdocs/core/modules/member/mod_member_simple.php b/htdocs/core/modules/member/mod_member_simple.php new file mode 100644 index 00000000000..50eccd0f244 --- /dev/null +++ b/htdocs/core/modules/member/mod_member_simple.php @@ -0,0 +1,183 @@ + + * + * 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/member/mod_member_simple.php + * \ingroup member + * \brief File with class to manage the numbering module Simple for member references + */ + +require_once DOL_DOCUMENT_ROOT.'/core/modules/member/modules_member.class.php'; + + +/** + * Class to manage the numbering module Simple for member references + */ +class mod_member_simple extends ModeleNumRefMembers +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix = 'MEM'; + + /** + * @var string Error code (or message) + */ + public $error = ''; + + /** + * @var string Nom du modele + * @deprecated + * @see $name + */ + public $nom = 'Simple'; + + /** + * @var string model name + */ + public $name = 'Simple'; + + + /** + * Return description of numbering module + * + * @return string Text with description + */ + public function info() + { + global $langs; + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + } + + + /** + * Return an example of numbering module values + * + * @return string Example + */ + public function getExample() + { + return $this->prefix."0501-0001"; + } + + + /** + * Checks if the numbers already in the database do not + * cause conflicts that would prevent this numbering working. + * + * @return boolean false if conflict, true if ok + */ + public function canBeActivated() + { + global $conf, $langs, $db; + + $coyymm = ''; + $max = ''; + + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + $sql .= " AND entity = ".$conf->entity; + $resql = $db->query($sql); + if ($resql) { + $row = $db->fetch_row($resql); + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } + } + if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { + return true; + } else { + $langs->load("errors"); + $this->error = $langs->trans('ErrorNumRefModel', $max); + return false; + } + } + + + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param Object $object Object we need next value for + * @return string Value if OK, 0 if KO + */ + public function getNextValue($objsoc, $object) + { + global $db, $conf; + + /* + // First, we get the max value + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + $sql .= " AND entity = ".$conf->entity; + + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } + } else { + dol_syslog("mod_member_simple::getNextValue", LOG_DEBUG); + return -1; + } + + $date = empty($object->date_c) ? dol_now() : $object->date_c; + + //$yymm = strftime("%y%m",time()); + $yymm = strftime("%y%m", $date); + + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } + + dol_syslog("mod_member_simple::getNextValue return ".$this->prefix.$yymm."-".$num); + return $this->prefix.$yymm."-".$num; + */ + + // For the moment, the ref of a member is the rowid + $sql = "SELECT MAX(rowid) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent"; + + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } + } else { + dol_syslog("mod_member_simple::getNextValue", LOG_DEBUG); + return -1; + } + return ($max + 1); + } +} diff --git a/htdocs/core/modules/member/modules_cards.php b/htdocs/core/modules/member/modules_cards.php index 937e8a06870..b37b9144d3e 100644 --- a/htdocs/core/modules/member/modules_cards.php +++ b/htdocs/core/modules/member/modules_cards.php @@ -74,9 +74,10 @@ class ModelePDFCards * @param Translate $outputlangs Object langs to use for translation * @param string $outputdir Output directory * @param string $template pdf generenate document class to use default 'standard' + * @param string $filename Name of output file (without extension) * @return int <0 if KO, >0 if OK */ -function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir = '', $template = 'standard') +function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir = '', $template = 'standard', $filename = 'tmp_cards') { // phpcs:enable global $conf, $langs; @@ -125,7 +126,7 @@ function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $o foreach (array('doc', 'pdf') as $prefix) { $file = $prefix."_".$template.".class.php"; - // On verifie l'emplacement du modele + // We check that file of doc generaotr exists $file = dol_buildpath($reldir."core/modules/member/doc/".$file, 0); if (file_exists($file)) { $filefound = 1; @@ -148,7 +149,7 @@ function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $o // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. $sav_charset_output = $outputlangs->charset_output; - if ($obj->write_file($arrayofmembers, $outputlangs, $srctemplatepath) > 0) { + if ($obj->write_file($arrayofmembers, $outputlangs, $srctemplatepath, 'member', 0, $filename) > 0) { $outputlangs->charset_output = $sav_charset_output; return 1; } else { diff --git a/htdocs/core/modules/member/modules_member.class.php b/htdocs/core/modules/member/modules_member.class.php index 3a1b4edcc1d..cdc37231901 100644 --- a/htdocs/core/modules/member/modules_member.class.php +++ b/htdocs/core/modules/member/modules_member.class.php @@ -60,3 +60,97 @@ abstract class ModelePDFMember extends CommonDocGenerator return $list; } } + + + +/** + * Classe mere des modeles de numerotation des references de members + */ +abstract class ModeleNumRefMembers +{ + /** + * @var string Error code (or message) + */ + public $error = ''; + + /** + * Return if a module can be used or not + * + * @return boolean true if module can be used + */ + public function isEnabled() + { + return true; + } + + /** + * Renvoi la description par defaut du modele de numerotation + * + * @return string Texte descripif + */ + public function info() + { + global $langs; + $langs->load("members"); + return $langs->trans("NoDescription"); + } + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $langs; + $langs->load("members"); + return $langs->trans("NoExample"); + } + + /** + * Checks if the numbers already in the database do not + * cause conflicts that would prevent this numbering working. + * + * @return boolean false if conflict, true if ok + */ + public function canBeActivated() + { + return true; + } + + /** + * Renvoi prochaine valeur attribuee + * + * @param Societe $objsoc Object third party + * @param Object $object Object we need next value for + * @return string Valeur + */ + public function getNextValue($objsoc, $object) + { + global $langs; + return $langs->trans("NotAvailable"); + } + + /** + * Renvoi version du module numerotation + * + * @return string Valeur + */ + public function getVersion() + { + global $langs; + $langs->load("admin"); + + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } else { + return $langs->trans("NotAvailable"); + } + } +} diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index ff0c67408c5..47edfcc9ca2 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -286,7 +286,7 @@ 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'=>'Nature', + '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.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', @@ -338,8 +338,9 @@ 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.civility'=>"UserTitle", 'a.lastname'=>"Lastname*", 'a.firstname'=>"Firstname", 'a.gender'=>"Gender", 'a.login'=>"Login*", "a.pass"=>"Password", - "a.fk_adherent_type"=>"MemberType*", 'a.morphy'=>'Nature*', 'a.societe'=>'Company', 'a.address'=>"Address", 'a.zip'=>"Zip", 'a.town'=>"Town", + "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.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' @@ -358,7 +359,27 @@ class modAdherent extends DolibarrModules } } // End add extra fields - $this->import_convertvalue_array[$r] = array(); + $this->import_convertvalue_array[$r] = array( + 'a.ref'=>array( + 'rule'=>'getrefifauto', + 'class'=>(empty($conf->global->MEMBER_ADDON) ? 'mod_member_simple' : $conf->global->MEMBER_ADDON), + 'path'=>"/core/modules/member/".(empty($conf->global->MEMBER_ADDON) ? 'mod_member_simple' : $conf->global->MEMBER_ADDON).'.php' + ), + 'a.state_id' => array( + 'rule' => 'fetchidfromcodeid', + 'classfile' => '/core/class/cstate.class.php', + 'class' => 'Cstate', + 'method' => 'fetch', + 'dict' => 'DictionaryStateCode' + ), + 'a.country' => array( + 'rule' => 'fetchidfromcodeid', + 'classfile' => '/core/class/ccountry.class.php', + 'class' => 'Ccountry', + 'method' => 'fetch', + 'dict' => 'DictionaryCountry' + ) + ); if (!empty($conf->societe->enabled)) { $this->import_convertvalue_array[$r]['a.fk_soc'] = array('rule'=>'fetchidfromref', 'classfile'=>'/societe/class/societe.class.php', 'class'=>'Societe', 'method'=>'fetch', 'element'=>'ThirdParty'); } @@ -367,6 +388,7 @@ class modAdherent extends DolibarrModules 'a.civility'=>'code@'.MAIN_DB_PREFIX.'c_civility', 'a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type', 'a.morphy'=>'(phy|mor)', 'a.statut'=>'^[0|1]', 'a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$', 'a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); $this->import_examplevalues_array[$r] = array( + 'a.ref'=>"auto or MEM2010-1234", 'a.civility'=>"MR", 'a.lastname'=>'Smith', 'a.firstname'=>'John', 'a.gender'=>'man or woman', 'a.login'=>'jsmith', 'a.pass'=>'passofjsmith', 'a.fk_adherent_type'=>'1', 'a.morphy'=>'"mor" or "phy"', 'a.societe'=>'JS company', 'a.address'=>'21 jump street', 'a.zip'=>'55000', 'a.town'=>'New York', 'a.country'=>'1', 'a.email'=>'jsmith@example.com', 'a.birth'=>'1972-10-10', 'a.statut'=>"0 or 1", 'a.note_public'=>"This is a public comment on member", @@ -375,6 +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'); // Cronjobs $arraydate = dol_getdate(dol_now()); diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 776c5c76681..c3b7f256b4b 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -164,8 +164,8 @@ class modCategorie extends DolibarrModules $typeexample .= ($typeexample ? " / " : "")."11=Website page"; } - $this->export_fields_array[$r] = array('cat.rowid'=>"CategId", 'cat.label'=>"Label", 'cat.type'=>"Type", 'cat.description'=>"Description", 'cat.fk_parent'=>"ParentCategory", 'pcat.label'=>"ParentCategoryLabel" ); - $this->export_TypeFields_array[$r] = array('cat.label'=>"Text", 'cat.type'=>"Numeric", 'cat.description'=>"Text", 'cat.fk_parent'=>'List:categorie:label:rowid', 'pcat.label'=>'Text' ); + $this->export_fields_array[$r] = array('cat.rowid'=>"CategId", 'cat.label'=>"Label", 'cat.type'=>"Type", 'cat.description'=>"Description", 'cat.fk_parent'=>"ParentCategory", 'pcat.label'=>"ParentCategoryLabel"); + $this->export_TypeFields_array[$r] = array('cat.label'=>"Text", 'cat.type'=>"Numeric", 'cat.description'=>"Text", 'cat.fk_parent'=>'List:categorie:label:rowid', 'pcat.label'=>'Text'); $this->export_entities_array[$r] = array(); // We define here only fields that use another picto $this->export_help_array[$r] = array('cat.type'=>$typeexample); @@ -460,7 +460,7 @@ class modCategorie extends DolibarrModules ); $this->import_examplevalues_array[$r] = array( - 'ca.label'=>"My Category Label", 'ca.type'=>$typeexample, 'ca.description'=>"My Category description", // $typeexample built above in exports + 'ca.label'=>"My Category Label", 'ca.type'=>$typeexample, 'ca.description'=>"My Category description", // $typeexample built above in exports 'ca.fk_parent' => 'rowid or label' ); $this->import_updatekeys_array[$r] = array('ca.label'=>'Label'); @@ -538,7 +538,7 @@ class modCategorie extends DolibarrModules $this->import_convertvalue_array[$r] = array( 'cs.fk_categorie'=>array('rule'=>'fetchidfromref', 'classfile'=>'/categories/class/categorie.class.php', 'class'=>'Categorie', 'method'=>'fetch', 'element'=>'category'), - 'cs.fk_member'=>array('rule'=>'fetchidfromref','classfile'=>'/adherents/class/adherent.class.php','class'=>'Adherent','method'=>'fetch','element'=>'Member') + 'cs.fk_member'=>array('rule'=>'fetchidfromref', 'classfile'=>'/adherents/class/adherent.class.php', 'class'=>'Adherent', 'method'=>'fetch', 'element'=>'Member') ); $this->import_examplevalues_array[$r] = array('cs.fk_categorie'=>"rowid or label", 'cs.fk_member'=>"rowid or ref"); } @@ -579,7 +579,7 @@ class modCategorie extends DolibarrModules $this->import_convertvalue_array[$r] = array( 'cs.fk_categorie'=>array('rule'=>'fetchidfromref', 'classfile'=>'/categories/class/categorie.class.php', 'class'=>'Categorie', 'method'=>'fetch', 'element'=>'category'), - 'cs.fk_project'=>array('rule'=>'fetchidfromref','classfile'=>'/projet/class/project.class.php','class'=>'Project','method'=>'fetch','element'=>'Project') + 'cs.fk_project'=>array('rule'=>'fetchidfromref', 'classfile'=>'/projet/class/project.class.php', 'class'=>'Project', 'method'=>'fetch', 'element'=>'Project') ); $this->import_examplevalues_array[$r] = array('cp.fk_categorie'=>"rowid or label", 'cp.fk_project'=>"rowid or ref"); } @@ -597,7 +597,7 @@ class modCategorie extends DolibarrModules $this->import_convertvalue_array[$r] = array( 'cu.fk_categorie'=>array('rule'=>'fetchidfromref', 'classfile'=>'/categories/class/categorie.class.php', 'class'=>'Categorie', 'method'=>'fetch', 'element'=>'category'), - 'cu.fk_user'=>array('rule'=>'fetchidfromref','classfile'=>'/user/class/user.class.php','class'=>'User','method'=>'fetch','element'=>'User') + 'cu.fk_user'=>array('rule'=>'fetchidfromref', 'classfile'=>'/user/class/user.class.php', 'class'=>'User', 'method'=>'fetch', 'element'=>'User') ); $this->import_examplevalues_array[$r] = array('cu.fk_categorie'=>"rowid or label", 'cu.fk_user'=>"rowid or login"); } diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php index 8a3fb3d80cf..6ab1c8acb89 100644 --- a/htdocs/core/modules/modEventOrganization.class.php +++ b/htdocs/core/modules/modEventOrganization.class.php @@ -19,7 +19,7 @@ * \defgroup eventorganization Module EventOrganization * \brief EventOrganization module descriptor. * - * \file htdocs/eventorganization/core/modules/modEventOrganization.class.php + * \file htdocs/core/modules/modEventOrganization.class.php * \ingroup eventorganization * \brief Description and activation file for the EventOrganization */ diff --git a/htdocs/core/modules/modKnowledgeManagement.class.php b/htdocs/core/modules/modKnowledgeManagement.class.php index afd20a94a04..b3fb24aa7b3 100644 --- a/htdocs/core/modules/modKnowledgeManagement.class.php +++ b/htdocs/core/modules/modKnowledgeManagement.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2018-2019 Nicolas ZABOURI - * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2019-2021 Frédéric France * Copyright (C) 2021 SuperAdmin * * This program is free software; you can redistribute it and/or modify @@ -22,7 +22,7 @@ * \defgroup knowledgemanagement Module KnowledgeManagement * \brief KnowledgeManagement module descriptor. * - * \file htdocs/knowledgemanagement/core/modules/modKnowledgeManagement.class.php + * \file htdocs/core/modules/modKnowledgeManagement.class.php * \ingroup knowledgemanagement * \brief Description and activation file for module KnowledgeManagement */ @@ -68,7 +68,7 @@ class modKnowledgeManagement extends DolibarrModules $this->descriptionlong = "Manage a Knowledge Management (KM) or Help-Desk base"; // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' - $this->version = 'experimental'; + $this->version = 'dolibarr'; // Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; diff --git a/htdocs/core/modules/modMultiCurrency.class.php b/htdocs/core/modules/modMultiCurrency.class.php index e89a2a4fe3e..98d7222f082 100644 --- a/htdocs/core/modules/modMultiCurrency.class.php +++ b/htdocs/core/modules/modMultiCurrency.class.php @@ -302,7 +302,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/modPartnership.class.php b/htdocs/core/modules/modPartnership.class.php index a036613fcec..87ce98abb4a 100644 --- a/htdocs/core/modules/modPartnership.class.php +++ b/htdocs/core/modules/modPartnership.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2018-2019 Nicolas ZABOURI - * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2019-2021 Frédéric France * Copyright (C) 2021 Dorian Laurent * Copyright (C) 2021 NextGestion * @@ -23,7 +23,7 @@ * \defgroup partnership Module Partnership * \brief Partnership module descriptor. * - * \file htdocs/partnership/core/modules/modPartnership.class.php + * \file htdocs/core/modules/modPartnership.class.php * \ingroup partnership * \brief Description and activation file for module Partnership */ diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index deefea6c2e8..2d89baa07a3 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -309,7 +309,7 @@ class modProjet extends DolibarrModules $this->import_fieldshidden_array[$r] = array('t.fk_user_creat'=>'user->id', 'extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'projet_task'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_convertvalue_array[$r] = array( 't.fk_projet'=>array('rule'=>'fetchidfromref', 'classfile'=>'/projet/class/project.class.php', 'class'=>'Project', 'method'=>'fetch', 'element'=>'Project'), - 't.ref'=>array('rule'=>'getrefifauto') + 't.ref'=>array('rule'=>'getrefifauto', 'class'=>(empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON), 'path'=>"/core/modules/project/task/".(empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON).'.php') ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r] = array('t.dateo'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$', 't.datee'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$', 't.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$'); diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index b46671eae01..1374e70d6d4 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -23,7 +23,7 @@ /** * \defgroup propale Module commercial proposals - * \brief Module pour gerer la tenue de propositions commerciales + * \brief Module to manage commercial proposals * \file htdocs/core/modules/modPropale.class.php * \ingroup propale * \brief Description and activation file for the module customer proposal @@ -36,7 +36,6 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; */ class modPropale extends DolibarrModules { - /** * Constructor. Define names, constants, directories, boxes, permissions * diff --git a/htdocs/core/modules/modRecruitment.class.php b/htdocs/core/modules/modRecruitment.class.php index 02e7cdfbf4c..239c48135d7 100644 --- a/htdocs/core/modules/modRecruitment.class.php +++ b/htdocs/core/modules/modRecruitment.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2018-2019 Nicolas ZABOURI - * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2019-2021 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ * \defgroup recruitment Module Recruitment * \brief Recruitment module descriptor. * - * \file htdocs/recruitment/core/modules/modRecruitment.class.php + * \file htdocs/core/modules/modRecruitment.class.php * \ingroup recruitment * \brief Description and activation file for the module Recruitment */ diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index d0cfa64c884..00e5a7859c0 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -414,7 +414,7 @@ class modStock extends DolibarrModules ); $this->import_updatekeys_array[$r] = array('ps.fk_product'=>'Product', 'ps.fk_entrepot'=>"Warehouse"); $this->import_run_sql_after_array[$r] = array( // Because we may change data that are denormalized, we must update dernormalized data after. - 'UPDATE '.MAIN_DB_PREFIX.'product p SET p.stock= (SELECT SUM(ps.reel) FROM '.MAIN_DB_PREFIX.'product_stock ps WHERE ps.fk_product = p.rowid);' + 'UPDATE '.MAIN_DB_PREFIX.'product as p SET p.stock = (SELECT SUM(ps.reel) FROM '.MAIN_DB_PREFIX.'product_stock ps WHERE ps.fk_product = p.rowid);' ); } diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index e54ac7bd440..abeca50b77d 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -49,7 +49,7 @@ class modUser extends DolibarrModules $this->module_position = '05'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); - $this->description = "Gestion des utilisateurs (requis)"; + $this->description = "Management of users and groups of users (mandatory)"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'dolibarr'; @@ -90,7 +90,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 251; - $this->rights[$r][1] = 'Consulter les autres utilisateurs'; + $this->rights[$r][1] = 'Read information of other users, groups and permissions'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'user'; @@ -98,15 +98,15 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 252; - $this->rights[$r][1] = 'Consulter les permissions des autres utilisateurs'; + $this->rights[$r][1] = 'Read permissions of other users'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'user_advance'; + $this->rights[$r][4] = 'user_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on $this->rights[$r][5] = 'readperms'; $r++; $this->rights[$r][0] = 253; - $this->rights[$r][1] = 'Creer/modifier utilisateurs internes et externes'; + $this->rights[$r][1] = 'Create/modify internal and external users, groups and permissions'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'user'; @@ -114,15 +114,15 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 254; - $this->rights[$r][1] = 'Creer/modifier utilisateurs externes seulement'; + $this->rights[$r][1] = 'Create/modify external users only'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'user_advance'; + $this->rights[$r][4] = 'user_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on $this->rights[$r][5] = 'write'; $r++; $this->rights[$r][0] = 255; - $this->rights[$r][1] = 'Modifier le mot de passe des autres utilisateurs'; + $this->rights[$r][1] = 'Modify the password of other users'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'user'; @@ -130,7 +130,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 256; - $this->rights[$r][1] = 'Supprimer ou desactiver les autres utilisateurs'; + $this->rights[$r][1] = 'Delete or disable other users'; $this->rights[$r][2] = 'd'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'user'; @@ -138,7 +138,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 341; - $this->rights[$r][1] = 'Consulter ses propres permissions'; + $this->rights[$r][1] = 'Read its own permissions'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'self_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on @@ -146,7 +146,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 342; - $this->rights[$r][1] = 'Creer/modifier ses propres infos utilisateur'; + $this->rights[$r][1] = 'Create/modify of its own user'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'self'; @@ -154,7 +154,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 343; - $this->rights[$r][1] = 'Modifier son propre mot de passe'; + $this->rights[$r][1] = 'Modify its own password'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'self'; @@ -162,7 +162,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 344; - $this->rights[$r][1] = 'Modifier ses propres permissions'; + $this->rights[$r][1] = 'Modify its own permissions'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'self_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on @@ -170,7 +170,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 351; - $this->rights[$r][1] = 'Consulter les groupes'; + $this->rights[$r][1] = 'Read groups'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'group_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on @@ -178,7 +178,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 352; - $this->rights[$r][1] = 'Consulter les permissions des groupes'; + $this->rights[$r][1] = 'Read permissions of groups'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'group_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on @@ -186,7 +186,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 353; - $this->rights[$r][1] = 'Creer/modifier les groupes et leurs permissions'; + $this->rights[$r][1] = 'Create/modify groups and permissions'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'group_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on @@ -194,7 +194,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 354; - $this->rights[$r][1] = 'Supprimer ou desactiver les groupes'; + $this->rights[$r][1] = 'Delete groups'; $this->rights[$r][2] = 'd'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'group_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on @@ -202,7 +202,7 @@ class modUser extends DolibarrModules $r++; $this->rights[$r][0] = 358; - $this->rights[$r][1] = 'Exporter les utilisateurs'; + $this->rights[$r][1] = 'Export all users'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'user'; diff --git a/htdocs/core/modules/modWorkstation.class.php b/htdocs/core/modules/modWorkstation.class.php index 3069be8ced5..38c5222401c 100755 --- a/htdocs/core/modules/modWorkstation.class.php +++ b/htdocs/core/modules/modWorkstation.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2018-2019 Nicolas ZABOURI - * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2019-2021 Frédéric France * Copyright (C) 2020 Gauthier VERDOL * * This program is free software; you can redistribute it and/or modify @@ -22,7 +22,7 @@ * \defgroup workstation Module Workstation * \brief Workstation module descriptor. * - * \file htdocs/workstation/core/modules/modWorkstation.class.php + * \file htdocs/core/modules/modWorkstation.class.php * \ingroup workstation * \brief Description and activation file for the module Workstation */ diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php index 5f6a03f2caa..d116976eb88 100644 --- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php +++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php @@ -5,8 +5,8 @@ * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018 Frédéric France - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 Frédéric France + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or @@ -23,7 +23,7 @@ */ /** - * \file htdocs/core/modules/mrp/doc/pdf_vinci.php + * \file htdocs/core/modules/mrp/doc/pdf_vinci.modules.php * \ingroup mrp * \brief File of class to generate MO document from vinci model */ diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 5ac04453c77..406322a20a3 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1742,7 +1742,7 @@ class pdf_cyan extends ModelePDFPropales $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); - $mode = 'target'; + $mode = 'target'; $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); // Show recipient diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 5904db84398..215987054ce 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -196,7 +196,7 @@ class pdf_paiement $sql .= " ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba,"; } $sql .= " ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid AND pf.fk_facture = f.rowid AND pf.fk_paiement = p.rowid"; @@ -205,7 +205,7 @@ class pdf_paiement } $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year, $month))."' AND '".$this->db->idate(dol_get_last_day($year, $month))."'"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if (!empty($socid)) { @@ -234,7 +234,7 @@ class pdf_paiement $sql .= " ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba,"; } $sql .= " ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid AND pf.fk_facturefourn = f.rowid AND pf.fk_paiementfourn = p.rowid"; @@ -243,7 +243,7 @@ class pdf_paiement } $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year, $month))."' AND '".$this->db->idate(dol_get_last_day($year, $month))."'"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if (!empty($socid)) { diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index c4fb2ef7b50..08ccf213b18 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -133,7 +133,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->db = $db; $this->name = "canelle"; $this->description = $langs->trans('SuppliersInvoiceModel'); - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page dimensions $this->type = 'pdf'; diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index 8c706f59db3..76d264f2444 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -135,7 +135,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->db = $db; $this->name = "muscadet"; $this->description = $langs->trans('SuppliersCommandModelMuscadet'); - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -1127,7 +1127,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders global $langs, $conf, $mysoc; $ltrdirection = 'L'; - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; + if ($outputlangs->trans("DIRECTION") == 'rtl') { + $ltrdirection = 'R'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "sendings")); diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index b6da2d4c294..5b9ffa062a3 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -132,7 +132,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->db = $db; $this->name = "standard"; $this->description = $langs->trans('DocumentModelStandardPDF'); - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -812,6 +812,25 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L'); + + // Show default IBAN account + $sql = "SELECT iban_prefix"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as rib"; + $sql .= " WHERE fk_soc = ".($object->thirdparty->id); + $sql .= " AND rib.default_rib = 1"; + $sql .= " AND rib.type = 'ban'"; + $sql .= " LIMIT 1"; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + $iban = $obj->iban_prefix; + } + + if (!empty($iban)) { + $pdf->SetFont('', '', $default_font_size - 1); + $pdf->SetXY($posx + 2, $posy + 15); + $pdf->MultiCell($widthrecbox, 4, $langs->trans("IBAN").': '.$iban, 0, 'L'); + } } } diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 1bf47275599..c2ab5c99ea6 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -132,7 +132,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->db = $db; $this->name = "aurore"; $this->description = $langs->trans('DocModelAuroreDescription'); - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index 2f1a8ae9d71..6611f8d926e 100755 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -27,7 +27,7 @@ * \brief File containing class for advanced numbering model of Workstation */ -require_once DOL_DOCUMENT_ROOT . '/core/modules/workstation/modules_workstation.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/workstation/modules_workstation.php'; /** diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index 374f381c098..7b2feef5c72 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -68,7 +68,7 @@ if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'serv $accessallowed = 1; } elseif ($modulepart == 'member') { $result = restrictedArea($user, 'adherent', $id, '', '', 'fk_soc', 'rowid'); - if (!$user->rights->adherent->lire) { + if (empty($user->rights->adherent->lire)) { accessforbidden(); } $accessallowed = 1; @@ -86,7 +86,7 @@ if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'serv $accessallowed = 1; } elseif ($modulepart == 'bank') { $result = restrictedArea($user, 'banque', $id, 'bank_account'); - if (!$user->rights->banque->lire) { + if (empty($user->rights->banque->lire)) { accessforbidden(); } $accessallowed = 1; @@ -98,7 +98,7 @@ if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'serv $accessallowed = 1; } elseif ($modulepart == 'facture_fourn' || $modulepart == 'facture_fournisseur') { $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); - if (!$user->rights->fournisseur->facture->lire) { + if (empty($user->rights->fournisseur->facture->lire)) { accessforbidden(); } $accessallowed = 1; @@ -475,7 +475,7 @@ if ($action == 'confirm_crop') { * View */ -$title= $langs->trans("ImageEditor"); +$title = $langs->trans("ImageEditor"); $morejs = array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js'); $morecss = array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css'); diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index 6750cc0b1a5..0c1d34efa08 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -93,7 +93,10 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel // Key print "".dol_escape_htmltag($key)."\n"; // Type - print "".dol_escape_htmltag($type2label[$extrafields->attributes[$elementtype]['type'][$key]])."\n"; + $typetoshow = $type2label[$extrafields->attributes[$elementtype]['type'][$key]]; + print ''; + print dol_escape_htmltag($typetoshow); + print "\n"; // Size print ''.dol_escape_htmltag($extrafields->attributes[$elementtype]['size'][$key])."\n"; // Computed field diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 212e766589c..7cc95c81fe0 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -210,6 +210,9 @@ if ($action == 'presend') { } // Make substitution in email content + if ($object) { + $formmail->setSubstitFromObject($object, $langs); + } $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, $arrayoffamiliestoexclude, $object); $substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '' : ''; $substitutionarray['__PERSONALIZED__'] = ''; // deprecated diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index 7d547d52dea..00a22934f78 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -19,13 +19,8 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) { if (!empty($arrayfields[$extrafieldsobjectprefix.$key]['checked'])) { - $align = $extrafields->getAlignFlag($key, $extrafieldsobjectkey); - print ''; + $cssclass = $extrafields->getAlignFlag($key, $extrafieldsobjectkey); + $tmpkey = 'options_'.$key; if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !is_numeric($obj->$tmpkey)) { @@ -47,8 +42,16 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield //var_dump($value); } - print $extrafields->showOutputField($key, $value, '', $extrafieldsobjectkey); + $valuetoshow = $extrafields->showOutputField($key, $value, '', $extrafieldsobjectkey); + $title = dol_string_nohtmltag($valuetoshow); + + print ''; + print $valuetoshow; print ''; + if (!$i) { $totalarray['nbfield']++; } @@ -62,7 +65,7 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield $totalarray['totalizable'][$key]['total'] += $obj->$tmpkey; } } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = $extrafieldsobjectprefix.$tmpkey; } diff --git a/htdocs/core/tpl/extrafields_list_search_param.tpl.php b/htdocs/core/tpl/extrafields_list_search_param.tpl.php index 56652b87dd3..7e58e106882 100644 --- a/htdocs/core/tpl/extrafields_list_search_param.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_param.tpl.php @@ -18,17 +18,17 @@ if (!empty($search_array_options) && is_array($search_array_options)) { // $extr if (is_array($val) && array_key_exists('start', $val) && array_key_exists('end', $val)) { // date range from list filters is stored as array('start' => , 'end' => ) // start date - $param .= '&' . $search_options_pattern.$tmpkey.'_startyear=' . dol_print_date($val['start'], '%Y'); - $param .= '&' . $search_options_pattern.$tmpkey.'_startmonth=' . dol_print_date($val['start'], '%m'); - $param .= '&' . $search_options_pattern.$tmpkey.'_startday=' . dol_print_date($val['start'], '%d'); - $param .= '&' . $search_options_pattern.$tmpkey.'_starthour=' . dol_print_date($val['start'], '%H'); - $param .= '&' . $search_options_pattern.$tmpkey.'_startmin=' . dol_print_date($val['start'], '%M'); + $param .= '&'.$search_options_pattern.$tmpkey.'_startyear='.dol_print_date($val['start'], '%Y'); + $param .= '&'.$search_options_pattern.$tmpkey.'_startmonth='.dol_print_date($val['start'], '%m'); + $param .= '&'.$search_options_pattern.$tmpkey.'_startday='.dol_print_date($val['start'], '%d'); + $param .= '&'.$search_options_pattern.$tmpkey.'_starthour='.dol_print_date($val['start'], '%H'); + $param .= '&'.$search_options_pattern.$tmpkey.'_startmin='.dol_print_date($val['start'], '%M'); // end date - $param .= '&' . $search_options_pattern.$tmpkey.'_endyear=' . dol_print_date($val['end'], '%Y'); - $param .= '&' . $search_options_pattern.$tmpkey.'_endmonth=' . dol_print_date($val['end'], '%m'); - $param .= '&' . $search_options_pattern.$tmpkey.'_endday=' . dol_print_date($val['end'], '%d'); - $param .= '&' . $search_options_pattern.$tmpkey.'_endhour=' . dol_print_date($val['end'], '%H'); - $param .= '&' . $search_options_pattern.$tmpkey.'_endmin=' . dol_print_date($val['end'], '%M'); + $param .= '&'.$search_options_pattern.$tmpkey.'_endyear='.dol_print_date($val['end'], '%Y'); + $param .= '&'.$search_options_pattern.$tmpkey.'_endmonth='.dol_print_date($val['end'], '%m'); + $param .= '&'.$search_options_pattern.$tmpkey.'_endday='.dol_print_date($val['end'], '%d'); + $param .= '&'.$search_options_pattern.$tmpkey.'_endhour='.dol_print_date($val['end'], '%H'); + $param .= '&'.$search_options_pattern.$tmpkey.'_endmin='.dol_print_date($val['end'], '%M'); $val = ''; } if ($val != '') { diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index cd58ae554f2..199d9011cf6 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -125,7 +125,7 @@ if (empty($reshook) && isset($extrafields->attributes[$object->table_element]['l $lastseparatorkeyfound = $tmpkeyextra; } else { - print 'id) ? '_'.$object->id : ''); /*if ($extrafields_collapse_num && $extrafields_collapse_num_old && $extrafields_collapse_num != $extrafields_collapse_num_old) { print ' trextrafields_collapse_new'; }*/ diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 4d0772225c7..e1f56974483 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -38,17 +38,17 @@ if ($massaction == 'predelete') { if ($massaction == 'preaffecttag') { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $categ = new Categorie($db); - $categ_types=array(); - $categ_type_array=$categ->getMapList(); + $categ_types = array(); + $categ_type_array = $categ->getMapList(); foreach ($categ_type_array as $categdef) { - if (isset($object) && $categdef['obj_table']==$object->table_element) { + if (isset($object) && $categdef['obj_table'] == $object->table_element) { if (!array_key_exists($categdef['code'], $categ_types)) { - $categ_types[$categdef['code']] = array('code'=>$categdef['code'],'label'=>$langs->trans($categdef['obj_class'])); + $categ_types[$categdef['code']] = array('code'=>$categdef['code'], 'label'=>$langs->trans($categdef['obj_class'])); } } - if (isset($objecttmp) && $categdef['obj_table']==$objecttmp->table_element) { + if (isset($objecttmp) && $categdef['obj_table'] == $objecttmp->table_element) { if (!array_key_exists($categdef['code'], $categ_types)) { - $categ_types[$categdef['code']] = array('code'=>$categdef['code'],'label'=>$langs->trans($categdef['obj_class'])); + $categ_types[$categdef['code']] = array('code'=>$categdef['code'], 'label'=>$langs->trans($categdef['obj_class'])); } } } @@ -57,12 +57,12 @@ if ($massaction == 'preaffecttag') { if (!empty($categ_types)) { foreach ($categ_types as $categ_type) { $cate_arbo = $form->select_all_categories($categ_type['code'], null, 'parent', null, null, 1); - $formquestion[]=array('type' => 'other', + $formquestion[] = array('type' => 'other', 'name' => 'affecttag_'.$categ_type['code'], 'label' => $langs->trans("Tag").' '.$categ_type['label'], 'value' => $form->multiselectarray('contcats_'.$categ_type['code'], $cate_arbo, GETPOST('contcats_'.$categ_type['code'], 'array'), null, null, null, null, '60%')); } - $formquestion[]=array('type' => 'other', + $formquestion[] = array('type' => 'other', 'name' => 'affecttag_type', 'label' => '', 'value' => ''); @@ -99,12 +99,9 @@ if ($massaction == 'presend') { print ''; - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; - $formmail = new FormMail($db); - print dol_get_fiche_head(null, '', ''); - // Cree l'objet formulaire mail + // Create mail form include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); $formmail->withform = -1; @@ -150,7 +147,7 @@ if ($massaction == 'presend') { // $formmail->withfile = 2; Not yet supported in mass action $formmail->withmaindocfile = 1; // Add a checkbox "Attach also main document" if ($objecttmp->element != 'societe') { - $formmail->withfile = ''.$langs->trans("OnlyPDFattachmentSupported").''; + $formmail->withfile = ''.$langs->trans("OnlyPDFattachmentSupported").''; $formmail->withmaindocfile = - 1; // Add a checkbox "Attach also main document" but not checked by default } $formmail->withbody = 1; diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 611d6a9cce5..d1b19495429 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -296,7 +296,8 @@ $coldisplay++; echo '%'; } $coldisplay++; - } elseif (!empty($conf->global->DISPLAY_MARK_RATES)) { + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { $mark_rate = (GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : price($line->marque_tx)); // if credit note, dont allow to modify margin if ($line->subprice < 0) { diff --git a/htdocs/core/tpl/originproductline.tpl.php b/htdocs/core/tpl/originproductline.tpl.php index d4943ac454d..7e56611a282 100644 --- a/htdocs/core/tpl/originproductline.tpl.php +++ b/htdocs/core/tpl/originproductline.tpl.php @@ -1,6 +1,6 @@ -/* Copyright (C) 2017 Charlie Benke + * Copyright (C) 2017 Charlie Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index dd779803026..c45ce9d2406 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -173,11 +173,11 @@ class InterfaceWorkflowManager extends DolibarrTriggers } } - if (! empty($conf->expedition->enabled) && ! empty($conf->workflow->enabled) && ! empty($conf->global->WORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE)) { + if (!empty($conf->expedition->enabled) && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE)) { /** @var Facture $object */ $object->fetchObjectLinked('', 'shipping', $object->id, $object->element); - if (! empty($object->linkedObjects)) { + if (!empty($object->linkedObjects)) { /** @var Expedition $shipment */ $shipment = array_shift($object->linkedObjects['shipping']); diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index e069ea7a326..4a6d61b6daf 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1432,10 +1432,10 @@ class Cronjob extends CommonObject $moretext .= ' ('.$langs->trans("Error").')'; } - $this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Disabled').$moretext; - $this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Scheduled').$moretext; - $this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_ENABLED] = $langs->trans('Scheduled'); + $this->labelStatus[self::STATUS_DISABLED] = $langs->transnoentitiesnoconv('Disabled').$moretext; + $this->labelStatus[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv('Scheduled').$moretext; + $this->labelStatusShort[self::STATUS_DISABLED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv('Scheduled'); } $statusType = 'status4'; diff --git a/htdocs/datapolicy/class/actions_datapolicy.class.php b/htdocs/datapolicy/class/actions_datapolicy.class.php index e54086149fe..c58e1634fc2 100644 --- a/htdocs/datapolicy/class/actions_datapolicy.class.php +++ b/htdocs/datapolicy/class/actions_datapolicy.class.php @@ -133,7 +133,7 @@ class ActionsDatapolicy header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv'); header('Pragma: no-cache'); $object->fetch(GETPOST('socid')); - echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL; + echo 'Name;Firstname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL; echo $object->name.';'; echo ';'; echo ';'; @@ -157,7 +157,7 @@ class ActionsDatapolicy header('Pragma: no-cache'); $soc = $object->fetch_thirdparty(); - echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL; + echo 'Name;Firstname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL; echo $object->lastname.';'; echo $object->firstname.';'; echo $object->getCivilityLabel().';'; @@ -181,7 +181,7 @@ class ActionsDatapolicy header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv'); header('Pragma: no-cache'); $soc = $object->fetch_thirdparty(); - echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL; + echo 'Name;Firstname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;'.PHP_EOL; echo $object->lastname.';'; echo $object->firstname.';'; echo $object->getCivilityLabel().';'; diff --git a/htdocs/debugbar/class/DataCollector/DolLogsCollector.php b/htdocs/debugbar/class/DataCollector/DolLogsCollector.php index 520a0a20a72..5fd339918fa 100644 --- a/htdocs/debugbar/class/DataCollector/DolLogsCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolLogsCollector.php @@ -73,7 +73,7 @@ class DolLogsCollector extends MessagesCollector { global $conf; - $uselogfile = $conf->global->DEBUGBAR_USE_LOGFILE; + $uselogfile = getDolGlobalInt('DEBUGBAR_USE_LOGFILE'); if ($uselogfile) { $this->getStorageLogs($this->path); diff --git a/htdocs/debugbar/class/DataCollector/DolibarrCollector.php b/htdocs/debugbar/class/DataCollector/DolibarrCollector.php index 2e11887360f..c69ebb9a121 100644 --- a/htdocs/debugbar/class/DataCollector/DolibarrCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolibarrCollector.php @@ -86,12 +86,12 @@ class DolibarrCollector extends DataCollector implements Renderable, AssetProvid global $conf, $langs; global $dolibarr_mailing_limit_sendbyweb; - $info = $langs->trans('Method').': '.$conf->global->MAIN_MAIL_SENDMODE.'
    '; - $info .= $langs->trans('Server').': '.$conf->global->MAIN_MAIL_SMTP_SERVER.'
    '; - $info .= $langs->trans('Port').': '.$conf->global->MAIN_MAIL_SMTP_PORT.'
    '; - $info .= $langs->trans('ID').': '.$conf->global->MAIN_MAIL_SMTPS_ID.'
    '; - $info .= $langs->trans('Pwd').': '.preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW).'
    '; - $info .= $langs->trans('TLS/STARTTLS').': '.(empty($conf->global->MAIN_MAIL_EMAIL_TLS) ? '' : $conf->global->MAIN_MAIL_EMAIL_TLS).' / '.(empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS) ? '' : $conf->global->MAIN_MAIL_EMAIL_STARTTLS).'
    '; + $info = $langs->trans('Method').': '.getDolGlobalString("MAIN_MAIL_SENDMODE").'
    '; + $info .= $langs->trans('Server').': '.getDolGlobalString("MAIN_MAIL_SMTP_SERVER").'
    '; + $info .= $langs->trans('Port').': '.getDolGlobalString("MAIN_MAIL_SMTP_PORT").'
    '; + $info .= $langs->trans('ID').': '.getDolGlobalString("MAIN_MAIL_SMTPS_IDT").'
    '; + $info .= $langs->trans('Pwd').': '.preg_replace('/./', '*', getDolGlobalString("MAIN_MAIL_SMTPS_PW")).'
    '; + $info .= $langs->trans('TLS/STARTTLS').': '.getDolGlobalString("MAIN_MAIL_EMAIL_TLS").' / '.getDolGlobalString("MAIN_MAIL_EMAIL_STARTTLS").'
    '; $info .= $langs->trans('MAIN_DISABLE_ALL_MAILS').': '.(empty($conf->global->MAIN_DISABLE_ALL_MAILS) ? $langs->trans('No') : $langs->trans('Yes')).'
    '; $info .= 'dolibarr_mailing_limit_sendbyweb = '.$dolibarr_mailing_limit_sendbyweb.'
    '; diff --git a/htdocs/delivery/card.php b/htdocs/delivery/card.php index cca399f43af..eededc31aa2 100644 --- a/htdocs/delivery/card.php +++ b/htdocs/delivery/card.php @@ -114,7 +114,7 @@ if ($action == 'add') { $idl = "idl".$i; $qtytouse = price2num(GETPOST($qty)); if ($qtytouse > 0) { - $object->addline(GETPOST($idl), price2num($qtytouse)); + $object->addline(GETPOST($idl), price2num($qtytouse), $arrayoptions); } } @@ -603,23 +603,26 @@ if ($action == 'create') { // Create. Seems to no be used print ""; // Display lines extrafields - if (!empty($extrafields)) { + //if (!empty($extrafields)) { $colspan = 2; $mode = ($object->statut == 0) ? 'edit' : 'view'; $object->lines[$i]->fetch_optionals(); - if ($action == 'create_delivery') { - $srcLine = new ExpeditionLigne($db); + if ($action == 'create_delivery') { + $srcLine = new ExpeditionLigne($db); + $extrafields->fetch_name_optionals_label($srcLine->table_element); + $srcLine->id = $expedition->lines[$i]->id; + $srcLine->fetch_optionals(); + + $object->lines[$i]->array_options = array_merge($object->lines[$i]->array_options, $srcLine->array_options); + } else { + $srcLine = new DeliveryLine($db); $extrafields->fetch_name_optionals_label($srcLine->table_element); - $srcLine->id = $expedition->lines[$i]->id; - $srcLine->fetch_optionals(); - - $object->lines[$i]->array_options = array_merge($object->lines[$i]->array_options, $srcLine->array_options); - } - print $object->lines[$i]->showOptionals($extrafields, $mode, array('style' => 'class="oddeven"', 'colspan' => $colspan), $i); } + print $object->lines[$i]->showOptionals($extrafields, $mode, array('style' => 'class="oddeven"', 'colspan' => $colspan), ''); + //} } $i++; @@ -689,11 +692,11 @@ if ($action == 'create') { // Create. Seems to no be used } - print '
    '; + print '
    '; // Nothing on right - print '
    '; + print ''; } else { /* Expedition non trouvee */ print "Expedition inexistante ou acces refuse"; diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 60c134661ce..6bfe3a33dd7 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -211,7 +211,7 @@ class Delivery extends CommonObject $origin_id = $this->lines[$i]->commande_ligne_id; // For backward compatibility } - if (!$this->create_line($origin_id, $this->lines[$i]->qty, $this->lines[$i]->fk_product, $this->lines[$i]->description)) { + if (!$this->create_line($origin_id, $this->lines[$i]->qty, $this->lines[$i]->fk_product, $this->lines[$i]->description, $this->lines[$i]->array_options)) { $error++; } } @@ -262,9 +262,10 @@ class Delivery extends CommonObject * @param string $qty Quantity * @param string $fk_product Id of predefined product * @param string $description Description + * @param array $array_options Array options * @return int <0 if KO, >0 if OK */ - public function create_line($origin_id, $qty, $fk_product, $description) + public function create_line($origin_id, $qty, $fk_product, $description, $array_options = null) { // phpcs:enable $error = 0; @@ -283,6 +284,15 @@ class Delivery extends CommonObject $error++; } + $id = $this->db->last_insert_id(MAIN_DB_PREFIX."deliverydet"); + + if (is_array($array_options) && count($array_options) > 0) { + $line = new DeliveryLine($this->db); + $line->id = $id; + $line->array_options = $array_options; + $result = $line->insertExtraFields(); + } + if ($error == 0) { return 1; } @@ -385,7 +395,7 @@ class Delivery extends CommonObject $error = 0; if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery_advance->validate))) { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery_advance->validate))) { if (!empty($conf->global->DELIVERY_ADDON_NUMBER)) { // Setting the command numbering module name $modName = $conf->global->DELIVERY_ADDON_NUMBER; @@ -531,7 +541,9 @@ class Delivery extends CommonObject $line->description = $expedition->lines[$i]->description; $line->qty = $expedition->lines[$i]->qty_shipped; $line->fk_product = $expedition->lines[$i]->fk_product; - + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($expedition->lines[$i]->array_options) && count($expedition->lines[$i]->array_options) > 0) { // For avoid conflicts if trigger used + $line->array_options = $expedition->lines[$i]->array_options; + } $this->lines[$i] = $line; } @@ -589,18 +601,23 @@ class Delivery extends CommonObject /** * Add line * - * @param int $origin_id Origin id - * @param int $qty Qty + * @param int $origin_id Origin id + * @param int $qty Qty + * @param array $array_options Array options * @return void */ - public function addline($origin_id, $qty) + public function addline($origin_id, $qty, $array_options = null) { + global $conf; + $num = count($this->lines); $line = new DeliveryLine($this->db); $line->origin_id = $origin_id; $line->qty = $qty; - + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used + $line->array_options = $array_options; + } $this->lines[$num] = $line; } @@ -719,8 +736,8 @@ class Delivery extends CommonObject //if ($option !== 'nolink') //{ - // Add param to save lastsearch_values or not - $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + // Add param to save lastsearch_values or not + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { $add_save_lastsearch_values = 1; } @@ -846,12 +863,12 @@ class Delivery extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[-1] = $langs->trans('StatusDeliveryCanceled'); - $this->labelStatus[0] = $langs->trans('StatusDeliveryDraft'); - $this->labelStatus[1] = $langs->trans('StatusDeliveryValidated'); - $this->labelStatusShort[-1] = $langs->trans('StatusDeliveryCanceled'); - $this->labelStatusShort[0] = $langs->trans('StatusDeliveryDraft'); - $this->labelStatusShort[1] = $langs->trans('StatusDeliveryValidated'); + $this->labelStatus[-1] = $langs->transnoentitiesnoconv('StatusDeliveryCanceled'); + $this->labelStatus[0] = $langs->transnoentitiesnoconv('StatusDeliveryDraft'); + $this->labelStatus[1] = $langs->transnoentitiesnoconv('StatusDeliveryValidated'); + $this->labelStatusShort[-1] = $langs->transnoentitiesnoconv('StatusDeliveryCanceled'); + $this->labelStatusShort[0] = $langs->transnoentitiesnoconv('StatusDeliveryDraft'); + $this->labelStatusShort[1] = $langs->transnoentitiesnoconv('StatusDeliveryValidated'); } $statusType = 'status0'; @@ -980,7 +997,7 @@ class Delivery extends CommonObject $array[$i]['label'] = $objSourceLine->label ? $objSourceLine->label : $objSourceLine->description; } - $i++; + $i++; } return $array; } else { diff --git a/htdocs/document.php b/htdocs/document.php index 3c06801c9a0..7fc0dd6fff3 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -119,7 +119,7 @@ if ($user->socid > 0) { // For some module part, dir may be privates if (in_array($modulepart, array('facture_paiement', 'unpaid'))) { - if (!$user->rights->societe->client->voir || $socid) { + if (empty($user->rights->societe->client->voir) || $socid) { $original_file = 'private/'.$user->id.'/'.$original_file; // If user has no permission to see all, output dir is specific to user } } @@ -195,9 +195,11 @@ if (!in_array($type, array('text/x-javascript')) && !dolIsAllowedForPreview($ori } // Security: Delete string ../ or ..\ into $original_file +$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' $original_file = str_replace('../', '/', $original_file); $original_file = str_replace('..\\', '/', $original_file); + // Find the subdirectory name as the reference $refname = basename(dirname($original_file)."/"); diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 8ff0fa62e6c..6bfa9130363 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -517,7 +517,7 @@ if ($action == 'create') { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } print ''; @@ -778,7 +778,6 @@ if (!empty($id) && $action != 'edit') { print ''; print '
    '; - print '
    '; /* * Payments @@ -788,7 +787,7 @@ if (!empty($id) && $action != 'edit') { $sql .= " FROM ".MAIN_DB_PREFIX."payment_donation as p"; $sql .= ", ".MAIN_DB_PREFIX."c_paiement as c "; $sql .= ", ".MAIN_DB_PREFIX."don as d"; - $sql .= " WHERE d.rowid = '".$id."'"; + $sql .= " WHERE d.rowid = ".((int) $id); $sql .= " AND p.fk_donation = d.rowid"; $sql .= " AND d.entity IN (".getEntity('donation').")"; $sql .= " AND p.fk_typepayment = c.id"; @@ -836,7 +835,6 @@ if (!empty($id) && $action != 'edit') { dol_print_error($db); } - print '
    '; print '
    '; print ''; @@ -919,9 +917,9 @@ if (!empty($id) && $action != 'edit') { print showOnlinePaymentUrl('donation', $object->ref).'
    '; } - print '
    '; + print '
    '; - print '
    '; + print ''; } llxFooter(); diff --git a/htdocs/don/document.php b/htdocs/don/document.php index 52e33a26cb4..51227a07ef4 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -80,6 +80,8 @@ $object->fetch($id, $ref); $upload_dir = $conf->don->dir_output.'/'.get_exdir($filename, 0, 0, 0, $object, 'donation').'/'.dol_sanitizeFileName($object->ref); $modulepart = 'don'; +$permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php + /* * Actions diff --git a/htdocs/don/index.php b/htdocs/don/index.php index 36323d332b7..85e2eb3e48f 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -190,7 +190,7 @@ print ''; print ""; -print '
    '; +print '
    '; $max = 10; @@ -252,7 +252,7 @@ if ($resql) { } -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardDonation', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index 23e6c0a46c0..bb7d6b314aa 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -70,7 +70,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenamenb = $dir.'/shipmentsnbinyear-'.$user->id.'-'.$year.'.png'; } else { $filenamenb = $dir.'/shipmentsnbinyear-'.$year.'.png'; @@ -105,7 +105,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear); //var_dump($data); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenameamount = $dir.'/shipmentsamountinyear-'.$user->id.'-'.$year.'.png'; } @@ -143,7 +143,7 @@ if (! $mesg) /* $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) +if (empty($user->rights->societe->client->voir) || $user->socid) { $filename_avg = $dir.'/shipmentsaverage-'.$user->id.'-'.$year.'.png'; } @@ -276,7 +276,7 @@ print ''; print ''; -print '
    '; +print '
    '; // Show graphs @@ -293,7 +293,7 @@ if ($mesg) { print ''; -print '
    '; +print ''; print '
    '; print dol_get_fiche_end(); diff --git a/htdocs/don/tpl/linkedobjectblock.tpl.php b/htdocs/don/tpl/linkedobjectblock.tpl.php index 3d6ec68ba2e..4097e73d560 100644 --- a/htdocs/don/tpl/linkedobjectblock.tpl.php +++ b/htdocs/don/tpl/linkedobjectblock.tpl.php @@ -19,7 +19,7 @@ * */ -print "\n"; +print "\n"; global $user; global $noMoreLinkedObjectBlockAfter; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index aed93b51f6f..03413a56eb1 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -197,7 +197,7 @@ class EcmDirectory extends CommonObject $sql .= " '".$this->db->escape($this->description)."',"; $sql .= " ".((int) $this->cachenbofdoc).","; $sql .= " '".$this->db->idate($this->date_c)."',"; - $sql .= " ".($this->fk_user_c > 0 ? ((int) $this->fk_user_c) : "null").","; + $sql .= " ".($this->fk_user_c > 0 ? ((int) $this->fk_user_c) : "null"); $sql .= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php index e38c3caf3f3..237f70a0a42 100644 --- a/htdocs/ecm/file_card.php +++ b/htdocs/ecm/file_card.php @@ -67,7 +67,7 @@ if (!$section) { dol_print_error('', 'Error, section parameter missing'); exit; } -$urlfile = (string) dol_sanitizePathName(GETPOST("urlfile")); +$urlfile = (string) dol_sanitizePathName(GETPOST("urlfile"), '_', 0); if (!$urlfile) { dol_print_error('', "ErrorParamNotDefined"); exit; @@ -131,7 +131,7 @@ if ($action == 'update' && $permtoadd) { $error = 0; $oldlabel = GETPOST('urlfile', 'alpha'); - $newlabel = dol_sanitizeFileName(GETPOST('label', 'alpha')); + $newlabel = dol_sanitizeFileName(GETPOST('label', 'alpha'), '_', 0); $shareenabled = GETPOST('shareenabled', 'alpha'); //$db->begin(); diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index e737d1b62a2..7f098951fe7 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -341,6 +341,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) { } if (!empty($conf->projet->enabled)) { $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects"))); + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project_task', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Tasks"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Tasks"))); } if (!empty($conf->ficheinter->enabled)) { $langs->load("interventions"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions"))); @@ -353,6 +354,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) { } if (!empty($conf->banque->enabled)) { $langs->load("banks"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'banque', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount"))); + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'chequereceipt', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("CheckReceipt"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("CheckReceipt"))); } if (!empty($conf->mrp->enabled)) { $langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders"))); @@ -364,8 +366,8 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) { $parameters = array(); $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); - if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) { - $sectionauto[]=$hookmanager->resArray; + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) { + $sectionauto[] = $hookmanager->resArray; $rowspan += count($hookmanager->resArray); } } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 1e92e1aba4b..0a52969f9f6 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -599,10 +599,10 @@ class EmailCollector extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_ENABLED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_DISABLED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_DISABLED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status5'; diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php index 90462fdb762..ac9e465b43b 100644 --- a/htdocs/eventorganization/class/conferenceorbooth.class.php +++ b/htdocs/eventorganization/class/conferenceorbooth.class.php @@ -24,7 +24,7 @@ // Put here all includes required by your class file require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; -require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; //require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; /** @@ -102,7 +102,7 @@ class ConferenceOrBooth extends ActionComm /** * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ - public $fields=array( + public $fields = array( 'id' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'ref' => array('type'=>'integer', 'label'=>'Ref', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'help'=>"Help text", 'showoncombobox'=>'1',), @@ -195,11 +195,11 @@ class ConferenceOrBooth extends ActionComm */ protected function setPercentageFromStatus() { - if ($this->status==self::STATUS_DONE) { - $this->percentage=100; + if ($this->status == self::STATUS_DONE) { + $this->percentage = 100; } - if ($this->status==self::STATUS_DRAFT) { - $this->percentage=0; + if ($this->status == self::STATUS_DRAFT) { + $this->percentage = 0; } } @@ -211,12 +211,12 @@ class ConferenceOrBooth extends ActionComm */ protected function setActionCommFields(User $user) { - $this->userownerid=$user->id; - $this->type_id=$this->fk_action; - $this->socid=$this->fk_soc; - $this->datef=$this->datep2; - $this->note_private=$this->note; - $this->fk_user_author=$this->fk_user_author; + $this->userownerid = $user->id; + $this->type_id = $this->fk_action; + $this->socid = $this->fk_soc; + $this->datef = $this->datep2; + $this->note_private = $this->note; + $this->fk_user_author = $this->fk_user_author; } /** @@ -226,9 +226,9 @@ class ConferenceOrBooth extends ActionComm */ protected function getActionCommFields() { - $this->fk_action=$this->type_id; - $this->fk_soc=$this->socid; - $this->datep2=$this->datef; + $this->fk_action = $this->type_id; + $this->fk_soc = $this->socid; + $this->datep2 = $this->datef; } /** @@ -247,7 +247,7 @@ class ConferenceOrBooth extends ActionComm $result = parent::fetch($id, $ref, $ref_ext, $email_msgid); - $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.urlencode($id).'&type=conf'; + $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.urlencode($id).'&type=conf'; $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); $link_subscription .= '&securekey='.urlencode($encodedsecurekey); @@ -383,7 +383,7 @@ class ConferenceOrBooth extends ActionComm $error = 0; // Protection - if ($this->status == self::STATUS_VALIDATED) { + if ($this->status == self::STATUS_CONFIRMED) { dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); return 0; } @@ -408,48 +408,14 @@ class ConferenceOrBooth extends ActionComm if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('CONFERENCEORBOOTH_VALIDATE', $user); - if ($result < 0) $error++; - // End call triggers - } - - if (!$error) { - $this->oldref = $this->ref; - - // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->ref)) { - // Now we rename also files into index - $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'conferenceorbooth/".$this->db->escape($this->newref)."'"; - $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'conferenceorbooth/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; - $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } - - // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments - $oldref = dol_sanitizeFileName($this->ref); - $newref = dol_sanitizeFileName($num); - $dirsource = $conf->eventorganization->dir_output.'/conferenceorbooth/'.$oldref; - $dirdest = $conf->eventorganization->dir_output.'/conferenceorbooth/'.$newref; - if (!$error && file_exists($dirsource)) { - dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest); - - if (@rename($dirsource, $dirdest)) { - dol_syslog("Rename ok"); - // Rename docs starting with $oldref with $newref - $listoffiles = dol_dir_list($conf->eventorganization->dir_output.'/conferenceorbooth/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) { - $dirsource = $fileentry['name']; - $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); - $dirsource = $fileentry['path'].'/'.$dirsource; - $dirdest = $fileentry['path'].'/'.$dirdest; - @rename($dirsource, $dirdest); - } - } - } + if ($result < 0) { + $error++; } + // End call triggers } // Set new ref and current status if (!$error) { - $this->ref = $num; $this->status = self::STATUS_CONFIRMED; } @@ -576,7 +542,7 @@ class ConferenceOrBooth extends ActionComm if ($add_save_lastsearch_values) { $url .= '&save_lastsearch_values=1'; } - if ($option=='withproject') { + if ($option == 'withproject') { $url .= '&withproject=1'; } } @@ -672,18 +638,18 @@ class ConferenceOrBooth extends ActionComm if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("eventorganization@eventorganization"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_SUGGESTED] = $langs->trans('Suggested'); - $this->labelStatus[self::STATUS_CONFIRMED] = $langs->trans('Confirmed'); - $this->labelStatus[self::STATUS_NOT_QUALIFIED] = $langs->trans('NotSelected'); - $this->labelStatus[self::STATUS_DONE] = $langs->trans('Done'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_SUGGESTED] = $langs->trans('Suggested'); - $this->labelStatusShort[self::STATUS_CONFIRMED] = $langs->trans('Confirmed'); - $this->labelStatusShort[self::STATUS_NOT_QUALIFIED] = $langs->trans('NotSelected'); - $this->labelStatusShort[self::STATUS_DONE] = $langs->trans('Done'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Canceled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_SUGGESTED] = $langs->transnoentitiesnoconv('Suggested'); + $this->labelStatus[self::STATUS_CONFIRMED] = $langs->transnoentitiesnoconv('Confirmed'); + $this->labelStatus[self::STATUS_NOT_QUALIFIED] = $langs->transnoentitiesnoconv('NotSelected'); + $this->labelStatus[self::STATUS_DONE] = $langs->transnoentitiesnoconv('Done'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_SUGGESTED] = $langs->transnoentitiesnoconv('Suggested'); + $this->labelStatusShort[self::STATUS_CONFIRMED] = $langs->transnoentitiesnoconv('Confirmed'); + $this->labelStatusShort[self::STATUS_NOT_QUALIFIED] = $langs->transnoentitiesnoconv('NotSelected'); + $this->labelStatusShort[self::STATUS_DONE] = $langs->transnoentitiesnoconv('Done'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); } $statusType = 'status'.$status; diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index bf3470b7445..96131aa5946 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -100,7 +100,7 @@ class ConferenceOrBoothAttendee extends CommonObject /** * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ - public $fields=array( + public $fields = array( 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"), 'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'), @@ -119,7 +119,7 @@ class ConferenceOrBoothAttendee extends CommonObject 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), - 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'default'=>0,'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Canceled'),), + 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'default'=>0, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Canceled'),), ); public $rowid; public $ref; @@ -787,7 +787,7 @@ class ConferenceOrBoothAttendee extends CommonObject } if ($option == 'conforboothidproject') { - $url .= '&conforboothid='.((int) $this->fk_actioncomm).'&withproject=1' ; + $url .= '&conforboothid='.((int) $this->fk_actioncomm).'&withproject=1'; } } @@ -982,28 +982,6 @@ class ConferenceOrBoothAttendee extends CommonObject $this->initAsSpecimenCommon(); } - /** - * Create an array of lines - * - * @return array|int array of lines if OK, <0 if KO - */ - public function getLinesArray() - { - $this->lines = array(); - - $objectline = new ConferenceOrBoothAttendeeLine($this->db); - $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorboothattendee = '.((int) $this->id))); - - if (is_numeric($result)) { - $this->error = $this->error; - $this->errors = $this->errors; - return $result; - } else { - $this->lines = $result; - return $this->lines; - } - } - /** * Returns the reference to the following non used object depending on the active numbering module. * diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php index fafbd0a6f8b..8fa1f1ec288 100644 --- a/htdocs/eventorganization/conferenceorbooth_card.php +++ b/htdocs/eventorganization/conferenceorbooth_card.php @@ -200,7 +200,7 @@ if (!empty($withproject)) { $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -282,7 +282,6 @@ if (!empty($withproject)) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -341,7 +340,6 @@ if (!empty($withproject)) { print '
    '; - print '
    '; print '
    '; print ''; diff --git a/htdocs/eventorganization/conferenceorbooth_contact.php b/htdocs/eventorganization/conferenceorbooth_contact.php index 3b135c21dc4..6f921848881 100644 --- a/htdocs/eventorganization/conferenceorbooth_contact.php +++ b/htdocs/eventorganization/conferenceorbooth_contact.php @@ -181,7 +181,7 @@ if (!empty($withproject)) { $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -263,7 +263,6 @@ if (!empty($withproject)) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -322,7 +321,6 @@ if (!empty($withproject)) { print '
    '; - print '
    '; print '
    '; print ''; diff --git a/htdocs/eventorganization/conferenceorbooth_document.php b/htdocs/eventorganization/conferenceorbooth_document.php index 8b064c12b72..537005761d2 100644 --- a/htdocs/eventorganization/conferenceorbooth_document.php +++ b/htdocs/eventorganization/conferenceorbooth_document.php @@ -138,7 +138,7 @@ if (!empty($withproject)) { $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -220,7 +220,6 @@ if (!empty($withproject)) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -279,7 +278,6 @@ if (!empty($withproject)) { print '
    '; - print '
    '; print '
    '; print ''; diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 5e382590fca..198f169a390 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -282,13 +282,13 @@ if ($projectid > 0) { // Title $morehtmlref .= $project->title; // Thirdparty - if ($project->thirdparty->id > 0) { + if (isset($project->thirdparty->id) && $project->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$project->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->project->all->lire) { + if (empty($user->rights->project->all->lire)) { $objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0); $project->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; } @@ -370,7 +370,6 @@ if ($projectid > 0) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -422,7 +421,7 @@ if ($projectid > 0) { // Show message $message = 'global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...'); + $message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')); $message .= "&project=".$projectid.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').''; print $message; print ""; @@ -434,7 +433,7 @@ if ($projectid > 0) { //print ''; print '
    '; $linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.((int) $project->id); - $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.((int) $project->id), 'md5'); + $encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $project->id), 'md5'); $linksuggest .= '&securekey='.urlencode($encodedsecurekey); //print ''; - $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.((int) $project->id).'&type=global'; - $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.((int) $project->id), 'md5'); + $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.((int) $project->id).'&type=global'; + $encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $project->id), 'md5'); $link_subscription .= '&securekey='.urlencode($encodedsecurekey); //print '
    '; - print '
    '; print '
    '; print ''; @@ -487,7 +485,7 @@ $sql .= $object->getFieldList('t'); // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } // Add fields from hooks @@ -700,6 +698,7 @@ print ''; foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['css']) ? '' : $val['css']); + $searchkey = (empty($search[$key]) ? '' : $search[$key]); if ($key == 'status') { $cssforfield .= ($cssforfield ? ' ' : '').'center'; } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { @@ -712,11 +711,11 @@ foreach ($object->fields as $key => $val) { if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; print ''; @@ -394,6 +394,23 @@ if ($id > 0 || !empty($ref)) { //print ''; print ''; + // Delivery delay + print ''; + // Shipping Method 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'], $searchkey, $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); + print $object->showInputField($val, $key, $searchkey, '', '', 'search_', 'maxwidth125', 1); } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - print ''; + print ''; } 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')); @@ -830,7 +829,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php index 994ff9a7ee7..5eb44b931c5 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_card.php +++ b/htdocs/eventorganization/conferenceorboothattendee_card.php @@ -202,7 +202,7 @@ $title = $langs->trans("ConferenceOrBoothAttendee"); $help_url = ''; llxHeader('', $title, $help_url); -$result = $projectstatic->fetch(empty($confOrBooth->fk_project)?$fk_project:$confOrBooth->fk_project); +$result = $projectstatic->fetch(empty($confOrBooth->fk_project) ? $fk_project : $confOrBooth->fk_project); if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { $projectstatic->fetchComments(); } @@ -235,7 +235,7 @@ if (!empty($withproject)) { $morehtmlref .= '
    '; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -317,7 +317,6 @@ if (!empty($withproject)) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -397,7 +396,7 @@ if (!empty($withproject)) { print $langs->trans("PublicAttendeeSubscriptionGlobalPage"); //print ''; print '
    '; - $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.$projectstatic->id.'&type=global'; + $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.'&type=global'; $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5'); $link_subscription .= '&securekey='.urlencode($encodedsecurekey); //print '
    '; - print '
    '; print '
    '; print ''; @@ -590,58 +588,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print dol_get_fiche_end(); - - /* - * Lines - */ - - if (!empty($object->table_element_line)) { - // Show object lines - $result = $object->getLinesArray(); - - print '
    - - - - - - '; - - if (!empty($conf->use_javascript_ajax) && $object->status == 0) { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } - - print '
    '; - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { - print ''; - } - - if (!empty($object->lines)) { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); - } - - // Form to add new line - if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { - if ($action != 'editline') { - // Add products/services form - - $parameters = array(); - $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - if (empty($reshook)) - $object->formAddObjectLine(1, $mysoc, $soc); - } - } - - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { - print '
    '; - } - print '
    '; - - print "
    \n"; - } - - // Buttons for actions if ($action != 'presend' && $action != 'editline') { diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index 8b263b32699..c237fcd0bbd 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -266,7 +266,7 @@ $sql .= $object->getFieldList('t'); // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } // Add fields from hooks @@ -412,7 +412,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -497,7 +497,6 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -577,7 +576,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { print $langs->trans("PublicAttendeeSubscriptionGlobalPage"); //print ''; print '
    '; - $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.$projectstatic->id.'&type=global'; + $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.'&type=global'; $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5'); $link_subscription .= '&securekey='.urlencode($encodedsecurekey); //print '
    '; - print '
    '; print '
    '; print ''; @@ -889,7 +887,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/eventorganization/eventorganizationindex.php b/htdocs/eventorganization/eventorganizationindex.php index d708883c249..77c2ec512f4 100644 --- a/htdocs/eventorganization/eventorganizationindex.php +++ b/htdocs/eventorganization/eventorganizationindex.php @@ -144,7 +144,7 @@ if (! empty($conf->eventorganization->enabled) && $user->rights->eventorganizati END MODULEBUILDER DRAFT MYOBJECT */ -print '
    '; +print '
    '; $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; @@ -205,7 +205,7 @@ if (! empty($conf->eventorganization->enabled) && $user->rights->eventorganizati } */ -print '
    '; +print ''; // End of page llxFooter(); diff --git a/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php index 3951cc25df7..b8a2578e93d 100644 --- a/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php +++ b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php @@ -42,7 +42,7 @@ function conferenceorboothPrepareHead($object, $with_project = 0) $withProjectUrl = "&withproject=1"; } - $head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.ph?id='.$object->id.$withProjectUrl; + $head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?id='.$object->id.$withProjectUrl; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; @@ -127,6 +127,7 @@ function conferenceorboothProjectPrepareHead($object) $head[$h][2] = 'conferenceorbooth'; // Enable caching of conf or booth count attendees $nbAttendees = 0; + $nbConferenceOrBooth= 0; require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; $cachekey = 'count_conferenceorbooth_project_'.$object->id; $dataretrieved = dol_getcache($cachekey); diff --git a/htdocs/eventorganization/tpl/linkedobjectblock.tpl.php b/htdocs/eventorganization/tpl/linkedobjectblock.tpl.php index 732d3254203..9f761c24bc6 100644 --- a/htdocs/eventorganization/tpl/linkedobjectblock.tpl.php +++ b/htdocs/eventorganization/tpl/linkedobjectblock.tpl.php @@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) { exit; } -echo "\n"; +echo "\n"; global $user; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index b9061b463ef..03938003dfb 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -122,7 +122,7 @@ if ($user->socid) { $result = restrictedArea($user, 'expedition', $object->id, ''); $permissiondellink = $user->rights->expedition->delivery->creer; // Used by the include of actions_dellink.inc.php -//var_dump($object->lines[0]->detail_batch); +$permissiontoadd = $user->rights->expedition->creer; /* @@ -152,7 +152,6 @@ if (empty($reshook)) { // Actions to build doc $upload_dir = $conf->expedition->dir_output.'/sending'; - $permissiontoadd = $user->rights->expedition->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Reopen @@ -1893,7 +1892,6 @@ if ($action == 'create') { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -1964,7 +1962,6 @@ if ($action == 'create') { print "
    "; - print '
    '; print '
    '; print ''; @@ -2544,14 +2541,14 @@ if ($action == 'create') { $somethingshown = $form->showLinkedObjectBlock($object, ''); - print '
    '; + print '
    '; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'shipping', $socid, 1); - print '
    '; + print ''; } @@ -2566,8 +2563,8 @@ if ($action == 'create') { // Presend form $modelmail = 'shipping_send'; - $defaulttopic = 'SendShippingRef'; - $diroutput = $conf->expedition->dir_output; + $defaulttopic = $langs->trans('SendShippingRef'); + $diroutput = $conf->expedition->dir_output.'/sending'; $trackid = 'shi'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 623d3635ba5..50360f4365f 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -443,7 +443,7 @@ class Expedition extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, line_id if OK */ - public function create_line($entrepot_id, $origin_line_id, $qty, $rang = 0, $array_options = 0) + public function create_line($entrepot_id, $origin_line_id, $qty, $rang = 0, $array_options = null) { //phpcs:enable global $user; @@ -1853,8 +1853,8 @@ class Expedition extends CommonObject // phpcs:enable global $langs; - $labelStatus = $langs->trans($this->statuts[$status]); - $labelStatusShort = $langs->trans($this->statutshorts[$status]); + $labelStatus = $langs->transnoentitiesnoconv($this->statuts[$status]); + $labelStatusShort = $langs->transnoentitiesnoconv($this->statutshorts[$status]); $statusType = 'status'.$status; if ($status == self::STATUS_VALIDATED) { diff --git a/htdocs/expedition/class/expeditionstats.class.php b/htdocs/expedition/class/expeditionstats.class.php index 3c1bef04d09..8eb31896f38 100644 --- a/htdocs/expedition/class/expeditionstats.class.php +++ b/htdocs/expedition/class/expeditionstats.class.php @@ -73,7 +73,7 @@ class ExpeditionStats extends Stats //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where .= " AND c.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($this->socid) { @@ -97,7 +97,7 @@ class ExpeditionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; @@ -121,7 +121,7 @@ class ExpeditionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE ".$this->where; @@ -142,7 +142,7 @@ class ExpeditionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as year, COUNT(*) as nb, SUM(c.".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE ".$this->where; diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index ac0c068bfc9..f3723ed534b 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -221,11 +221,9 @@ if ($id > 0 || !empty($ref)) { //print ''; //print '
    '; - //print '
    '; //print '
    '; - //print '
    '; //print '
    '; print ''; diff --git a/htdocs/expedition/document.php b/htdocs/expedition/document.php index ee0014a2f8d..df88cbe7a3f 100644 --- a/htdocs/expedition/document.php +++ b/htdocs/expedition/document.php @@ -76,6 +76,8 @@ if ($user->socid) { } $result = restrictedArea($user, 'expedition', $object->id, ''); +$permissiontoadd = $user->rights->expedition->creer; // Used by the include of actions_dellink.inc.php + /* * Actions diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 173cc1889bc..49777518509 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -66,7 +66,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; $sql .= $clause." sc.fk_user = ".((int) $user->id); $clause = " AND "; @@ -124,7 +124,7 @@ if ($resql) { //print '
    '; -print '
    '; +print '
    '; $max = 5; @@ -138,11 +138,11 @@ $sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping' AND el.sourcetype IN ('commande')"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid AND el.sourcetype IN ('commande') AND el.targettype = 'shipping'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; } $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND sc.fk_user = ".((int) $user->id); } $sql .= " AND e.fk_statut = ".Expedition::STATUS_VALIDATED; @@ -208,7 +208,7 @@ if ($resql) { $sql = "SELECT c.rowid, c.ref, c.ref_client as ref_customer, c.fk_statut as status, c.facture as billed, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -217,7 +217,7 @@ $sql .= " AND c.fk_statut IN (".Commande::STATUS_VALIDATED.", ".Commande::STATUS if ($socid > 0) { $sql .= " AND c.fk_soc = ".((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY c.rowid ASC"; @@ -283,7 +283,7 @@ if ($resql) { } -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardWarehouseSendings', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 391628a9d38..ac5704511ef 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -277,7 +277,7 @@ if ($search_user > 0) { // Get link to order to get the order id in eesource.fk $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as eesource ON eesource.fk_target = e.rowid AND eesource.targettype = 'shipping' AND eesource.sourcetype = 'commande'"; } // We'll need this table joined to the select in order to filter by sale -if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { +if ($search_sale > 0 || (empty($user->rights->societe->client->voir) && !$socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } if ($search_user > 0) { @@ -291,7 +291,7 @@ if ($search_product_category > 0) { if ($socid > 0) { $sql .= ' AND s.rowid = '.$socid; } -if (!$user->rights->societe->client->voir && !$socid) { // Internal user with no permission to see all +if (empty($user->rights->societe->client->voir) && !$socid) { // Internal user with no permission to see all $sql .= " AND e.fk_soc = sc.fk_soc"; $sql .= " AND sc.fk_user = ".((int) $user->id); } diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index b8814450030..5ea49982d5c 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -357,7 +357,7 @@ if ($id > 0 || !empty($ref)) { print '
    '.$langs->trans('Date').''; print dol_print_date($object->date, 'day'); - if ($object->hasDelay() && empty($object->delivery_date)) { + if ($object->hasDelay() && empty($object->delivery_date)) { // If there is a delivery date planned, warning should be on this date print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); } print '
    '; + print ''; + if ($action != 'editavailability') { + print ''; + } + print '
    '; + print $langs->trans('AvailabilityPeriod'); + print 'id.'">'.img_edit($langs->trans('SetAvailability'), 1).'
    '; + print '
    '; + if ($action == 'editavailability') { + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1); + } else { + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'none', 1); + } + print '
    '; print ''; } + // Source reason (why we have an order) + print '';*/ - // Availability - print ''; - - // Source - print '
    '; @@ -434,6 +451,22 @@ if ($id > 0 || !empty($ref)) { print '
    '; + print ''; + if ($action != 'editdemandreason') { + print ''; + } + print '
    '; + print $langs->trans('Source'); + print 'id.'">'.img_edit($langs->trans('SetDemandReason'), 1).'
    '; + print '
    '; + if ($action == 'editdemandreason') { + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1); + } else { + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'none'); + } + // Terms of payment /* print '
    '; @@ -472,39 +505,6 @@ if ($id > 0 || !empty($ref)) { } print '
    '; - print ''; - if ($action != 'editavailability') { - print ''; - } - print '
    '; - print $langs->trans('AvailabilityPeriod'); - print 'id.'">'.img_edit($langs->trans('SetAvailability'), 1).'
    '; - print '
    '; - if ($action == 'editavailability') { - $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1); - } else { - $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'none', 1); - } - print '
    '; - print ''; - if ($action != 'editdemandreason') { - print ''; - } - print '
    '; - print $langs->trans('Source'); - print 'id.'">'.img_edit($langs->trans('SetDemandReason'), 1).'
    '; - print '
    '; - if ($action == 'editdemandreason') { - $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1); - } else { - $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'none'); - } - $tmparray = $object->getTotalWeightVolume(); $totalWeight = $tmparray['weight']; $totalVolume = $tmparray['volume']; @@ -554,7 +554,6 @@ if ($id > 0 || !empty($ref)) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -601,14 +600,12 @@ if ($id > 0 || !empty($ref)) { print '
    '; - print '
    '; print '
    '; print ''; print '

    '; - /** * Lines or orders with quantity shipped and remain to ship * Note: Qty shipped are already available into $object->expeditions[fk_product] diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index 42cac2d3c92..fc8d69e4ce7 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -75,7 +75,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenamenb = $dir.'/shipmentsnbinyear-'.$user->id.'-'.$year.'.png'; } else { $filenamenb = $dir.'/shipmentsnbinyear-'.$year.'.png'; @@ -110,7 +110,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear); //var_dump($data); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenameamount = $dir.'/shipmentsamountinyear-'.$user->id.'-'.$year.'.png'; } @@ -148,7 +148,7 @@ if (! $mesg) /* $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) +if (empty($user->rights->societe->client->voir) || $user->socid) { $filename_avg = $dir.'/shipmentsaverage-'.$user->id.'-'.$year.'.png'; } @@ -291,7 +291,7 @@ print '
    '; print ''; -print '
    '; +print '
    '; // Show graphs @@ -308,7 +308,7 @@ if ($mesg) { print '
    '; -print ''; +print ''; print '
    '; print dol_get_fiche_end(); diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index b00d63eaba1..26e4ebbb47d 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) { } -print "\n"; +print "\n"; global $user; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 6e40b6b3a77..b711a65d25a 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2021 Alexandre Spangaro * Copyright (C) 2017 Ferran Marcet * Copyright (C) 2018 Frédéric France * @@ -139,6 +139,8 @@ if ($user->socid) { } $result = restrictedArea($user, 'expensereport', $object->id, 'expensereport'); +$permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php + /* * Actions @@ -1339,7 +1341,6 @@ if (empty($reshook)) { // Actions to build doc $upload_dir = $conf->expensereport->dir_output; - $permissiontoadd = $user->rights->expensereport->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -1465,7 +1466,7 @@ if ($action == 'create') { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } print ''; @@ -1696,20 +1697,20 @@ if ($action == 'create') { } } }*/ - $morehtmlref .= ''; + $morehtmlref .= ''; - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - print '
    '; - print '
    '; - print '
    '; + print '
    '; + print '
    '; + print '
    '; - print ''; + print '
    '; - // Author - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; - // Period - print ''; - print ''; - print ''; - print ''; + // Period + print ''; + print ''; + print ''; + print ''; if (!empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) { print ''; print ''; @@ -1735,20 +1736,20 @@ if ($action == 'create') { print ''; } - // Validation date - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; + print ''; + print ''; - // User to inform for approval + // User to inform for approval if ($object->status <= ExpenseReport::STATUS_VALIDATED) { // informed print ''; print ''; // approver @@ -1842,24 +1843,23 @@ if ($action == 'create') { */ } - // Other attributes - $cols = 2; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Other attributes + $cols = 2; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - print '
    '.$langs->trans("User").''; + // Author + print '
    '.$langs->trans("User").''; if ($object->fk_user_author > 0) { $userauthor = new User($db); $result = $userauthor->fetch($object->fk_user_author); @@ -1719,15 +1720,15 @@ if ($action == 'create') { print $userauthor->getNomUrl(-1); } } - print '
    '.$langs->trans("Period").''; - print get_date_range($object->date_debut, $object->date_fin, 'day', $langs, 0); - print '
    '.$langs->trans("Period").''; + print get_date_range($object->date_debut, $object->date_fin, 'day', $langs, 0); + print '
    '.$langs->trans("ModePaiement").'
    '.$langs->trans("DATE_SAVE").''.dol_print_date($object->date_valid, 'dayhour', 'tzuser'); + // Validation date + print '
    '.$langs->trans("DATE_SAVE").''.dol_print_date($object->date_valid, 'dayhour', 'tzuser'); if ($object->status == 2 && $object->hasDelay('toapprove')) { print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToApprove")); } if ($object->status == 5 && $object->hasDelay('topay')) { print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToPay")); } - print '
    '.$langs->trans("VALIDATOR").'
    '; + print ''; - print '
    '; - print '
    '; - print '
    '; - print '
    '; + print '
    '; + print '
    '; + print '
    '; - print ''; + print '
    '; - // Amount - print ''; - print ''; - print ''; - $rowspan = 5; + // Amount + print ''; + print ''; + print ''; + $rowspan = 5; if ($object->status <= ExpenseReport::STATUS_VALIDATED) { $rowspan++; } elseif ($object->status == ExpenseReport::STATUS_CANCELED) { @@ -1873,15 +1873,15 @@ if ($action == 'create') { if ($object->status == ExpenseReport::STATUS_CLOSED) { $rowspan += 2; } - print ""; - print ''; + print ""; + print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - // Amount Local Taxes + // Amount Local Taxes if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { // Localtax1 print ''; print ''; @@ -1891,45 +1891,45 @@ if ($action == 'create') { print ''; } - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - // List of payments already done - $nbcols = 3; + // List of payments already done + $nbcols = 3; if (!empty($conf->banque->enabled)) { $nbrows++; $nbcols++; } - print '
    '.$langs->trans("AmountHT").''.price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).'
    '.$langs->trans("AmountHT").''.price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).'
    '.$langs->trans("AmountVAT").''.price($object->total_tva, 1, '', 1, -1, -1, $conf->currency).'
    '.$langs->trans("AmountVAT").''.price($object->total_tva, 1, '', 1, -1, -1, $conf->currency).'
    '.$langs->transcountry("AmountLT1", $mysoc->country_code).''.price($object->total_localtax1, 1, '', 1, -1, -1, $conf->currency).'
    '.price($object->total_localtax2, 1, '', 1, -1, -1, $conf->currency).'
    '.$langs->trans("AmountTTC").''.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'
    '.$langs->trans("AmountTTC").''.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'
    '; + print '
    '; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if (!empty($conf->banque->enabled)) { print ''; } - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; - // Payments already done (from payment on this expensereport) - $sql = "SELECT p.rowid, p.num_payment, p.datep as dp, p.amount, p.fk_bank,"; - $sql .= "c.code as p_code, c.libelle as payment_type,"; - $sql .= "ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal"; - $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."payment_expensereport as p"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepayment = c.id"; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; - $sql .= " WHERE e.rowid = '".$id."'"; - $sql .= " AND p.fk_expensereport = e.rowid"; - $sql .= ' AND e.entity IN ('.getEntity('expensereport').')'; - $sql .= " ORDER BY dp"; + // Payments already done (from payment on this expensereport) + $sql = "SELECT p.rowid, p.num_payment, p.datep as dp, p.amount, p.fk_bank,"; + $sql .= "c.code as p_code, c.libelle as payment_type,"; + $sql .= "ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal"; + $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."payment_expensereport as p"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepayment = c.id"; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; + $sql .= " WHERE e.rowid = ".((int) $id); + $sql .= " AND p.fk_expensereport = e.rowid"; + $sql .= ' AND e.entity IN ('.getEntity('expensereport').')'; + $sql .= " ORDER BY dp"; - $resql = $db->query($sql); + $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; $totalpaid = 0; @@ -2000,29 +2000,28 @@ if ($action == 'create') { } else { dol_print_error($db); } - print "
    '.$langs->trans('Payments').''.$langs->trans('Date').''.$langs->trans('Type').'
    '.$langs->trans('Payments').''.$langs->trans('Date').''.$langs->trans('Type').''.$langs->trans('BankAccount').''.$langs->trans('Amount').' 
    '.$langs->trans('Amount').' 
    "; + print ""; - print '
    '; - print '
    '; - print '
    '; + print '
    '; + print '
    '; - print '

    '; + print '

    '; - print '
    '; + print '
    '; - $actiontouse = 'updateline'; + $actiontouse = 'updateline'; if (($object->status == 0 || $object->status == 99) && $action != 'editline') { $actiontouse = 'addline'; } - print '
    '; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - print '
    '; - print ''; + print '
    '; + print '
    '; if (!empty($object->lines)) { $i = 0; $total = 0; @@ -2050,6 +2049,11 @@ if ($action == 'create') { // Picture print ''; + + // Information if theres a rule restriction + print ''; + // Ajout des boutons de modification/suppression if (($object->status < 2 || $object->status == 99) && $user->rights->expensereport->creer) { print ''; @@ -2174,7 +2178,10 @@ if ($action == 'create') { // If the preview file is found if (file_exists($fileimage)) { $thumbshown = 1; + $urlforhref = getAdvancedPreviewUrl($modulepart, $relativepath.'/'.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']), 1, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity)); + print ''; print ''; + print ''; } } } @@ -2187,6 +2194,10 @@ if ($action == 'create') { } print ''; + print ''; + // Ajout des boutons de modification/suppression if (($object->status < ExpenseReport::STATUS_VALIDATED || $object->status == ExpenseReport::STATUS_REFUSED) && $user->rights->expensereport->creer) { print ''; print ''; //print ''; @@ -2332,9 +2344,14 @@ if ($action == 'create') { print ''; + // Information if theres a rule restriction + print ''; + print ''; print ''; } @@ -2344,10 +2361,8 @@ if ($action == 'create') { } // Add a new line - if (($object->status == ExpenseReport::STATUS_DRAFT || $object->status == ExpenseReport::STATUS_REFUSED) - && $action != 'editline' - && $user->rights->expensereport->creer) { - $colspan = 11; + if (($object->status == ExpenseReport::STATUS_DRAFT || $object->status == ExpenseReport::STATUS_REFUSED) && $action != 'editline' && $user->rights->expensereport->creer) { + $colspan = 12; if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { $colspan++; } @@ -2358,8 +2373,8 @@ if ($action == 'create') { $colspan++; } - $nbFiles = $nbLinks = 0; - $arrayoffiles = array(); + $nbFiles = $nbLinks = 0; + $arrayoffiles = array(); if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; @@ -2370,21 +2385,21 @@ if ($action == 'create') { $nbLinks = Link::count($db, $object->element, $object->id); } - // Add line with link to add new file or attach to an existing file - print ''; - print ''; + print ''; + print ''."\n"; + print ''; - include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php'; - include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php'; + include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php'; + include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; if (!empty($conf->projet->enabled)) { print ''; } - print ''; + print ''; if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { print ''; } - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - print ''; + print ''; - // Line number - print ''; + // Line number + print ''; - // Select date - print ''; + // Select date + print ''; - // Select project + // Select project if (!empty($conf->projet->enabled)) { print ''; } - // Add comments - print ''; + // Add comments + print ''; - // Select VAT - print ''; + print $form->load_tva('vatrate', ($vatrate != '' ? $vatrate : $defaultvat), $mysoc, '', 0, 0, '', false, 1); + print ''; - // Unit price net - print ''; + // Unit price net + print ''; - // Unit price with tax - print ''; + // Unit price with tax + print ''; - // Quantity - print ''; + // Quantity + print ''; - // Picture - print ''; + // Picture + print ''; if ($action != 'editline') { print ''; print ''; } - print ''; + print ''; - print ''; + print ''; } // Fin si c'est payé/validé print '
    '; print ''; + print ''; + print !empty($line->rule_warning_message) ? img_warning(html_entity_decode($line->rule_warning_message)) : ' '; + print ''; @@ -2206,7 +2217,7 @@ if ($action == 'create') { if ($action == 'editline' && $line->rowid == GETPOST('rowid', 'int')) { // Add line with link to add new file or attach line to an existing file - $colspan = 10; + $colspan = 11; if (!empty($conf->projet->enabled)) { $colspan++; } @@ -2214,6 +2225,7 @@ if ($action == 'create') { $colspan++; } + print ''."\n"; print '
    '; @@ -2322,7 +2334,7 @@ if ($action == 'create') { // Quantity print ''; - print ''; + print ''; // We must be able to enter decimal qty print ''.$langs->trans('AmountHT').''; //print $line->fk_ecm_files; print ''; + print ''; print ''; - print $form->buttonsSaveCancel(); + print $form->buttonsSaveCancel('Save', 'Cancel', array(), 0, 'small'); + print '
    '; - print ''.$langs->trans("UploadANewFileNow"); - print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); - print ''; + // Add line with link to add new file or attach to an existing file + print '
    '; + print ''.$langs->trans("UploadANewFileNow"); + print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); + print ''; if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { print '   -   '.$langs->trans("AttachTheNewLineToTheDocument"); print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); print ''; } - print ''."\n"; - print ''."\n"; - print '
    '.$langs->trans('Date').'
    '.$langs->trans('Date').''.$form->textwithpicto($langs->trans('Project'), $langs->trans("ClosedProjectsAreHidden")).''.$langs->trans('Type').''.$langs->trans('Type').''.$langs->trans('CarCategory').''.$langs->trans('Description').''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('PriceUTTC').''.$langs->trans('Qty').'
    '.$langs->trans('Description').''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('PriceUTTC').''.$langs->trans('Qty').'
    '; - print $form->selectDate($date ? $date : -1, 'date', 0, 0, 0, '', 1, 1); - print ''; + print $form->selectDate($date ? $date : -1, 'date', 0, 0, 0, '', 1, 1); + print ''; $formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, $projectRequired ? 0 : 1, -1, 0, 0, 0, '', 0, 0, 'maxwidth300'); @@ -2475,48 +2491,48 @@ if ($action == 'create') { print ''; - print ''; - print ''; + print ''; + print ''; - $defaultvat = -1; + // Select VAT + print ''; + $defaultvat = -1; if (!empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) { $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none'; } - print $form->load_tva('vatrate', ($vatrate != '' ? $vatrate : $defaultvat), $mysoc, '', 0, 0, '', false, 1); - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; // We must be able to enter decimal qty - print ''; + print ''; // We must be able to enter decimal qty + print ''; - print $form->buttonsSaveCancel("Add", '', '', 1); - print ''; + print $form->buttonsSaveCancel("Add", '', '', 1); + print '
    '; @@ -2563,7 +2579,7 @@ if ($action == 'create') { print '
    '; -if ($action != 'create' && $action != 'edit') { +if ($action != 'create' && $action != 'edit' && $action != 'editline') { $object = new ExpenseReport($db); $object->fetch($id, $ref); @@ -2741,13 +2757,13 @@ if ($action != 'presend') { } */ - print '
    '; + print '
    '; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'expensereport', null); - print '
    '; + print ''; } // Presend form diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 64034c10a3f..877a7c79ade 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -998,7 +998,7 @@ class ExpenseReport extends CommonObject $sql .= ' de.localtax1_tx, de.localtax2_tx, de.localtax1_type, de.localtax2_type,'; $sql .= ' de.fk_ecm_files,'; $sql .= ' de.total_ht, de.total_tva, de.total_ttc,'; - $sql .= ' de.total_localtax1, de.total_localtax2,'; + $sql .= ' de.total_localtax1, de.total_localtax2, de.rule_warning_message,'; $sql .= ' ctf.code as code_type_fees, ctf.label as libelle_type_fees,'; $sql .= ' p.ref as ref_projet, p.title as title_projet'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as de'; @@ -1055,6 +1055,8 @@ class ExpenseReport extends CommonObject $deplig->projet_ref = $objp->ref_projet; $deplig->projet_title = $objp->title_projet; + $deplig->rule_warning_message = $objp->rule_warning_message; + $deplig->rang = $objp->rang; $this->lines[$i] = $deplig; @@ -1874,10 +1876,6 @@ class ExpenseReport extends CommonObject $langs->load('trips'); - if (empty($conf->global->MAIN_USE_EXPENSE_RULE)) { - return true; // if don't use rules - } - // We don't know seller and buyer for expense reports if (!is_object($seller)) { $seller = $mysoc; // We use same than current company (expense report are often done in same country) @@ -1914,12 +1912,12 @@ class ExpenseReport extends CommonObject $this->errors[] = $this->error; $new_current_total_ttc -= $amount_to_test - $rule->amount; // ex, entered 16€, limit 12€, subtracts 4€; - $rule_warning_message_tab[] = $langs->trans('ExpenseReportConstraintViolationError', $rule->id, price($amount_to_test, 0, $langs, 1, -1, -1, $conf->currency), price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency), $langs->trans('by'.$rule->code_expense_rules_type, price($new_current_total_ttc, 0, $langs, 1, -1, -1, $conf->currency))); + $rule_warning_message_tab[] = $langs->trans('ExpenseReportConstraintViolationError', $rule->id, price($amount_to_test, 0, $langs, 1, -1, -1, $conf->currency), price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency)); } else { $this->error = 'ExpenseReportConstraintViolationWarning'; $this->errors[] = $this->error; - $rule_warning_message_tab[] = $langs->trans('ExpenseReportConstraintViolationWarning', $rule->id, price($amount_to_test, 0, $langs, 1, -1, -1, $conf->currency), price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency), $langs->trans('nolimitby'.$rule->code_expense_rules_type)); + $rule_warning_message_tab[] = $langs->trans('ExpenseReportConstraintViolationWarning', $rule->id, price($amount_to_test, 0, $langs, 1, -1, -1, $conf->currency), price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency)); } // No break, we sould test if another rule is violated @@ -1975,7 +1973,7 @@ class ExpenseReport extends CommonObject } //$buyer = new Societe($this->db); - $expenseik = new ExpenseReportIk($db); + $expenseik = new ExpenseReportIk($this->db); $range = $expenseik->getRangeByUser($userauthor, $this->line->fk_c_exp_tax_cat); if (empty($range)) { @@ -2603,6 +2601,8 @@ class ExpenseReportLine */ public $fk_ecm_files; + public $rule_warning_message; + /** * Constructor @@ -2624,7 +2624,7 @@ class ExpenseReportLine { $sql = 'SELECT fde.rowid, fde.fk_expensereport, fde.fk_c_type_fees, fde.fk_c_exp_tax_cat, fde.fk_projet as fk_project, fde.date,'; $sql .= ' fde.tva_tx as vatrate, fde.vat_src_code, fde.comments, fde.qty, fde.value_unit, fde.total_ht, fde.total_tva, fde.total_ttc, fde.fk_ecm_files,'; - $sql .= ' fde.localtax1_tx, fde.localtax2_tx, fde.localtax1_type, fde.localtax2_type, fde.total_localtax1, fde.total_localtax2,'; + $sql .= ' fde.localtax1_tx, fde.localtax2_tx, fde.localtax1_type, fde.localtax2_type, fde.total_localtax1, fde.total_localtax2, fde.rule_warning_message,'; $sql .= ' ctf.code as type_fees_code, ctf.label as type_fees_libelle,'; $sql .= ' pjt.rowid as projet_id, pjt.title as projet_title, pjt.ref as projet_ref'; $sql .= ' FROM '.MAIN_DB_PREFIX.'expensereport_det as fde'; @@ -2670,6 +2670,8 @@ class ExpenseReportLine $this->fk_ecm_files = $objp->fk_ecm_files; + $this->rule_warning_message = $objp->rule_warning_message; + $this->db->free($result); } else { dol_print_error($this->db); diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index da2312bdcb1..53cf3695b12 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -165,7 +165,7 @@ class ExpenseReportIk extends CoreObject $sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'c_exp_tax_cat c ON (r.fk_c_exp_tax_cat = c.rowid)'; } $sql .= ' WHERE r.fk_c_exp_tax_cat = '.((int) $fk_c_exp_tax_cat); - $sql .= " AND entity IN(0, ".getEntity($this->element).")"; + $sql .= " AND r.entity IN(0, ".getEntity($this->element).")"; if ($active) { $sql .= ' AND r.active = 1 AND c.active = 1'; } diff --git a/htdocs/expensereport/document.php b/htdocs/expensereport/document.php index d7ecea8fcc9..8c3b5f56549 100644 --- a/htdocs/expensereport/document.php +++ b/htdocs/expensereport/document.php @@ -44,13 +44,6 @@ $confirm = GETPOST('confirm', 'alpha'); $childids = $user->getAllChildIds(1); -// Security check -if ($user->socid) { - $socid = $user->socid; -} -$result = restrictedArea($user, 'expensereport', $id, 'expensereport'); - - // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -81,6 +74,12 @@ $modulepart = 'trip'; // Load object //include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'expensereport', $id, 'expensereport'); + if ($object->id > 0) { // Check current user can read this expense report $canread = 0; @@ -95,6 +94,8 @@ if ($object->id > 0) { } } +$permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php + /* * Actions diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index c87cc08fb40..d731c4c8c82 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -185,7 +185,7 @@ print ''; // Right area -print '
    '; +print '
    '; $max = 10; @@ -265,7 +265,7 @@ if ($result) { dol_print_error($db); } -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardExpenseReport', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php index 5f8a9f628b5..500fe874747 100644 --- a/htdocs/expensereport/stats/index.php +++ b/htdocs/expensereport/stats/index.php @@ -146,7 +146,7 @@ if (!$mesg) { $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') { $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; @@ -292,7 +292,7 @@ foreach ($data as $val) { print ''; print ''; -print '
    '; +print '
    '; // Show graphs @@ -309,7 +309,7 @@ if ($mesg) { print ''; -print '
    '; +print ''; print '
    '; diff --git a/htdocs/expensereport/tpl/expensereport_addfile.tpl.php b/htdocs/expensereport/tpl/expensereport_addfile.tpl.php index c27136ebd38..d74b68e6738 100644 --- a/htdocs/expensereport/tpl/expensereport_addfile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_addfile.tpl.php @@ -2,7 +2,14 @@ // Add line to upload new file print ''."\n"; print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>'; -print ''; + +// Num line +if ($action == 'editline') { + print ''; +} + +// Upload section +print ''; $modulepart = 'expensereport'; $permission = $user->rights->expensereport->creer; diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php index 9264400a71f..33cfc0976fe 100644 --- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php @@ -13,7 +13,14 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { if ($nbFiles > 0) { print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>'; - print ''; + + // Num line + if ($action == 'editline') { + print ''; + } + + // Select image section + print ''; //print ''.$langs->trans("AttachTheNewLineToTheDocument").'
    '; $modulepart = 'expensereport'; $maxheightmini = 48; $relativepath = (!empty($object->ref) ?dol_sanitizeFileName($object->ref) : '').'/'; @@ -112,8 +119,8 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { if (!empty($filenamelinked) && $filenamelinked == $file['relativename']) { $checked = ' checked'; } - print '
    '; - print ''; + print '
    '; + print ''; print '
    '; print '
    '; diff --git a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php index e3fc511a024..6a36b62f924 100644 --- a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php @@ -24,7 +24,7 @@ if (empty($conf) || !is_object($conf)) { } -print "\n"; +print "\n"; global $user; diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 50acd166237..c87f03f3110 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -178,7 +178,7 @@ class Export // Code du dataset export $this->array_export_code[$i] = $module->export_code[$r]; // Define a key for sort - $this->array_export_code_for_sort[$i] = $module->module_position.'_'.$module->export_code[$r]; // Add a key into the module + $this->array_export_code_for_sort[$i] = $module->module_position.'_'.$module->export_code[$r]; // Add a key into the module // Libelle du dataset export $this->array_export_label[$i] = $module->getExportDatasetLabel($r); // Tableau des champ a exporter (cle=champ, valeur=libelle) @@ -379,13 +379,13 @@ class Export */ public function conditionDate($Field, $Value, $Sens) { - // TODO date_format is forbidden, not performant and not portable. Use instead BETWEEN + // TODO date_format is forbidden, not performant and not portable. Use instead $Value to forge the range date. if (strlen($Value) == 4) { - $Condition = " date_format(".$Field.",'%Y') ".$Sens." '".$Value."'"; + $Condition = " date_format(".$Field.",'%Y') ".$Sens." '".$this->db->escape($Value)."'"; } elseif (strlen($Value) == 6) { - $Condition = " date_format(".$Field.",'%Y%m') ".$Sens." '".$Value."'"; + $Condition = " date_format(".$Field.",'%Y%m') ".$Sens." '".$this->db->escape($Value)."'"; } else { - $Condition = " date_format(".$Field.",'%Y%m%d') ".$Sens." ".$Value; + $Condition = " date_format(".$Field.",'%Y%m%d') ".$Sens." '".$this->db->escape($Value)."'"; } return $Condition; } @@ -416,7 +416,7 @@ class Export case 'Duree': case 'Numeric': case 'Number': - // Must be a string text to allow to use comparison strings like "<= 999" + // Must be a string text to allow to use comparison strings like "<= 99.9" $szFilterField = ''; break; case 'Status': diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index d74e0a5c5e8..fb7ea015495 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -573,7 +573,6 @@ if ($action == 'create') { print ''; print '
    '; - print '
    '; print '
    '; $title = $langs->trans("Recurrence"); @@ -674,7 +673,6 @@ if ($action == 'create') { print '
    '; } - print '
    '; print '
    '; print ''; @@ -761,7 +759,7 @@ if ($action == 'create') { $sql .= " FROM ".MAIN_DB_PREFIX."fichinter_rec as f"; $sql .= " , ".MAIN_DB_PREFIX."societe as s "; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; @@ -769,7 +767,7 @@ if ($action == 'create') { if ($socid) { $sql .= " AND s.rowid = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($search_ref) { diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 6613ea0ed9d..32147367d4e 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -66,17 +66,13 @@ $originid = (GETPOST('originid', 'int') ?GETPOST('originid', 'int') : GETPOST('o $note_public = GETPOST('note_public', 'restricthtml'); $lineid = GETPOST('line_id', 'int'); +$error = 0; + //PDF $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0)); $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0)); $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); -// Security check -if ($user->socid) { - $socid = $user->socid; -} -$result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); - // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('interventioncard', 'globalcard')); @@ -96,11 +92,15 @@ if ($id > 0 || !empty($ref)) { } } +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); + $permissionnote = $user->rights->ficheinter->creer; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->ficheinter->creer; // Used by the include of actions_dellink.inc.php -$error = 0; - /* * Actions @@ -945,7 +945,7 @@ if ($action == 'create') { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'create'); } // Show link to origin object @@ -1246,7 +1246,6 @@ if ($action == 'create') { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -1260,7 +1259,6 @@ if ($action == 'create') { print "
    "; - print '
    '; print '
    '; print ''; @@ -1668,14 +1666,14 @@ if ($action == 'create') { $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'fichinter', $socid, 1); - print '
    '; + print ''; } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 9bd3f17da25..297e03fa379 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -204,7 +204,7 @@ class Fichinter extends CommonObject $sql = "SELECT count(fi.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as fi"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON fi.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; diff --git a/htdocs/fichinter/class/fichinterstats.class.php b/htdocs/fichinter/class/fichinterstats.class.php index 297aeca7760..f6fbdb8d305 100644 --- a/htdocs/fichinter/class/fichinterstats.class.php +++ b/htdocs/fichinter/class/fichinterstats.class.php @@ -72,7 +72,7 @@ class FichinterStats extends Stats $this->field_line = '0'; //$this->where.= " AND c.fk_statut > 0"; // Not draft and not cancelled } - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $this->where .= ($this->where ? ' AND ' : '')."c.entity IN (".getEntity('fichinter').')'; @@ -98,7 +98,7 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; @@ -122,7 +122,7 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as dm, COUNT(*) as nb, 0"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE ".$this->where; @@ -145,7 +145,7 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%m') as dm, 0"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; @@ -169,7 +169,7 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%m') as dm, 0"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; @@ -191,7 +191,7 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as year, COUNT(*) as nb, 0 as total, 0 as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE ".$this->where; @@ -214,7 +214,7 @@ class FichinterStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, 0 as total, 0 as avg"; $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE ".$this->where; $sql .= " AND c.rowid = tl.fk_fichinter AND tl.fk_product = product.rowid"; $sql .= " AND c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index 74ef0c57804..f3dae0d8318 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -78,6 +78,8 @@ $object->fetch($id, $ref); $upload_dir = $conf->ficheinter->dir_output.'/'.dol_sanitizeFileName($object->ref); $modulepart = 'fichinter'; +$permissiontoadd = $user->rights->ficheinter->creer; // Used by the include of actions_setnotes.inc.php + /* * Actions diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 8eca043ef40..0f0fc0acc99 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -74,7 +74,7 @@ print '
    '; $sql = "SELECT count(f.rowid), f.fk_statut"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."fichinter as f"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; @@ -82,7 +82,7 @@ $sql .= " AND f.fk_soc = s.rowid"; if ($user->socid) { $sql .= ' AND f.fk_soc = '.((int) $user->socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " GROUP BY f.fk_statut"; @@ -192,7 +192,7 @@ if (!empty($conf->ficheinter->enabled)) { $sql = "SELECT f.rowid, f.ref, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; @@ -201,7 +201,7 @@ if (!empty($conf->ficheinter->enabled)) { if ($socid) { $sql .= " AND f.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -229,7 +229,7 @@ if (!empty($conf->ficheinter->enabled)) { } -print '
    '; +print '
    '; $max = 5; @@ -242,7 +242,7 @@ $sql = "SELECT f.rowid, f.ref, f.fk_statut, f.date_valid as datec, f.tms as date $sql .= " s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; @@ -251,7 +251,7 @@ $sql .= " AND f.fk_soc = s.rowid"; if ($socid) { $sql .= " AND f.fk_soc = ".((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY f.tms DESC"; @@ -315,7 +315,7 @@ if (!empty($conf->ficheinter->enabled)) { $sql = "SELECT f.rowid, f.ref, f.fk_statut, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; @@ -324,7 +324,7 @@ if (!empty($conf->ficheinter->enabled)) { if ($socid) { $sql .= " AND f.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY f.rowid DESC"; @@ -381,7 +381,7 @@ if (!empty($conf->ficheinter->enabled)) { } } -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardInterventions', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 6f4dccd878d..d710d7cd6cc 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -257,7 +257,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -if (!$user->rights->societe->client->voir && empty($socid)) { +if (empty($user->rights->societe->client->voir) && empty($socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."societe as s"; @@ -285,7 +285,7 @@ if ($search_desc) { if ($search_status != '' && $search_status >= 0) { $sql .= ' AND f.fk_statut = '.urlencode($search_status); } -if (!$user->rights->societe->client->voir && empty($socid)) { +if (empty($user->rights->societe->client->voir) && empty($socid)) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 7a7adb639b3..f1247adb457 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -79,7 +79,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenamenb = $dir.'/interventionsnbinyear-'.$user->id.'-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsnbinyear-'.$user->id.'-'.$year.'.png'; } else { @@ -114,7 +114,7 @@ if (!$mesg) { $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenameamount = $dir.'/interventionsamountinyear-'.$user->id.'-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsamountinyear-'.$user->id.'-'.$year.'.png'; } else { @@ -148,7 +148,7 @@ if (!$mesg) { $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filename_avg = $dir.'/interventionsaverage-'.$user->id.'-'.$year.'.png'; $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsaverage-'.$user->id.'-'.$year.'.png'; } else { @@ -300,7 +300,7 @@ print ''; print ''; -print '
    '; +print '
    '; // Show graphs @@ -317,7 +317,7 @@ if ($mesg) { print ''; -print '
    '; +print ''; print '
    '; print dol_get_fiche_end(); diff --git a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php index b7e3eaa382b..e5903ee5863 100644 --- a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php @@ -22,7 +22,7 @@ if (empty($conf) || !is_object($conf)) { } -print "\n"; +print "\n"; global $user; diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index c9ac19f9a23..736370b6b49 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -371,7 +371,7 @@ if ($object->id > 0) { print ''; - print '
    '; + print '
    '; $boxstat = ''; @@ -813,7 +813,7 @@ if ($object->id > 0) { } } - print '
    '; + print ''; print '
    '; print dol_get_fiche_end(); diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index df1bf36b723..51cd2673b0b 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -201,6 +201,10 @@ class SupplierInvoices extends DolibarrApi /** * Create supplier invoice object * + * Note: soc_id = dolibarr_order_id + * + * Example: {'ref': 'auto', 'ref_supplier': '7985630', 'socid': 1, 'note': 'Inserted with Python', 'order_supplier': 1, 'date': '2021-07-28'} + * * @param array $request_data Request datas * * @return int ID of supplier invoice @@ -525,6 +529,10 @@ class SupplierInvoices extends DolibarrApi /** * Add a line to given supplier invoice * + * Note: socid = dolibarr_order_id, pu_ht = net price, remise = discount + * + * Example: {'socid': 1, 'qty': 1, 'pu_ht': 21.0, 'tva_tx': 25.0, 'fk_product': '1189', 'product_type': 0, 'remise_percent': 1.0, 'vat_src_code': None} + * * @param int $id Id of supplier invoice to update * @param array $request_data supplier invoice line data * diff --git a/htdocs/fourn/class/fournisseur.class.php b/htdocs/fourn/class/fournisseur.class.php index 805ed7c1ba6..b47cfa263c0 100644 --- a/htdocs/fourn/class/fournisseur.class.php +++ b/htdocs/fourn/class/fournisseur.class.php @@ -113,7 +113,7 @@ class Fournisseur extends Societe $sql = "SELECT count(s.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; @@ -178,12 +178,12 @@ class Fournisseur extends Societe $sql = "SELECT s.rowid, s.nom as name"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.fournisseur = 1"; $sql .= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 99ef4e54e87..bc79aa4d6e1 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2936,11 +2936,11 @@ class CommandeFournisseur extends CommonOrder $this->user_approve_id2 = $obj->fk_user_approve2; } - $this->date_creation = $this->db->idate($obj->datec); - $this->date_modification = $this->db->idate($obj->datem); - $this->date_approve = $this->db->idate($obj->datea); - $this->date_approve2 = $this->db->idate($obj->datea2); - $this->date_validation = $this->db->idate($obj->date_validation); + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = $this->db->jdate($obj->datem); + $this->date_approve = $this->db->jdate($obj->datea); + $this->date_approve2 = $this->db->jdate($obj->datea2); + $this->date_validation = $this->db->jdate($obj->date_validation); } $this->db->free($result); } else { @@ -2965,7 +2965,7 @@ class CommandeFournisseur extends CommonOrder $sql = "SELECT count(co.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as co"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON co.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; @@ -3003,7 +3003,7 @@ class CommandeFournisseur extends CommonOrder $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.fk_statut, c.date_livraison as delivery_date"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON c.fk_soc = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = " AND"; diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index a73be8ac43b..7037cd94262 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -286,7 +286,7 @@ class CommandeFournisseurDispatch extends CommonObjectLine $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; if ($ref) { - $sql .= " WHERE t.ref = '".$ref."'"; + $sql .= " WHERE t.ref = '".$this->db->escape($ref)."'"; } else { $sql .= " WHERE t.rowid = ".((int) $id); } @@ -374,7 +374,6 @@ class CommandeFournisseurDispatch extends CommonObjectLine // Update request $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; - $sql .= " fk_commande=".(isset($this->fk_commande) ? $this->fk_commande : "null").","; $sql .= " fk_product=".(isset($this->fk_product) ? $this->fk_product : "null").","; $sql .= " fk_commandefourndet=".(isset($this->fk_commandefourndet) ? $this->fk_commandefourndet : "null").","; @@ -388,8 +387,6 @@ class CommandeFournisseurDispatch extends CommonObjectLine $sql .= " batch=".(isset($this->batch) ? "'".$this->db->escape($this->batch)."'" : "null").","; $sql .= " eatby=".(dol_strlen($this->eatby) != 0 ? "'".$this->db->idate($this->eatby)."'" : 'null').","; $sql .= " sellby=".(dol_strlen($this->sellby) != 0 ? "'".$this->db->idate($this->sellby)."'" : 'null').""; - - $sql .= " WHERE rowid=".((int) $this->id); $this->db->begin(); diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index dbf33b6cd69..ccaa7db60fa 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -415,6 +415,7 @@ class FactureFournisseur extends CommonInvoice $sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_fourn ("; $sql .= "ref"; $sql .= ", ref_supplier"; + $sql .= ", ref_ext"; $sql .= ", entity"; $sql .= ", type"; $sql .= ", libelle"; @@ -438,6 +439,7 @@ class FactureFournisseur extends CommonInvoice $sql .= " VALUES ("; $sql .= "'(PROV)'"; $sql .= ", '".$this->db->escape($this->ref_supplier)."'"; + $sql .= ", '".$this->db->escape($this->ref_ext)."'"; $sql .= ", ".((int) $conf->entity); $sql .= ", '".$this->db->escape($this->type)."'"; $sql .= ", '".$this->db->escape(isset($this->label) ? $this->label : (isset($this->libelle) ? $this->libelle : ''))."'"; @@ -647,6 +649,7 @@ class FactureFournisseur extends CommonInvoice $sql .= " t.rowid,"; $sql .= " t.ref,"; $sql .= " t.ref_supplier,"; + $sql .= " t.ref_ext,"; $sql .= " t.entity,"; $sql .= " t.type,"; $sql .= " t.fk_soc,"; @@ -708,6 +711,7 @@ class FactureFournisseur extends CommonInvoice $this->ref = $obj->ref ? $obj->ref : $obj->rowid; // We take rowid if ref is empty for backward compatibility $this->ref_supplier = $obj->ref_supplier; + $this->ref_ext = $obj->ref_ext; $this->entity = $obj->entity; $this->type = empty($obj->type) ? self::TYPE_STANDARD : $obj->type; $this->fk_soc = $obj->fk_soc; @@ -924,6 +928,9 @@ class FactureFournisseur extends CommonInvoice if (isset($this->ref_supplier)) { $this->ref_supplier = trim($this->ref_supplier); } + if (isset($this->ref_ext)) { + $this->ref_ext = trim($this->ref_ext); + } if (isset($this->entity)) { $this->entity = trim($this->entity); } @@ -1013,6 +1020,7 @@ class FactureFournisseur extends CommonInvoice $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn SET"; $sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").","; $sql .= " ref_supplier=".(isset($this->ref_supplier) ? "'".$this->db->escape($this->ref_supplier)."'" : "null").","; + $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; $sql .= " entity=".(isset($this->entity) ? $this->entity : "null").","; $sql .= " type=".(isset($this->type) ? $this->type : "null").","; $sql .= " fk_soc=".(isset($this->fk_soc) ? $this->fk_soc : "null").","; @@ -2404,7 +2412,7 @@ class FactureFournisseur extends CommonInvoice $sql = 'SELECT ff.rowid, ff.date_lim_reglement as datefin, ff.fk_statut'; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as ff'; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ' WHERE ff.paye=0'; @@ -2413,7 +2421,7 @@ class FactureFournisseur extends CommonInvoice if ($user->socid) { $sql .= ' AND ff.fk_soc = '.((int) $user->socid); } - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " AND ff.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -2759,7 +2767,7 @@ class FactureFournisseur extends CommonInvoice $sql = "SELECT count(f.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 32150131314..dea816b9574 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1786,7 +1786,7 @@ if ($action == 'create') { print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'create'); } // Bouton "Create Draft" @@ -2249,7 +2249,6 @@ if ($action == 'create') { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -2308,7 +2307,6 @@ if ($action == 'create') { }*/ - print ''; print ''; print ''; @@ -2640,7 +2638,7 @@ if ($action == 'create') { $linktoelem = $form->showLinkToObjectBlock($object, null, array('supplier_order', 'order_supplier')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; if ($action == 'classifyreception') { if ($usercanreceived && ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY)) { @@ -2686,7 +2684,7 @@ if ($action == 'create') { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'order_supplier', $socid, 1, 'listaction'.($genallowed ? 'largetitle' : '')); - print '
    '; + print ''; } /* diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 16d4b1f25f3..7192f976219 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -1219,7 +1219,7 @@ if ($id > 0 || !empty($ref)) { // Qty print '
    '; if ($action == 'editline' && $lineid == $objp->dispatchlineid) { - print ''; + print ''; } else { print $objp->qty; } diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index aea8abed665..993830eb539 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -46,12 +46,6 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -// Security check -if ($user->socid) { - $socid = $user->socid; -} -$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); - // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); @@ -81,6 +75,15 @@ if ($object->fetch($id, $ref) < 0) { $upload_dir = $conf->fournisseur->commande->dir_output.'/'.dol_sanitizeFileName($object->ref); $object->fetch_thirdparty(); +// Security check +$socid = 0; +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); + +$permissiontoadd = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); // Used by the include of actions_setnotes.inc.php + /* * Actions diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index b4956ea706f..7d6b3b6936a 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -67,7 +67,7 @@ print '
    '; $sql = "SELECT count(cf.rowid) as nb, fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE cf.fk_soc = s.rowid"; @@ -75,7 +75,7 @@ $sql .= " AND cf.entity IN (".getEntity('supplier_order').")"; if ($user->socid) { $sql .= ' AND cf.fk_soc = '.((int) $user->socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " GROUP BY cf.fk_statut"; @@ -176,7 +176,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql = "SELECT c.rowid, c.ref, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -185,7 +185,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU if (!empty($socid)) { $sql .= " AND c.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -272,7 +272,7 @@ if ($resql) { } -print '
    '; +print '
    '; /* @@ -283,7 +283,7 @@ $max = 5; $sql = "SELECT c.rowid, c.ref, c.fk_statut as status, c.tms, c.billed, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -292,7 +292,7 @@ $sql .= " AND c.entity IN (".getEntity('supplier_order').")"; if (!empty($socid)) { $sql .= " AND c.fk_soc = ".((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY c.tms DESC"; @@ -355,12 +355,12 @@ if ($resql) { $sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as name, s.rowid as socid"; $sql.=" FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (empty($user->rights->societe->client->voir) && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.fk_soc = s.rowid"; $sql.= " AND c.entity IN (".getEntity("supplier_order").")"; $sql.= " AND c.fk_statut = 1"; if ($socid) $sql.= " AND c.fk_soc = ".((int) $socid); -if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .((int) $user->id); +if (empty($user->rights->societe->client->voir) && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .((int) $user->id); $sql.= " ORDER BY c.rowid DESC"; $resql=$db->query($sql); @@ -417,7 +417,7 @@ print "

    "; } */ -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardOrdersSuppliers', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index aeb17c25035..bb8dc302b1c 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -74,7 +74,7 @@ if ($user->socid) { } $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); -if (!$user->rights->fournisseur->commande->lire) { +if (empty($user->rights->fournisseur->commande->lire)) { accessforbidden(); } diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index bef5289c791..419e75b55aa 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -777,7 +777,7 @@ if ($search_product_category > 0) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON cf.fk_user_author = u.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = cf.fk_projet"; // We'll need this table joined to the select in order to filter by sale -if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { +if ($search_sale > 0 || (empty($user->rights->societe->client->voir) && !$socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } if ($search_user > 0) { @@ -792,7 +792,7 @@ $sql .= ' AND cf.entity IN ('.getEntity('supplier_order').')'; if ($socid > 0) { $sql .= " AND s.rowid = ".((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($search_ref) { diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php index eeb2860bcd6..1efd78df372 100644 --- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php @@ -23,7 +23,7 @@ if (empty($conf) || !is_object($conf)) { } -print "\n"; +print "\n"; global $user; diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index 9fd4dd30b26..cabf726beee 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -64,18 +64,18 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; */ $sql = "SELECT s.rowid as socid, s.nom as name, st.libelle as stcomm, p.rowid as cidp, p.lastname, p.firstname, p.email, p.phone"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."socpeople as p, ".MAIN_DB_PREFIX."c_stcomm as st"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.fk_stcomm = st.id"; $sql .= " AND s.fournisseur = 1"; $sql .= " AND s.rowid = p.fk_soc"; $sql .= " AND s.entity IN (".getEntity('societe').")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 02e52c8164b..946958594d8 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2285,7 +2285,7 @@ if ($action == 'create') { } if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'create'); } // Public note @@ -2417,6 +2417,15 @@ if ($action == 'create') { // $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); $resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); + // Multicurrency + if (!empty($conf->multicurrency->enabled)) { + $multicurrency_totalpaye = $object->getSommePaiement(1); + $multicurrency_totalcreditnotes = $object->getSumCreditNotesUsed(1); + $multicurrency_totaldeposits = $object->getSumDepositsUsed(1); + $multicurrency_resteapayer = price2num($object->multicurrency_total_ttc - $multicurrency_totalpaye - $multicurrency_totalcreditnotes - $multicurrency_totaldeposits, 'MT'); + $resteapayer = price2num($multicurrency_resteapayer / $object->multicurrency_tx, 'MT'); + } + if ($object->paye) { $resteapayer = 0; } @@ -2939,7 +2948,6 @@ if ($action == 'create') { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -3316,7 +3324,6 @@ if ($action == 'create') { print '
    '; print '
    '; - print '
    '; print ''; print ''; @@ -3565,17 +3572,14 @@ if ($action == 'create') { $linktoelem = $form->showLinkToObjectBlock($object, null, array('invoice_supplier')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; - //print ''; - //print '
    '; + print '
    '; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'invoice_supplier', $socid, 1, 'listaction'.($genallowed ? 'largetitle' : '')); - print '
    '; - //print ''; + print ''; } } } diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index f6954635db1..4c4e92315f4 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -77,6 +77,8 @@ if ($object->fetch($id, $ref)) { $upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$ref; } +$permissiontoadd = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); // Used by the include of actions_setnotes.inc.php + /* * Actions diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 5479ad22462..21d3e4cfa58 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -73,7 +73,6 @@ if ($tmp) { print ''; print '
    '; -print '
    '; $tmp = getPurchaseInvoiceLatestEditTable($maxLatestEditCount, $socid); if ($tmp) { @@ -87,7 +86,6 @@ if ($tmp) { print '
    '; } -print '
    '; print '
    '; print ''; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 9bf756e70be..bf4048ae655 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -461,7 +461,7 @@ if ($search_product_category > 0) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = f.fk_projet"; // We'll need this table joined to the select in order to filter by sale -if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { +if ($search_sale > 0 || (empty($user->rights->societe->client->voir) && !$socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } if ($search_user > 0) { @@ -474,7 +474,7 @@ $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object $sql .= $hookmanager->resPrint; $sql .= ' WHERE f.fk_soc = s.rowid'; $sql .= ' AND f.entity IN ('.getEntity('facture_fourn').')'; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($search_product_category > 0) { diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index fcbfdcf7b45..71a15023343 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -360,16 +360,16 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $sql = 'SELECT s.nom as name, s.rowid as socid,'; $sql .= ' f.rowid, f.ref, f.ref_supplier, f.total_ttc as total, f.fk_mode_reglement, f.fk_account'; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'facture_fourn as f'; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ' WHERE f.fk_soc = s.rowid'; $sql .= ' AND f.rowid = '.((int) $facid); - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $resql = $db->query($sql); @@ -641,13 +641,19 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''; if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) { - print price($objp->multicurrency_am); + print price($sign * $multicurrency_payment); + if ($multicurrency_creditnotes) { + print '+'.price($multicurrency_creditnotes); + } + if ($multicurrency_deposits) { + print '+'.price($multicurrency_deposits); + } } print ''; print ''; if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) { - print price($objp->multicurrency_total_ttc - $objp->multicurrency_am); + print price($sign * $multicurrency_remaintopay); } print ''; } @@ -676,10 +682,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'"); } print ''; - print ''; // class is requied to be used by javascript callForResult(); + print ''; // class is requied to be used by javascript callForResult(); } else { print ''; - print ''; // class is requied to be used by javascript callForResult(); + print ''; // class is requied to be used by javascript callForResult(); } print ""; diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index fe2bb78008d..59b92f349c0 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -46,7 +46,7 @@ if ($user->socid > 0) { } $dir = $conf->fournisseur->facture->dir_output.'/payments'; -if (!$user->rights->societe->client->voir || $socid) { +if (empty($user->rights->societe->client->voir) || $socid) { $dir .= '/private/'.$user->id; // If user has no permission to see all, output dir is specific to user } diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index 4188fef716e..3f728d99567 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -25,7 +25,7 @@ if (empty($conf) || !is_object($conf)) { } -print "\n"; +print "\n"; global $user; diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 44a689fcd80..1dc3e963db7 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -60,11 +60,11 @@ print '
    '; $sql = "SELECT count(cf.rowid), cf.fk_statut"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; } $sql .= " WHERE cf.fk_soc = s.rowid "; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND sc.fk_user = ".((int) $user->id); } $sql .= " AND cf.entity = ".$conf->entity; @@ -106,11 +106,11 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql .= " s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; } $sql .= " WHERE cf.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND sc.fk_user = ".((int) $user->id); } $sql .= " AND cf.entity = ".$conf->entity; @@ -162,11 +162,11 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S $sql .= ", s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; } $sql .= " WHERE s.rowid = ff.fk_soc"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND sc.fk_user = ".((int) $user->id); } $sql .= " AND ff.entity = ".$conf->entity; @@ -221,8 +221,7 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S } -//print ''; -print '
    '; +print '
    '; /* @@ -241,13 +240,13 @@ if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); } $sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.fk_stcomm = st.id"; $sql .= " AND s.fournisseur = 1"; $sql .= " AND s.entity IN (".getEntity('societe').")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -318,8 +317,7 @@ if (count($companystatic->SupplierCategories)) { } -//print "\n"; -print '
    '; +print ''; // End of page llxFooter(); diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 05ad6ac71c4..f8f484f0cc9 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -135,6 +135,13 @@ $upload_dir = $conf->fournisseur->payment->dir_output; $permissiontoadd = true; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; +// Actions to send emails +$triggersendname = 'PAYMENTRECEIPT_SENTBYMAIL'; +$paramname = 'id'; +$autocopy = 'MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO'; +$trackid = 'pre'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; + /* * View @@ -334,6 +341,18 @@ if ($result > 0) { */ print '
    '; + + // Send by mail + if ($user->socid == 0 && $action == '') { + $usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS)); + if ($usercansend) { + print ''.$langs->trans('SendMail').''; + } else { + print ''.$langs->trans('SendMail').''; + } + } + + // Payment validation if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { if ($user->socid == 0 && $object->statut == 0 && $action == '') { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && (!empty($user->rights->fournisseur->facture->creer) || !empty($user->rights->supplier_invoice->creer))) @@ -342,6 +361,8 @@ if ($result > 0) { } } } + + // Delete payment if ($user->socid == 0 && $action == '') { if ($user->rights->fournisseur->facture->supprimer) { if ($allow_delete) { @@ -371,7 +392,7 @@ if ($result > 0) { $somethingshown = $formfile->numoffiles; } - print '
    '; + print '
    '; //print '
    '; // List of actions on element @@ -380,7 +401,16 @@ if ($result > 0) { $somethingshown = $formactions->showactions($object,'supplier_payment',$socid,1,'listaction'.($genallowed?'largetitle':'')); */ - print '
    '; + print ''; + + // Presend form + $modelmail = ''; //TODO: Add new 'payment receipt' model in email models + $defaulttopic = 'SendPaymentReceipt'; + $diroutput = $conf->fournisseur->payment->dir_output; + $autocopy = 'MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO'; + $trackid = 'pre'.$object->id; + + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; } else { $langs->load("errors"); print $langs->trans("ErrorRecordNotFound"); diff --git a/htdocs/fourn/paiement/document.php b/htdocs/fourn/paiement/document.php new file mode 100644 index 00000000000..a29e9b0713c --- /dev/null +++ b/htdocs/fourn/paiement/document.php @@ -0,0 +1,180 @@ + + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Marcos García + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2017 Ferran Marcet + * Copyright (C) 2021 Jesus Jerez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/fourn/paiement/document.php + * \ingroup facture, fournisseur + * \brief Management page of attached documents to a payment + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; +if (!empty($conf->projet->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +} + +// Load translation files required by the page +$langs->loadLangs(array('bills', 'banks', 'companies', 'suppliers', 'other')); + +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); + +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); + +// Get parameters +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST("sortfield", 'alpha'); +$sortorder = GETPOST("sortorder", 'alpha'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} + +// Load object +$object = new PaiementFourn($db); +if ($object->fetch($id, $ref)) { + $object->fetch_thirdparty(); + $ref = dol_sanitizeFileName($object->ref); + $upload_dir = $conf->fournisseur->payment->dir_output.'/'.dol_sanitizeFileName($object->ref); +} + +$permissiontoadd = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); // Used by the include of actions_setnotes.inc.php + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + + +/* + * View + */ + +$form = new Form($db); + +$title = $langs->trans('Payment')." - ".$langs->trans('Documents'); +llxHeader('', $title); + +if ($object->id > 0) { + $head = payment_supplier_prepare_head($object); + print dol_get_fiche_head($head, 'documents', $langs->trans("SupplierPayment"), -1, 'payment'); + + // Supplier order card + $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref = '
    '; + + // Date of payment + $morehtmlref .= $form->editfieldkey("Date", 'datep', $object->date, $object, $object->statut == 0 && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer), 'datehourpicker', '', null, 3).': '; + $morehtmlref .= $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer), 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded')); + + // Payment mode + $morehtmlref .= '
    '.$langs->trans('PaymentMode').' : '; + $morehtmlref .= $langs->trans("PaymentType".$object->type_code) != ("PaymentType".$object->type_code) ? $langs->trans("PaymentType".$object->type_code) : $object->type_label; + $morehtmlref .= $object->num_payment ? ' - '.$object->num_payment : ''; + + // Thirdparty + $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + + // Amount + $morehtmlref .= '
    '.$langs->trans('Amount').' : '. price($object->amount, '', $langs, 0, 0, -1, $conf->currency); + + $allow_delete = 1; + // Bank account + if (!empty($conf->banque->enabled)) { + if ($object->fk_account) { + $bankline = new AccountLine($db); + $bankline->fetch($object->bank_line); + if ($bankline->rappro) { + $allow_delete = 0; + $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemoveConciliatedPayment")); + } + + $morehtmlref .= '
    '.$langs->trans('BankAccount').' : '; + $accountstatic = new Account($db); + $accountstatic->fetch($bankline->fk_account); + $morehtmlref .= $accountstatic->getNomUrl(1); + + $morehtmlref .= '
    '.$langs->trans('BankTransactionLine').' : '; + $morehtmlref .= $bankline->getNomUrl(1, 0, 'showconciliated'); + } + } + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + // Build file list + $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); + $totalsize = 0; + foreach ($filearray as $key => $file) { + $totalsize += $file['size']; + } + + print '
    '; + print '
    '; + + print ''; + print ''; + print ''; + print "
    '.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
    '.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize, 1, 1).'
    \n"; + + print "
    \n"; + + print dol_get_fiche_end(); + + $modulepart = 'supplier_payment'; + // TODO: get the appropriate permission + $permissiontoadd = true; + $permtoedit = true; + $param = '&id='.$object->id; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; +} else { + header('Location: index.php'); + exit; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index 96af99d3f06..c4e18d50f90 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -177,7 +177,7 @@ $sql = 'SELECT p.rowid, p.ref, p.datep, p.amount as pamount, p.num_paiement'; $sql .= ', s.rowid as socid, s.nom as name, s.email'; $sql .= ', c.code as paiement_type, c.libelle as paiement_libelle'; $sql .= ', ba.rowid as bid, ba.label'; -if (!$user->rights->societe->client->voir) { +if (empty($user->rights->societe->client->voir)) { $sql .= ', sc.fk_soc, sc.fk_user'; } $sql .= ', SUM(pf.amount)'; @@ -189,12 +189,12 @@ $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement AS c ON p.fk_paiement = c.id'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON s.rowid = f.fk_soc'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; -if (!$user->rights->societe->client->voir) { +if (empty($user->rights->societe->client->voir)) { $sql .= ', '.MAIN_DB_PREFIX.'societe_commerciaux as sc'; } $sql .= ' WHERE f.entity = '.$conf->entity; -if (!$user->rights->societe->client->voir) { +if (empty($user->rights->societe->client->voir)) { $sql .= ' AND s.rowid = sc.fk_soc AND sc.fk_user = '.((int) $user->id); } if ($socid > 0) { @@ -233,7 +233,7 @@ if ($search_all) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; $sql .= ' GROUP BY p.rowid, p.ref, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, s.email, c.code, c.libelle, ba.rowid, ba.label'; -if (!$user->rights->societe->client->voir) { +if (empty($user->rights->societe->client->voir)) { $sql .= ', sc.fk_soc, sc.fk_user'; } diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 9948b64e460..b4bb54f3b1b 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -1302,7 +1302,6 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { print '
    '; print '
    '; - print '
    '; print '
    '; @@ -1391,7 +1390,6 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { print ''; print ''; - print '
    '; print '
    '; print ''; @@ -1545,7 +1543,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { //$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -1554,7 +1552,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } } } diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 55d92b7835b..89760c4d1ac 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -701,6 +701,7 @@ class Holiday extends CommonObject public function validate($user = null, $notrigger = 0) { global $conf, $langs; + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $error = 0; // Define new ref @@ -740,6 +741,44 @@ class Holiday extends CommonObject } } + if (!$error) { + $this->oldref = $this->ref; + + // Rename directory if dir was a temporary ref + if (preg_match('/^[\(]?PROV/i', $this->ref)) { + // Now we rename also files into index + $sql = 'UPDATE ' . MAIN_DB_PREFIX . "ecm_files set filename = CONCAT('" . $this->db->escape($this->newref) . "', SUBSTR(filename, " . (strlen($this->ref) + 1) . ")), filepath = 'holiday/" . $this->db->escape($this->newref) . "'"; + $sql .= " WHERE filename LIKE '" . $this->db->escape($this->ref) . "%' AND filepath = 'holiday/" . $this->db->escape($this->ref) . "' and entity = " . ((int) $conf->entity); + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->error = $this->db->lasterror(); + } + + // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments + $oldref = dol_sanitizeFileName($this->ref); + $newref = dol_sanitizeFileName($num); + $dirsource = $conf->holiday->multidir_output[$this->entity] . '/' . $oldref; + $dirdest = $conf->holiday->multidir_output[$this->entity] . '/' . $newref; + if (!$error && file_exists($dirsource)) { + dol_syslog(get_class($this) . "::validate rename dir " . $dirsource . " into " . $dirdest); + if (@rename($dirsource, $dirdest)) { + dol_syslog("Rename ok"); + // Rename docs starting with $oldref with $newref + $listoffiles = dol_dir_list($dirdest, 'files', 1, '^' . preg_quote($oldref, '/')); + foreach ($listoffiles as $fileentry) { + $dirsource = $fileentry['name']; + $dirdest = preg_replace('/^' . preg_quote($oldref, '/') . '/', $newref, $dirsource); + $dirsource = $fileentry['path'] . '/' . $dirsource; + $dirdest = $fileentry['path'] . '/' . $dirdest; + @rename($dirsource, $dirdest); + } + } + } + } + } + + // Commit or rollback if ($error) { foreach ($this->errors as $errmsg) { @@ -1266,16 +1305,16 @@ class Holiday extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('DraftCP'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('ToReviewCP'); - $this->labelStatus[self::STATUS_APPROVED] = $langs->trans('ApprovedCP'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('CancelCP'); - $this->labelStatus[self::STATUS_REFUSED] = $langs->trans('RefuseCP'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('DraftCP'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('ToReviewCP'); - $this->labelStatusShort[self::STATUS_APPROVED] = $langs->trans('ApprovedCP'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('CancelCP'); - $this->labelStatusShort[self::STATUS_REFUSED] = $langs->trans('RefuseCP'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('DraftCP'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('ToReviewCP'); + $this->labelStatus[self::STATUS_APPROVED] = $langs->transnoentitiesnoconv('ApprovedCP'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('CancelCP'); + $this->labelStatus[self::STATUS_REFUSED] = $langs->transnoentitiesnoconv('RefuseCP'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('DraftCP'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('ToReviewCP'); + $this->labelStatusShort[self::STATUS_APPROVED] = $langs->transnoentitiesnoconv('ApprovedCP'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('CancelCP'); + $this->labelStatusShort[self::STATUS_REFUSED] = $langs->transnoentitiesnoconv('RefuseCP'); } $params = array(); diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index c4e779efe52..7dc086a113f 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -120,6 +120,7 @@ if ($user->socid) { } $result = restrictedArea($user, 'holiday', $object->id, 'holiday'); +$permissiontoadd = $user->rights->holiday->write; // Used by the include of actions_setnotes.inc.php /* @@ -283,7 +284,6 @@ if ($object->id) { /* print ''; print '
    '; - print '
    '; print '
    '; @@ -340,7 +340,6 @@ if ($object->id) { print ''; print ''; - print '
    '; print '
    '; */ print ''; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index a9082a02b5e..88e93f1398f 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -369,10 +369,10 @@ class Establishment extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_OPEN] = $langs->trans('Open'); - $this->labelStatus[self::STATUS_CLOSED] = $langs->trans('Closed'); - $this->labelStatusShort[self::STATUS_OPEN] = $langs->trans('Open'); - $this->labelStatusShort[self::STATUS_CLOSED] = $langs->trans('Closed'); + $this->labelStatus[self::STATUS_OPEN] = $langs->transnoentitiesnoconv('Open'); + $this->labelStatus[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('Closed'); + $this->labelStatusShort[self::STATUS_OPEN] = $langs->transnoentitiesnoconv('Open'); + $this->labelStatusShort[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('Closed'); } $statusType = 'status'.$status; diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index 30e95e2d44e..75dc03cc6f2 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -116,7 +116,7 @@ class Evaluation extends CommonObject 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), - 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'default'=>0, 'visible'=>5, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Brouillon', '1'=>'Validé'),), + 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'default'=>0, 'visible'=>5, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '6' => 'Closed'),), 'date_eval' => array('type'=>'date', 'label'=>'DateEval', 'enabled'=>'1', 'position'=>502, 'notnull'=>1, 'visible'=>1,), 'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'User', 'enabled'=>'1', 'position'=>504, 'notnull'=>1, 'visible'=>1,), 'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>505, 'notnull'=>1, 'visible'=>1,), @@ -844,12 +844,12 @@ class Evaluation extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("hrm"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated'); - $this->labelStatus[self::STATUS_CLOSED] = $langs->trans('Closed'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Validated'); - $this->labelStatus[self::STATUS_CLOSED] = $langs->trans('Closed'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); + $this->labelStatus[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('Closed'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); + $this->labelStatus[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('Closed'); } $statusType = 'status'.$status; diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php index 83a4c5a387b..a268f1b30be 100644 --- a/htdocs/hrm/class/evaluationdet.class.php +++ b/htdocs/hrm/class/evaluationdet.class.php @@ -816,12 +816,12 @@ class Evaluationline extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("hrm"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status'.$status; diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index 4ff5ccbe303..fc94f4ba6ae 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -154,7 +154,7 @@ class Job extends CommonObject // * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will // * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object // */ - // protected $childtablesoncascade = array('hrm_jobdet'); + protected $childtablesoncascade = array("@SkillRank:hrm/class/skillrank.class.php:fk_object:objecttype='job'"); // /** // * @var JobLine[] Array of subtable lines @@ -850,12 +850,12 @@ class Job extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("hrm"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status'.$status; diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php index f349514b69a..2a0d04fe393 100644 --- a/htdocs/hrm/class/position.class.php +++ b/htdocs/hrm/class/position.class.php @@ -825,12 +825,12 @@ class Position extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("hrm"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status' . $status; diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index ba7d0f43d3c..478b267ac1f 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -384,7 +384,7 @@ class Skill extends CommonObject /** * Load object lines in memory from the database * - * @return int | array <0 if KO, 0 if not found, array if OK + * @return array|int <0 if KO, 0 if not found, array if OK */ public function fetchLines() { @@ -867,12 +867,12 @@ class Skill extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("hrm"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status'.$status; diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php index e4ac293c297..1fb90b907db 100644 --- a/htdocs/hrm/class/skilldet.class.php +++ b/htdocs/hrm/class/skilldet.class.php @@ -377,13 +377,13 @@ class Skilldet extends CommonObject if ($key == 't.rowid') { $sqlwhere[] = $key.'='.$value; } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { - $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; + $sqlwhere[] = $key." = '".$this->db->idate($value)."'"; } elseif ($key == 'customsql') { $sqlwhere[] = $value; } elseif (strpos($value, '%') === false) { - $sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')'; + $sqlwhere[] = $key." IN (".$this->db->sanitize($this->db->escape($value)).")"; } else { - $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; + $sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'"; } } } @@ -395,7 +395,7 @@ class Skilldet extends CommonObject $sql .= $this->db->order($sortfield, $sortorder); } if (!empty($limit)) { - $sql .= ' '.$this->db->plimit($limit, $offset); + $sql .= " ".$this->db->plimit($limit, $offset); } $resql = $this->db->query($sql); @@ -804,12 +804,12 @@ class Skilldet extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("hrm"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status'.$status; diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index 97fcd7edab4..a07015ef763 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -843,12 +843,12 @@ class SkillRank extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("hrm"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status'.$status; diff --git a/htdocs/hrm/evaluation_agenda.php b/htdocs/hrm/evaluation_agenda.php index 8524f6df3d9..91a0615bc95 100644 --- a/htdocs/hrm/evaluation_agenda.php +++ b/htdocs/hrm/evaluation_agenda.php @@ -25,57 +25,9 @@ * \brief Tab of events on Evaluation */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/hrm/evaluation_card.php b/htdocs/hrm/evaluation_card.php index 64b54b4c80b..28e030ffc42 100644 --- a/htdocs/hrm/evaluation_card.php +++ b/htdocs/hrm/evaluation_card.php @@ -25,57 +25,8 @@ * \brief Page to create/edit/view evaluation */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification - // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -731,7 +682,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -744,7 +695,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } //Select mail models is same action as presend diff --git a/htdocs/hrm/evaluation_contact.php b/htdocs/hrm/evaluation_contact.php index 540154b77ef..61af793b28a 100644 --- a/htdocs/hrm/evaluation_contact.php +++ b/htdocs/hrm/evaluation_contact.php @@ -26,35 +26,7 @@ */ // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; diff --git a/htdocs/hrm/evaluation_document.php b/htdocs/hrm/evaluation_document.php index 06cbd7a621a..7318819644e 100644 --- a/htdocs/hrm/evaluation_document.php +++ b/htdocs/hrm/evaluation_document.php @@ -25,57 +25,9 @@ * \brief Tab for documents linked to Evaluation */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/hrm/evaluation_list.php b/htdocs/hrm/evaluation_list.php index 9ec102c45ea..35189f11b87 100644 --- a/htdocs/hrm/evaluation_list.php +++ b/htdocs/hrm/evaluation_list.php @@ -25,57 +25,9 @@ * \brief List page for evaluation */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -268,7 +220,7 @@ $sql .= $object->getFieldList('t'); // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } // Add fields from hooks @@ -296,7 +248,7 @@ foreach ($search as $key => $val) { } $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) { - if ($search[$key] == '-1' || $search[$key] === '0') { + if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($object->fields[$key]['arrayofkeyval']) || !array_key_exists('0', $object->fields[$key]['arrayofkeyval'])))) { $search[$key] = ''; } $mode_search = 2; @@ -641,7 +593,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/hrm/evaluation_note.php b/htdocs/hrm/evaluation_note.php index aae7b56acaf..1b6b5a35564 100644 --- a/htdocs/hrm/evaluation_note.php +++ b/htdocs/hrm/evaluation_note.php @@ -25,57 +25,8 @@ * \brief Tab for notes on Evaluation */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification - // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_evaluation.lib.php'; @@ -86,7 +37,7 @@ $langs->loadLangs(array("hrm", "companies")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index ec7ba9b74e3..0b887667561 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -175,7 +175,7 @@ if (!empty($conf->holiday->enabled)) { } -print '
    '; +print '
    '; @@ -189,7 +189,7 @@ if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) { if (empty($user->rights->holiday->readall)) { $sql .= ' AND x.fk_user IN ('.$db->sanitize(join(',', $childids)).')'; } - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); + //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid); $sql .= $db->order("x.tms", "DESC"); $sql .= $db->plimit($max, 0); @@ -264,13 +264,13 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo,"; $sql .= " x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u"; - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE u.rowid = x.fk_user_author"; $sql .= " AND x.entity = ".$conf->entity; if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) { $sql .= ' AND x.fk_user_author IN ('.$db->sanitize(join(',', $childids)).')'; } - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); + //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid); $sql .= $db->order("x.tms", "DESC"); $sql .= $db->plimit($max, 0); @@ -339,11 +339,11 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme $sql.= " rp.rowid as jobid, rp.ref as jobref, rp.label"; $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as rp ON rc.fk_recruitmentjobposition = rp.rowid"; - if ($conf->societe->enabled && !$user->rights->societe->client->voir && !$socid) { + if ($conf->societe->enabled && empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE rc.entity IN (".getEntity($staticrecruitmentcandidature->element).")"; - if ($conf->societe->enabled && !$user->rights->societe->client->voir && !$socid) { + if ($conf->societe->enabled && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND rp.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -404,7 +404,7 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme } } -print '
    '; +print ''; // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $parameters = array('user' => $user); diff --git a/htdocs/hrm/job_agenda.php b/htdocs/hrm/job_agenda.php index 77dd464a7f0..d7772763d8d 100644 --- a/htdocs/hrm/job_agenda.php +++ b/htdocs/hrm/job_agenda.php @@ -25,57 +25,9 @@ * \brief Tab of events on Job */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/hrm/job_card.php b/htdocs/hrm/job_card.php index 19b40048f7b..42ee4d6f4b1 100644 --- a/htdocs/hrm/job_card.php +++ b/htdocs/hrm/job_card.php @@ -25,61 +25,9 @@ * \brief Page to create/edit/view job */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"] . "/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; -$tmp2 = realpath(__FILE__); -$i = strlen($tmp) - 1; -$j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; - $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)) . "/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1)) . "/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; @@ -502,7 +450,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -515,7 +463,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element . '@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } // Presend form diff --git a/htdocs/hrm/job_contact.php b/htdocs/hrm/job_contact.php index cbc961d3f9e..67da8ecfd91 100644 --- a/htdocs/hrm/job_contact.php +++ b/htdocs/hrm/job_contact.php @@ -26,35 +26,7 @@ */ // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; diff --git a/htdocs/hrm/job_document.php b/htdocs/hrm/job_document.php index a32f02915e9..a055fbbc325 100644 --- a/htdocs/hrm/job_document.php +++ b/htdocs/hrm/job_document.php @@ -25,57 +25,8 @@ * \brief Tab for documents linked to Job */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification - // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/hrm/job_list.php b/htdocs/hrm/job_list.php index fdf2de51d45..55363d729b5 100644 --- a/htdocs/hrm/job_list.php +++ b/htdocs/hrm/job_list.php @@ -25,57 +25,9 @@ * \brief List page for job */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -268,7 +220,7 @@ $sql .= $object->getFieldList('t'); // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } // Add fields from hooks @@ -296,7 +248,7 @@ foreach ($search as $key => $val) { } $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) { - if ($search[$key] == '-1' || $search[$key] === '0') { + if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($object->fields[$key]['arrayofkeyval']) || !array_key_exists('0', $object->fields[$key]['arrayofkeyval'])))) { $search[$key] = ''; } $mode_search = 2; @@ -643,7 +595,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/hrm/job_note.php b/htdocs/hrm/job_note.php index 85a1cd1dc84..7205afec247 100644 --- a/htdocs/hrm/job_note.php +++ b/htdocs/hrm/job_note.php @@ -25,57 +25,9 @@ * \brief Tab for notes on Job */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; diff --git a/htdocs/hrm/position.php b/htdocs/hrm/position.php index 8eec7d0e660..208a397f135 100644 --- a/htdocs/hrm/position.php +++ b/htdocs/hrm/position.php @@ -812,7 +812,7 @@ function DisplayPositionList() if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.' . $key; } diff --git a/htdocs/hrm/position_agenda.php b/htdocs/hrm/position_agenda.php index 670ec51304b..b3b68d9bcbc 100644 --- a/htdocs/hrm/position_agenda.php +++ b/htdocs/hrm/position_agenda.php @@ -25,57 +25,9 @@ * \brief Tab of events on Position */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/hrm/position_card.php b/htdocs/hrm/position_card.php index 8cb8ba9de8c..4d6b36b52f3 100644 --- a/htdocs/hrm/position_card.php +++ b/htdocs/hrm/position_card.php @@ -25,61 +25,9 @@ * \brief Page to create/edit/view position */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"] . "/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; -$tmp2 = realpath(__FILE__); -$i = strlen($tmp) - 1; -$j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; - $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)) . "/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1)) . "/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; @@ -396,7 +344,7 @@ function DisplayPositionCard(&$object) // } // // -// print '
    '; +// print '
    '; // // $MAXEVENT = 10; // @@ -407,7 +355,7 @@ function DisplayPositionCard(&$object) // $formactions = new FormActions($db); // $somethingshown = $formactions->showactions($object, '', $object->id, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for thirdparty // -// print '
    '; +// print ''; //} @@ -425,7 +373,7 @@ if ($action !== 'edit' && $action !== 'create') { $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -437,7 +385,7 @@ if ($action !== 'edit' && $action !== 'create') { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element . '@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } diff --git a/htdocs/hrm/position_contact.php b/htdocs/hrm/position_contact.php index 56a4fc8ff8f..a7246e3a82b 100644 --- a/htdocs/hrm/position_contact.php +++ b/htdocs/hrm/position_contact.php @@ -26,35 +26,7 @@ */ // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; diff --git a/htdocs/hrm/position_document.php b/htdocs/hrm/position_document.php index 1ae41c193ab..7a820310ee2 100644 --- a/htdocs/hrm/position_document.php +++ b/htdocs/hrm/position_document.php @@ -25,57 +25,8 @@ * \brief Tab for documents linked to Position */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification - // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/hrm/position_list.php b/htdocs/hrm/position_list.php index 725948c4b3f..d6ed72c2612 100644 --- a/htdocs/hrm/position_list.php +++ b/htdocs/hrm/position_list.php @@ -25,57 +25,9 @@ * \brief List page for position */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -268,7 +220,7 @@ $sql .= $object->getFieldList('t'); // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } // Add fields from hooks @@ -642,7 +594,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/hrm/position_note.php b/htdocs/hrm/position_note.php index 81548761326..1eea4b82676 100644 --- a/htdocs/hrm/position_note.php +++ b/htdocs/hrm/position_note.php @@ -26,57 +26,9 @@ * \brief Tab for notes on Position */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; diff --git a/htdocs/hrm/skill_agenda.php b/htdocs/hrm/skill_agenda.php index 0b854ccb028..9c1821fb8d7 100644 --- a/htdocs/hrm/skill_agenda.php +++ b/htdocs/hrm/skill_agenda.php @@ -25,57 +25,9 @@ * \brief Tab of events on skill */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index c0d3d67ccab..ed66dc4ebb9 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -25,62 +25,9 @@ * \brief Page to create/edit/view skill */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"] . "/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; -$tmp2 = realpath(__FILE__); -$i = strlen($tmp) - 1; -$j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; - $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)) . "/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1)) . "/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} - +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; @@ -790,7 +737,7 @@ if ($action != "create" && $action != "edit") { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.' . $key; } @@ -889,7 +836,7 @@ if ($action != "create" && $action != "edit") { $linktoelem = $form->showLinkToObjectBlock($object, null, array('skill')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -901,7 +848,7 @@ if ($action != "create" && $action != "edit") { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element . '@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } // End of page diff --git a/htdocs/hrm/skill_contact.php b/htdocs/hrm/skill_contact.php index a535e00696b..f8ea2a04a9f 100644 --- a/htdocs/hrm/skill_contact.php +++ b/htdocs/hrm/skill_contact.php @@ -26,35 +26,7 @@ */ // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; diff --git a/htdocs/hrm/skill_document.php b/htdocs/hrm/skill_document.php index ca13044f712..77f3325de15 100644 --- a/htdocs/hrm/skill_document.php +++ b/htdocs/hrm/skill_document.php @@ -25,57 +25,9 @@ * \brief Tab for documents linked to skill */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/hrm/skill_list.php b/htdocs/hrm/skill_list.php index 5e8ae1e6e24..1fc5440e589 100644 --- a/htdocs/hrm/skill_list.php +++ b/htdocs/hrm/skill_list.php @@ -25,57 +25,9 @@ * \brief List page for skill */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -268,7 +220,7 @@ $sql .= $object->getFieldList('t'); // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } // Add fields from hooks @@ -296,7 +248,7 @@ foreach ($search as $key => $val) { } $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) { - if ($search[$key] == '-1' || $search[$key] === '0') { + if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($object->fields[$key]['arrayofkeyval']) || !array_key_exists('0', $object->fields[$key]['arrayofkeyval'])))) { $search[$key] = ''; } $mode_search = 2; @@ -643,7 +595,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/hrm/skill_note.php b/htdocs/hrm/skill_note.php index 000c5e1b41b..1510f746e5e 100644 --- a/htdocs/hrm/skill_note.php +++ b/htdocs/hrm/skill_note.php @@ -25,57 +25,9 @@ * \brief Tab for notes on skill */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; diff --git a/htdocs/hrm/skill_tab.php b/htdocs/hrm/skill_tab.php index 2aada2a771e..9a9ea39e31d 100644 --- a/htdocs/hrm/skill_tab.php +++ b/htdocs/hrm/skill_tab.php @@ -25,61 +25,10 @@ * \brief Page to add/delete/view skill to jobs/users */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"] . "/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; -$tmp2 = realpath(__FILE__); -$i = strlen($tmp) - 1; -$j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; - $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)) . "/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1)) . "/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; diff --git a/htdocs/imports/emptyexample.php b/htdocs/imports/emptyexample.php index b919a3c4c3e..6435f91241c 100644 --- a/htdocs/imports/emptyexample.php +++ b/htdocs/imports/emptyexample.php @@ -75,9 +75,6 @@ $filename = $langs->trans("ExampleOfImportFile").'_'.$datatoimport.'.'.$format; $objimport = new Import($db); $objimport->load_arrays($user, $datatoimport); // Load arrays from descriptor module -$entity = $objimport->array_import_entities[0][$code]; -$entityicon = $entitytoicon[$entity] ? $entitytoicon[$entity] : $entity; -$entitylang = $entitytolang[$entity] ? $entitytolang[$entity] : $entity; $fieldstarget = $objimport->array_import_fields[0]; $valuestarget = $objimport->array_import_examplevalues[0]; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 2ab7e3976aa..4227aed6afa 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -706,12 +706,12 @@ if ($step == 3 && $datatoimport) { print $out; print ''; - print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print ''; - // Search available imports $filearray = dol_dir_list($conf->import->dir_temp, 'files', 0, '', '', 'name', SORT_DESC); if (count($filearray) > 0) { + print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table + print '
    '; + $dir = $conf->import->dir_temp; // Search available files to import @@ -752,10 +752,10 @@ if ($step == 3 && $datatoimport) { print ''; print ''; } - } - print '
    '; - print '
    '; + print ''; + print ''; + } print ''; } @@ -1451,10 +1451,10 @@ if ($step == 5 && $datatoimport) { print $langs->trans("ImportFromToLine"); print ''; if ($action == 'launchsimu') { - print ''; + print ''; print ''; } else { - print ''; + print ''; print $form->textwithpicto("", $langs->trans("SetThisValueTo2ToExcludeFirstLine")); } print ' - '; diff --git a/htdocs/includes/symfony/var-dumper/Caster/AmqpCaster.php b/htdocs/includes/symfony/var-dumper/Caster/AmqpCaster.php index 4e9b351c181..4f1aa18a053 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/AmqpCaster.php +++ b/htdocs/includes/symfony/var-dumper/Caster/AmqpCaster.php @@ -20,145 +20,191 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class AmqpCaster { - private static $flags = array( - AMQP_DURABLE => 'AMQP_DURABLE', - AMQP_PASSIVE => 'AMQP_PASSIVE', - AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', - AMQP_AUTODELETE => 'AMQP_AUTODELETE', - AMQP_INTERNAL => 'AMQP_INTERNAL', - AMQP_NOLOCAL => 'AMQP_NOLOCAL', - AMQP_AUTOACK => 'AMQP_AUTOACK', - AMQP_IFEMPTY => 'AMQP_IFEMPTY', - AMQP_IFUNUSED => 'AMQP_IFUNUSED', - AMQP_MANDATORY => 'AMQP_MANDATORY', - AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', - AMQP_MULTIPLE => 'AMQP_MULTIPLE', - AMQP_NOWAIT => 'AMQP_NOWAIT', - AMQP_REQUEUE => 'AMQP_REQUEUE', - ); + private static $flags = array( + AMQP_DURABLE => 'AMQP_DURABLE', + AMQP_PASSIVE => 'AMQP_PASSIVE', + AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', + AMQP_AUTODELETE => 'AMQP_AUTODELETE', + AMQP_INTERNAL => 'AMQP_INTERNAL', + AMQP_NOLOCAL => 'AMQP_NOLOCAL', + AMQP_AUTOACK => 'AMQP_AUTOACK', + AMQP_IFEMPTY => 'AMQP_IFEMPTY', + AMQP_IFUNUSED => 'AMQP_IFUNUSED', + AMQP_MANDATORY => 'AMQP_MANDATORY', + AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', + AMQP_MULTIPLE => 'AMQP_MULTIPLE', + AMQP_NOWAIT => 'AMQP_NOWAIT', + AMQP_REQUEUE => 'AMQP_REQUEUE', + ); - private static $exchangeTypes = array( - AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', - AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', - AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', - AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', - ); + private static $exchangeTypes = array( + AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', + AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', + AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', + AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', + ); - public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; + public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; - // BC layer in the ampq lib - if (method_exists($c, 'getReadTimeout')) { - $timeout = $c->getReadTimeout(); - } else { - $timeout = $c->getTimeout(); - } + $a += array( + $prefix.'is_connected' => $c->isConnected(), + ); - $a += array( - $prefix.'isConnected' => $c->isConnected(), - $prefix.'login' => $c->getLogin(), - $prefix.'password' => $c->getPassword(), - $prefix.'host' => $c->getHost(), - $prefix.'port' => $c->getPort(), - $prefix.'vhost' => $c->getVhost(), - $prefix.'readTimeout' => $timeout, - ); + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPConnection\x00login"])) { + return $a; + } - return $a; - } + // BC layer in the amqp lib + if (method_exists($c, 'getReadTimeout')) { + $timeout = $c->getReadTimeout(); + } else { + $timeout = $c->getTimeout(); + } - public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; + $a += array( + $prefix.'is_connected' => $c->isConnected(), + $prefix.'login' => $c->getLogin(), + $prefix.'password' => $c->getPassword(), + $prefix.'host' => $c->getHost(), + $prefix.'vhost' => $c->getVhost(), + $prefix.'port' => $c->getPort(), + $prefix.'read_timeout' => $timeout, + ); - $a += array( - $prefix.'isConnected' => $c->isConnected(), - $prefix.'channelId' => $c->getChannelId(), - $prefix.'prefetchSize' => $c->getPrefetchSize(), - $prefix.'prefetchCount' => $c->getPrefetchCount(), - $prefix.'connection' => $c->getConnection(), - ); + return $a; + } - return $a; - } + public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; - public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; + $a += array( + $prefix.'is_connected' => $c->isConnected(), + $prefix.'channel_id' => $c->getChannelId(), + ); - $a += array( - $prefix.'name' => $c->getName(), - $prefix.'flags' => self::extractFlags($c->getFlags()), - $prefix.'arguments' => $c->getArguments(), - $prefix.'connection' => $c->getConnection(), - $prefix.'channel' => $c->getChannel(), - ); + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPChannel\x00connection"])) { + return $a; + } - return $a; - } + $a += array( + $prefix.'connection' => $c->getConnection(), + $prefix.'prefetch_size' => $c->getPrefetchSize(), + $prefix.'prefetch_count' => $c->getPrefetchCount(), + ); - public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; + return $a; + } - $a += array( - $prefix.'name' => $c->getName(), - $prefix.'flags' => self::extractFlags($c->getFlags()), - $prefix.'type' => isset(self::$exchangeTypes[$c->getType()]) ? new ConstStub(self::$exchangeTypes[$c->getType()], $c->getType()) : $c->getType(), - $prefix.'arguments' => $c->getArguments(), - $prefix.'channel' => $c->getChannel(), - $prefix.'connection' => $c->getConnection(), - ); + public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; - return $a; - } + $a += array( + $prefix.'flags' => self::extractFlags($c->getFlags()), + ); - public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPQueue\x00name"])) { + return $a; + } - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $a += array($prefix.'body' => $c->getBody()); - } + $a += array( + $prefix.'connection' => $c->getConnection(), + $prefix.'channel' => $c->getChannel(), + $prefix.'name' => $c->getName(), + $prefix.'arguments' => $c->getArguments(), + ); - $a += array( - $prefix.'routingKey' => $c->getRoutingKey(), - $prefix.'deliveryTag' => $c->getDeliveryTag(), - $prefix.'deliveryMode' => new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()), - $prefix.'exchangeName' => $c->getExchangeName(), - $prefix.'isRedelivery' => $c->isRedelivery(), - $prefix.'contentType' => $c->getContentType(), - $prefix.'contentEncoding' => $c->getContentEncoding(), - $prefix.'type' => $c->getType(), - $prefix.'timestamp' => $c->getTimestamp(), - $prefix.'priority' => $c->getPriority(), - $prefix.'expiration' => $c->getExpiration(), - $prefix.'userId' => $c->getUserId(), - $prefix.'appId' => $c->getAppId(), - $prefix.'messageId' => $c->getMessageId(), - $prefix.'replyTo' => $c->getReplyTo(), - $prefix.'correlationId' => $c->getCorrelationId(), - $prefix.'headers' => $c->getHeaders(), - ); + return $a; + } - return $a; - } + public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; - private static function extractFlags($flags) - { - $flagsArray = array(); + $a += array( + $prefix.'flags' => self::extractFlags($c->getFlags()), + ); - foreach (self::$flags as $value => $name) { - if ($flags & $value) { - $flagsArray[] = $name; - } - } + $type = isset(self::$exchangeTypes[$c->getType()]) ? new ConstStub(self::$exchangeTypes[$c->getType()], $c->getType()) : $c->getType(); - if (!$flagsArray) { - $flagsArray = array('AMQP_NOPARAM'); - } + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPExchange\x00name"])) { + $a["\x00AMQPExchange\x00type"] = $type; - return new ConstStub(implode('|', $flagsArray), $flags); - } + return $a; + } + + $a += array( + $prefix.'connection' => $c->getConnection(), + $prefix.'channel' => $c->getChannel(), + $prefix.'name' => $c->getName(), + $prefix.'type' => $type, + $prefix.'arguments' => $c->getArguments(), + ); + + return $a; + } + + public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $deliveryMode = new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()); + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPEnvelope\x00body"])) { + $a["\0AMQPEnvelope\0delivery_mode"] = $deliveryMode; + + return $a; + } + + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + $a += array($prefix.'body' => $c->getBody()); + } + + $a += array( + $prefix.'delivery_tag' => $c->getDeliveryTag(), + $prefix.'is_redelivery' => $c->isRedelivery(), + $prefix.'exchange_name' => $c->getExchangeName(), + $prefix.'routing_key' => $c->getRoutingKey(), + $prefix.'content_type' => $c->getContentType(), + $prefix.'content_encoding' => $c->getContentEncoding(), + $prefix.'headers' => $c->getHeaders(), + $prefix.'delivery_mode' => $deliveryMode, + $prefix.'priority' => $c->getPriority(), + $prefix.'correlation_id' => $c->getCorrelationId(), + $prefix.'reply_to' => $c->getReplyTo(), + $prefix.'expiration' => $c->getExpiration(), + $prefix.'message_id' => $c->getMessageId(), + $prefix.'timestamp' => $c->getTimeStamp(), + $prefix.'type' => $c->getType(), + $prefix.'user_id' => $c->getUserId(), + $prefix.'app_id' => $c->getAppId(), + ); + + return $a; + } + + private static function extractFlags($flags) + { + $flagsArray = array(); + + foreach (self::$flags as $value => $name) { + if ($flags & $value) { + $flagsArray[] = $name; + } + } + + if (!$flagsArray) { + $flagsArray = array('AMQP_NOPARAM'); + } + + return new ConstStub(implode('|', $flagsArray), $flags); + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/ArgsStub.php b/htdocs/includes/symfony/var-dumper/Caster/ArgsStub.php new file mode 100644 index 00000000000..0fa2e17fa5e --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/ArgsStub.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a list of function arguments. + * + * @author Nicolas Grekas + */ +class ArgsStub extends EnumStub +{ + private static $parameters = array(); + + public function __construct(array $args, $function, $class) + { + list($variadic, $params) = self::getParameters($function, $class); + + $values = array(); + foreach ($args as $k => $v) { + $values[$k] = !is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; + } + if (null === $params) { + parent::__construct($values, false); + + return; + } + if (count($values) < count($params)) { + $params = array_slice($params, 0, count($values)); + } elseif (count($values) > count($params)) { + $values[] = new EnumStub(array_splice($values, count($params)), false); + $params[] = $variadic; + } + if (array('...') === $params) { + $this->dumpKeys = false; + $this->value = $values[0]->value; + } else { + $this->value = array_combine($params, $values); + } + } + + private static function getParameters($function, $class) + { + if (isset(self::$parameters[$k = $class.'::'.$function])) { + return self::$parameters[$k]; + } + + try { + $r = null !== $class ? new \ReflectionMethod($class, $function) : new \ReflectionFunction($function); + } catch (\ReflectionException $e) { + return array(null, null); + } + + $variadic = '...'; + $params = array(); + foreach ($r->getParameters() as $v) { + $k = '$'.$v->name; + if ($v->isPassedByReference()) { + $k = '&'.$k; + } + if (method_exists($v, 'isVariadic') && $v->isVariadic()) { + $variadic .= $k; + } else { + $params[] = $k; + } + } + + return self::$parameters[$k] = array($variadic, $params); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/Caster.php b/htdocs/includes/symfony/var-dumper/Caster/Caster.php index 23e72e87701..701c83a599e 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/Caster.php +++ b/htdocs/includes/symfony/var-dumper/Caster/Caster.php @@ -11,6 +11,8 @@ namespace Symfony\Component\VarDumper\Caster; +use Symfony\Component\VarDumper\Cloner\Stub; + /** * Helper for filtering out properties in casters. * @@ -18,99 +20,123 @@ namespace Symfony\Component\VarDumper\Caster; */ class Caster { - const EXCLUDE_VERBOSE = 1; - const EXCLUDE_VIRTUAL = 2; - const EXCLUDE_DYNAMIC = 4; - const EXCLUDE_PUBLIC = 8; - const EXCLUDE_PROTECTED = 16; - const EXCLUDE_PRIVATE = 32; - const EXCLUDE_NULL = 64; - const EXCLUDE_EMPTY = 128; - const EXCLUDE_NOT_IMPORTANT = 256; - const EXCLUDE_STRICT = 512; + const EXCLUDE_VERBOSE = 1; + const EXCLUDE_VIRTUAL = 2; + const EXCLUDE_DYNAMIC = 4; + const EXCLUDE_PUBLIC = 8; + const EXCLUDE_PROTECTED = 16; + const EXCLUDE_PRIVATE = 32; + const EXCLUDE_NULL = 64; + const EXCLUDE_EMPTY = 128; + const EXCLUDE_NOT_IMPORTANT = 256; + const EXCLUDE_STRICT = 512; - const PREFIX_VIRTUAL = "\0~\0"; - const PREFIX_DYNAMIC = "\0+\0"; - const PREFIX_PROTECTED = "\0*\0"; + const PREFIX_VIRTUAL = "\0~\0"; + const PREFIX_DYNAMIC = "\0+\0"; + const PREFIX_PROTECTED = "\0*\0"; - /** - * Casts objects to arrays and adds the dynamic property prefix. - * - * @param object $obj The object to cast. - * @param \ReflectionClass $reflector The class reflector to use for inspecting the object definition. - * - * @return array The array-cast of the object, with prefixed dynamic properties. - */ - public static function castObject($obj, \ReflectionClass $reflector) - { - if ($reflector->hasMethod('__debugInfo')) { - $a = $obj->__debugInfo(); - } else { - $a = (array) $obj; - } + /** + * Casts objects to arrays and adds the dynamic property prefix. + * + * @param object $obj The object to cast + * @param \ReflectionClass $reflector The class reflector to use for inspecting the object definition + * + * @return array The array-cast of the object, with prefixed dynamic properties + */ + public static function castObject($obj, \ReflectionClass $reflector) + { + if ($reflector->hasMethod('__debugInfo')) { + $a = $obj->__debugInfo(); + } elseif ($obj instanceof \Closure) { + $a = array(); + } else { + $a = (array) $obj; + } + if ($obj instanceof \__PHP_Incomplete_Class) { + return $a; + } - if ($a) { - $p = array_keys($a); - foreach ($p as $i => $k) { - if (!isset($k[0]) || ("\0" !== $k[0] && !$reflector->hasProperty($k))) { - $p[$i] = self::PREFIX_DYNAMIC.$k; - } elseif (isset($k[16]) && "\0" === $k[16] && 0 === strpos($k, "\0class@anonymous\0")) { - $p[$i] = "\0".$reflector->getParentClass().'@anonymous'.strrchr($k, "\0"); - } - } - $a = array_combine($p, $a); - } + if ($a) { + $combine = false; + $p = array_keys($a); + foreach ($p as $i => $k) { + if (isset($k[0]) ? "\0" !== $k[0] && !$reflector->hasProperty($k) : \PHP_VERSION_ID >= 70200) { + $combine = true; + $p[$i] = self::PREFIX_DYNAMIC.$k; + } elseif (isset($k[16]) && "\0" === $k[16] && 0 === strpos($k, "\0class@anonymous\0")) { + $combine = true; + $p[$i] = "\0".$reflector->getParentClass().'@anonymous'.strrchr($k, "\0"); + } + } + if ($combine) { + $a = array_combine($p, $a); + } + } - return $a; - } + return $a; + } - /** - * Filters out the specified properties. - * - * By default, a single match in the $filter bit field filters properties out, following an "or" logic. - * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. - * - * @param array $a The array containing the properties to filter. - * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out. - * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set. - * - * @return array The filtered array - */ - public static function filter(array $a, $filter, array $listedProperties = array()) - { - foreach ($a as $k => $v) { - $type = self::EXCLUDE_STRICT & $filter; + /** + * Filters out the specified properties. + * + * By default, a single match in the $filter bit field filters properties out, following an "or" logic. + * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. + * + * @param array $a The array containing the properties to filter + * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out + * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set + * @param int &$count Set to the number of removed properties + * + * @return array The filtered array + */ + public static function filter(array $a, $filter, array $listedProperties = array(), &$count = 0) + { + $count = 0; - if (null === $v) { - $type |= self::EXCLUDE_NULL & $filter; - } - if (empty($v)) { - $type |= self::EXCLUDE_EMPTY & $filter; - } - if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_NOT_IMPORTANT; - } - if ((self::EXCLUDE_VERBOSE & $filter) && in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_VERBOSE; - } + foreach ($a as $k => $v) { + $type = self::EXCLUDE_STRICT & $filter; - if (!isset($k[1]) || "\0" !== $k[0]) { - $type |= self::EXCLUDE_PUBLIC & $filter; - } elseif ('~' === $k[1]) { - $type |= self::EXCLUDE_VIRTUAL & $filter; - } elseif ('+' === $k[1]) { - $type |= self::EXCLUDE_DYNAMIC & $filter; - } elseif ('*' === $k[1]) { - $type |= self::EXCLUDE_PROTECTED & $filter; - } else { - $type |= self::EXCLUDE_PRIVATE & $filter; - } + if (null === $v) { + $type |= self::EXCLUDE_NULL & $filter; + } + if (empty($v)) { + $type |= self::EXCLUDE_EMPTY & $filter; + } + if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !in_array($k, $listedProperties, true)) { + $type |= self::EXCLUDE_NOT_IMPORTANT; + } + if ((self::EXCLUDE_VERBOSE & $filter) && in_array($k, $listedProperties, true)) { + $type |= self::EXCLUDE_VERBOSE; + } - if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { - unset($a[$k]); - } - } + if (!isset($k[1]) || "\0" !== $k[0]) { + $type |= self::EXCLUDE_PUBLIC & $filter; + } elseif ('~' === $k[1]) { + $type |= self::EXCLUDE_VIRTUAL & $filter; + } elseif ('+' === $k[1]) { + $type |= self::EXCLUDE_DYNAMIC & $filter; + } elseif ('*' === $k[1]) { + $type |= self::EXCLUDE_PROTECTED & $filter; + } else { + $type |= self::EXCLUDE_PRIVATE & $filter; + } - return $a; - } + if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { + unset($a[$k]); + ++$count; + } + } + + return $a; + } + + public static function castPhpIncompleteClass(\__PHP_Incomplete_Class $c, array $a, Stub $stub, $isNested) + { + if (isset($a['__PHP_Incomplete_Class_Name'])) { + $stub->class .= '('.$a['__PHP_Incomplete_Class_Name'].')'; + unset($a['__PHP_Incomplete_Class_Name']); + } + + return $a; + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/ClassStub.php b/htdocs/includes/symfony/var-dumper/Caster/ClassStub.php new file mode 100644 index 00000000000..6acb22d665c --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/ClassStub.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a PHP class identifier. + * + * @author Nicolas Grekas + */ +class ClassStub extends ConstStub +{ + /** + * Constructor. + * + * @param string A PHP identifier, e.g. a class, method, interface, etc. name + * @param callable The callable targeted by the identifier when it is ambiguous or not a real PHP identifier + */ + public function __construct($identifier, $callable = null) + { + $this->value = $identifier; + + if (0 < $i = strrpos($identifier, '\\')) { + $this->attr['ellipsis'] = strlen($identifier) - $i; + } + + try { + if (null !== $callable) { + if ($callable instanceof \Closure) { + $r = new \ReflectionFunction($callable); + } elseif (is_object($callable)) { + $r = array($callable, '__invoke'); + } elseif (is_array($callable)) { + $r = $callable; + } elseif (false !== $i = strpos($callable, '::')) { + $r = array(substr($callable, 0, $i), substr($callable, 2 + $i)); + } else { + $r = new \ReflectionFunction($callable); + } + } elseif (false !== $i = strpos($identifier, '::')) { + $r = array(substr($identifier, 0, $i), substr($identifier, 2 + $i)); + } else { + $r = new \ReflectionClass($identifier); + } + + if (is_array($r)) { + try { + $r = new \ReflectionMethod($r[0], $r[1]); + } catch (\ReflectionException $e) { + $r = new \ReflectionClass($r[0]); + } + } + } catch (\ReflectionException $e) { + return; + } + + if ($f = $r->getFileName()) { + $this->attr['file'] = $f; + $this->attr['line'] = $r->getStartLine(); + } + } + + public static function wrapCallable($callable) + { + if (is_object($callable) || !is_callable($callable)) { + return $callable; + } + + if (!is_array($callable)) { + $callable = new static($callable); + } elseif (is_string($callable[0])) { + $callable[0] = new static($callable[0]); + } else { + $callable[1] = new static($callable[1], $callable); + } + + return $callable; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/ConstStub.php b/htdocs/includes/symfony/var-dumper/Caster/ConstStub.php index f20e03cdf0d..64766c3ba4f 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/ConstStub.php +++ b/htdocs/includes/symfony/var-dumper/Caster/ConstStub.php @@ -20,9 +20,14 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class ConstStub extends Stub { - public function __construct($name, $value) - { - $this->class = $name; - $this->value = $value; - } + public function __construct($name, $value) + { + $this->class = $name; + $this->value = $value; + } + + public function __toString() + { + return (string) $this->value; + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/CutStub.php b/htdocs/includes/symfony/var-dumper/Caster/CutStub.php index 8781f5cf3c6..c8f51970abe 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/CutStub.php +++ b/htdocs/includes/symfony/var-dumper/Caster/CutStub.php @@ -20,37 +20,40 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class CutStub extends Stub { - public function __construct($value) - { - $this->value = $value; + public function __construct($value) + { + $this->value = $value; - switch (gettype($value)) { - case 'object': - $this->type = self::TYPE_OBJECT; - $this->class = get_class($value); - $this->cut = -1; - break; + switch (gettype($value)) { + case 'object': + $this->type = self::TYPE_OBJECT; + $this->class = get_class($value); + $this->cut = -1; + break; - case 'array': - $this->type = self::TYPE_ARRAY; - $this->class = self::ARRAY_ASSOC; - $this->cut = $this->value = count($value); - break; + case 'array': + $this->type = self::TYPE_ARRAY; + $this->class = self::ARRAY_ASSOC; + $this->cut = $this->value = count($value); + break; - case 'resource': - case 'unknown type': - $this->type = self::TYPE_RESOURCE; - $this->handle = (int) $value; - $this->class = @get_resource_type($value); - $this->cut = -1; - break; + case 'resource': + case 'unknown type': + case 'resource (closed)': + $this->type = self::TYPE_RESOURCE; + $this->handle = (int) $value; + if ('Unknown' === $this->class = @get_resource_type($value)) { + $this->class = 'Closed'; + } + $this->cut = -1; + break; - case 'string': - $this->type = self::TYPE_STRING; - $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; - $this->cut = self::STRING_BINARY === $this->class ? strlen($value) : mb_strlen($value, 'UTF-8'); - $this->value = ''; - break; - } - } + case 'string': + $this->type = self::TYPE_STRING; + $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; + $this->cut = self::STRING_BINARY === $this->class ? strlen($value) : mb_strlen($value, 'UTF-8'); + $this->value = ''; + break; + } + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/DOMCaster.php b/htdocs/includes/symfony/var-dumper/Caster/DOMCaster.php index e04cf9534b3..c35c1965b8d 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/DOMCaster.php +++ b/htdocs/includes/symfony/var-dumper/Caster/DOMCaster.php @@ -20,283 +20,283 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class DOMCaster { - private static $errorCodes = array( - DOM_PHP_ERR => 'DOM_PHP_ERR', - DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', - DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', - DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', - DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', - DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', - DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', - DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', - DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', - DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', - DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', - DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', - DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', - DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', - DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', - DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', - DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', - ); + private static $errorCodes = array( + DOM_PHP_ERR => 'DOM_PHP_ERR', + DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', + DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', + DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', + DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', + DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', + DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', + DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', + DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', + DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', + DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', + DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', + DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', + DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', + DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', + DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', + DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', + ); - private static $nodeTypes = array( - XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', - XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', - XML_TEXT_NODE => 'XML_TEXT_NODE', - XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', - XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', - XML_ENTITY_NODE => 'XML_ENTITY_NODE', - XML_PI_NODE => 'XML_PI_NODE', - XML_COMMENT_NODE => 'XML_COMMENT_NODE', - XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', - XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', - XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', - XML_NOTATION_NODE => 'XML_NOTATION_NODE', - XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', - XML_DTD_NODE => 'XML_DTD_NODE', - XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', - XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', - XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', - XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', - ); + private static $nodeTypes = array( + XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', + XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', + XML_TEXT_NODE => 'XML_TEXT_NODE', + XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', + XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', + XML_ENTITY_NODE => 'XML_ENTITY_NODE', + XML_PI_NODE => 'XML_PI_NODE', + XML_COMMENT_NODE => 'XML_COMMENT_NODE', + XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', + XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', + XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', + XML_NOTATION_NODE => 'XML_NOTATION_NODE', + XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', + XML_DTD_NODE => 'XML_DTD_NODE', + XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', + XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', + XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', + XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', + ); - public static function castException(\DOMException $e, array $a, Stub $stub, $isNested) - { - $k = Caster::PREFIX_PROTECTED.'code'; - if (isset($a[$k], self::$errorCodes[$a[$k]])) { - $a[$k] = new ConstStub(self::$errorCodes[$a[$k]], $a[$k]); - } + public static function castException(\DOMException $e, array $a, Stub $stub, $isNested) + { + $k = Caster::PREFIX_PROTECTED.'code'; + if (isset($a[$k], self::$errorCodes[$a[$k]])) { + $a[$k] = new ConstStub(self::$errorCodes[$a[$k]], $a[$k]); + } - return $a; - } + return $a; + } - public static function castLength($dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'length' => $dom->length, - ); + public static function castLength($dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'length' => $dom->length, + ); - return $a; - } + return $a; + } - public static function castImplementation($dom, array $a, Stub $stub, $isNested) - { - $a += array( - Caster::PREFIX_VIRTUAL.'Core' => '1.0', - Caster::PREFIX_VIRTUAL.'XML' => '2.0', - ); + public static function castImplementation($dom, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'Core' => '1.0', + Caster::PREFIX_VIRTUAL.'XML' => '2.0', + ); - return $a; - } + return $a; + } - public static function castNode(\DOMNode $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), - 'parentNode' => new CutStub($dom->parentNode), - 'childNodes' => $dom->childNodes, - 'firstChild' => new CutStub($dom->firstChild), - 'lastChild' => new CutStub($dom->lastChild), - 'previousSibling' => new CutStub($dom->previousSibling), - 'nextSibling' => new CutStub($dom->nextSibling), - 'attributes' => $dom->attributes, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'namespaceURI' => $dom->namespaceURI, - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'baseURI' => $dom->baseURI, - 'textContent' => new CutStub($dom->textContent), - ); + public static function castNode(\DOMNode $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'nodeName' => $dom->nodeName, + 'nodeValue' => new CutStub($dom->nodeValue), + 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), + 'parentNode' => new CutStub($dom->parentNode), + 'childNodes' => $dom->childNodes, + 'firstChild' => new CutStub($dom->firstChild), + 'lastChild' => new CutStub($dom->lastChild), + 'previousSibling' => new CutStub($dom->previousSibling), + 'nextSibling' => new CutStub($dom->nextSibling), + 'attributes' => $dom->attributes, + 'ownerDocument' => new CutStub($dom->ownerDocument), + 'namespaceURI' => $dom->namespaceURI, + 'prefix' => $dom->prefix, + 'localName' => $dom->localName, + 'baseURI' => $dom->baseURI ? new LinkStub($dom->baseURI) : $dom->baseURI, + 'textContent' => new CutStub($dom->textContent), + ); - return $a; - } + return $a; + } - public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'namespaceURI' => $dom->namespaceURI, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'parentNode' => new CutStub($dom->parentNode), - ); + public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'nodeName' => $dom->nodeName, + 'nodeValue' => new CutStub($dom->nodeValue), + 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), + 'prefix' => $dom->prefix, + 'localName' => $dom->localName, + 'namespaceURI' => $dom->namespaceURI, + 'ownerDocument' => new CutStub($dom->ownerDocument), + 'parentNode' => new CutStub($dom->parentNode), + ); - return $a; - } + return $a; + } - public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, $isNested, $filter = 0) - { - $a += array( - 'doctype' => $dom->doctype, - 'implementation' => $dom->implementation, - 'documentElement' => new CutStub($dom->documentElement), - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'xmlEncoding' => $dom->xmlEncoding, - 'standalone' => $dom->standalone, - 'xmlStandalone' => $dom->xmlStandalone, - 'version' => $dom->version, - 'xmlVersion' => $dom->xmlVersion, - 'strictErrorChecking' => $dom->strictErrorChecking, - 'documentURI' => $dom->documentURI, - 'config' => $dom->config, - 'formatOutput' => $dom->formatOutput, - 'validateOnParse' => $dom->validateOnParse, - 'resolveExternals' => $dom->resolveExternals, - 'preserveWhiteSpace' => $dom->preserveWhiteSpace, - 'recover' => $dom->recover, - 'substituteEntities' => $dom->substituteEntities, - ); + public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, $isNested, $filter = 0) + { + $a += array( + 'doctype' => $dom->doctype, + 'implementation' => $dom->implementation, + 'documentElement' => new CutStub($dom->documentElement), + 'actualEncoding' => $dom->actualEncoding, + 'encoding' => $dom->encoding, + 'xmlEncoding' => $dom->xmlEncoding, + 'standalone' => $dom->standalone, + 'xmlStandalone' => $dom->xmlStandalone, + 'version' => $dom->version, + 'xmlVersion' => $dom->xmlVersion, + 'strictErrorChecking' => $dom->strictErrorChecking, + 'documentURI' => $dom->documentURI ? new LinkStub($dom->documentURI) : $dom->documentURI, + 'config' => $dom->config, + 'formatOutput' => $dom->formatOutput, + 'validateOnParse' => $dom->validateOnParse, + 'resolveExternals' => $dom->resolveExternals, + 'preserveWhiteSpace' => $dom->preserveWhiteSpace, + 'recover' => $dom->recover, + 'substituteEntities' => $dom->substituteEntities, + ); - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $formatOutput = $dom->formatOutput; - $dom->formatOutput = true; - $a += array(Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()); - $dom->formatOutput = $formatOutput; - } + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + $formatOutput = $dom->formatOutput; + $dom->formatOutput = true; + $a += array(Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()); + $dom->formatOutput = $formatOutput; + } - return $a; - } + return $a; + } - public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'data' => $dom->data, - 'length' => $dom->length, - ); + public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'data' => $dom->data, + 'length' => $dom->length, + ); - return $a; - } + return $a; + } - public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'name' => $dom->name, - 'specified' => $dom->specified, - 'value' => $dom->value, - 'ownerElement' => $dom->ownerElement, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ); + public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'name' => $dom->name, + 'specified' => $dom->specified, + 'value' => $dom->value, + 'ownerElement' => $dom->ownerElement, + 'schemaTypeInfo' => $dom->schemaTypeInfo, + ); - return $a; - } + return $a; + } - public static function castElement(\DOMElement $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'tagName' => $dom->tagName, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ); + public static function castElement(\DOMElement $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'tagName' => $dom->tagName, + 'schemaTypeInfo' => $dom->schemaTypeInfo, + ); - return $a; - } + return $a; + } - public static function castText(\DOMText $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'wholeText' => $dom->wholeText, - ); + public static function castText(\DOMText $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'wholeText' => $dom->wholeText, + ); - return $a; - } + return $a; + } - public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'typeName' => $dom->typeName, - 'typeNamespace' => $dom->typeNamespace, - ); + public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'typeName' => $dom->typeName, + 'typeNamespace' => $dom->typeNamespace, + ); - return $a; - } + return $a; + } - public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'severity' => $dom->severity, - 'message' => $dom->message, - 'type' => $dom->type, - 'relatedException' => $dom->relatedException, - 'related_data' => $dom->related_data, - 'location' => $dom->location, - ); + public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'severity' => $dom->severity, + 'message' => $dom->message, + 'type' => $dom->type, + 'relatedException' => $dom->relatedException, + 'related_data' => $dom->related_data, + 'location' => $dom->location, + ); - return $a; - } + return $a; + } - public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'lineNumber' => $dom->lineNumber, - 'columnNumber' => $dom->columnNumber, - 'offset' => $dom->offset, - 'relatedNode' => $dom->relatedNode, - 'uri' => $dom->uri, - ); + public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'lineNumber' => $dom->lineNumber, + 'columnNumber' => $dom->columnNumber, + 'offset' => $dom->offset, + 'relatedNode' => $dom->relatedNode, + 'uri' => $dom->uri ? new LinkStub($dom->uri, $dom->lineNumber) : $dom->uri, + ); - return $a; - } + return $a; + } - public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'name' => $dom->name, - 'entities' => $dom->entities, - 'notations' => $dom->notations, - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'internalSubset' => $dom->internalSubset, - ); + public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'name' => $dom->name, + 'entities' => $dom->entities, + 'notations' => $dom->notations, + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + 'internalSubset' => $dom->internalSubset, + ); - return $a; - } + return $a; + } - public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - ); + public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + ); - return $a; - } + return $a; + } - public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'notationName' => $dom->notationName, - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'version' => $dom->version, - ); + public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + 'notationName' => $dom->notationName, + 'actualEncoding' => $dom->actualEncoding, + 'encoding' => $dom->encoding, + 'version' => $dom->version, + ); - return $a; - } + return $a; + } - public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'target' => $dom->target, - 'data' => $dom->data, - ); + public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'target' => $dom->target, + 'data' => $dom->data, + ); - return $a; - } + return $a; + } - public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, $isNested) - { - $a += array( - 'document' => $dom->document, - ); + public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'document' => $dom->document, + ); - return $a; - } + return $a; + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/EnumStub.php b/htdocs/includes/symfony/var-dumper/Caster/EnumStub.php index 67bb2e16390..66d8bc219de 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/EnumStub.php +++ b/htdocs/includes/symfony/var-dumper/Caster/EnumStub.php @@ -20,8 +20,11 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class EnumStub extends Stub { - public function __construct(array $values) - { - $this->value = $values; - } + public $dumpKeys = true; + + public function __construct(array $values, $dumpKeys = true) + { + $this->value = $values; + $this->dumpKeys = $dumpKeys; + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/ExceptionCaster.php b/htdocs/includes/symfony/var-dumper/Caster/ExceptionCaster.php index a5a8773e859..daf7cebe83f 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/ExceptionCaster.php +++ b/htdocs/includes/symfony/var-dumper/Caster/ExceptionCaster.php @@ -21,218 +21,278 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class ExceptionCaster { - public static $srcContext = 1; - public static $traceArgs = true; - public static $errorTypes = array( - E_DEPRECATED => 'E_DEPRECATED', - E_USER_DEPRECATED => 'E_USER_DEPRECATED', - E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', - E_ERROR => 'E_ERROR', - E_WARNING => 'E_WARNING', - E_PARSE => 'E_PARSE', - E_NOTICE => 'E_NOTICE', - E_CORE_ERROR => 'E_CORE_ERROR', - E_CORE_WARNING => 'E_CORE_WARNING', - E_COMPILE_ERROR => 'E_COMPILE_ERROR', - E_COMPILE_WARNING => 'E_COMPILE_WARNING', - E_USER_ERROR => 'E_USER_ERROR', - E_USER_WARNING => 'E_USER_WARNING', - E_USER_NOTICE => 'E_USER_NOTICE', - E_STRICT => 'E_STRICT', - ); + public static $srcContext = 1; + public static $traceArgs = true; + public static $errorTypes = array( + E_DEPRECATED => 'E_DEPRECATED', + E_USER_DEPRECATED => 'E_USER_DEPRECATED', + E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', + E_ERROR => 'E_ERROR', + E_WARNING => 'E_WARNING', + E_PARSE => 'E_PARSE', + E_NOTICE => 'E_NOTICE', + E_CORE_ERROR => 'E_CORE_ERROR', + E_CORE_WARNING => 'E_CORE_WARNING', + E_COMPILE_ERROR => 'E_COMPILE_ERROR', + E_COMPILE_WARNING => 'E_COMPILE_WARNING', + E_USER_ERROR => 'E_USER_ERROR', + E_USER_WARNING => 'E_USER_WARNING', + E_USER_NOTICE => 'E_USER_NOTICE', + E_STRICT => 'E_STRICT', + ); - public static function castError(\Error $e, array $a, Stub $stub, $isNested, $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); - } + private static $framesCache = array(); - public static function castException(\Exception $e, array $a, Stub $stub, $isNested, $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); - } + public static function castError(\Error $e, array $a, Stub $stub, $isNested, $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); + } - public static function castErrorException(\ErrorException $e, array $a, Stub $stub, $isNested) - { - if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) { - $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); - } + public static function castException(\Exception $e, array $a, Stub $stub, $isNested, $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); + } - return $a; - } + public static function castErrorException(\ErrorException $e, array $a, Stub $stub, $isNested) + { + if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) { + $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); + } - public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_PROTECTED; - $xPrefix = "\0Exception\0"; + return $a; + } - if (isset($a[$xPrefix.'previous'], $a[$xPrefix.'trace'])) { - $b = (array) $a[$xPrefix.'previous']; - array_unshift($b[$xPrefix.'trace'], array( - 'function' => 'new '.get_class($a[$xPrefix.'previous']), - 'file' => $b[$prefix.'file'], - 'line' => $b[$prefix.'line'], - )); - $a[$xPrefix.'trace'] = new TraceStub($b[$xPrefix.'trace'], false, 0, -1 - count($a[$xPrefix.'trace']->value)); - } + public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_PROTECTED; + $xPrefix = "\0Exception\0"; - unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); + if (isset($a[$xPrefix.'previous'], $a[$xPrefix.'trace']) && $a[$xPrefix.'previous'] instanceof \Exception) { + $b = (array) $a[$xPrefix.'previous']; + self::traceUnshift($b[$xPrefix.'trace'], get_class($a[$xPrefix.'previous']), $b[$prefix.'file'], $b[$prefix.'line']); + $a[$xPrefix.'trace'] = new TraceStub($b[$xPrefix.'trace'], false, 0, -1 - count($a[$xPrefix.'trace']->value)); + } - return $a; - } + unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); - public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, $isNested) - { - if (!$isNested) { - return $a; - } - $stub->class = ''; - $stub->handle = 0; - $frames = $trace->value; + return $a; + } - $a = array(); - $j = count($frames); - if (0 > $i = $trace->sliceOffset) { - $i = max(0, $j + $i); - } - if (!isset($trace->value[$i])) { - return array(); - } - $lastCall = isset($frames[$i]['function']) ? ' ==> '.(isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; + public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, $isNested) + { + if (!$isNested) { + return $a; + } + $stub->class = ''; + $stub->handle = 0; + $frames = $trace->value; + $prefix = Caster::PREFIX_VIRTUAL; - for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { - $call = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[$i]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : '???'; + $a = array(); + $j = count($frames); + if (0 > $i = $trace->sliceOffset) { + $i = max(0, $j + $i); + } + if (!isset($trace->value[$i])) { + return array(); + } + $lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; + $frames[] = array('function' => ''); - $a[Caster::PREFIX_VIRTUAL.$j.'. '.$call.$lastCall] = new FrameStub( - array( - 'object' => isset($frames[$i]['object']) ? $frames[$i]['object'] : null, - 'class' => isset($frames[$i]['class']) ? $frames[$i]['class'] : null, - 'type' => isset($frames[$i]['type']) ? $frames[$i]['type'] : null, - 'function' => isset($frames[$i]['function']) ? $frames[$i]['function'] : null, - ) + $frames[$i - 1], - $trace->keepArgs, - true - ); + for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { + $f = $frames[$i]; + $call = isset($f['function']) ? (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'].'()' : '???'; - $lastCall = ' ==> '.$call; - } - $a[Caster::PREFIX_VIRTUAL.$j.'. {main}'.$lastCall] = new FrameStub( - array( - 'object' => null, - 'class' => null, - 'type' => null, - 'function' => '{main}', - ) + $frames[$i - 1], - $trace->keepArgs, - true - ); - if (null !== $trace->sliceLength) { - $a = array_slice($a, 0, $trace->sliceLength, true); - } + $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall; + $frame = new FrameStub( + array( + 'object' => isset($f['object']) ? $f['object'] : null, + 'class' => isset($f['class']) ? $f['class'] : null, + 'type' => isset($f['type']) ? $f['type'] : null, + 'function' => isset($f['function']) ? $f['function'] : null, + ) + $frames[$i - 1], + false, + true + ); + $f = self::castFrameStub($frame, array(), $frame, true); + if (isset($f[$prefix.'src'])) { + foreach ($f[$prefix.'src']->value as $label => $frame) { + $label = substr_replace($label, "title=Stack level $j.&", 2, 0); + } + $f = $frames[$i - 1]; + if ($trace->keepArgs && !empty($f['args']) && $frame instanceof EnumStub) { + $frame->value['arguments'] = new ArgsStub($f['args'], isset($f['function']) ? $f['function'] : null, isset($f['class']) ? $f['class'] : null); + } + } + $a[$label] = $frame; - return $a; - } + $lastCall = $call; + } + if (null !== $trace->sliceLength) { + $a = array_slice($a, 0, $trace->sliceLength, true); + } - public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, $isNested) - { - if (!$isNested) { - return $a; - } - $f = $frame->value; - $prefix = Caster::PREFIX_VIRTUAL; + return $a; + } - if (isset($f['file'], $f['line'])) { - if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { - $f['file'] = substr($f['file'], 0, -strlen($match[0])); - $f['line'] = (int) $match[1]; - } - if (file_exists($f['file']) && 0 <= self::$srcContext) { - $src[$f['file'].':'.$f['line']] = self::extractSource(explode("\n", file_get_contents($f['file'])), $f['line'], self::$srcContext); + public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, $isNested) + { + if (!$isNested) { + return $a; + } + $f = $frame->value; + $prefix = Caster::PREFIX_VIRTUAL; - if (!empty($f['class']) && is_subclass_of($f['class'], 'Twig_Template') && method_exists($f['class'], 'getDebugInfo')) { - $template = isset($f['object']) ? $f['object'] : new $f['class'](new \Twig_Environment(new \Twig_Loader_Filesystem())); + if (isset($f['file'], $f['line'])) { + $cacheKey = $f; + unset($cacheKey['object'], $cacheKey['args']); + $cacheKey[] = self::$srcContext; + $cacheKey = implode('-', $cacheKey); - try { - $templateName = $template->getTemplateName(); - $templateSrc = explode("\n", method_exists($template, 'getSource') ? $template->getSource() : $template->getEnvironment()->getLoader()->getSource($templateName)); - $templateInfo = $template->getDebugInfo(); - if (isset($templateInfo[$f['line']])) { - $src[$templateName.':'.$templateInfo[$f['line']]] = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext); - } - } catch (\Twig_Error_Loader $e) { - } - } - } else { - $src[$f['file']] = $f['line']; - } - $a[$prefix.'src'] = new EnumStub($src); - } + if (isset(self::$framesCache[$cacheKey])) { + $a[$prefix.'src'] = self::$framesCache[$cacheKey]; + } else { + if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { + $f['file'] = substr($f['file'], 0, -strlen($match[0])); + $f['line'] = (int) $match[1]; + } + $caller = isset($f['function']) ? sprintf('in %s() on line %d', (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'], $f['line']) : null; + $src = $f['line']; + $srcKey = $f['file']; + $ellipsis = explode(DIRECTORY_SEPARATOR, $srcKey); + $ellipsis = 3 < count($ellipsis) ? 2 + strlen(implode(array_slice($ellipsis, -2))) : 0; - unset($a[$prefix.'args'], $a[$prefix.'line'], $a[$prefix.'file']); - if ($frame->inTraceStub) { - unset($a[$prefix.'class'], $a[$prefix.'type'], $a[$prefix.'function']); - } - foreach ($a as $k => $v) { - if (!$v) { - unset($a[$k]); - } - } - if ($frame->keepArgs && isset($f['args'])) { - $a[$prefix.'args'] = $f['args']; - } + if (file_exists($f['file']) && 0 <= self::$srcContext) { + if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) { + $template = isset($f['object']) ? $f['object'] : unserialize(sprintf('O:%d:"%s":0:{}', strlen($f['class']), $f['class'])); - return $a; - } + $ellipsis = 0; + $templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : ''); + $templateInfo = $template->getDebugInfo(); + if (isset($templateInfo[$f['line']])) { + if (!method_exists($template, 'getSourceContext') || !file_exists($templatePath = $template->getSourceContext()->getPath())) { + $templatePath = null; + } + if ($templateSrc) { + $src = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext, $caller, 'twig', $templatePath); + $srcKey = ($templatePath ?: $template->getTemplateName()).':'.$templateInfo[$f['line']]; + } + } + } + if ($srcKey == $f['file']) { + $src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, $caller, 'php', $f['file']); + $srcKey .= ':'.$f['line']; + if ($ellipsis) { + $ellipsis += 1 + strlen($f['line']); + } + } + } + $srcAttr = $ellipsis ? 'ellipsis='.$ellipsis : ''; + self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(array("\0~$srcAttr\0$srcKey" => $src)); + } + } - private static function filterExceptionArray($xClass, array $a, $xPrefix, $filter) - { - if (isset($a[$xPrefix.'trace'])) { - $trace = $a[$xPrefix.'trace']; - unset($a[$xPrefix.'trace']); // Ensures the trace is always last - } else { - $trace = array(); - } + unset($a[$prefix.'args'], $a[$prefix.'line'], $a[$prefix.'file']); + if ($frame->inTraceStub) { + unset($a[$prefix.'class'], $a[$prefix.'type'], $a[$prefix.'function']); + } + foreach ($a as $k => $v) { + if (!$v) { + unset($a[$k]); + } + } + if ($frame->keepArgs && !empty($f['args'])) { + $a[$prefix.'arguments'] = new ArgsStub($f['args'], $f['function'], $f['class']); + } - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - array_unshift($trace, array( - 'function' => $xClass ? 'new '.$xClass : null, - 'file' => $a[Caster::PREFIX_PROTECTED.'file'], - 'line' => $a[Caster::PREFIX_PROTECTED.'line'], - )); - $a[$xPrefix.'trace'] = new TraceStub($trace); - } - if (empty($a[$xPrefix.'previous'])) { - unset($a[$xPrefix.'previous']); - } - unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); + return $a; + } - return $a; - } + private static function filterExceptionArray($xClass, array $a, $xPrefix, $filter) + { + if (isset($a[$xPrefix.'trace'])) { + $trace = $a[$xPrefix.'trace']; + unset($a[$xPrefix.'trace']); // Ensures the trace is always last + } else { + $trace = array(); + } - private static function extractSource(array $srcArray, $line, $srcContext) - { - $src = array(); + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { + self::traceUnshift($trace, $xClass, $a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); + } + $a[$xPrefix.'trace'] = new TraceStub($trace, self::$traceArgs); + } + if (empty($a[$xPrefix.'previous'])) { + unset($a[$xPrefix.'previous']); + } + unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); - for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { - $src[] = (isset($srcArray[$i]) ? $srcArray[$i] : '')."\n"; - } + if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { + $a[Caster::PREFIX_PROTECTED.'file'] = new LinkStub($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); + } - $ltrim = 0; - while (' ' === $src[0][$ltrim] || "\t" === $src[0][$ltrim]) { - $i = $srcContext << 1; - while ($i > 0 && $src[0][$ltrim] === $src[$i][$ltrim]) { - --$i; - } - if ($i) { - break; - } - ++$ltrim; - } - if ($ltrim) { - foreach ($src as $i => $line) { - $src[$i] = substr($line, $ltrim); - } - } + return $a; + } - return implode('', $src); - } + private static function traceUnshift(&$trace, $class, $file, $line) + { + if (isset($trace[0]['file'], $trace[0]['line']) && $trace[0]['file'] === $file && $trace[0]['line'] === $line) { + return; + } + array_unshift($trace, array( + 'function' => $class ? 'new '.$class : null, + 'file' => $file, + 'line' => $line, + )); + } + + private static function extractSource($srcLines, $line, $srcContext, $title, $lang, $file = null) + { + $srcLines = explode("\n", $srcLines); + $src = array(); + + for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { + $src[] = (isset($srcLines[$i]) ? $srcLines[$i] : '')."\n"; + } + + $srcLines = array(); + $ltrim = 0; + do { + $pad = null; + for ($i = $srcContext << 1; $i >= 0; --$i) { + if (isset($src[$i][$ltrim]) && "\r" !== ($c = $src[$i][$ltrim]) && "\n" !== $c) { + if (null === $pad) { + $pad = $c; + } + if ((' ' !== $c && "\t" !== $c) || $pad !== $c) { + break; + } + } + } + ++$ltrim; + } while (0 > $i && null !== $pad); + + --$ltrim; + + foreach ($src as $i => $c) { + if ($ltrim) { + $c = isset($c[$ltrim]) && "\r" !== $c[$ltrim] ? substr($c, $ltrim) : ltrim($c, " \t"); + } + $c = substr($c, 0, -1); + if ($i !== $srcContext) { + $c = new ConstStub('default', $c); + } else { + $c = new ConstStub($c, $title); + if (null !== $file) { + $c->attr['file'] = $file; + $c->attr['line'] = $line; + } + } + $c->attr['lang'] = $lang; + $srcLines[sprintf("\0~%d\0", $i + $line - $srcContext)] = $c; + } + + return new EnumStub($srcLines); + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/LinkStub.php b/htdocs/includes/symfony/var-dumper/Caster/LinkStub.php new file mode 100644 index 00000000000..d275379c2a9 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/LinkStub.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a file or a URL. + * + * @author Nicolas Grekas + */ +class LinkStub extends ConstStub +{ + public function __construct($label, $line = 0, $href = null) + { + $this->value = $label; + + if (null === $href) { + $href = $label; + } + if (is_string($href)) { + if (0 === strpos($href, 'file://')) { + if ($href === $label) { + $label = substr($label, 7); + } + $href = substr($href, 7); + } elseif (false !== strpos($href, '://')) { + $this->attr['href'] = $href; + + return; + } + if (file_exists($href)) { + if ($line) { + $this->attr['line'] = $line; + } + $this->attr['file'] = realpath($href) ?: $href; + + if ($this->attr['file'] === $label && 3 < count($ellipsis = explode(DIRECTORY_SEPARATOR, $href))) { + $this->attr['ellipsis'] = 2 + strlen(implode(array_slice($ellipsis, -2))); + } + } + } + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/PdoCaster.php b/htdocs/includes/symfony/var-dumper/Caster/PdoCaster.php index e60b9275fd8..782101a90a7 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/PdoCaster.php +++ b/htdocs/includes/symfony/var-dumper/Caster/PdoCaster.php @@ -20,95 +20,101 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class PdoCaster { - private static $pdoAttributes = array( - 'CASE' => array( - \PDO::CASE_LOWER => 'LOWER', - \PDO::CASE_NATURAL => 'NATURAL', - \PDO::CASE_UPPER => 'UPPER', - ), - 'ERRMODE' => array( - \PDO::ERRMODE_SILENT => 'SILENT', - \PDO::ERRMODE_WARNING => 'WARNING', - \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', - ), - 'TIMEOUT', - 'PREFETCH', - 'AUTOCOMMIT', - 'PERSISTENT', - 'DRIVER_NAME', - 'SERVER_INFO', - 'ORACLE_NULLS' => array( - \PDO::NULL_NATURAL => 'NATURAL', - \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', - \PDO::NULL_TO_STRING => 'TO_STRING', - ), - 'CLIENT_VERSION', - 'SERVER_VERSION', - 'STATEMENT_CLASS', - 'EMULATE_PREPARES', - 'CONNECTION_STATUS', - 'STRINGIFY_FETCHES', - 'DEFAULT_FETCH_MODE' => array( - \PDO::FETCH_ASSOC => 'ASSOC', - \PDO::FETCH_BOTH => 'BOTH', - \PDO::FETCH_LAZY => 'LAZY', - \PDO::FETCH_NUM => 'NUM', - \PDO::FETCH_OBJ => 'OBJ', - ), - ); + private static $pdoAttributes = array( + 'CASE' => array( + \PDO::CASE_LOWER => 'LOWER', + \PDO::CASE_NATURAL => 'NATURAL', + \PDO::CASE_UPPER => 'UPPER', + ), + 'ERRMODE' => array( + \PDO::ERRMODE_SILENT => 'SILENT', + \PDO::ERRMODE_WARNING => 'WARNING', + \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', + ), + 'TIMEOUT', + 'PREFETCH', + 'AUTOCOMMIT', + 'PERSISTENT', + 'DRIVER_NAME', + 'SERVER_INFO', + 'ORACLE_NULLS' => array( + \PDO::NULL_NATURAL => 'NATURAL', + \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', + \PDO::NULL_TO_STRING => 'TO_STRING', + ), + 'CLIENT_VERSION', + 'SERVER_VERSION', + 'STATEMENT_CLASS', + 'EMULATE_PREPARES', + 'CONNECTION_STATUS', + 'STRINGIFY_FETCHES', + 'DEFAULT_FETCH_MODE' => array( + \PDO::FETCH_ASSOC => 'ASSOC', + \PDO::FETCH_BOTH => 'BOTH', + \PDO::FETCH_LAZY => 'LAZY', + \PDO::FETCH_NUM => 'NUM', + \PDO::FETCH_OBJ => 'OBJ', + ), + ); - public static function castPdo(\PDO $c, array $a, Stub $stub, $isNested) - { - $attr = array(); - $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); - $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + public static function castPdo(\PDO $c, array $a, Stub $stub, $isNested) + { + $attr = array(); + $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); + $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - foreach (self::$pdoAttributes as $k => $v) { - if (!isset($k[0])) { - $k = $v; - $v = array(); - } + foreach (self::$pdoAttributes as $k => $v) { + if (!isset($k[0])) { + $k = $v; + $v = array(); + } - try { - $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(constant('PDO::ATTR_'.$k)); - if ($v && isset($v[$attr[$k]])) { - $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); - } - } catch (\Exception $e) { - } - } + try { + $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(constant('PDO::ATTR_'.$k)); + if ($v && isset($v[$attr[$k]])) { + $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); + } + } catch (\Exception $e) { + } + } + if (isset($attr[$k = 'STATEMENT_CLASS'][1])) { + if ($attr[$k][1]) { + $attr[$k][1] = new ArgsStub($attr[$k][1], '__construct', $attr[$k][0]); + } + $attr[$k][0] = new ClassStub($attr[$k][0]); + } - $prefix = Caster::PREFIX_VIRTUAL; - $a += array( - $prefix.'inTransaction' => method_exists($c, 'inTransaction'), - $prefix.'errorInfo' => $c->errorInfo(), - $prefix.'attributes' => new EnumStub($attr), - ); + $prefix = Caster::PREFIX_VIRTUAL; + $a += array( + $prefix.'inTransaction' => method_exists($c, 'inTransaction'), + $prefix.'errorInfo' => $c->errorInfo(), + $prefix.'attributes' => new EnumStub($attr), + ); - if ($a[$prefix.'inTransaction']) { - $a[$prefix.'inTransaction'] = $c->inTransaction(); - } else { - unset($a[$prefix.'inTransaction']); - } + if ($a[$prefix.'inTransaction']) { + $a[$prefix.'inTransaction'] = $c->inTransaction(); + } else { + unset($a[$prefix.'inTransaction']); + } - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } + if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { + unset($a[$prefix.'errorInfo']); + } - $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); + $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); - return $a; - } + return $a; + } - public static function castPdoStatement(\PDOStatement $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $a[$prefix.'errorInfo'] = $c->errorInfo(); + public static function castPdoStatement(\PDOStatement $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $a[$prefix.'errorInfo'] = $c->errorInfo(); - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } + if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { + unset($a[$prefix.'errorInfo']); + } - return $a; - } + return $a; + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/RedisCaster.php b/htdocs/includes/symfony/var-dumper/Caster/RedisCaster.php new file mode 100644 index 00000000000..b0e567fcf96 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/RedisCaster.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Redis class from ext-redis to array representation. + * + * @author Nicolas Grekas + */ +class RedisCaster +{ + private static $serializer = array( + \Redis::SERIALIZER_NONE => 'NONE', + \Redis::SERIALIZER_PHP => 'PHP', + 2 => 'IGBINARY', // Optional Redis::SERIALIZER_IGBINARY + ); + + public static function castRedis(\Redis $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if (defined('HHVM_VERSION_ID')) { + if (isset($a[Caster::PREFIX_PROTECTED.'serializer'])) { + $ser = $a[Caster::PREFIX_PROTECTED.'serializer']; + $a[Caster::PREFIX_PROTECTED.'serializer'] = isset(self::$serializer[$ser]) ? new ConstStub(self::$serializer[$ser], $ser) : $ser; + } + + return $a; + } + + if (!$connected = $c->isConnected()) { + return $a + array( + $prefix.'isConnected' => $connected, + ); + } + + $ser = $c->getOption(\Redis::OPT_SERIALIZER); + $retry = defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0; + + return $a + array( + $prefix.'isConnected' => $connected, + $prefix.'host' => $c->getHost(), + $prefix.'port' => $c->getPort(), + $prefix.'auth' => $c->getAuth(), + $prefix.'dbNum' => $c->getDbNum(), + $prefix.'timeout' => $c->getTimeout(), + $prefix.'persistentId' => $c->getPersistentID(), + $prefix.'options' => new EnumStub(array( + 'READ_TIMEOUT' => $c->getOption(\Redis::OPT_READ_TIMEOUT), + 'SERIALIZER' => isset(self::$serializer[$ser]) ? new ConstStub(self::$serializer[$ser], $ser) : $ser, + 'PREFIX' => $c->getOption(\Redis::OPT_PREFIX), + 'SCAN' => new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry), + )), + ); + } + + public static function castRedisArray(\RedisArray $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + return $a + array( + $prefix.'hosts' => $c->_hosts(), + $prefix.'function' => ClassStub::wrapCallable($c->_function()), + ); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/ReflectionCaster.php b/htdocs/includes/symfony/var-dumper/Caster/ReflectionCaster.php index 936e11982ee..6a53bd2b61b 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/ReflectionCaster.php +++ b/htdocs/includes/symfony/var-dumper/Caster/ReflectionCaster.php @@ -20,291 +20,313 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class ReflectionCaster { - private static $extraMap = array( - 'docComment' => 'getDocComment', - 'extension' => 'getExtensionName', - 'isDisabled' => 'isDisabled', - 'isDeprecated' => 'isDeprecated', - 'isInternal' => 'isInternal', - 'isUserDefined' => 'isUserDefined', - 'isGenerator' => 'isGenerator', - 'isVariadic' => 'isVariadic', - ); + private static $extraMap = array( + 'docComment' => 'getDocComment', + 'extension' => 'getExtensionName', + 'isDisabled' => 'isDisabled', + 'isDeprecated' => 'isDeprecated', + 'isInternal' => 'isInternal', + 'isUserDefined' => 'isUserDefined', + 'isGenerator' => 'isGenerator', + 'isVariadic' => 'isVariadic', + ); - public static function castClosure(\Closure $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $c = new \ReflectionFunction($c); + public static function castClosure(\Closure $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $c = new \ReflectionFunction($c); - $stub->class = 'Closure'; // HHVM generates unique class names for closures - $a = static::castFunctionAbstract($c, $a, $stub, $isNested); + $stub->class = 'Closure'; // HHVM generates unique class names for closures + $a = static::castFunctionAbstract($c, $a, $stub, $isNested); - if (isset($a[$prefix.'parameters'])) { - foreach ($a[$prefix.'parameters']->value as &$v) { - $param = $v; - $v = new EnumStub(array()); - foreach (static::castParameter($param, array(), $stub, true) as $k => $param) { - if ("\0" === $k[0]) { - $v->value[substr($k, 3)] = $param; - } - } - unset($v->value['position'], $v->value['isVariadic'], $v->value['byReference'], $v); - } - } + if (isset($a[$prefix.'parameters'])) { + foreach ($a[$prefix.'parameters']->value as &$v) { + $param = $v; + $v = new EnumStub(array()); + foreach (static::castParameter($param, array(), $stub, true) as $k => $param) { + if ("\0" === $k[0]) { + $v->value[substr($k, 3)] = $param; + } + } + unset($v->value['position'], $v->value['isVariadic'], $v->value['byReference'], $v); + } + } - if ($f = $c->getFileName()) { - $a[$prefix.'file'] = $f; - $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); - } + if ($f = $c->getFileName()) { + $a[$prefix.'file'] = new LinkStub($f, $c->getStartLine()); + $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); + } - $prefix = Caster::PREFIX_DYNAMIC; - unset($a['name'], $a[$prefix.'0'], $a[$prefix.'this'], $a[$prefix.'parameter'], $a[Caster::PREFIX_VIRTUAL.'extra']); + $prefix = Caster::PREFIX_DYNAMIC; + unset($a['name'], $a[$prefix.'this'], $a[$prefix.'parameter'], $a[Caster::PREFIX_VIRTUAL.'extra']); - return $a; - } + return $a; + } - public static function castGenerator(\Generator $c, array $a, Stub $stub, $isNested) - { - return class_exists('ReflectionGenerator', false) ? self::castReflectionGenerator(new \ReflectionGenerator($c), $a, $stub, $isNested) : $a; - } + public static function castGenerator(\Generator $c, array $a, Stub $stub, $isNested) + { + if (!class_exists('ReflectionGenerator', false)) { + return $a; + } - public static function castType(\ReflectionType $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; + // Cannot create ReflectionGenerator based on a terminated Generator + try { + $reflectionGenerator = new \ReflectionGenerator($c); + } catch (\Exception $e) { + $a[Caster::PREFIX_VIRTUAL.'closed'] = true; - $a += array( - $prefix.'type' => $c->__toString(), - $prefix.'allowsNull' => $c->allowsNull(), - $prefix.'isBuiltin' => $c->isBuiltin(), - ); + return $a; + } - return $a; - } + return self::castReflectionGenerator($reflectionGenerator, $a, $stub, $isNested); + } - public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; + public static function castType(\ReflectionType $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; - if ($c->getThis()) { - $a[$prefix.'this'] = new CutStub($c->getThis()); - } - $x = $c->getFunction(); - $frame = array( - 'class' => isset($x->class) ? $x->class : null, - 'type' => isset($x->class) ? ($x->isStatic() ? '::' : '->') : null, - 'function' => $x->name, - 'file' => $c->getExecutingFile(), - 'line' => $c->getExecutingLine(), - ); - if ($trace = $c->getTrace(DEBUG_BACKTRACE_IGNORE_ARGS)) { - $x = new \ReflectionGenerator($c->getExecutingGenerator()); - array_unshift($trace, array( - 'function' => 'yield', - 'file' => $x->getExecutingFile(), - 'line' => $x->getExecutingLine() - 1, - )); - $trace[] = $frame; - $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); - } else { - $x = new FrameStub($frame, false, true); - $x = ExceptionCaster::castFrameStub($x, array(), $x, true); - $a[$prefix.'executing'] = new EnumStub(array( - $frame['class'].$frame['type'].$frame['function'].'()' => $x[$prefix.'src'], - )); - } + $a += array( + $prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : $c->__toString(), + $prefix.'allowsNull' => $c->allowsNull(), + $prefix.'isBuiltin' => $c->isBuiltin(), + ); - return $a; - } + return $a; + } - public static function castClass(\ReflectionClass $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; + public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; - if ($n = \Reflection::getModifierNames($c->getModifiers())) { - $a[$prefix.'modifiers'] = implode(' ', $n); - } + if ($c->getThis()) { + $a[$prefix.'this'] = new CutStub($c->getThis()); + } + $function = $c->getFunction(); + $frame = array( + 'class' => isset($function->class) ? $function->class : null, + 'type' => isset($function->class) ? ($function->isStatic() ? '::' : '->') : null, + 'function' => $function->name, + 'file' => $c->getExecutingFile(), + 'line' => $c->getExecutingLine(), + ); + if ($trace = $c->getTrace(DEBUG_BACKTRACE_IGNORE_ARGS)) { + $function = new \ReflectionGenerator($c->getExecutingGenerator()); + array_unshift($trace, array( + 'function' => 'yield', + 'file' => $function->getExecutingFile(), + 'line' => $function->getExecutingLine() - 1, + )); + $trace[] = $frame; + $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); + } else { + $function = new FrameStub($frame, false, true); + $function = ExceptionCaster::castFrameStub($function, array(), $function, true); + $a[$prefix.'executing'] = new EnumStub(array( + $frame['class'].$frame['type'].$frame['function'].'()' => $function[$prefix.'src'], + )); + } - self::addMap($a, $c, array( - 'extends' => 'getParentClass', - 'implements' => 'getInterfaceNames', - 'constants' => 'getConstants', - )); + $a[Caster::PREFIX_VIRTUAL.'closed'] = false; - foreach ($c->getProperties() as $n) { - $a[$prefix.'properties'][$n->name] = $n; - } + return $a; + } - foreach ($c->getMethods() as $n) { - $a[$prefix.'methods'][$n->name] = $n; - } + public static function castClass(\ReflectionClass $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } + if ($n = \Reflection::getModifierNames($c->getModifiers())) { + $a[$prefix.'modifiers'] = implode(' ', $n); + } - return $a; - } + self::addMap($a, $c, array( + 'extends' => 'getParentClass', + 'implements' => 'getInterfaceNames', + 'constants' => 'getConstants', + )); - public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; + foreach ($c->getProperties() as $n) { + $a[$prefix.'properties'][$n->name] = $n; + } - self::addMap($a, $c, array( - 'returnsReference' => 'returnsReference', - 'returnType' => 'getReturnType', - 'class' => 'getClosureScopeClass', - 'this' => 'getClosureThis', - )); + foreach ($c->getMethods() as $n) { + $a[$prefix.'methods'][$n->name] = $n; + } - if (isset($a[$prefix.'returnType'])) { - $a[$prefix.'returnType'] = (string) $a[$prefix.'returnType']; - } - if (isset($a[$prefix.'this'])) { - $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); - } + if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } - foreach ($c->getParameters() as $v) { - $k = '$'.$v->name; - if ($v->isPassedByReference()) { - $k = '&'.$k; - } - if (method_exists($v, 'isVariadic') && $v->isVariadic()) { - $k = '...'.$k; - } - $a[$prefix.'parameters'][$k] = $v; - } - if (isset($a[$prefix.'parameters'])) { - $a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']); - } + return $a; + } - if ($v = $c->getStaticVariables()) { - foreach ($v as $k => &$v) { - $a[$prefix.'use']['$'.$k] = &$v; - } - unset($v); - $a[$prefix.'use'] = new EnumStub($a[$prefix.'use']); - } + public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } + self::addMap($a, $c, array( + 'returnsReference' => 'returnsReference', + 'returnType' => 'getReturnType', + 'class' => 'getClosureScopeClass', + 'this' => 'getClosureThis', + )); - // Added by HHVM - unset($a[Caster::PREFIX_DYNAMIC.'static']); + if (isset($a[$prefix.'returnType'])) { + $v = $a[$prefix.'returnType']; + $v = $v instanceof \ReflectionNamedType ? $v->getName() : $v->__toString(); + $a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType']->allowsNull() ? '?'.$v : $v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '')); + } + if (isset($a[$prefix.'class'])) { + $a[$prefix.'class'] = new ClassStub($a[$prefix.'class']); + } + if (isset($a[$prefix.'this'])) { + $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); + } - return $a; - } + foreach ($c->getParameters() as $v) { + $k = '$'.$v->name; + if (method_exists($v, 'isVariadic') && $v->isVariadic()) { + $k = '...'.$k; + } + if ($v->isPassedByReference()) { + $k = '&'.$k; + } + $a[$prefix.'parameters'][$k] = $v; + } + if (isset($a[$prefix.'parameters'])) { + $a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']); + } - public static function castMethod(\ReflectionMethod $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); + if ($v = $c->getStaticVariables()) { + foreach ($v as $k => &$v) { + $a[$prefix.'use']['$'.$k] = &$v; + } + unset($v); + $a[$prefix.'use'] = new EnumStub($a[$prefix.'use']); + } - return $a; - } + if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } - public static function castParameter(\ReflectionParameter $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; + // Added by HHVM + unset($a[Caster::PREFIX_DYNAMIC.'static']); - // Added by HHVM - unset($a['info']); + return $a; + } - self::addMap($a, $c, array( - 'position' => 'getPosition', - 'isVariadic' => 'isVariadic', - 'byReference' => 'isPassedByReference', - )); + public static function castMethod(\ReflectionMethod $c, array $a, Stub $stub, $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - try { - if (method_exists($c, 'hasType')) { - if ($c->hasType()) { - $a[$prefix.'typeHint'] = $c->getType()->__toString(); - } - } elseif ($c->isArray()) { - $a[$prefix.'typeHint'] = 'array'; - } elseif (method_exists($c, 'isCallable') && $c->isCallable()) { - $a[$prefix.'typeHint'] = 'callable'; - } elseif ($v = $c->getClass()) { - $a[$prefix.'typeHint'] = $v->name; - } - } catch (\ReflectionException $e) { - if (preg_match('/^Class ([^ ]++) does not exist$/', $e->getMessage(), $m)) { - $a[$prefix.'typeHint'] = $m[1]; - } - } + return $a; + } - try { - $a[$prefix.'default'] = $v = $c->getDefaultValue(); - if (method_exists($c, 'isDefaultValueConstant') && $c->isDefaultValueConstant()) { - $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); - } - } catch (\ReflectionException $e) { - if (isset($a[$prefix.'typeHint']) && $c->allowsNull()) { - $a[$prefix.'default'] = null; - } - } + public static function castParameter(\ReflectionParameter $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; - return $a; - } + // Added by HHVM + unset($a['info']); - public static function castProperty(\ReflectionProperty $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - self::addExtra($a, $c); + self::addMap($a, $c, array( + 'position' => 'getPosition', + 'isVariadic' => 'isVariadic', + 'byReference' => 'isPassedByReference', + 'allowsNull' => 'allowsNull', + )); - return $a; - } + if (method_exists($c, 'getType')) { + if ($v = $c->getType()) { + $a[$prefix.'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : $v->__toString(); + } + } elseif (preg_match('/^(?:[^ ]++ ){4}([a-zA-Z_\x7F-\xFF][^ ]++)/', $c, $v)) { + $a[$prefix.'typeHint'] = $v[1]; + } - public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, $isNested) - { - self::addMap($a, $c, array( - 'version' => 'getVersion', - 'dependencies' => 'getDependencies', - 'iniEntries' => 'getIniEntries', - 'isPersistent' => 'isPersistent', - 'isTemporary' => 'isTemporary', - 'constants' => 'getConstants', - 'functions' => 'getFunctions', - 'classes' => 'getClasses', - )); + if (isset($a[$prefix.'typeHint'])) { + $v = $a[$prefix.'typeHint']; + $a[$prefix.'typeHint'] = new ClassStub($v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '')); + } else { + unset($a[$prefix.'allowsNull']); + } - return $a; - } + try { + $a[$prefix.'default'] = $v = $c->getDefaultValue(); + if (method_exists($c, 'isDefaultValueConstant') && $c->isDefaultValueConstant()) { + $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); + } + if (null === $v) { + unset($a[$prefix.'allowsNull']); + } + } catch (\ReflectionException $e) { + if (isset($a[$prefix.'typeHint']) && $c->allowsNull() && !class_exists('ReflectionNamedType', false)) { + $a[$prefix.'default'] = null; + unset($a[$prefix.'allowsNull']); + } + } - public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, $isNested) - { - self::addMap($a, $c, array( - 'version' => 'getVersion', - 'author' => 'getAuthor', - 'copyright' => 'getCopyright', - 'url' => 'getURL', - )); + return $a; + } - return $a; - } + public static function castProperty(\ReflectionProperty $c, array $a, Stub $stub, $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); + self::addExtra($a, $c); - private static function addExtra(&$a, \Reflector $c) - { - $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : array(); + return $a; + } - if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { - $x['file'] = $m; - $x['line'] = $c->getStartLine().' to '.$c->getEndLine(); - } + public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, $isNested) + { + self::addMap($a, $c, array( + 'version' => 'getVersion', + 'dependencies' => 'getDependencies', + 'iniEntries' => 'getIniEntries', + 'isPersistent' => 'isPersistent', + 'isTemporary' => 'isTemporary', + 'constants' => 'getConstants', + 'functions' => 'getFunctions', + 'classes' => 'getClasses', + )); - self::addMap($x, $c, self::$extraMap, ''); + return $a; + } - if ($x) { - $a[Caster::PREFIX_VIRTUAL.'extra'] = new EnumStub($x); - } - } + public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, $isNested) + { + self::addMap($a, $c, array( + 'version' => 'getVersion', + 'author' => 'getAuthor', + 'copyright' => 'getCopyright', + 'url' => 'getURL', + )); - private static function addMap(&$a, \Reflector $c, $map, $prefix = Caster::PREFIX_VIRTUAL) - { - foreach ($map as $k => $m) { - if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) { - $a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m; - } - } - } + return $a; + } + + private static function addExtra(&$a, \Reflector $c) + { + $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : array(); + + if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { + $x['file'] = new LinkStub($m, $c->getStartLine()); + $x['line'] = $c->getStartLine().' to '.$c->getEndLine(); + } + + self::addMap($x, $c, self::$extraMap, ''); + + if ($x) { + $a[Caster::PREFIX_VIRTUAL.'extra'] = new EnumStub($x); + } + } + + private static function addMap(&$a, \Reflector $c, $map, $prefix = Caster::PREFIX_VIRTUAL) + { + foreach ($map as $k => $m) { + if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) { + $a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m; + } + } + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/ResourceCaster.php b/htdocs/includes/symfony/var-dumper/Caster/ResourceCaster.php index 903641f69c6..0b189d4d9b5 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/ResourceCaster.php +++ b/htdocs/includes/symfony/var-dumper/Caster/ResourceCaster.php @@ -20,48 +20,53 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class ResourceCaster { - public static function castCurl($h, array $a, Stub $stub, $isNested) - { - return curl_getinfo($h); - } + public static function castCurl($h, array $a, Stub $stub, $isNested) + { + return curl_getinfo($h); + } - public static function castDba($dba, array $a, Stub $stub, $isNested) - { - $list = dba_list(); - $a['file'] = $list[(int) $dba]; + public static function castDba($dba, array $a, Stub $stub, $isNested) + { + $list = dba_list(); + $a['file'] = $list[(int) $dba]; - return $a; - } + return $a; + } - public static function castProcess($process, array $a, Stub $stub, $isNested) - { - return proc_get_status($process); - } + public static function castProcess($process, array $a, Stub $stub, $isNested) + { + return proc_get_status($process); + } - public static function castStream($stream, array $a, Stub $stub, $isNested) - { - return stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); - } + public static function castStream($stream, array $a, Stub $stub, $isNested) + { + $a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); + if (isset($a['uri'])) { + $a['uri'] = new LinkStub($a['uri']); + } - public static function castStreamContext($stream, array $a, Stub $stub, $isNested) - { - return stream_context_get_params($stream); - } + return $a; + } - public static function castGd($gd, array $a, Stub $stub, $isNested) - { - $a['size'] = imagesx($gd).'x'.imagesy($gd); - $a['trueColor'] = imageistruecolor($gd); + public static function castStreamContext($stream, array $a, Stub $stub, $isNested) + { + return @stream_context_get_params($stream) ?: $a; + } - return $a; - } + public static function castGd($gd, array $a, Stub $stub, $isNested) + { + $a['size'] = imagesx($gd).'x'.imagesy($gd); + $a['trueColor'] = imageistruecolor($gd); - public static function castMysqlLink($h, array $a, Stub $stub, $isNested) - { - $a['host'] = mysql_get_host_info($h); - $a['protocol'] = mysql_get_proto_info($h); - $a['server'] = mysql_get_server_info($h); + return $a; + } - return $a; - } + public static function castMysqlLink($h, array $a, Stub $stub, $isNested) + { + $a['host'] = mysql_get_host_info($h); + $a['protocol'] = mysql_get_proto_info($h); + $a['server'] = mysql_get_server_info($h); + + return $a; + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/SplCaster.php b/htdocs/includes/symfony/var-dumper/Caster/SplCaster.php index 97f21463821..176e7f2ae48 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/SplCaster.php +++ b/htdocs/includes/symfony/var-dumper/Caster/SplCaster.php @@ -20,184 +20,188 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class SplCaster { - private static $splFileObjectFlags = array( - \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', - \SplFileObject::READ_AHEAD => 'READ_AHEAD', - \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', - \SplFileObject::READ_CSV => 'READ_CSV', - ); + private static $splFileObjectFlags = array( + \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', + \SplFileObject::READ_AHEAD => 'READ_AHEAD', + \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', + \SplFileObject::READ_CSV => 'READ_CSV', + ); - public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $class = $stub->class; - $flags = $c->getFlags(); + public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $class = $stub->class; + $flags = $c->getFlags(); - $b = array( - $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), - $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), - $prefix.'iteratorClass' => $c->getIteratorClass(), - $prefix.'storage' => $c->getArrayCopy(), - ); + $b = array( + $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), + $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), + $prefix.'iteratorClass' => new ClassStub($c->getIteratorClass()), + $prefix.'storage' => $c->getArrayCopy(), + ); - if ($class === 'ArrayObject') { - $a = $b; - } else { - if (!($flags & \ArrayObject::STD_PROP_LIST)) { - $c->setFlags(\ArrayObject::STD_PROP_LIST); - $a = Caster::castObject($c, new \ReflectionClass($class)); - $c->setFlags($flags); - } + if ($class === 'ArrayObject') { + $a = $b; + } else { + if (!($flags & \ArrayObject::STD_PROP_LIST)) { + $c->setFlags(\ArrayObject::STD_PROP_LIST); + $a = Caster::castObject($c, new \ReflectionClass($class)); + $c->setFlags($flags); + } - $a += $b; - } + $a += $b; + } - return $a; - } + return $a; + } - public static function castHeap(\Iterator $c, array $a, Stub $stub, $isNested) - { - $a += array( - Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), - ); + public static function castHeap(\Iterator $c, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), + ); - return $a; - } + return $a; + } - public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $mode = $c->getIteratorMode(); - $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); + public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $mode = $c->getIteratorMode(); + $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); - $a += array( - $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_KEEP) ? 'IT_MODE_KEEP' : 'IT_MODE_DELETE'), $mode), - $prefix.'dllist' => iterator_to_array($c), - ); - $c->setIteratorMode($mode); + $a += array( + $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_DELETE) ? 'IT_MODE_DELETE' : 'IT_MODE_KEEP'), $mode), + $prefix.'dllist' => iterator_to_array($c), + ); + $c->setIteratorMode($mode); - return $a; - } + return $a; + } - public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNested) - { - static $map = array( - 'path' => 'getPath', - 'filename' => 'getFilename', - 'basename' => 'getBasename', - 'pathname' => 'getPathname', - 'extension' => 'getExtension', - 'realPath' => 'getRealPath', - 'aTime' => 'getATime', - 'mTime' => 'getMTime', - 'cTime' => 'getCTime', - 'inode' => 'getInode', - 'size' => 'getSize', - 'perms' => 'getPerms', - 'owner' => 'getOwner', - 'group' => 'getGroup', - 'type' => 'getType', - 'writable' => 'isWritable', - 'readable' => 'isReadable', - 'executable' => 'isExecutable', - 'file' => 'isFile', - 'dir' => 'isDir', - 'link' => 'isLink', - 'linkTarget' => 'getLinkTarget', - ); + public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNested) + { + static $map = array( + 'path' => 'getPath', + 'filename' => 'getFilename', + 'basename' => 'getBasename', + 'pathname' => 'getPathname', + 'extension' => 'getExtension', + 'realPath' => 'getRealPath', + 'aTime' => 'getATime', + 'mTime' => 'getMTime', + 'cTime' => 'getCTime', + 'inode' => 'getInode', + 'size' => 'getSize', + 'perms' => 'getPerms', + 'owner' => 'getOwner', + 'group' => 'getGroup', + 'type' => 'getType', + 'writable' => 'isWritable', + 'readable' => 'isReadable', + 'executable' => 'isExecutable', + 'file' => 'isFile', + 'dir' => 'isDir', + 'link' => 'isLink', + 'linkTarget' => 'getLinkTarget', + ); - $prefix = Caster::PREFIX_VIRTUAL; + $prefix = Caster::PREFIX_VIRTUAL; - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } - if (isset($a[$prefix.'perms'])) { - $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); - } + if (isset($a[$prefix.'realPath'])) { + $a[$prefix.'realPath'] = new LinkStub($a[$prefix.'realPath']); + } - static $mapDate = array('aTime', 'mTime', 'cTime'); - foreach ($mapDate as $key) { - if (isset($a[$prefix.$key])) { - $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); - } - } + if (isset($a[$prefix.'perms'])) { + $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); + } - return $a; - } + static $mapDate = array('aTime', 'mTime', 'cTime'); + foreach ($mapDate as $key) { + if (isset($a[$prefix.$key])) { + $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); + } + } - public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, $isNested) - { - static $map = array( - 'csvControl' => 'getCsvControl', - 'flags' => 'getFlags', - 'maxLineLen' => 'getMaxLineLen', - 'fstat' => 'fstat', - 'eof' => 'eof', - 'key' => 'key', - ); + return $a; + } - $prefix = Caster::PREFIX_VIRTUAL; + public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, $isNested) + { + static $map = array( + 'csvControl' => 'getCsvControl', + 'flags' => 'getFlags', + 'maxLineLen' => 'getMaxLineLen', + 'fstat' => 'fstat', + 'eof' => 'eof', + 'key' => 'key', + ); - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } + $prefix = Caster::PREFIX_VIRTUAL; - if (isset($a[$prefix.'flags'])) { - $flagsArray = array(); - foreach (self::$splFileObjectFlags as $value => $name) { - if ($a[$prefix.'flags'] & $value) { - $flagsArray[] = $name; - } - } - $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); - } + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } - if (isset($a[$prefix.'fstat'])) { - $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], array('dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks')); - } + if (isset($a[$prefix.'flags'])) { + $flagsArray = array(); + foreach (self::$splFileObjectFlags as $value => $name) { + if ($a[$prefix.'flags'] & $value) { + $flagsArray[] = $name; + } + } + $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); + } - return $a; - } + if (isset($a[$prefix.'fstat'])) { + $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], array('dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks')); + } - public static function castFixedArray(\SplFixedArray $c, array $a, Stub $stub, $isNested) - { - $a += array( - Caster::PREFIX_VIRTUAL.'storage' => $c->toArray(), - ); + return $a; + } - return $a; - } + public static function castFixedArray(\SplFixedArray $c, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'storage' => $c->toArray(), + ); - public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, $isNested) - { - $storage = array(); - unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 + return $a; + } - foreach ($c as $obj) { - $storage[spl_object_hash($obj)] = array( - 'object' => $obj, - 'info' => $c->getInfo(), - ); - } + public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, $isNested) + { + $storage = array(); + unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 - $a += array( - Caster::PREFIX_VIRTUAL.'storage' => $storage, - ); + foreach (clone $c as $obj) { + $storage[spl_object_hash($obj)] = array( + 'object' => $obj, + 'info' => $c->getInfo(), + ); + } - return $a; - } + $a += array( + Caster::PREFIX_VIRTUAL.'storage' => $storage, + ); - public static function castOuterIterator(\OuterIterator $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'innerIterator'] = $c->getInnerIterator(); + return $a; + } - return $a; - } + public static function castOuterIterator(\OuterIterator $c, array $a, Stub $stub, $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'innerIterator'] = $c->getInnerIterator(); + + return $a; + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/StubCaster.php b/htdocs/includes/symfony/var-dumper/Caster/StubCaster.php index ebad5ba9844..83fde9eba3c 100644 --- a/htdocs/includes/symfony/var-dumper/Caster/StubCaster.php +++ b/htdocs/includes/symfony/var-dumper/Caster/StubCaster.php @@ -20,53 +20,63 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class StubCaster { - public static function castStub(Stub $c, array $a, Stub $stub, $isNested) - { - if ($isNested) { - $stub->type = $c->type; - $stub->class = $c->class; - $stub->value = $c->value; - $stub->handle = $c->handle; - $stub->cut = $c->cut; + public static function castStub(Stub $c, array $a, Stub $stub, $isNested) + { + if ($isNested) { + $stub->type = $c->type; + $stub->class = $c->class; + $stub->value = $c->value; + $stub->handle = $c->handle; + $stub->cut = $c->cut; + $stub->attr = $c->attr; - return array(); - } - } + if (Stub::TYPE_REF === $c->type && !$c->class && is_string($c->value) && !preg_match('//u', $c->value)) { + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_BINARY; + } - public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, $isNested) - { - return $isNested ? $c->preservedSubset : $a; - } + $a = array(); + } - public static function cutInternals($obj, array $a, Stub $stub, $isNested) - { - if ($isNested) { - $stub->cut += count($a); + return $a; + } - return array(); - } + public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, $isNested) + { + return $isNested ? $c->preservedSubset : $a; + } - return $a; - } + public static function cutInternals($obj, array $a, Stub $stub, $isNested) + { + if ($isNested) { + $stub->cut += count($a); - public static function castEnum(EnumStub $c, array $a, Stub $stub, $isNested) - { - if ($isNested) { - $stub->class = ''; - $stub->handle = 0; - $stub->value = null; + return array(); + } - $a = array(); + return $a; + } - if ($c->value) { - foreach (array_keys($c->value) as $k) { - $keys[] = Caster::PREFIX_VIRTUAL.$k; - } - // Preserve references with array_combine() - $a = array_combine($keys, $c->value); - } - } + public static function castEnum(EnumStub $c, array $a, Stub $stub, $isNested) + { + if ($isNested) { + $stub->class = $c->dumpKeys ? '' : null; + $stub->handle = 0; + $stub->value = null; + $stub->cut = $c->cut; + $stub->attr = $c->attr; - return $a; - } + $a = array(); + + if ($c->value) { + foreach (array_keys($c->value) as $k) { + $keys[] = !isset($k[0]) || "\0" !== $k[0] ? Caster::PREFIX_VIRTUAL.$k : $k; + } + // Preserve references with array_combine() + $a = array_combine($keys, $c->value); + } + } + + return $a; + } } diff --git a/htdocs/includes/symfony/var-dumper/Caster/XmlReaderCaster.php b/htdocs/includes/symfony/var-dumper/Caster/XmlReaderCaster.php new file mode 100644 index 00000000000..bbd4645c8e5 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/XmlReaderCaster.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts XmlReader class to array representation. + * + * @author Baptiste Clavié + */ +class XmlReaderCaster +{ + private static $nodeTypes = array( + \XmlReader::NONE => 'NONE', + \XmlReader::ELEMENT => 'ELEMENT', + \XmlReader::ATTRIBUTE => 'ATTRIBUTE', + \XmlReader::TEXT => 'TEXT', + \XmlReader::CDATA => 'CDATA', + \XmlReader::ENTITY_REF => 'ENTITY_REF', + \XmlReader::ENTITY => 'ENTITY', + \XmlReader::PI => 'PI (Processing Instruction)', + \XmlReader::COMMENT => 'COMMENT', + \XmlReader::DOC => 'DOC', + \XmlReader::DOC_TYPE => 'DOC_TYPE', + \XmlReader::DOC_FRAGMENT => 'DOC_FRAGMENT', + \XmlReader::NOTATION => 'NOTATION', + \XmlReader::WHITESPACE => 'WHITESPACE', + \XmlReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE', + \XmlReader::END_ELEMENT => 'END_ELEMENT', + \XmlReader::END_ENTITY => 'END_ENTITY', + \XmlReader::XML_DECLARATION => 'XML_DECLARATION', + ); + + public static function castXmlReader(\XmlReader $reader, array $a, Stub $stub, $isNested) + { + $props = Caster::PREFIX_VIRTUAL.'parserProperties'; + $info = array( + 'localName' => $reader->localName, + 'prefix' => $reader->prefix, + 'nodeType' => new ConstStub(self::$nodeTypes[$reader->nodeType], $reader->nodeType), + 'depth' => $reader->depth, + 'isDefault' => $reader->isDefault, + 'isEmptyElement' => \XmlReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement, + 'xmlLang' => $reader->xmlLang, + 'attributeCount' => $reader->attributeCount, + 'value' => $reader->value, + 'namespaceURI' => $reader->namespaceURI, + 'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI, + $props => array( + 'LOADDTD' => $reader->getParserProperty(\XmlReader::LOADDTD), + 'DEFAULTATTRS' => $reader->getParserProperty(\XmlReader::DEFAULTATTRS), + 'VALIDATE' => $reader->getParserProperty(\XmlReader::VALIDATE), + 'SUBST_ENTITIES' => $reader->getParserProperty(\XmlReader::SUBST_ENTITIES), + ), + ); + + if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, array(), $count)) { + $info[$props] = new EnumStub($info[$props]); + $info[$props]->cut = $count; + } + + $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, array(), $count); + // +2 because hasValue and hasAttributes are always filtered + $stub->cut += $count + 2; + + return $a + $info; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Cloner/AbstractCloner.php b/htdocs/includes/symfony/var-dumper/Cloner/AbstractCloner.php index 2807ceb935b..27bc47870ae 100644 --- a/htdocs/includes/symfony/var-dumper/Cloner/AbstractCloner.php +++ b/htdocs/includes/symfony/var-dumper/Cloner/AbstractCloner.php @@ -21,293 +21,302 @@ use Symfony\Component\VarDumper\Exception\ThrowingCasterException; */ abstract class AbstractCloner implements ClonerInterface { - public static $defaultCasters = array( - 'Symfony\Component\VarDumper\Caster\CutStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', - 'Symfony\Component\VarDumper\Caster\CutArrayStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castCutArray', - 'Symfony\Component\VarDumper\Caster\ConstStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', - 'Symfony\Component\VarDumper\Caster\EnumStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castEnum', + public static $defaultCasters = array( + '__PHP_Incomplete_Class' => 'Symfony\Component\VarDumper\Caster\Caster::castPhpIncompleteClass', - 'Closure' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClosure', - 'Generator' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castGenerator', - 'ReflectionType' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castType', - 'ReflectionGenerator' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castReflectionGenerator', - 'ReflectionClass' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClass', - 'ReflectionFunctionAbstract' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castFunctionAbstract', - 'ReflectionMethod' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castMethod', - 'ReflectionParameter' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castParameter', - 'ReflectionProperty' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castProperty', - 'ReflectionExtension' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castExtension', - 'ReflectionZendExtension' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castZendExtension', + 'Symfony\Component\VarDumper\Caster\CutStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', + 'Symfony\Component\VarDumper\Caster\CutArrayStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castCutArray', + 'Symfony\Component\VarDumper\Caster\ConstStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', + 'Symfony\Component\VarDumper\Caster\EnumStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castEnum', - 'Doctrine\Common\Persistence\ObjectManager' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', - 'Doctrine\Common\Proxy\Proxy' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castCommonProxy', - 'Doctrine\ORM\Proxy\Proxy' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castOrmProxy', - 'Doctrine\ORM\PersistentCollection' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castPersistentCollection', + 'Closure' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClosure', + 'Generator' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castGenerator', + 'ReflectionType' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castType', + 'ReflectionGenerator' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castReflectionGenerator', + 'ReflectionClass' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClass', + 'ReflectionFunctionAbstract' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castFunctionAbstract', + 'ReflectionMethod' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castMethod', + 'ReflectionParameter' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castParameter', + 'ReflectionProperty' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castProperty', + 'ReflectionExtension' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castExtension', + 'ReflectionZendExtension' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castZendExtension', - 'DOMException' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castException', - 'DOMStringList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', - 'DOMNameList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', - 'DOMImplementation' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castImplementation', - 'DOMImplementationList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', - 'DOMNode' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNode', - 'DOMNameSpaceNode' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNameSpaceNode', - 'DOMDocument' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDocument', - 'DOMNodeList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', - 'DOMNamedNodeMap' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', - 'DOMCharacterData' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castCharacterData', - 'DOMAttr' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castAttr', - 'DOMElement' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castElement', - 'DOMText' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castText', - 'DOMTypeinfo' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castTypeinfo', - 'DOMDomError' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDomError', - 'DOMLocator' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLocator', - 'DOMDocumentType' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDocumentType', - 'DOMNotation' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNotation', - 'DOMEntity' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castEntity', - 'DOMProcessingInstruction' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castProcessingInstruction', - 'DOMXPath' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castXPath', + 'Doctrine\Common\Persistence\ObjectManager' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Doctrine\Common\Proxy\Proxy' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castCommonProxy', + 'Doctrine\ORM\Proxy\Proxy' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castOrmProxy', + 'Doctrine\ORM\PersistentCollection' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castPersistentCollection', - 'ErrorException' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castErrorException', - 'Exception' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castException', - 'Error' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castError', - 'Symfony\Component\DependencyInjection\ContainerInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', - 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castThrowingCasterException', - 'Symfony\Component\VarDumper\Caster\TraceStub' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castTraceStub', - 'Symfony\Component\VarDumper\Caster\FrameStub' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castFrameStub', + 'DOMException' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castException', + 'DOMStringList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMNameList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMImplementation' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castImplementation', + 'DOMImplementationList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMNode' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNode', + 'DOMNameSpaceNode' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNameSpaceNode', + 'DOMDocument' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDocument', + 'DOMNodeList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMNamedNodeMap' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMCharacterData' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castCharacterData', + 'DOMAttr' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castAttr', + 'DOMElement' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castElement', + 'DOMText' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castText', + 'DOMTypeinfo' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castTypeinfo', + 'DOMDomError' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDomError', + 'DOMLocator' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLocator', + 'DOMDocumentType' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDocumentType', + 'DOMNotation' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNotation', + 'DOMEntity' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castEntity', + 'DOMProcessingInstruction' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castProcessingInstruction', + 'DOMXPath' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castXPath', - 'PHPUnit_Framework_MockObject_MockObject' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', - 'Prophecy\Prophecy\ProphecySubjectInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', - 'Mockery\MockInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'XmlReader' => 'Symfony\Component\VarDumper\Caster\XmlReaderCaster::castXmlReader', - 'PDO' => 'Symfony\Component\VarDumper\Caster\PdoCaster::castPdo', - 'PDOStatement' => 'Symfony\Component\VarDumper\Caster\PdoCaster::castPdoStatement', + 'ErrorException' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castErrorException', + 'Exception' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castException', + 'Error' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castError', + 'Symfony\Component\DependencyInjection\ContainerInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castThrowingCasterException', + 'Symfony\Component\VarDumper\Caster\TraceStub' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castTraceStub', + 'Symfony\Component\VarDumper\Caster\FrameStub' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castFrameStub', - 'AMQPConnection' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castConnection', - 'AMQPChannel' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castChannel', - 'AMQPQueue' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castQueue', - 'AMQPExchange' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castExchange', - 'AMQPEnvelope' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castEnvelope', + 'PHPUnit_Framework_MockObject_MockObject' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Prophecy\Prophecy\ProphecySubjectInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Mockery\MockInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', - 'ArrayObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castArrayObject', - 'SplDoublyLinkedList' => 'Symfony\Component\VarDumper\Caster\SplCaster::castDoublyLinkedList', - 'SplFileInfo' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileInfo', - 'SplFileObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileObject', - 'SplFixedArray' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFixedArray', - 'SplHeap' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', - 'SplObjectStorage' => 'Symfony\Component\VarDumper\Caster\SplCaster::castObjectStorage', - 'SplPriorityQueue' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', - 'OuterIterator' => 'Symfony\Component\VarDumper\Caster\SplCaster::castOuterIterator', + 'PDO' => 'Symfony\Component\VarDumper\Caster\PdoCaster::castPdo', + 'PDOStatement' => 'Symfony\Component\VarDumper\Caster\PdoCaster::castPdoStatement', - 'MongoCursorInterface' => 'Symfony\Component\VarDumper\Caster\MongoCaster::castCursor', + 'AMQPConnection' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castConnection', + 'AMQPChannel' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castChannel', + 'AMQPQueue' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castQueue', + 'AMQPExchange' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castExchange', + 'AMQPEnvelope' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castEnvelope', - ':curl' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castCurl', - ':dba' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castDba', - ':dba persistent' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castDba', - ':gd' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castGd', - ':mysql link' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castMysqlLink', - ':pgsql large object' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLargeObject', - ':pgsql link' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLink', - ':pgsql link persistent' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLink', - ':pgsql result' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castResult', - ':process' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castProcess', - ':stream' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStream', - ':stream-context' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStreamContext', - ':xml' => 'Symfony\Component\VarDumper\Caster\XmlResourceCaster::castXml', - ); + 'ArrayObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castArrayObject', + 'SplDoublyLinkedList' => 'Symfony\Component\VarDumper\Caster\SplCaster::castDoublyLinkedList', + 'SplFileInfo' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileInfo', + 'SplFileObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileObject', + 'SplFixedArray' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFixedArray', + 'SplHeap' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', + 'SplObjectStorage' => 'Symfony\Component\VarDumper\Caster\SplCaster::castObjectStorage', + 'SplPriorityQueue' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', + 'OuterIterator' => 'Symfony\Component\VarDumper\Caster\SplCaster::castOuterIterator', - protected $maxItems = 2500; - protected $maxString = -1; - protected $useExt; + 'MongoCursorInterface' => 'Symfony\Component\VarDumper\Caster\MongoCaster::castCursor', - private $casters = array(); - private $prevErrorHandler; - private $classInfo = array(); - private $filter = 0; + 'Redis' => 'Symfony\Component\VarDumper\Caster\RedisCaster::castRedis', + 'RedisArray' => 'Symfony\Component\VarDumper\Caster\RedisCaster::castRedisArray', - /** - * @param callable[]|null $casters A map of casters. - * - * @see addCasters - */ - public function __construct(array $casters = null) - { - if (null === $casters) { - $casters = static::$defaultCasters; - } - $this->addCasters($casters); - $this->useExt = extension_loaded('symfony_debug'); - } + ':curl' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castCurl', + ':dba' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castDba', + ':dba persistent' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castDba', + ':gd' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castGd', + ':mysql link' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castMysqlLink', + ':pgsql large object' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLargeObject', + ':pgsql link' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLink', + ':pgsql link persistent' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLink', + ':pgsql result' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castResult', + ':process' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castProcess', + ':stream' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStream', + ':persistent stream' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStream', + ':stream-context' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStreamContext', + ':xml' => 'Symfony\Component\VarDumper\Caster\XmlResourceCaster::castXml', + ); - /** - * Adds casters for resources and objects. - * - * Maps resources or objects types to a callback. - * Types are in the key, with a callable caster for value. - * Resource types are to be prefixed with a `:`, - * see e.g. static::$defaultCasters. - * - * @param callable[] $casters A map of casters. - */ - public function addCasters(array $casters) - { - foreach ($casters as $type => $callback) { - $this->casters[strtolower($type)][] = $callback; - } - } + protected $maxItems = 2500; + protected $maxString = -1; + protected $useExt; - /** - * Sets the maximum number of items to clone past the first level in nested structures. - * - * @param int $maxItems - */ - public function setMaxItems($maxItems) - { - $this->maxItems = (int) $maxItems; - } + private $casters = array(); + private $prevErrorHandler; + private $classInfo = array(); + private $filter = 0; - /** - * Sets the maximum cloned length for strings. - * - * @param int $maxString - */ - public function setMaxString($maxString) - { - $this->maxString = (int) $maxString; - } + /** + * @param callable[]|null $casters A map of casters + * + * @see addCasters + */ + public function __construct(array $casters = null) + { + if (null === $casters) { + $casters = static::$defaultCasters; + } + $this->addCasters($casters); + $this->useExt = extension_loaded('symfony_debug'); + } - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable. - * @param int $filter A bit field of Caster::EXCLUDE_* constants. - * - * @return Data The cloned variable represented by a Data object. - */ - public function cloneVar($var, $filter = 0) - { - $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context) { - if (E_RECOVERABLE_ERROR === $type || E_USER_ERROR === $type) { - // Cloner never dies - throw new \ErrorException($msg, 0, $type, $file, $line); - } + /** + * Adds casters for resources and objects. + * + * Maps resources or objects types to a callback. + * Types are in the key, with a callable caster for value. + * Resource types are to be prefixed with a `:`, + * see e.g. static::$defaultCasters. + * + * @param callable[] $casters A map of casters + */ + public function addCasters(array $casters) + { + foreach ($casters as $type => $callback) { + $this->casters[strtolower($type)][] = $callback; + } + } - if ($this->prevErrorHandler) { - return call_user_func($this->prevErrorHandler, $type, $msg, $file, $line, $context); - } + /** + * Sets the maximum number of items to clone past the first level in nested structures. + * + * @param int $maxItems + */ + public function setMaxItems($maxItems) + { + $this->maxItems = (int) $maxItems; + } - return false; - }); - $this->filter = $filter; + /** + * Sets the maximum cloned length for strings. + * + * @param int $maxString + */ + public function setMaxString($maxString) + { + $this->maxString = (int) $maxString; + } - try { - $data = $this->doClone($var); - } catch (\Exception $e) { - } - restore_error_handler(); - $this->prevErrorHandler = null; + /** + * Clones a PHP variable. + * + * @param mixed $var Any PHP variable + * @param int $filter A bit field of Caster::EXCLUDE_* constants + * + * @return Data The cloned variable represented by a Data object + */ + public function cloneVar($var, $filter = 0) + { + $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context) { + if (E_RECOVERABLE_ERROR === $type || E_USER_ERROR === $type) { + // Cloner never dies + throw new \ErrorException($msg, 0, $type, $file, $line); + } - if (isset($e)) { - throw $e; - } + if ($this->prevErrorHandler) { + return call_user_func($this->prevErrorHandler, $type, $msg, $file, $line, $context); + } - return new Data($data); - } + return false; + }); + $this->filter = $filter; - /** - * Effectively clones the PHP variable. - * - * @param mixed $var Any PHP variable. - * - * @return array The cloned variable represented in an array. - */ - abstract protected function doClone($var); + try { + $data = $this->doClone($var); + } catch (\Exception $e) { + } + restore_error_handler(); + $this->prevErrorHandler = null; - /** - * Casts an object to an array representation. - * - * @param Stub $stub The Stub for the casted object. - * @param bool $isNested True if the object is nested in the dumped structure. - * - * @return array The object casted as array. - */ - protected function castObject(Stub $stub, $isNested) - { - $obj = $stub->value; - $class = $stub->class; + if (isset($e)) { + throw $e; + } - if (isset($class[15]) && "\0" === $class[15] && 0 === strpos($class, "class@anonymous\x00")) { - $stub->class = get_parent_class($class).'@anonymous'; - } - if (isset($this->classInfo[$class])) { - $classInfo = $this->classInfo[$class]; - } else { - $classInfo = array( - new \ReflectionClass($class), - array_reverse(array($class => $class) + class_parents($class) + class_implements($class) + array('*' => '*')), - ); + return new Data($data); + } - $this->classInfo[$class] = $classInfo; - } + /** + * Effectively clones the PHP variable. + * + * @param mixed $var Any PHP variable + * + * @return array The cloned variable represented in an array + */ + abstract protected function doClone($var); - $a = $this->callCaster('Symfony\Component\VarDumper\Caster\Caster::castObject', $obj, $classInfo[0], null, $isNested); + /** + * Casts an object to an array representation. + * + * @param Stub $stub The Stub for the casted object + * @param bool $isNested True if the object is nested in the dumped structure + * + * @return array The object casted as array + */ + protected function castObject(Stub $stub, $isNested) + { + $obj = $stub->value; + $class = $stub->class; - foreach ($classInfo[1] as $p) { - if (!empty($this->casters[$p = strtolower($p)])) { - foreach ($this->casters[$p] as $p) { - $a = $this->callCaster($p, $obj, $a, $stub, $isNested); - } - } - } + if (isset($class[15]) && "\0" === $class[15] && 0 === strpos($class, "class@anonymous\x00")) { + $stub->class = get_parent_class($class).'@anonymous'; + } + if (isset($this->classInfo[$class])) { + $classInfo = $this->classInfo[$class]; + } else { + $classInfo = array( + new \ReflectionClass($class), + array_reverse(array($class => $class) + class_parents($class) + class_implements($class) + array('*' => '*')), + ); + $classInfo[1] = array_map('strtolower', $classInfo[1]); - return $a; - } + $this->classInfo[$class] = $classInfo; + } - /** - * Casts a resource to an array representation. - * - * @param Stub $stub The Stub for the casted resource. - * @param bool $isNested True if the object is nested in the dumped structure. - * - * @return array The resource casted as array. - */ - protected function castResource(Stub $stub, $isNested) - { - $a = array(); - $res = $stub->value; - $type = $stub->class; + $a = Caster::castObject($obj, $classInfo[0]); - if (!empty($this->casters[':'.$type])) { - foreach ($this->casters[':'.$type] as $c) { - $a = $this->callCaster($c, $res, $a, $stub, $isNested); - } - } + foreach ($classInfo[1] as $p) { + if (!empty($this->casters[$p])) { + foreach ($this->casters[$p] as $p) { + $a = $this->callCaster($p, $obj, $a, $stub, $isNested); + } + } + } - return $a; - } + return $a; + } - /** - * Calls a custom caster. - * - * @param callable $callback The caster. - * @param object|resource $obj The object/resource being casted. - * @param array $a The result of the previous cast for chained casters. - * @param Stub $stub The Stub for the casted object/resource. - * @param bool $isNested True if $obj is nested in the dumped structure. - * - * @return array The casted object/resource. - */ - private function callCaster($callback, $obj, $a, $stub, $isNested) - { - try { - $cast = call_user_func($callback, $obj, $a, $stub, $isNested, $this->filter); + /** + * Casts a resource to an array representation. + * + * @param Stub $stub The Stub for the casted resource + * @param bool $isNested True if the object is nested in the dumped structure + * + * @return array The resource casted as array + */ + protected function castResource(Stub $stub, $isNested) + { + $a = array(); + $res = $stub->value; + $type = $stub->class; - if (is_array($cast)) { - $a = $cast; - } - } catch (\Exception $e) { - $a[(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠'] = new ThrowingCasterException($e); - } + if (!empty($this->casters[':'.$type])) { + foreach ($this->casters[':'.$type] as $c) { + $a = $this->callCaster($c, $res, $a, $stub, $isNested); + } + } - return $a; - } + return $a; + } + + /** + * Calls a custom caster. + * + * @param callable $callback The caster + * @param object|resource $obj The object/resource being casted + * @param array $a The result of the previous cast for chained casters + * @param Stub $stub The Stub for the casted object/resource + * @param bool $isNested True if $obj is nested in the dumped structure + * + * @return array The casted object/resource + */ + private function callCaster($callback, $obj, $a, $stub, $isNested) + { + try { + $cast = call_user_func($callback, $obj, $a, $stub, $isNested, $this->filter); + + if (is_array($cast)) { + $a = $cast; + } + } catch (\Exception $e) { + $a = array((Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)) + $a; + } + + return $a; + } } diff --git a/htdocs/includes/symfony/var-dumper/Cloner/ClonerInterface.php b/htdocs/includes/symfony/var-dumper/Cloner/ClonerInterface.php index c1df5933dbf..09d863e8e6f 100644 --- a/htdocs/includes/symfony/var-dumper/Cloner/ClonerInterface.php +++ b/htdocs/includes/symfony/var-dumper/Cloner/ClonerInterface.php @@ -16,12 +16,12 @@ namespace Symfony\Component\VarDumper\Cloner; */ interface ClonerInterface { - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable. - * - * @return Data The cloned variable represented by a Data object. - */ - public function cloneVar($var); + /** + * Clones a PHP variable. + * + * @param mixed $var Any PHP variable + * + * @return Data The cloned variable represented by a Data object + */ + public function cloneVar($var); } diff --git a/htdocs/includes/symfony/var-dumper/Cloner/Cursor.php b/htdocs/includes/symfony/var-dumper/Cloner/Cursor.php index 162f3293cf2..23fe80977c6 100644 --- a/htdocs/includes/symfony/var-dumper/Cloner/Cursor.php +++ b/htdocs/includes/symfony/var-dumper/Cloner/Cursor.php @@ -18,24 +18,25 @@ namespace Symfony\Component\VarDumper\Cloner; */ class Cursor { - const HASH_INDEXED = Stub::ARRAY_INDEXED; - const HASH_ASSOC = Stub::ARRAY_ASSOC; - const HASH_OBJECT = Stub::TYPE_OBJECT; - const HASH_RESOURCE = Stub::TYPE_RESOURCE; + const HASH_INDEXED = Stub::ARRAY_INDEXED; + const HASH_ASSOC = Stub::ARRAY_ASSOC; + const HASH_OBJECT = Stub::TYPE_OBJECT; + const HASH_RESOURCE = Stub::TYPE_RESOURCE; - public $depth = 0; - public $refIndex = 0; - public $softRefTo = 0; - public $softRefCount = 0; - public $softRefHandle = 0; - public $hardRefTo = 0; - public $hardRefCount = 0; - public $hardRefHandle = 0; - public $hashType; - public $hashKey; - public $hashKeyIsBinary; - public $hashIndex = 0; - public $hashLength = 0; - public $hashCut = 0; - public $stop = false; + public $depth = 0; + public $refIndex = 0; + public $softRefTo = 0; + public $softRefCount = 0; + public $softRefHandle = 0; + public $hardRefTo = 0; + public $hardRefCount = 0; + public $hardRefHandle = 0; + public $hashType; + public $hashKey; + public $hashKeyIsBinary; + public $hashIndex = 0; + public $hashLength = 0; + public $hashCut = 0; + public $stop = false; + public $attr = array(); } diff --git a/htdocs/includes/symfony/var-dumper/Cloner/Data.php b/htdocs/includes/symfony/var-dumper/Cloner/Data.php index 43a7b67971e..c770f06a928 100644 --- a/htdocs/includes/symfony/var-dumper/Cloner/Data.php +++ b/htdocs/includes/symfony/var-dumper/Cloner/Data.php @@ -11,208 +11,260 @@ namespace Symfony\Component\VarDumper\Cloner; +use Symfony\Component\VarDumper\Caster\Caster; + /** * @author Nicolas Grekas */ class Data { - private $data; - private $maxDepth = 20; - private $maxItemsPerDepth = -1; - private $useRefHandles = -1; + private $data; + private $position = 0; + private $key = 0; + private $maxDepth = 20; + private $maxItemsPerDepth = -1; + private $useRefHandles = -1; - /** - * @param array $data A array as returned by ClonerInterface::cloneVar(). - */ - public function __construct(array $data) - { - $this->data = $data; - } + /** + * @param array $data A array as returned by ClonerInterface::cloneVar() + */ + public function __construct(array $data) + { + $this->data = $data; + } - /** - * @return array The raw data structure. - */ - public function getRawData() - { - return $this->data; - } + /** + * @return array The raw data structure + */ + public function getRawData() + { + return $this->data; + } - /** - * Returns a depth limited clone of $this. - * - * @param int $maxDepth The max dumped depth level. - * - * @return self A clone of $this. - */ - public function withMaxDepth($maxDepth) - { - $data = clone $this; - $data->maxDepth = (int) $maxDepth; + /** + * Returns a depth limited clone of $this. + * + * @param int $maxDepth The max dumped depth level + * + * @return self A clone of $this + */ + public function withMaxDepth($maxDepth) + { + $data = clone $this; + $data->maxDepth = (int) $maxDepth; - return $data; - } + return $data; + } - /** - * Limits the numbers of elements per depth level. - * - * @param int $maxItemsPerDepth The max number of items dumped per depth level. - * - * @return self A clone of $this. - */ - public function withMaxItemsPerDepth($maxItemsPerDepth) - { - $data = clone $this; - $data->maxItemsPerDepth = (int) $maxItemsPerDepth; + /** + * Limits the number of elements per depth level. + * + * @param int $maxItemsPerDepth The max number of items dumped per depth level + * + * @return self A clone of $this + */ + public function withMaxItemsPerDepth($maxItemsPerDepth) + { + $data = clone $this; + $data->maxItemsPerDepth = (int) $maxItemsPerDepth; - return $data; - } + return $data; + } - /** - * Enables/disables objects' identifiers tracking. - * - * @param bool $useRefHandles False to hide global ref. handles. - * - * @return self A clone of $this. - */ - public function withRefHandles($useRefHandles) - { - $data = clone $this; - $data->useRefHandles = $useRefHandles ? -1 : 0; + /** + * Enables/disables objects' identifiers tracking. + * + * @param bool $useRefHandles False to hide global ref. handles + * + * @return self A clone of $this + */ + public function withRefHandles($useRefHandles) + { + $data = clone $this; + $data->useRefHandles = $useRefHandles ? -1 : 0; - return $data; - } + return $data; + } - /** - * Dumps data with a DumperInterface dumper. - */ - public function dump(DumperInterface $dumper) - { - $refs = array(0); - $this->dumpItem($dumper, new Cursor(), $refs, $this->data[0][0]); - } + /** + * Seeks to a specific key in nested data structures. + * + * @param string|int $key The key to seek to + * + * @return self|null A clone of $this of null if the key is not set + */ + public function seek($key) + { + $item = $this->data[$this->position][$this->key]; - /** - * Depth-first dumping of items. - * - * @param DumperInterface $dumper The dumper being used for dumping. - * @param Cursor $cursor A cursor used for tracking dumper state position. - * @param array &$refs A map of all references discovered while dumping. - * @param mixed $item A Stub object or the original value being dumped. - */ - private function dumpItem($dumper, $cursor, &$refs, $item) - { - $cursor->refIndex = 0; - $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; - $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; - $firstSeen = true; + if (!$item instanceof Stub || !$item->position) { + return; + } + $keys = array($key); - if (!$item instanceof Stub) { - $type = gettype($item); - } elseif (Stub::TYPE_REF === $item->type) { - if ($item->handle) { - if (!isset($refs[$r = $item->handle - (PHP_INT_MAX >> 1)])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->hardRefTo = $refs[$r]; - $cursor->hardRefHandle = $this->useRefHandles & $item->handle; - $cursor->hardRefCount = $item->refCount; - } - $type = $item->class ?: gettype($item->value); - $item = $item->value; - } - if ($item instanceof Stub) { - if ($item->refCount) { - if (!isset($refs[$r = $item->handle])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->softRefTo = $refs[$r]; - } - $cursor->softRefHandle = $this->useRefHandles & $item->handle; - $cursor->softRefCount = $item->refCount; - $cut = $item->cut; + switch ($item->type) { + case Stub::TYPE_OBJECT: + $keys[] = Caster::PREFIX_DYNAMIC.$key; + $keys[] = Caster::PREFIX_PROTECTED.$key; + $keys[] = Caster::PREFIX_VIRTUAL.$key; + $keys[] = "\0$item->class\0$key"; + case Stub::TYPE_ARRAY: + case Stub::TYPE_RESOURCE: + break; + default: + return; + } - if ($item->position && $firstSeen) { - $children = $this->data[$item->position]; + $data = null; + $children = $this->data[$item->position]; - if ($cursor->stop) { - if ($cut >= 0) { - $cut += count($children); - } - $children = array(); - } - } else { - $children = array(); - } - switch ($item->type) { - case Stub::TYPE_STRING: - $dumper->dumpString($cursor, $item->value, Stub::STRING_BINARY === $item->class, $cut); - break; + foreach ($keys as $key) { + if (isset($children[$key]) || array_key_exists($key, $children)) { + $data = clone $this; + $data->key = $key; + $data->position = $item->position; + break; + } + } - case Stub::TYPE_ARRAY: - $item = clone $item; - $item->type = $item->class; - $item->class = $item->value; - // No break; - case Stub::TYPE_OBJECT: - case Stub::TYPE_RESOURCE: - $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; - $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); - if ($withChildren) { - $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type); - } elseif ($children && 0 <= $cut) { - $cut += count($children); - } - $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); - break; + return $data; + } - default: - throw new \RuntimeException(sprintf('Unexpected Stub type: %s', $item->type)); - } - } elseif ('array' === $type) { - $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); - $dumper->leaveHash($cursor, Cursor::HASH_INDEXED, 0, false, 0); - } elseif ('string' === $type) { - $dumper->dumpString($cursor, $item, false, 0); - } else { - $dumper->dumpScalar($cursor, $type, $item); - } - } + /** + * Dumps data with a DumperInterface dumper. + */ + public function dump(DumperInterface $dumper) + { + $refs = array(0); + $this->dumpItem($dumper, new Cursor(), $refs, $this->data[$this->position][$this->key]); + } - /** - * Dumps children of hash structures. - * - * @param DumperInterface $dumper - * @param Cursor $parentCursor The cursor of the parent hash. - * @param array &$refs A map of all references discovered while dumping. - * @param array $children The children to dump. - * @param int $hashCut The number of items removed from the original hash. - * @param string $hashType A Cursor::HASH_* const. - * - * @return int The final number of removed items. - */ - private function dumpChildren($dumper, $parentCursor, &$refs, $children, $hashCut, $hashType) - { - $cursor = clone $parentCursor; - ++$cursor->depth; - $cursor->hashType = $hashType; - $cursor->hashIndex = 0; - $cursor->hashLength = count($children); - $cursor->hashCut = $hashCut; - foreach ($children as $key => $child) { - $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); - $cursor->hashKey = $key; - $this->dumpItem($dumper, $cursor, $refs, $child); - if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { - $parentCursor->stop = true; + /** + * Depth-first dumping of items. + * + * @param DumperInterface $dumper The dumper being used for dumping + * @param Cursor $cursor A cursor used for tracking dumper state position + * @param array &$refs A map of all references discovered while dumping + * @param mixed $item A Stub object or the original value being dumped + */ + private function dumpItem($dumper, $cursor, &$refs, $item) + { + $cursor->refIndex = 0; + $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; + $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; + $firstSeen = true; - return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; - } - } + if (!$item instanceof Stub) { + $cursor->attr = array(); + $type = gettype($item); + } elseif (Stub::TYPE_REF === $item->type) { + if ($item->handle) { + if (!isset($refs[$r = $item->handle - (PHP_INT_MAX >> 1)])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = false; + } + $cursor->hardRefTo = $refs[$r]; + $cursor->hardRefHandle = $this->useRefHandles & $item->handle; + $cursor->hardRefCount = $item->refCount; + } + $cursor->attr = $item->attr; + $type = $item->class ?: gettype($item->value); + $item = $item->value; + } + if ($item instanceof Stub) { + if ($item->refCount) { + if (!isset($refs[$r = $item->handle])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = false; + } + $cursor->softRefTo = $refs[$r]; + } + $cursor->softRefHandle = $this->useRefHandles & $item->handle; + $cursor->softRefCount = $item->refCount; + $cursor->attr = $item->attr; + $cut = $item->cut; - return $hashCut; - } + if ($item->position && $firstSeen) { + $children = $this->data[$item->position]; + + if ($cursor->stop) { + if ($cut >= 0) { + $cut += count($children); + } + $children = array(); + } + } else { + $children = array(); + } + switch ($item->type) { + case Stub::TYPE_STRING: + $dumper->dumpString($cursor, $item->value, Stub::STRING_BINARY === $item->class, $cut); + break; + + case Stub::TYPE_ARRAY: + $item = clone $item; + $item->type = $item->class; + $item->class = $item->value; + // No break; + case Stub::TYPE_OBJECT: + case Stub::TYPE_RESOURCE: + $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; + $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); + if ($withChildren) { + $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); + } elseif ($children && 0 <= $cut) { + $cut += count($children); + } + $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); + break; + + default: + throw new \RuntimeException(sprintf('Unexpected Stub type: %s', $item->type)); + } + } elseif ('array' === $type) { + $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); + $dumper->leaveHash($cursor, Cursor::HASH_INDEXED, 0, false, 0); + } elseif ('string' === $type) { + $dumper->dumpString($cursor, $item, false, 0); + } else { + $dumper->dumpScalar($cursor, $type, $item); + } + } + + /** + * Dumps children of hash structures. + * + * @param DumperInterface $dumper + * @param Cursor $parentCursor The cursor of the parent hash + * @param array &$refs A map of all references discovered while dumping + * @param array $children The children to dump + * @param int $hashCut The number of items removed from the original hash + * @param string $hashType A Cursor::HASH_* const + * @param bool $dumpKeys Whether keys should be dumped or not + * + * @return int The final number of removed items + */ + private function dumpChildren($dumper, $parentCursor, &$refs, $children, $hashCut, $hashType, $dumpKeys) + { + $cursor = clone $parentCursor; + ++$cursor->depth; + $cursor->hashType = $hashType; + $cursor->hashIndex = 0; + $cursor->hashLength = count($children); + $cursor->hashCut = $hashCut; + foreach ($children as $key => $child) { + $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); + $cursor->hashKey = $dumpKeys ? $key : null; + $this->dumpItem($dumper, $cursor, $refs, $child); + if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { + $parentCursor->stop = true; + + return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; + } + } + + return $hashCut; + } } diff --git a/htdocs/includes/symfony/var-dumper/Cloner/DumperInterface.php b/htdocs/includes/symfony/var-dumper/Cloner/DumperInterface.php index eba23d42297..8f647a7e5a7 100644 --- a/htdocs/includes/symfony/var-dumper/Cloner/DumperInterface.php +++ b/htdocs/includes/symfony/var-dumper/Cloner/DumperInterface.php @@ -18,43 +18,43 @@ namespace Symfony\Component\VarDumper\Cloner; */ interface DumperInterface { - /** - * Dumps a scalar value. - * - * @param Cursor $cursor The Cursor position in the dump. - * @param string $type The PHP type of the value being dumped. - * @param scalar $value The scalar value being dumped. - */ - public function dumpScalar(Cursor $cursor, $type, $value); + /** + * Dumps a scalar value. + * + * @param Cursor $cursor The Cursor position in the dump + * @param string $type The PHP type of the value being dumped + * @param scalar $value The scalar value being dumped + */ + public function dumpScalar(Cursor $cursor, $type, $value); - /** - * Dumps a string. - * - * @param Cursor $cursor The Cursor position in the dump. - * @param string $str The string being dumped. - * @param bool $bin Whether $str is UTF-8 or binary encoded. - * @param int $cut The number of characters $str has been cut by. - */ - public function dumpString(Cursor $cursor, $str, $bin, $cut); + /** + * Dumps a string. + * + * @param Cursor $cursor The Cursor position in the dump + * @param string $str The string being dumped + * @param bool $bin Whether $str is UTF-8 or binary encoded + * @param int $cut The number of characters $str has been cut by + */ + public function dumpString(Cursor $cursor, $str, $bin, $cut); - /** - * Dumps while entering an hash. - * - * @param Cursor $cursor The Cursor position in the dump. - * @param int $type A Cursor::HASH_* const for the type of hash. - * @param string $class The object class, resource type or array count. - * @param bool $hasChild When the dump of the hash has child item. - */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild); + /** + * Dumps while entering an hash. + * + * @param Cursor $cursor The Cursor position in the dump + * @param int $type A Cursor::HASH_* const for the type of hash + * @param string $class The object class, resource type or array count + * @param bool $hasChild When the dump of the hash has child item + */ + public function enterHash(Cursor $cursor, $type, $class, $hasChild); - /** - * Dumps while leaving an hash. - * - * @param Cursor $cursor The Cursor position in the dump. - * @param int $type A Cursor::HASH_* const for the type of hash. - * @param string $class The object class, resource type or array count. - * @param bool $hasChild When the dump of the hash has child item. - * @param int $cut The number of items the hash has been cut by. - */ - public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut); + /** + * Dumps while leaving an hash. + * + * @param Cursor $cursor The Cursor position in the dump + * @param int $type A Cursor::HASH_* const for the type of hash + * @param string $class The object class, resource type or array count + * @param bool $hasChild When the dump of the hash has child item + * @param int $cut The number of items the hash has been cut by + */ + public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut); } diff --git a/htdocs/includes/symfony/var-dumper/Cloner/Stub.php b/htdocs/includes/symfony/var-dumper/Cloner/Stub.php index f58a57a7276..8ee0f23b75e 100644 --- a/htdocs/includes/symfony/var-dumper/Cloner/Stub.php +++ b/htdocs/includes/symfony/var-dumper/Cloner/Stub.php @@ -18,23 +18,24 @@ namespace Symfony\Component\VarDumper\Cloner; */ class Stub { - const TYPE_REF = 'ref'; - const TYPE_STRING = 'string'; - const TYPE_ARRAY = 'array'; - const TYPE_OBJECT = 'object'; - const TYPE_RESOURCE = 'resource'; + const TYPE_REF = 'ref'; + const TYPE_STRING = 'string'; + const TYPE_ARRAY = 'array'; + const TYPE_OBJECT = 'object'; + const TYPE_RESOURCE = 'resource'; - const STRING_BINARY = 'bin'; - const STRING_UTF8 = 'utf8'; + const STRING_BINARY = 'bin'; + const STRING_UTF8 = 'utf8'; - const ARRAY_ASSOC = 'assoc'; - const ARRAY_INDEXED = 'indexed'; + const ARRAY_ASSOC = 'assoc'; + const ARRAY_INDEXED = 'indexed'; - public $type = self::TYPE_REF; - public $class = ''; - public $value; - public $cut = 0; - public $handle = 0; - public $refCount = 0; - public $position = 0; + public $type = self::TYPE_REF; + public $class = ''; + public $value; + public $cut = 0; + public $handle = 0; + public $refCount = 0; + public $position = 0; + public $attr = array(); } diff --git a/htdocs/includes/symfony/var-dumper/Cloner/VarCloner.php b/htdocs/includes/symfony/var-dumper/Cloner/VarCloner.php index 98d6e9e51c1..caadfe05e7d 100644 --- a/htdocs/includes/symfony/var-dumper/Cloner/VarCloner.php +++ b/htdocs/includes/symfony/var-dumper/Cloner/VarCloner.php @@ -16,285 +16,311 @@ namespace Symfony\Component\VarDumper\Cloner; */ class VarCloner extends AbstractCloner { - private static $hashMask = 0; - private static $hashOffset = 0; + private static $hashMask = 0; + private static $hashOffset = 0; - /** - * {@inheritdoc} - */ - protected function doClone($var) - { - $useExt = $this->useExt; - $i = 0; // Current iteration position in $queue - $len = 1; // Length of $queue - $pos = 0; // Number of cloned items past the first level - $refs = 0; // Hard references counter - $queue = array(array($var)); // This breadth-first queue is the return value - $arrayRefs = array(); // Map of queue indexes to stub array objects - $hardRefs = array(); // Map of original zval hashes to stub objects - $objRefs = array(); // Map of original object handles to their stub object couterpart - $resRefs = array(); // Map of original resource handles to their stub object couterpart - $values = array(); // Map of stub objects' hashes to original values - $maxItems = $this->maxItems; - $maxString = $this->maxString; - $cookie = (object) array(); // Unique object used to detect hard references - $gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable - $a = null; // Array cast for nested structures - $stub = null; // Stub capturing the main properties of an original item value - // or null if the original value is used directly - $zval = array( // Main properties of the current value - 'type' => null, - 'zval_isref' => null, - 'zval_hash' => null, - 'array_count' => null, - 'object_class' => null, - 'object_handle' => null, - 'resource_type' => null, - ); - if (!self::$hashMask) { - self::initHashMask(); - } - $hashMask = self::$hashMask; - $hashOffset = self::$hashOffset; + /** + * {@inheritdoc} + */ + protected function doClone($var) + { + $useExt = $this->useExt; + $len = 1; // Length of $queue + $pos = 0; // Number of cloned items past the first level + $refsCounter = 0; // Hard references counter + $queue = array(array($var)); // This breadth-first queue is the return value + $arrayRefs = array(); // Map of queue indexes to stub array objects + $hardRefs = array(); // Map of original zval hashes to stub objects + $objRefs = array(); // Map of original object handles to their stub object couterpart + $resRefs = array(); // Map of original resource handles to their stub object couterpart + $values = array(); // Map of stub objects' hashes to original values + $maxItems = $this->maxItems; + $maxString = $this->maxString; + $cookie = (object) array(); // Unique object used to detect hard references + $gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable + $a = null; // Array cast for nested structures + $stub = null; // Stub capturing the main properties of an original item value + // or null if the original value is used directly + $zval = array( // Main properties of the current value + 'type' => null, + 'zval_isref' => null, + 'zval_hash' => null, + 'array_count' => null, + 'object_class' => null, + 'object_handle' => null, + 'resource_type' => null, + ); + if (!self::$hashMask) { + self::initHashMask(); + } + $hashMask = self::$hashMask; + $hashOffset = self::$hashOffset; - for ($i = 0; $i < $len; ++$i) { - $indexed = true; // Whether the currently iterated array is numerically indexed or not - $j = -1; // Position in the currently iterated array - $step = $queue[$i]; // Copy of the currently iterated array used for hard references detection - foreach ($step as $k => $v) { - // $k is the original key - // $v is the original value or a stub object in case of hard references - if ($indexed && $k !== ++$j) { - $indexed = false; - } - if ($useExt) { - $zval = symfony_zval_info($k, $step); - } else { - $step[$k] = $cookie; - if ($zval['zval_isref'] = $queue[$i][$k] === $cookie) { - $zval['zval_hash'] = $v instanceof Stub ? spl_object_hash($v) : null; - } - $zval['type'] = gettype($v); - } - if ($zval['zval_isref']) { - $queue[$i][$k] = &$stub; // Break hard references to make $queue completely - unset($stub); // independent from the original structure - if (isset($hardRefs[$zval['zval_hash']])) { - $queue[$i][$k] = $useExt ? ($v = $hardRefs[$zval['zval_hash']]) : ($step[$k] = $v); - if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { - ++$v->value->refCount; - } - ++$v->refCount; - continue; - } - } - // Create $stub when the original value $v can not be used directly - // If $v is a nested structure, put that structure in array $a - switch ($zval['type']) { - case 'string': - if (isset($v[0]) && !preg_match('//u', $v)) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_BINARY; - if (0 <= $maxString && 0 < $cut = strlen($v) - $maxString) { - $stub->cut = $cut; - $stub->value = substr($v, 0, -$cut); - } else { - $stub->value = $v; - } - } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = iconv_strlen($v, 'UTF-8') - $maxString) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_UTF8; - $stub->cut = $cut; - $stub->value = iconv_substr($v, 0, $maxString, 'UTF-8'); - } - break; + for ($i = 0; $i < $len; ++$i) { + $indexed = true; // Whether the currently iterated array is numerically indexed or not + $j = -1; // Position in the currently iterated array + $fromObjCast = array_keys($queue[$i]); + $fromObjCast = array_keys(array_flip($fromObjCast)) !== $fromObjCast; + $refs = $vals = $fromObjCast ? array_values($queue[$i]) : $queue[$i]; + foreach ($queue[$i] as $k => $v) { + // $k is the original key + // $v is the original value or a stub object in case of hard references + if ($k !== ++$j) { + $indexed = false; + } + if ($fromObjCast) { + $k = $j; + } + if ($useExt) { + $zval = symfony_zval_info($k, $refs); + } else { + $refs[$k] = $cookie; + if ($zval['zval_isref'] = $vals[$k] === $cookie) { + $zval['zval_hash'] = $v instanceof Stub ? spl_object_hash($v) : null; + } + $zval['type'] = gettype($v); + } + if ($zval['zval_isref']) { + $vals[$k] = &$stub; // Break hard references to make $queue completely + unset($stub); // independent from the original structure + if (isset($hardRefs[$zval['zval_hash']])) { + $vals[$k] = $useExt ? ($v = $hardRefs[$zval['zval_hash']]) : ($refs[$k] = $v); + if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { + ++$v->value->refCount; + } + ++$v->refCount; + continue; + } + } + // Create $stub when the original value $v can not be used directly + // If $v is a nested structure, put that structure in array $a + switch ($zval['type']) { + case 'string': + if (isset($v[0]) && !preg_match('//u', $v)) { + $stub = new Stub(); + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_BINARY; + if (0 <= $maxString && 0 < $cut = strlen($v) - $maxString) { + $stub->cut = $cut; + $stub->value = substr($v, 0, -$cut); + } else { + $stub->value = $v; + } + } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = mb_strlen($v, 'UTF-8') - $maxString) { + $stub = new Stub(); + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_UTF8; + $stub->cut = $cut; + $stub->value = mb_substr($v, 0, $maxString, 'UTF-8'); + } + break; - case 'integer': - break; + case 'integer': + break; - case 'array': - if ($v) { - $stub = $arrayRefs[$len] = new Stub(); - $stub->type = Stub::TYPE_ARRAY; - $stub->class = Stub::ARRAY_ASSOC; + case 'array': + if ($v) { + $stub = $arrayRefs[$len] = new Stub(); + $stub->type = Stub::TYPE_ARRAY; + $stub->class = Stub::ARRAY_ASSOC; - // Copies of $GLOBALS have very strange behavior, - // let's detect them with some black magic - $a = $v; - $a[$gid] = true; + // Copies of $GLOBALS have very strange behavior, + // let's detect them with some black magic + $a = $v; + $a[$gid] = true; - // Happens with copies of $GLOBALS - if (isset($v[$gid])) { - unset($v[$gid]); - $a = array(); - foreach ($v as $gk => &$gv) { - $a[$gk] = &$gv; - } - } else { - $a = $v; - } + // Happens with copies of $GLOBALS + if (isset($v[$gid])) { + unset($v[$gid]); + $a = array(); + foreach ($v as $gk => &$gv) { + $a[$gk] = &$gv; + } + } else { + $a = $v; + } - $stub->value = $zval['array_count'] ?: count($a); - } - break; + $stub->value = $zval['array_count'] ?: count($a); + } + break; - case 'object': - if (empty($objRefs[$h = $zval['object_handle'] ?: ($hashMask ^ hexdec(substr(spl_object_hash($v), $hashOffset, PHP_INT_SIZE)))])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_OBJECT; - $stub->class = $zval['object_class'] ?: get_class($v); - $stub->value = $v; - $stub->handle = $h; - $a = $this->castObject($stub, 0 < $i); - if ($v !== $stub->value) { - if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { - break; - } - if ($useExt) { - $zval['type'] = $stub->value; - $zval = symfony_zval_info('type', $zval); - $h = $zval['object_handle']; - } else { - $h = $hashMask ^ hexdec(substr(spl_object_hash($stub->value), $hashOffset, PHP_INT_SIZE)); - } - $stub->handle = $h; - } - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos) { - $stub->cut = count($a); - $a = null; - } - } - if (empty($objRefs[$h])) { - $objRefs[$h] = $stub; - } else { - $stub = $objRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; + case 'object': + if (empty($objRefs[$h = $zval['object_handle'] ?: ($hashMask ^ hexdec(substr(spl_object_hash($v), $hashOffset, PHP_INT_SIZE)))])) { + $stub = new Stub(); + $stub->type = Stub::TYPE_OBJECT; + $stub->class = $zval['object_class'] ?: get_class($v); + $stub->value = $v; + $stub->handle = $h; + $a = $this->castObject($stub, 0 < $i); + if ($v !== $stub->value) { + if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { + break; + } + if ($useExt) { + $zval['type'] = $stub->value; + $zval = symfony_zval_info('type', $zval); + $h = $zval['object_handle']; + } else { + $h = $hashMask ^ hexdec(substr(spl_object_hash($stub->value), $hashOffset, PHP_INT_SIZE)); + } + $stub->handle = $h; + } + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos) { + $stub->cut = count($a); + $a = null; + } + } + if (empty($objRefs[$h])) { + $objRefs[$h] = $stub; + } else { + $stub = $objRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; - case 'resource': - case 'unknown type': - if (empty($resRefs[$h = (int) $v])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_RESOURCE; - $stub->class = $zval['resource_type'] ?: get_resource_type($v); - $stub->value = $v; - $stub->handle = $h; - $a = $this->castResource($stub, 0 < $i); - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos) { - $stub->cut = count($a); - $a = null; - } - } - if (empty($resRefs[$h])) { - $resRefs[$h] = $stub; - } else { - $stub = $resRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; - } + case 'resource': + case 'unknown type': + case 'resource (closed)': + if (empty($resRefs[$h = (int) $v])) { + $stub = new Stub(); + $stub->type = Stub::TYPE_RESOURCE; + if ('Unknown' === $stub->class = $zval['resource_type'] ?: @get_resource_type($v)) { + $stub->class = 'Closed'; + } + $stub->value = $v; + $stub->handle = $h; + $a = $this->castResource($stub, 0 < $i); + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos) { + $stub->cut = count($a); + $a = null; + } + } + if (empty($resRefs[$h])) { + $resRefs[$h] = $stub; + } else { + $stub = $resRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; + } - if (isset($stub)) { - if ($zval['zval_isref']) { - if ($useExt) { - $queue[$i][$k] = $hardRefs[$zval['zval_hash']] = $v = new Stub(); - $v->value = $stub; - } else { - $step[$k] = new Stub(); - $step[$k]->value = $stub; - $h = spl_object_hash($step[$k]); - $queue[$i][$k] = $hardRefs[$h] = &$step[$k]; - $values[$h] = $v; - } - $queue[$i][$k]->handle = ++$refs; - } else { - $queue[$i][$k] = $stub; - } + if (isset($stub)) { + if ($zval['zval_isref']) { + if ($useExt) { + $vals[$k] = $hardRefs[$zval['zval_hash']] = $v = new Stub(); + $v->value = $stub; + } else { + $refs[$k] = new Stub(); + $refs[$k]->value = $stub; + $h = spl_object_hash($refs[$k]); + $vals[$k] = $hardRefs[$h] = &$refs[$k]; + $values[$h] = $v; + } + $vals[$k]->handle = ++$refsCounter; + } else { + $vals[$k] = $stub; + } - if ($a) { - if ($i && 0 <= $maxItems) { - $k = count($a); - if ($pos < $maxItems) { - if ($maxItems < $pos += $k) { - $a = array_slice($a, 0, $maxItems - $pos); - if ($stub->cut >= 0) { - $stub->cut += $pos - $maxItems; - } - } - } else { - if ($stub->cut >= 0) { - $stub->cut += $k; - } - $stub = $a = null; - unset($arrayRefs[$len]); - continue; - } - } - $queue[$len] = $a; - $stub->position = $len++; - } - $stub = $a = null; - } elseif ($zval['zval_isref']) { - if ($useExt) { - $queue[$i][$k] = $hardRefs[$zval['zval_hash']] = new Stub(); - $queue[$i][$k]->value = $v; - } else { - $step[$k] = $queue[$i][$k] = new Stub(); - $step[$k]->value = $v; - $h = spl_object_hash($step[$k]); - $hardRefs[$h] = &$step[$k]; - $values[$h] = $v; - } - $queue[$i][$k]->handle = ++$refs; - } - } + if ($a) { + if ($i && 0 <= $maxItems) { + $k = count($a); + if ($pos < $maxItems) { + if ($maxItems < $pos += $k) { + $a = array_slice($a, 0, $maxItems - $pos); + if ($stub->cut >= 0) { + $stub->cut += $pos - $maxItems; + } + } + } else { + if ($stub->cut >= 0) { + $stub->cut += $k; + } + $stub = $a = null; + unset($arrayRefs[$len]); + continue; + } + } + $queue[$len] = $a; + $stub->position = $len++; + } + $stub = $a = null; + } elseif ($zval['zval_isref']) { + if ($useExt) { + $vals[$k] = $hardRefs[$zval['zval_hash']] = new Stub(); + $vals[$k]->value = $v; + } else { + $refs[$k] = $vals[$k] = new Stub(); + $refs[$k]->value = $v; + $h = spl_object_hash($refs[$k]); + $hardRefs[$h] = &$refs[$k]; + $values[$h] = $v; + } + $vals[$k]->handle = ++$refsCounter; + } + } - if (isset($arrayRefs[$i])) { - if ($indexed) { - $arrayRefs[$i]->class = Stub::ARRAY_INDEXED; - } - unset($arrayRefs[$i]); - } - } + if ($fromObjCast) { + $refs = $vals; + $vals = array(); + $j = -1; + foreach ($queue[$i] as $k => $v) { + foreach (array($k => $v) as $a => $v) { + } + if ($a !== $k) { + $vals = (object) $vals; + $vals->{$k} = $refs[++$j]; + $vals = (array) $vals; + } else { + $vals[$k] = $refs[++$j]; + } + } + } - foreach ($values as $h => $v) { - $hardRefs[$h] = $v; - } + $queue[$i] = $vals; - return $queue; - } + if (isset($arrayRefs[$i])) { + if ($indexed) { + $arrayRefs[$i]->class = Stub::ARRAY_INDEXED; + } + unset($arrayRefs[$i]); + } + } - private static function initHashMask() - { - $obj = (object) array(); - self::$hashOffset = 16 - PHP_INT_SIZE; - self::$hashMask = -1; + foreach ($values as $h => $v) { + $hardRefs[$h] = $v; + } - if (defined('HHVM_VERSION')) { - self::$hashOffset += 16; - } else { - // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below - $obFuncs = array('ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'); - foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) { - if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && in_array($frame['function'], $obFuncs)) { - $frame['line'] = 0; - break; - } - } - if (!empty($frame['line'])) { - ob_start(); - debug_zval_dump($obj); - self::$hashMask = substr(ob_get_clean(), 17); - } - } + return $queue; + } - self::$hashMask ^= hexdec(substr(spl_object_hash($obj), self::$hashOffset, PHP_INT_SIZE)); - } + private static function initHashMask() + { + $obj = (object) array(); + self::$hashOffset = 16 - PHP_INT_SIZE; + self::$hashMask = -1; + + if (defined('HHVM_VERSION')) { + self::$hashOffset += 16; + } else { + // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below + $obFuncs = array('ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'); + foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) { + if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && in_array($frame['function'], $obFuncs)) { + $frame['line'] = 0; + break; + } + } + if (!empty($frame['line'])) { + ob_start(); + debug_zval_dump($obj); + self::$hashMask = (int) substr(ob_get_clean(), 17); + } + } + + self::$hashMask ^= hexdec(substr(spl_object_hash($obj), self::$hashOffset, PHP_INT_SIZE)); + } } diff --git a/htdocs/includes/symfony/var-dumper/Dumper/AbstractDumper.php b/htdocs/includes/symfony/var-dumper/Dumper/AbstractDumper.php index f8b9c107779..fb68a8908c4 100644 --- a/htdocs/includes/symfony/var-dumper/Dumper/AbstractDumper.php +++ b/htdocs/includes/symfony/var-dumper/Dumper/AbstractDumper.php @@ -21,156 +21,181 @@ use Symfony\Component\VarDumper\Cloner\DumperInterface; */ abstract class AbstractDumper implements DataDumperInterface, DumperInterface { - public static $defaultOutput = 'php://output'; + const DUMP_LIGHT_ARRAY = 1; + const DUMP_STRING_LENGTH = 2; - protected $line = ''; - protected $lineDumper; - protected $outputStream; - protected $decimalPoint; // This is locale dependent - protected $indentPad = ' '; + public static $defaultOutput = 'php://output'; - private $charset; + protected $line = ''; + protected $lineDumper; + protected $outputStream; + protected $decimalPoint; // This is locale dependent + protected $indentPad = ' '; + protected $flags; - /** - * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput. - * @param string $charset The default character encoding to use for non-UTF8 strings. - */ - public function __construct($output = null, $charset = null) - { - $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); - $this->decimalPoint = (string) 0.5; - $this->decimalPoint = $this->decimalPoint[1]; - $this->setOutput($output ?: static::$defaultOutput); - if (!$output && is_string(static::$defaultOutput)) { - static::$defaultOutput = $this->outputStream; - } - } + private $charset; - /** - * Sets the output destination of the dumps. - * - * @param callable|resource|string $output A line dumper callable, an opened stream or an output path. - * - * @return callable|resource|string The previous output destination. - */ - public function setOutput($output) - { - $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; + /** + * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput + * @param string $charset The default character encoding to use for non-UTF8 strings + * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation + */ + public function __construct($output = null, $charset = null, $flags = 0) + { + $this->flags = (int) $flags; + $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); + $this->decimalPoint = localeconv(); + $this->decimalPoint = $this->decimalPoint['decimal_point']; + $this->setOutput($output ?: static::$defaultOutput); + if (!$output && is_string(static::$defaultOutput)) { + static::$defaultOutput = $this->outputStream; + } + } - if (is_callable($output)) { - $this->outputStream = null; - $this->lineDumper = $output; - } else { - if (is_string($output)) { - $output = fopen($output, 'wb'); - } - $this->outputStream = $output; - $this->lineDumper = array($this, 'echoLine'); - } + /** + * Sets the output destination of the dumps. + * + * @param callable|resource|string $output A line dumper callable, an opened stream or an output path + * + * @return callable|resource|string The previous output destination + */ + public function setOutput($output) + { + $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; - return $prev; - } + if (is_callable($output)) { + $this->outputStream = null; + $this->lineDumper = $output; + } else { + if (is_string($output)) { + $output = fopen($output, 'wb'); + } + $this->outputStream = $output; + $this->lineDumper = array($this, 'echoLine'); + } - /** - * Sets the default character encoding to use for non-UTF8 strings. - * - * @param string $charset The default character encoding to use for non-UTF8 strings. - * - * @return string The previous charset. - */ - public function setCharset($charset) - { - $prev = $this->charset; + return $prev; + } - $charset = strtoupper($charset); - $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; + /** + * Sets the default character encoding to use for non-UTF8 strings. + * + * @param string $charset The default character encoding to use for non-UTF8 strings + * + * @return string The previous charset + */ + public function setCharset($charset) + { + $prev = $this->charset; - $this->charset = $charset; + $charset = strtoupper($charset); + $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; - return $prev; - } + $this->charset = $charset; - /** - * Sets the indentation pad string. - * - * @param string $pad A string the will be prepended to dumped lines, repeated by nesting level. - * - * @return string The indent pad. - */ - public function setIndentPad($pad) - { - $prev = $this->indentPad; - $this->indentPad = $pad; + return $prev; + } - return $prev; - } + /** + * Sets the indentation pad string. + * + * @param string $pad A string the will be prepended to dumped lines, repeated by nesting level + * + * @return string The indent pad + */ + public function setIndentPad($pad) + { + $prev = $this->indentPad; + $this->indentPad = $pad; - /** - * Dumps a Data object. - * - * @param Data $data A Data object. - * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path. - */ - public function dump(Data $data, $output = null) - { - $exception = null; - if ($output) { - $prevOutput = $this->setOutput($output); - } - try { - $data->dump($this); - $this->dumpLine(-1); - } catch (\Exception $exception) { - // Re-thrown below - } - if ($output) { - $this->setOutput($prevOutput); - } - if (null !== $exception) { - throw $exception; - } - } + return $prev; + } - /** - * Dumps the current line. - * - * @param int $depth The recursive depth in the dumped structure for the line being dumped. - */ - protected function dumpLine($depth) - { - call_user_func($this->lineDumper, $this->line, $depth, $this->indentPad); - $this->line = ''; - } + /** + * Dumps a Data object. + * + * @param Data $data A Data object + * @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump + * + * @return string|null The dump as string when $output is true + */ + public function dump(Data $data, $output = null) + { + $this->decimalPoint = localeconv(); + $this->decimalPoint = $this->decimalPoint['decimal_point']; - /** - * Generic line dumper callback. - * - * @param string $line The line to write. - * @param int $depth The recursive depth in the dumped structure. - */ - protected function echoLine($line, $depth, $indentPad) - { - if (-1 !== $depth) { - fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n"); - } - } + if ($returnDump = true === $output) { + $output = fopen('php://memory', 'r+b'); + } + if ($output) { + $prevOutput = $this->setOutput($output); + } + try { + $data->dump($this); + $this->dumpLine(-1); - /** - * Converts a non-UTF-8 string to UTF-8. - * - * @param string $s The non-UTF-8 string to convert. - * - * @return string The string converted to UTF-8. - */ - protected function utf8Encode($s) - { - if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) { - return $c; - } - if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) { - return $c; - } + if ($returnDump) { + $result = stream_get_contents($output, -1, 0); + fclose($output); - return iconv('CP850', 'UTF-8', $s); - } + return $result; + } + } finally { + if ($output) { + $this->setOutput($prevOutput); + } + } + } + + /** + * Dumps the current line. + * + * @param int $depth The recursive depth in the dumped structure for the line being dumped + */ + protected function dumpLine($depth) + { + call_user_func($this->lineDumper, $this->line, $depth, $this->indentPad); + $this->line = ''; + } + + /** + * Generic line dumper callback. + * + * @param string $line The line to write + * @param int $depth The recursive depth in the dumped structure + * @param string $indentPad The line indent pad + */ + protected function echoLine($line, $depth, $indentPad) + { + if (-1 !== $depth) { + fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n"); + } + } + + /** + * Converts a non-UTF-8 string to UTF-8. + * + * @param string $s The non-UTF-8 string to convert + * + * @return string The string converted to UTF-8 + */ + protected function utf8Encode($s) + { + if (preg_match('//u', $s)) { + return $s; + } + + if (!function_exists('iconv')) { + throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); + } + + if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) { + return $c; + } + if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) { + return $c; + } + + return iconv('CP850', 'UTF-8', $s); + } } diff --git a/htdocs/includes/symfony/var-dumper/Dumper/CliDumper.php b/htdocs/includes/symfony/var-dumper/Dumper/CliDumper.php index bca2abcb3d0..95304b92817 100644 --- a/htdocs/includes/symfony/var-dumper/Dumper/CliDumper.php +++ b/htdocs/includes/symfony/var-dumper/Dumper/CliDumper.php @@ -20,452 +20,470 @@ use Symfony\Component\VarDumper\Cloner\Cursor; */ class CliDumper extends AbstractDumper { - public static $defaultColors; - public static $defaultOutput = 'php://stdout'; + public static $defaultColors; + public static $defaultOutput = 'php://stdout'; - protected $colors; - protected $maxStringWidth = 0; - protected $styles = array( - // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics - 'default' => '38;5;208', - 'num' => '1;38;5;38', - 'const' => '1;38;5;208', - 'str' => '1;38;5;113', - 'note' => '38;5;38', - 'ref' => '38;5;247', - 'public' => '', - 'protected' => '', - 'private' => '', - 'meta' => '38;5;170', - 'key' => '38;5;113', - 'index' => '38;5;38', - ); + protected $colors; + protected $maxStringWidth = 0; + protected $styles = array( + // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics + 'default' => '38;5;208', + 'num' => '1;38;5;38', + 'const' => '1;38;5;208', + 'str' => '1;38;5;113', + 'note' => '38;5;38', + 'ref' => '38;5;247', + 'public' => '', + 'protected' => '', + 'private' => '', + 'meta' => '38;5;170', + 'key' => '38;5;113', + 'index' => '38;5;38', + ); - protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; - protected static $controlCharsMap = array( - "\t" => '\t', - "\n" => '\n', - "\v" => '\v', - "\f" => '\f', - "\r" => '\r', - "\033" => '\e', - ); + protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; + protected static $controlCharsMap = array( + "\t" => '\t', + "\n" => '\n', + "\v" => '\v', + "\f" => '\f', + "\r" => '\r', + "\033" => '\e', + ); - /** - * {@inheritdoc} - */ - public function __construct($output = null, $charset = null) - { - parent::__construct($output, $charset); + /** + * {@inheritdoc} + */ + public function __construct($output = null, $charset = null, $flags = 0) + { + parent::__construct($output, $charset, $flags); - if ('\\' === DIRECTORY_SEPARATOR && false !== @getenv('ANSICON')) { - // Use only the base 16 xterm colors when using ANSICON - $this->setStyles(array( - 'default' => '31', - 'num' => '1;34', - 'const' => '1;31', - 'str' => '1;32', - 'note' => '34', - 'ref' => '1;30', - 'meta' => '35', - 'key' => '32', - 'index' => '34', - )); - } - } + if ('\\' === DIRECTORY_SEPARATOR && 'ON' !== @getenv('ConEmuANSI') && 'xterm' !== @getenv('TERM')) { + // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI + $this->setStyles(array( + 'default' => '31', + 'num' => '1;34', + 'const' => '1;31', + 'str' => '1;32', + 'note' => '34', + 'ref' => '1;30', + 'meta' => '35', + 'key' => '32', + 'index' => '34', + )); + } + } - /** - * Enables/disables colored output. - * - * @param bool $colors - */ - public function setColors($colors) - { - $this->colors = (bool) $colors; - } + /** + * Enables/disables colored output. + * + * @param bool $colors + */ + public function setColors($colors) + { + $this->colors = (bool) $colors; + } - /** - * Sets the maximum number of characters per line for dumped strings. - * - * @param int $maxStringWidth - */ - public function setMaxStringWidth($maxStringWidth) - { - $this->maxStringWidth = (int) $maxStringWidth; - } + /** + * Sets the maximum number of characters per line for dumped strings. + * + * @param int $maxStringWidth + */ + public function setMaxStringWidth($maxStringWidth) + { + $this->maxStringWidth = (int) $maxStringWidth; + } - /** - * Configures styles. - * - * @param array $styles A map of style names to style definitions. - */ - public function setStyles(array $styles) - { - $this->styles = $styles + $this->styles; - } + /** + * Configures styles. + * + * @param array $styles A map of style names to style definitions + */ + public function setStyles(array $styles) + { + $this->styles = $styles + $this->styles; + } - /** - * {@inheritdoc} - */ - public function dumpScalar(Cursor $cursor, $type, $value) - { - $this->dumpKey($cursor); + /** + * {@inheritdoc} + */ + public function dumpScalar(Cursor $cursor, $type, $value) + { + $this->dumpKey($cursor); - $style = 'const'; - $attr = array(); + $style = 'const'; + $attr = $cursor->attr; - switch ($type) { - case 'integer': - $style = 'num'; - break; + switch ($type) { + case 'default': + $style = 'default'; + break; - case 'double': - $style = 'num'; + case 'integer': + $style = 'num'; + break; - switch (true) { - case INF === $value: $value = 'INF'; break; - case -INF === $value: $value = '-INF'; break; - case is_nan($value): $value = 'NAN'; break; - default: - $value = (string) $value; - if (false === strpos($value, $this->decimalPoint)) { - $value .= $this->decimalPoint.'0'; - } - break; - } - break; + case 'double': + $style = 'num'; - case 'NULL': - $value = 'null'; - break; + switch (true) { + case INF === $value: $value = 'INF'; break; + case -INF === $value: $value = '-INF'; break; + case is_nan($value): $value = 'NAN'; break; + default: + $value = (string) $value; + if (false === strpos($value, $this->decimalPoint)) { + $value .= $this->decimalPoint.'0'; + } + break; + } + break; - case 'boolean': - $value = $value ? 'true' : 'false'; - break; + case 'NULL': + $value = 'null'; + break; - default: - $attr['value'] = isset($value[0]) && !preg_match('//u', $value) ? $this->utf8Encode($value) : $value; - $value = isset($type[0]) && !preg_match('//u', $type) ? $this->utf8Encode($type) : $type; - break; - } + case 'boolean': + $value = $value ? 'true' : 'false'; + break; - $this->line .= $this->style($style, $value, $attr); + default: + $attr += array('value' => $this->utf8Encode($value)); + $value = $this->utf8Encode($type); + break; + } - $this->dumpLine($cursor->depth, true); - } + $this->line .= $this->style($style, $value, $attr); - /** - * {@inheritdoc} - */ - public function dumpString(Cursor $cursor, $str, $bin, $cut) - { - $this->dumpKey($cursor); + $this->dumpLine($cursor->depth, true); + } - if ($bin) { - $str = $this->utf8Encode($str); - } - if ('' === $str) { - $this->line .= '""'; - $this->dumpLine($cursor->depth, true); - } else { - $attr = array( - 'length' => 0 <= $cut ? iconv_strlen($str, 'UTF-8') + $cut : 0, - 'binary' => $bin, - ); - $str = explode("\n", $str); - if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { - unset($str[1]); - $str[0] .= "\n"; - } - $m = count($str) - 1; - $i = $lineCut = 0; + /** + * {@inheritdoc} + */ + public function dumpString(Cursor $cursor, $str, $bin, $cut) + { + $this->dumpKey($cursor); + $attr = $cursor->attr; - if ($bin) { - $this->line .= 'b'; - } + if ($bin) { + $str = $this->utf8Encode($str); + } + if ('' === $str) { + $this->line .= '""'; + $this->dumpLine($cursor->depth, true); + } else { + $attr += array( + 'length' => 0 <= $cut ? mb_strlen($str, 'UTF-8') + $cut : 0, + 'binary' => $bin, + ); + $str = explode("\n", $str); + if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { + unset($str[1]); + $str[0] .= "\n"; + } + $m = count($str) - 1; + $i = $lineCut = 0; - if ($m) { - $this->line .= '"""'; - $this->dumpLine($cursor->depth); - } else { - $this->line .= '"'; - } + if (self::DUMP_STRING_LENGTH & $this->flags) { + $this->line .= '('.$attr['length'].') '; + } + if ($bin) { + $this->line .= 'b'; + } - foreach ($str as $str) { - if ($i < $m) { - $str .= "\n"; - } - if (0 < $this->maxStringWidth && $this->maxStringWidth < $len = iconv_strlen($str, 'UTF-8')) { - $str = iconv_substr($str, 0, $this->maxStringWidth, 'UTF-8'); - $lineCut = $len - $this->maxStringWidth; - } - if ($m && 0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - if ('' !== $str) { - $this->line .= $this->style('str', $str, $attr); - } - if ($i++ == $m) { - if ($m) { - if ('' !== $str) { - $this->dumpLine($cursor->depth); - if (0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - } - $this->line .= '"""'; - } else { - $this->line .= '"'; - } - if ($cut < 0) { - $this->line .= '…'; - $lineCut = 0; - } elseif ($cut) { - $lineCut += $cut; - } - } - if ($lineCut) { - $this->line .= '…'.$lineCut; - $lineCut = 0; - } + if ($m) { + $this->line .= '"""'; + $this->dumpLine($cursor->depth); + } else { + $this->line .= '"'; + } - $this->dumpLine($cursor->depth, $i > $m); - } - } - } + foreach ($str as $str) { + if ($i < $m) { + $str .= "\n"; + } + if (0 < $this->maxStringWidth && $this->maxStringWidth < $len = mb_strlen($str, 'UTF-8')) { + $str = mb_substr($str, 0, $this->maxStringWidth, 'UTF-8'); + $lineCut = $len - $this->maxStringWidth; + } + if ($m && 0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + if ('' !== $str) { + $this->line .= $this->style('str', $str, $attr); + } + if ($i++ == $m) { + if ($m) { + if ('' !== $str) { + $this->dumpLine($cursor->depth); + if (0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + } + $this->line .= '"""'; + } else { + $this->line .= '"'; + } + if ($cut < 0) { + $this->line .= '…'; + $lineCut = 0; + } elseif ($cut) { + $lineCut += $cut; + } + } + if ($lineCut) { + $this->line .= '…'.$lineCut; + $lineCut = 0; + } - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild) - { - $this->dumpKey($cursor); + $this->dumpLine($cursor->depth, $i > $m); + } + } + } - if (!preg_match('//u', $class)) { - $class = $this->utf8Encode($class); - } - if (Cursor::HASH_OBJECT === $type) { - $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class).' {' : '{'; - } elseif (Cursor::HASH_RESOURCE === $type) { - $prefix = $this->style('note', $class.' resource').($hasChild ? ' {' : ' '); - } else { - $prefix = $class ? $this->style('note', 'array:'.$class).' [' : '['; - } + /** + * {@inheritdoc} + */ + public function enterHash(Cursor $cursor, $type, $class, $hasChild) + { + $this->dumpKey($cursor); - if ($cursor->softRefCount || 0 < $cursor->softRefHandle) { - $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), array('count' => $cursor->softRefCount)); - } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { - $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, array('count' => $cursor->hardRefCount)); - } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { - $prefix = substr($prefix, 0, -1); - } + $class = $this->utf8Encode($class); + if (Cursor::HASH_OBJECT === $type) { + $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class).' {' : '{'; + } elseif (Cursor::HASH_RESOURCE === $type) { + $prefix = $this->style('note', $class.' resource').($hasChild ? ' {' : ' '); + } else { + $prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class).' [' : '['; + } - $this->line .= $prefix; + if ($cursor->softRefCount || 0 < $cursor->softRefHandle) { + $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), array('count' => $cursor->softRefCount)); + } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { + $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, array('count' => $cursor->hardRefCount)); + } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { + $prefix = substr($prefix, 0, -1); + } - if ($hasChild) { - $this->dumpLine($cursor->depth); - } - } + $this->line .= $prefix; - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) - { - $this->dumpEllipsis($cursor, $hasChild, $cut); - $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); - $this->dumpLine($cursor->depth, true); - } + if ($hasChild) { + $this->dumpLine($cursor->depth); + } + } - /** - * Dumps an ellipsis for cut children. - * - * @param Cursor $cursor The Cursor position in the dump. - * @param bool $hasChild When the dump of the hash has child item. - * @param int $cut The number of items the hash has been cut by. - */ - protected function dumpEllipsis(Cursor $cursor, $hasChild, $cut) - { - if ($cut) { - $this->line .= ' …'; - if (0 < $cut) { - $this->line .= $cut; - } - if ($hasChild) { - $this->dumpLine($cursor->depth + 1); - } - } - } + /** + * {@inheritdoc} + */ + public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) + { + $this->dumpEllipsis($cursor, $hasChild, $cut); + $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); + $this->dumpLine($cursor->depth, true); + } - /** - * Dumps a key in a hash structure. - * - * @param Cursor $cursor The Cursor position in the dump. - */ - protected function dumpKey(Cursor $cursor) - { - if (null !== $key = $cursor->hashKey) { - if ($cursor->hashKeyIsBinary) { - $key = $this->utf8Encode($key); - } - $attr = array('binary' => $cursor->hashKeyIsBinary); - $bin = $cursor->hashKeyIsBinary ? 'b' : ''; - $style = 'key'; - switch ($cursor->hashType) { - default: - case Cursor::HASH_INDEXED: - $style = 'index'; - case Cursor::HASH_ASSOC: - if (is_int($key)) { - $this->line .= $this->style($style, $key).' => '; - } else { - $this->line .= $bin.'"'.$this->style($style, $key).'" => '; - } - break; + /** + * Dumps an ellipsis for cut children. + * + * @param Cursor $cursor The Cursor position in the dump + * @param bool $hasChild When the dump of the hash has child item + * @param int $cut The number of items the hash has been cut by + */ + protected function dumpEllipsis(Cursor $cursor, $hasChild, $cut) + { + if ($cut) { + $this->line .= ' …'; + if (0 < $cut) { + $this->line .= $cut; + } + if ($hasChild) { + $this->dumpLine($cursor->depth + 1); + } + } + } - case Cursor::HASH_RESOURCE: - $key = "\0~\0".$key; - // No break; - case Cursor::HASH_OBJECT: - if (!isset($key[0]) || "\0" !== $key[0]) { - $this->line .= '+'.$bin.$this->style('public', $key).': '; - } elseif (0 < strpos($key, "\0", 1)) { - $key = explode("\0", substr($key, 1), 2); + /** + * Dumps a key in a hash structure. + * + * @param Cursor $cursor The Cursor position in the dump + */ + protected function dumpKey(Cursor $cursor) + { + if (null !== $key = $cursor->hashKey) { + if ($cursor->hashKeyIsBinary) { + $key = $this->utf8Encode($key); + } + $attr = array('binary' => $cursor->hashKeyIsBinary); + $bin = $cursor->hashKeyIsBinary ? 'b' : ''; + $style = 'key'; + switch ($cursor->hashType) { + default: + case Cursor::HASH_INDEXED: + if (self::DUMP_LIGHT_ARRAY & $this->flags) { + break; + } + $style = 'index'; + case Cursor::HASH_ASSOC: + if (is_int($key)) { + $this->line .= $this->style($style, $key).' => '; + } else { + $this->line .= $bin.'"'.$this->style($style, $key).'" => '; + } + break; - switch ($key[0]) { - case '+': // User inserted keys - $attr['dynamic'] = true; - $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; - break 2; - case '~': - $style = 'meta'; - break; - case '*': - $style = 'protected'; - $bin = '#'.$bin; - break; - default: - $attr['class'] = $key[0]; - $style = 'private'; - $bin = '-'.$bin; - break; - } + case Cursor::HASH_RESOURCE: + $key = "\0~\0".$key; + // No break; + case Cursor::HASH_OBJECT: + if (!isset($key[0]) || "\0" !== $key[0]) { + $this->line .= '+'.$bin.$this->style('public', $key).': '; + } elseif (0 < strpos($key, "\0", 1)) { + $key = explode("\0", substr($key, 1), 2); - $this->line .= $bin.$this->style($style, $key[1], $attr).': '; - } else { - // This case should not happen - $this->line .= '-'.$bin.'"'.$this->style('private', $key, array('class' => '')).'": '; - } - break; - } + switch ($key[0][0]) { + case '+': // User inserted keys + $attr['dynamic'] = true; + $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; + break 2; + case '~': + $style = 'meta'; + if (isset($key[0][1])) { + parse_str(substr($key[0], 1), $attr); + $attr += array('binary' => $cursor->hashKeyIsBinary); + } + break; + case '*': + $style = 'protected'; + $bin = '#'.$bin; + break; + default: + $attr['class'] = $key[0]; + $style = 'private'; + $bin = '-'.$bin; + break; + } - if ($cursor->hardRefTo) { - $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), array('count' => $cursor->hardRefCount)).' '; - } - } - } + $this->line .= $bin.$this->style($style, $key[1], $attr).': '; + } else { + // This case should not happen + $this->line .= '-'.$bin.'"'.$this->style('private', $key, array('class' => '')).'": '; + } + break; + } - /** - * Decorates a value with some style. - * - * @param string $style The type of style being applied. - * @param string $value The value being styled. - * @param array $attr Optional context information. - * - * @return string The value with style decoration. - */ - protected function style($style, $value, $attr = array()) - { - if (null === $this->colors) { - $this->colors = $this->supportsColors(); - } + if ($cursor->hardRefTo) { + $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), array('count' => $cursor->hardRefCount)).' '; + } + } + } - $style = $this->styles[$style]; + /** + * Decorates a value with some style. + * + * @param string $style The type of style being applied + * @param string $value The value being styled + * @param array $attr Optional context information + * + * @return string The value with style decoration + */ + protected function style($style, $value, $attr = array()) + { + if (null === $this->colors) { + $this->colors = $this->supportsColors(); + } - $map = static::$controlCharsMap; - $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; - $endCchr = $this->colors ? "\033[m\033[{$style}m" : ''; - $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { - $s = $startCchr; - $c = $c[$i = 0]; - do { - $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); - } while (isset($c[++$i])); + $style = $this->styles[$style]; - return $s.$endCchr; - }, $value, -1, $cchrCount); + $map = static::$controlCharsMap; + $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; + $endCchr = $this->colors ? "\033[m\033[{$style}m" : ''; + $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { + $s = $startCchr; + $c = $c[$i = 0]; + do { + $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); + } while (isset($c[++$i])); - if ($this->colors) { - if ($cchrCount && "\033" === $value[0]) { - $value = substr($value, strlen($startCchr)); - } else { - $value = "\033[{$style}m".$value; - } - if ($cchrCount && $endCchr === substr($value, -strlen($endCchr))) { - $value = substr($value, 0, -strlen($endCchr)); - } else { - $value .= "\033[{$this->styles['default']}m"; - } - } + return $s.$endCchr; + }, $value, -1, $cchrCount); - return $value; - } + if ($this->colors) { + if ($cchrCount && "\033" === $value[0]) { + $value = substr($value, strlen($startCchr)); + } else { + $value = "\033[{$style}m".$value; + } + if ($cchrCount && $endCchr === substr($value, -strlen($endCchr))) { + $value = substr($value, 0, -strlen($endCchr)); + } else { + $value .= "\033[{$this->styles['default']}m"; + } + } - /** - * @return bool Tells if the current output stream supports ANSI colors or not. - */ - protected function supportsColors() - { - if ($this->outputStream !== static::$defaultOutput) { - return @(is_resource($this->outputStream) && function_exists('posix_isatty') && posix_isatty($this->outputStream)); - } - if (null !== static::$defaultColors) { - return static::$defaultColors; - } - if (isset($_SERVER['argv'][1])) { - $colors = $_SERVER['argv']; - $i = count($colors); - while (--$i > 0) { - if (isset($colors[$i][5])) { - switch ($colors[$i]) { - case '--ansi': - case '--color': - case '--color=yes': - case '--color=force': - case '--color=always': - return static::$defaultColors = true; + return $value; + } - case '--no-ansi': - case '--color=no': - case '--color=none': - case '--color=never': - return static::$defaultColors = false; - } - } - } - } + /** + * @return bool Tells if the current output stream supports ANSI colors or not + */ + protected function supportsColors() + { + if ($this->outputStream !== static::$defaultOutput) { + return @(is_resource($this->outputStream) && function_exists('posix_isatty') && posix_isatty($this->outputStream)); + } + if (null !== static::$defaultColors) { + return static::$defaultColors; + } + if (isset($_SERVER['argv'][1])) { + $colors = $_SERVER['argv']; + $i = count($colors); + while (--$i > 0) { + if (isset($colors[$i][5])) { + switch ($colors[$i]) { + case '--ansi': + case '--color': + case '--color=yes': + case '--color=force': + case '--color=always': + return static::$defaultColors = true; - if ('\\' === DIRECTORY_SEPARATOR) { - static::$defaultColors = @(false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM')); - } elseif (function_exists('posix_isatty')) { - $h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null); - $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'wb') : $this->outputStream; - static::$defaultColors = @posix_isatty($h); - } else { - static::$defaultColors = false; - } + case '--no-ansi': + case '--color=no': + case '--color=none': + case '--color=never': + return static::$defaultColors = false; + } + } + } + } - return static::$defaultColors; - } + if ('\\' === DIRECTORY_SEPARATOR) { + static::$defaultColors = @( + '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM') + ); + } elseif (function_exists('posix_isatty')) { + $h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null); + $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'wb') : $this->outputStream; + static::$defaultColors = @posix_isatty($h); + } else { + static::$defaultColors = false; + } - /** - * {@inheritdoc} - */ - protected function dumpLine($depth, $endOfValue = false) - { - if ($this->colors) { - $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); - } - parent::dumpLine($depth); - } + return static::$defaultColors; + } + + /** + * {@inheritdoc} + */ + protected function dumpLine($depth, $endOfValue = false) + { + if ($this->colors) { + $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); + } + parent::dumpLine($depth); + } } diff --git a/htdocs/includes/symfony/var-dumper/Dumper/DataDumperInterface.php b/htdocs/includes/symfony/var-dumper/Dumper/DataDumperInterface.php index ee6060cebf6..abaa85c19bd 100644 --- a/htdocs/includes/symfony/var-dumper/Dumper/DataDumperInterface.php +++ b/htdocs/includes/symfony/var-dumper/Dumper/DataDumperInterface.php @@ -20,10 +20,10 @@ use Symfony\Component\VarDumper\Cloner\Data; */ interface DataDumperInterface { - /** - * Dumps a Data object. - * - * @param Data $data A Data object. - */ - public function dump(Data $data); + /** + * Dumps a Data object. + * + * @param Data $data A Data object + */ + public function dump(Data $data); } diff --git a/htdocs/includes/symfony/var-dumper/Dumper/HtmlDumper.php b/htdocs/includes/symfony/var-dumper/Dumper/HtmlDumper.php index 28af8e4cb22..10a3ffa41c0 100644 --- a/htdocs/includes/symfony/var-dumper/Dumper/HtmlDumper.php +++ b/htdocs/includes/symfony/var-dumper/Dumper/HtmlDumper.php @@ -21,103 +21,114 @@ use Symfony\Component\VarDumper\Cloner\Data; */ class HtmlDumper extends CliDumper { - public static $defaultOutput = 'php://output'; + public static $defaultOutput = 'php://output'; - protected $dumpHeader; - protected $dumpPrefix = '
    ';
    -    protected $dumpSuffix = '
    '; - protected $dumpId = 'sf-dump'; - protected $colors = true; - protected $headerIsDumped = false; - protected $lastDepth = -1; - protected $styles = array( - 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:100000; word-break: normal', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#56DB3A', - 'note' => 'color:#1299DA', - 'ref' => 'color:#A0A0A0', - 'public' => 'color:#FFFFFF', - 'protected' => 'color:#FFFFFF', - 'private' => 'color:#FFFFFF', - 'meta' => 'color:#B729D9', - 'key' => 'color:#56DB3A', - 'index' => 'color:#1299DA', - ); + protected $dumpHeader; + protected $dumpPrefix = '
    ';
    +	protected $dumpSuffix = '
    '; + protected $dumpId = 'sf-dump'; + protected $colors = true; + protected $headerIsDumped = false; + protected $lastDepth = -1; + protected $styles = array( + 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: normal', + 'num' => 'font-weight:bold; color:#1299DA', + 'const' => 'font-weight:bold', + 'str' => 'font-weight:bold; color:#56DB3A', + 'note' => 'color:#1299DA', + 'ref' => 'color:#A0A0A0', + 'public' => 'color:#FFFFFF', + 'protected' => 'color:#FFFFFF', + 'private' => 'color:#FFFFFF', + 'meta' => 'color:#B729D9', + 'key' => 'color:#56DB3A', + 'index' => 'color:#1299DA', + 'ellipsis' => 'color:#FF8400', + ); - /** - * {@inheritdoc} - */ - public function __construct($output = null, $charset = null) - { - AbstractDumper::__construct($output, $charset); - $this->dumpId = 'sf-dump-'.mt_rand(); - } + private $displayOptions = array( + 'maxDepth' => 1, + 'maxStringLength' => 160, + 'fileLinkFormat' => null, + ); + private $extraDisplayOptions = array(); - /** - * {@inheritdoc} - */ - public function setOutput($output) - { - if ($output !== $prev = parent::setOutput($output)) { - $this->headerIsDumped = false; - } + /** + * {@inheritdoc} + */ + public function __construct($output = null, $charset = null, $flags = 0) + { + AbstractDumper::__construct($output, $charset, $flags); + $this->dumpId = 'sf-dump-'.mt_rand(); + $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + } - return $prev; - } + /** + * {@inheritdoc} + */ + public function setStyles(array $styles) + { + $this->headerIsDumped = false; + $this->styles = $styles + $this->styles; + } - /** - * {@inheritdoc} - */ - public function setStyles(array $styles) - { - $this->headerIsDumped = false; - $this->styles = $styles + $this->styles; - } + /** + * Configures display options. + * + * @param array $displayOptions A map of display options to customize the behavior + */ + public function setDisplayOptions(array $displayOptions) + { + $this->headerIsDumped = false; + $this->displayOptions = $displayOptions + $this->displayOptions; + } - /** - * Sets an HTML header that will be dumped once in the output stream. - * - * @param string $header An HTML string. - */ - public function setDumpHeader($header) - { - $this->dumpHeader = $header; - } + /** + * Sets an HTML header that will be dumped once in the output stream. + * + * @param string $header An HTML string + */ + public function setDumpHeader($header) + { + $this->dumpHeader = $header; + } - /** - * Sets an HTML prefix and suffix that will encapse every single dump. - * - * @param string $prefix The prepended HTML string. - * @param string $suffix The appended HTML string. - */ - public function setDumpBoundaries($prefix, $suffix) - { - $this->dumpPrefix = $prefix; - $this->dumpSuffix = $suffix; - } + /** + * Sets an HTML prefix and suffix that will encapse every single dump. + * + * @param string $prefix The prepended HTML string + * @param string $suffix The appended HTML string + */ + public function setDumpBoundaries($prefix, $suffix) + { + $this->dumpPrefix = $prefix; + $this->dumpSuffix = $suffix; + } - /** - * {@inheritdoc} - */ - public function dump(Data $data, $output = null) - { - parent::dump($data, $output); - $this->dumpId = 'sf-dump-'.mt_rand(); - } + /** + * {@inheritdoc} + */ + public function dump(Data $data, $output = null, array $extraDisplayOptions = array()) + { + $this->extraDisplayOptions = $extraDisplayOptions; + $result = parent::dump($data, $output); + $this->dumpId = 'sf-dump-'.mt_rand(); - /** - * Dumps the HTML header. - */ - protected function getDumpHeader() - { - $this->headerIsDumped = true; + return $result; + } - if (null !== $this->dumpHeader) { - return $this->dumpHeader; - } + /** + * Dumps the HTML header. + */ + protected function getDumpHeader() + { + $this->headerIsDumped = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; - $line = <<<'EOHTML' + if (null !== $this->dumpHeader) { + return $this->dumpHeader; + } + + $line = str_replace('{$options}', json_encode($this->displayOptions, JSON_FORCE_OBJECT), <<<'EOHTML' -'.$this->dumpHeader; - } - - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild) - { - parent::enterHash($cursor, $type, $class, false); - - if ($hasChild) { - if ($cursor->refIndex) { - $r = Cursor::HASH_OBJECT !== $type ? 1 - (Cursor::HASH_RESOURCE !== $type) : 2; - $r .= $r && 0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->refIndex; - - $this->line .= sprintf('', $this->dumpId, $r); - } else { - $this->line .= ''; - } - $this->dumpLine($cursor->depth); - } - } - - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) - { - $this->dumpEllipsis($cursor, $hasChild, $cut); - if ($hasChild) { - $this->line .= ''; - } - parent::leaveHash($cursor, $type, $class, $hasChild, 0); - } - - /** - * {@inheritdoc} - */ - protected function style($style, $value, $attr = array()) - { - if ('' === $value) { - return ''; - } - - $v = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); - - if ('ref' === $style) { - if (empty($attr['count'])) { - return sprintf('%s', $v); - } - $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2).substr($value, 1); - - return sprintf('%s', $this->dumpId, $r, 1 + $attr['count'], $v); - } - - if ('const' === $style && array_key_exists('value', $attr)) { - $style .= sprintf(' title="%s"', htmlspecialchars(json_encode($attr['value']), ENT_QUOTES, 'UTF-8')); - } elseif ('public' === $style) { - $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); - } elseif ('str' === $style && 1 < $attr['length']) { - $style .= sprintf(' title="%s%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); - } elseif ('note' === $style && false !== $c = strrpos($v, '\\')) { - return sprintf('%s', $v, $style, substr($v, $c + 1)); - } elseif ('protected' === $style) { - $style .= ' title="Protected property"'; - } elseif ('private' === $style) { - $style .= sprintf(' title="Private property defined in class: `%s`"', $attr['class']); - } - - $map = static::$controlCharsMap; - $style = ""; - $v = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $style) { - $s = ''; - $c = $c[$i = 0]; - do { - $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); - } while (isset($c[++$i])); - - return $s.$style; - }, $v, -1, $cchrCount); - - if ($cchrCount && '<' === $v[0]) { - $v = substr($v, 7); - } else { - $v = $style.$v; - } - if ($cchrCount && '>' === substr($v, -1)) { - $v = substr($v, 0, -strlen($style)); - } else { - $v .= '
    '; - } - - return $v; - } - - /** - * {@inheritdoc} - */ - protected function dumpLine($depth, $endOfValue = false) - { - if (-1 === $this->lastDepth) { - $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line; - } - if (!$this->headerIsDumped) { - $this->line = $this->getDumpHeader().$this->line; - } - - if (-1 === $depth) { - $this->line .= sprintf($this->dumpSuffix, $this->dumpId); - } - $this->lastDepth = $depth; - - $this->line = mb_convert_encoding($this->line, 'HTML-ENTITIES', 'UTF-8'); - - if (-1 === $depth) { - AbstractDumper::dumpLine(0); - } - AbstractDumper::dumpLine($depth); - } +pre.sf-dump .sf-dump-ellipsis { + display: inline-block; + overflow: visible; + text-overflow: ellipsis; + max-width: 5em; + white-space: nowrap; + overflow: hidden; + vertical-align: top; +} +pre.sf-dump code { + display:inline; + padding:0; + background:none; +} +.sf-dump-str-collapse .sf-dump-str-collapse { + display: none; +} +.sf-dump-str-expand .sf-dump-str-expand { + display: none; +} +EOHTML + ); + + foreach ($this->styles as $class => $style) { + $line .= 'pre.sf-dump'.('default' === $class ? ', pre.sf-dump' : '').' .sf-dump-'.$class.'{'.$style.'}'; + } + + return $this->dumpHeader = preg_replace('/\s+/', ' ', $line).''.$this->dumpHeader; + } + + /** + * {@inheritdoc} + */ + public function enterHash(Cursor $cursor, $type, $class, $hasChild) + { + parent::enterHash($cursor, $type, $class, false); + + if ($hasChild) { + if ($cursor->refIndex) { + $r = Cursor::HASH_OBJECT !== $type ? 1 - (Cursor::HASH_RESOURCE !== $type) : 2; + $r .= $r && 0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->refIndex; + + $this->line .= sprintf('', $this->dumpId, $r); + } else { + $this->line .= ''; + } + $this->dumpLine($cursor->depth); + } + } + + /** + * {@inheritdoc} + */ + public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) + { + $this->dumpEllipsis($cursor, $hasChild, $cut); + if ($hasChild) { + $this->line .= ''; + } + parent::leaveHash($cursor, $type, $class, $hasChild, 0); + } + + /** + * {@inheritdoc} + */ + protected function style($style, $value, $attr = array()) + { + if ('' === $value) { + return ''; + } + + $v = esc($value); + + if ('ref' === $style) { + if (empty($attr['count'])) { + return sprintf('%s', $v); + } + $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2).substr($value, 1); + + return sprintf('%s', $this->dumpId, $r, 1 + $attr['count'], $v); + } + + if ('const' === $style && isset($attr['value'])) { + $style .= sprintf(' title="%s"', esc(is_scalar($attr['value']) ? $attr['value'] : json_encode($attr['value']))); + } elseif ('public' === $style) { + $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); + } elseif ('str' === $style && 1 < $attr['length']) { + $style .= sprintf(' title="%d%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); + } elseif ('note' === $style && false !== $c = strrpos($v, '\\')) { + return sprintf('%s', $v, $style, substr($v, $c + 1)); + } elseif ('protected' === $style) { + $style .= ' title="Protected property"'; + } elseif ('meta' === $style && isset($attr['title'])) { + $style .= sprintf(' title="%s"', esc($this->utf8Encode($attr['title']))); + } elseif ('private' === $style) { + $style .= sprintf(' title="Private property defined in class: `%s`"', esc($this->utf8Encode($attr['class']))); + } + $map = static::$controlCharsMap; + + if (isset($attr['ellipsis'])) { + $label = esc(substr($value, -$attr['ellipsis'])); + $style = str_replace(' title="', " title=\"$v\n", $style); + $v = sprintf('%s%s', substr($v, 0, -strlen($label)), $label); + } + + $v = "".preg_replace_callback(static::$controlCharsRx, function ($c) use ($map) { + $s = ''; + $c = $c[$i = 0]; + do { + $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); + } while (isset($c[++$i])); + + return $s.''; + }, $v).''; + + if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], isset($attr['line']) ? $attr['line'] : 0)) { + $attr['href'] = $href; + } + if (isset($attr['href'])) { + $v = sprintf('%s', esc($this->utf8Encode($attr['href'])), $v); + } + if (isset($attr['lang'])) { + $v = sprintf('%s', esc($attr['lang']), $v); + } + + return $v; + } + + /** + * {@inheritdoc} + */ + protected function dumpLine($depth, $endOfValue = false) + { + if (-1 === $this->lastDepth) { + $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line; + } + if ($this->headerIsDumped !== (null !== $this->outputStream ? $this->outputStream : $this->lineDumper)) { + $this->line = $this->getDumpHeader().$this->line; + } + + if (-1 === $depth) { + $args = array('"'.$this->dumpId.'"'); + if ($this->extraDisplayOptions) { + $args[] = json_encode($this->extraDisplayOptions, JSON_FORCE_OBJECT); + } + // Replace is for BC + $this->line .= sprintf(str_replace('"%s"', '%s', $this->dumpSuffix), implode(', ', $args)); + } + $this->lastDepth = $depth; + + $this->line = mb_convert_encoding($this->line, 'HTML-ENTITIES', 'UTF-8'); + + if (-1 === $depth) { + AbstractDumper::dumpLine(0); + } + AbstractDumper::dumpLine($depth); + } + + private function getSourceLink($file, $line) + { + $options = $this->extraDisplayOptions + $this->displayOptions; + + if ($fmt = $options['fileLinkFormat']) { + return is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line); + } + + return false; + } +} + +function esc($str) +{ + return htmlspecialchars($str, ENT_QUOTES, 'UTF-8'); } diff --git a/htdocs/includes/symfony/var-dumper/LICENSE b/htdocs/includes/symfony/var-dumper/LICENSE index ef1cde91a61..207646a052d 100644 --- a/htdocs/includes/symfony/var-dumper/LICENSE +++ b/htdocs/includes/symfony/var-dumper/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2015 Fabien Potencier +Copyright (c) 2014-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/htdocs/includes/symfony/var-dumper/README.md b/htdocs/includes/symfony/var-dumper/README.md index 71bff335a70..3b5d55f5f5b 100644 --- a/htdocs/includes/symfony/var-dumper/README.md +++ b/htdocs/includes/symfony/var-dumper/README.md @@ -1,14 +1,15 @@ -Symfony mechanism for exploring and dumping PHP variables -========================================================= +VarDumper Component +=================== -This component provides a mechanism that allows exploring then dumping -any PHP variable. +The VarDumper component provides mechanisms for walking through any arbitrary +PHP variable. Built on top, it provides a better `dump()` function that you +can use instead of `var_dump`. -It handles scalars, objects and resources properly, taking hard and soft -references into account. More than being immune to infinite recursion -problems, it allows dumping where references link to each other. -It explores recursive structures using a breadth-first algorithm. +Resources +--------- -The component exposes all the parts involved in the different steps of -cloning then dumping a PHP variable, while applying size limits and having -specialized output formats and methods. + * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/htdocs/includes/symfony/var-dumper/Test/VarDumperTestTrait.php b/htdocs/includes/symfony/var-dumper/Test/VarDumperTestTrait.php index e5f6bf5b98e..b05e272d23b 100644 --- a/htdocs/includes/symfony/var-dumper/Test/VarDumperTestTrait.php +++ b/htdocs/includes/symfony/var-dumper/Test/VarDumperTestTrait.php @@ -19,27 +19,30 @@ use Symfony\Component\VarDumper\Dumper\CliDumper; */ trait VarDumperTestTrait { - public function assertDumpEquals($dump, $data, $message = '') - { - $this->assertSame(rtrim($dump), $this->getDump($data), $message); - } + public function assertDumpEquals($dump, $data, $message = '') + { + $this->assertSame(rtrim($dump), $this->getDump($data), $message); + } - public function assertDumpMatchesFormat($dump, $data, $message = '') - { - $this->assertStringMatchesFormat(rtrim($dump), $this->getDump($data), $message); - } + public function assertDumpMatchesFormat($dump, $data, $message = '') + { + $this->assertStringMatchesFormat(rtrim($dump), $this->getDump($data), $message); + } - protected function getDump($data) - { - $h = fopen('php://memory', 'r+b'); - $cloner = new VarCloner(); - $cloner->setMaxItems(-1); - $dumper = new CliDumper($h); - $dumper->setColors(false); - $dumper->dump($cloner->cloneVar($data)->withRefHandles(false)); - $data = stream_get_contents($h, -1, 0); - fclose($h); + protected function getDump($data, $key = null) + { + $flags = getenv('DUMP_LIGHT_ARRAY') ? CliDumper::DUMP_LIGHT_ARRAY : 0; + $flags |= getenv('DUMP_STRING_LENGTH') ? CliDumper::DUMP_STRING_LENGTH : 0; - return rtrim($data); - } + $cloner = new VarCloner(); + $cloner->setMaxItems(-1); + $dumper = new CliDumper(null, null, $flags); + $dumper->setColors(false); + $data = $cloner->cloneVar($data)->withRefHandles(false); + if (null !== $key && null === $data = $data->seek($key)) { + return; + } + + return rtrim($dumper->dump($data, true)); + } } diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/CasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/CasterTest.php index 43d389ce1c0..d1f09841ea3 100644 --- a/htdocs/includes/symfony/var-dumper/Tests/Caster/CasterTest.php +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/CasterTest.php @@ -11,170 +11,171 @@ namespace Symfony\Component\VarDumper\Tests\Caster; +use PHPUnit\Framework\TestCase; use Symfony\Component\VarDumper\Caster\Caster; use Symfony\Component\VarDumper\Test\VarDumperTestTrait; /** * @author Nicolas Grekas */ -class CasterTest extends \PHPUnit_Framework_TestCase +class CasterTest extends TestCase { - use VarDumperTestTrait; + use VarDumperTestTrait; - private $referenceArray = array( - 'null' => null, - 'empty' => false, - 'public' => 'pub', - "\0~\0virtual" => 'virt', - "\0+\0dynamic" => 'dyn', - "\0*\0protected" => 'prot', - "\0Foo\0private" => 'priv', - ); + private $referenceArray = array( + 'null' => null, + 'empty' => false, + 'public' => 'pub', + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + "\0*\0protected" => 'prot', + "\0Foo\0private" => 'priv', + ); - /** - * @dataProvider provideFilter - */ - public function testFilter($filter, $expectedDiff, $listedProperties = null) - { - if (null === $listedProperties) { - $filteredArray = Caster::filter($this->referenceArray, $filter); - } else { - $filteredArray = Caster::filter($this->referenceArray, $filter, $listedProperties); - } + /** + * @dataProvider provideFilter + */ + public function testFilter($filter, $expectedDiff, $listedProperties = null) + { + if (null === $listedProperties) { + $filteredArray = Caster::filter($this->referenceArray, $filter); + } else { + $filteredArray = Caster::filter($this->referenceArray, $filter, $listedProperties); + } - $this->assertSame($expectedDiff, array_diff_assoc($this->referenceArray, $filteredArray)); - } + $this->assertSame($expectedDiff, array_diff_assoc($this->referenceArray, $filteredArray)); + } - public function provideFilter() - { - return array( - array( - 0, - array(), - ), - array( - Caster::EXCLUDE_PUBLIC, - array( - 'null' => null, - 'empty' => false, - 'public' => 'pub', - ), - ), - array( - Caster::EXCLUDE_NULL, - array( - 'null' => null, - ), - ), - array( - Caster::EXCLUDE_EMPTY, - array( - 'null' => null, - 'empty' => false, - ), - ), - array( - Caster::EXCLUDE_VIRTUAL, - array( - "\0~\0virtual" => 'virt', - ), - ), - array( - Caster::EXCLUDE_DYNAMIC, - array( - "\0+\0dynamic" => 'dyn', - ), - ), - array( - Caster::EXCLUDE_PROTECTED, - array( - "\0*\0protected" => 'prot', - ), - ), - array( - Caster::EXCLUDE_PRIVATE, - array( - "\0Foo\0private" => 'priv', - ), - ), - array( - Caster::EXCLUDE_VERBOSE, - array( - 'public' => 'pub', - "\0*\0protected" => 'prot', - ), - array('public', "\0*\0protected"), - ), - array( - Caster::EXCLUDE_NOT_IMPORTANT, - array( - 'null' => null, - 'empty' => false, - "\0~\0virtual" => 'virt', - "\0+\0dynamic" => 'dyn', - "\0Foo\0private" => 'priv', - ), - array('public', "\0*\0protected"), - ), - array( - Caster::EXCLUDE_VIRTUAL | Caster::EXCLUDE_DYNAMIC, - array( - "\0~\0virtual" => 'virt', - "\0+\0dynamic" => 'dyn', - ), - ), - array( - Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_VERBOSE, - $this->referenceArray, - array('public', "\0*\0protected"), - ), - array( - Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_EMPTY, - array( - 'null' => null, - 'empty' => false, - "\0~\0virtual" => 'virt', - "\0+\0dynamic" => 'dyn', - "\0*\0protected" => 'prot', - "\0Foo\0private" => 'priv', - ), - array('public', 'empty'), - ), - array( - Caster::EXCLUDE_VERBOSE | Caster::EXCLUDE_EMPTY | Caster::EXCLUDE_STRICT, - array( - 'empty' => false, - ), - array('public', 'empty'), - ), - ); - } + public function provideFilter() + { + return array( + array( + 0, + array(), + ), + array( + Caster::EXCLUDE_PUBLIC, + array( + 'null' => null, + 'empty' => false, + 'public' => 'pub', + ), + ), + array( + Caster::EXCLUDE_NULL, + array( + 'null' => null, + ), + ), + array( + Caster::EXCLUDE_EMPTY, + array( + 'null' => null, + 'empty' => false, + ), + ), + array( + Caster::EXCLUDE_VIRTUAL, + array( + "\0~\0virtual" => 'virt', + ), + ), + array( + Caster::EXCLUDE_DYNAMIC, + array( + "\0+\0dynamic" => 'dyn', + ), + ), + array( + Caster::EXCLUDE_PROTECTED, + array( + "\0*\0protected" => 'prot', + ), + ), + array( + Caster::EXCLUDE_PRIVATE, + array( + "\0Foo\0private" => 'priv', + ), + ), + array( + Caster::EXCLUDE_VERBOSE, + array( + 'public' => 'pub', + "\0*\0protected" => 'prot', + ), + array('public', "\0*\0protected"), + ), + array( + Caster::EXCLUDE_NOT_IMPORTANT, + array( + 'null' => null, + 'empty' => false, + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + "\0Foo\0private" => 'priv', + ), + array('public', "\0*\0protected"), + ), + array( + Caster::EXCLUDE_VIRTUAL | Caster::EXCLUDE_DYNAMIC, + array( + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + ), + ), + array( + Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_VERBOSE, + $this->referenceArray, + array('public', "\0*\0protected"), + ), + array( + Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_EMPTY, + array( + 'null' => null, + 'empty' => false, + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + "\0*\0protected" => 'prot', + "\0Foo\0private" => 'priv', + ), + array('public', 'empty'), + ), + array( + Caster::EXCLUDE_VERBOSE | Caster::EXCLUDE_EMPTY | Caster::EXCLUDE_STRICT, + array( + 'empty' => false, + ), + array('public', 'empty'), + ), + ); + } - /** - * @requires PHP 7.0 - */ - public function testAnonymousClass() - { - $c = eval('return new class extends stdClass { private $foo = "foo"; };'); + /** + * @requires PHP 7.0 + */ + public function testAnonymousClass() + { + $c = eval('return new class extends stdClass { private $foo = "foo"; };'); - $this->assertDumpMatchesFormat( - <<<'EOTXT' + $this->assertDumpMatchesFormat( + <<<'EOTXT' stdClass@anonymous { -foo: "foo" } EOTXT - , $c - ); + , $c + ); - $c = eval('return new class { private $foo = "foo"; };'); + $c = eval('return new class { private $foo = "foo"; };'); - $this->assertDumpMatchesFormat( - <<<'EOTXT' + $this->assertDumpMatchesFormat( + <<<'EOTXT' @anonymous { -foo: "foo" } EOTXT - , $c - ); - } + , $c + ); + } } diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php new file mode 100644 index 00000000000..2e348040f31 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php @@ -0,0 +1,225 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Caster\ExceptionCaster; +use Symfony\Component\VarDumper\Caster\FrameStub; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +class ExceptionCasterTest extends TestCase +{ + use VarDumperTestTrait; + + private function getTestException($msg, &$ref = null) + { + return new \Exception(''.$msg); + } + + protected function tearDown() + { + ExceptionCaster::$srcContext = 1; + ExceptionCaster::$traceArgs = true; + } + + public function testDefaultSettings() + { + $ref = array('foo'); + $e = $this->getTestException('foo', $ref); + + $expectedDump = <<<'EODUMP' +Exception { + #message: "foo" + #code: 0 + #file: "%sExceptionCasterTest.php" + #line: 27 + -trace: { + %sExceptionCasterTest.php:27: { + : { + : return new \Exception(''.$msg); + : } + } + %sExceptionCasterTest.php:%d: { + : $ref = array('foo'); + : $e = $this->getTestException('foo', $ref); + : + arguments: { + $msg: "foo" + &$ref: array:1 [ …1] + } + } +%A +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $e); + $this->assertSame(array('foo'), $ref); + } + + public function testSeek() + { + $e = $this->getTestException(2); + + $expectedDump = <<<'EODUMP' +{ + %sExceptionCasterTest.php:27: { + : { + : return new \Exception(''.$msg); + : } + } + %sExceptionCasterTest.php:%d: { + : { + : $e = $this->getTestException(2); + : + arguments: { + $msg: 2 + } + } +%A +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $this->getDump($e, 'trace')); + } + + public function testNoArgs() + { + $e = $this->getTestException(1); + ExceptionCaster::$traceArgs = false; + + $expectedDump = <<<'EODUMP' +Exception { + #message: "1" + #code: 0 + #file: "%sExceptionCasterTest.php" + #line: 27 + -trace: { + %sExceptionCasterTest.php:27: { + : { + : return new \Exception(''.$msg); + : } + } + %sExceptionCasterTest.php:%d: { + : { + : $e = $this->getTestException(1); + : ExceptionCaster::$traceArgs = false; + } +%A +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $e); + } + + public function testNoSrcContext() + { + $e = $this->getTestException(1); + ExceptionCaster::$srcContext = -1; + + $expectedDump = <<<'EODUMP' +Exception { + #message: "1" + #code: 0 + #file: "%sExceptionCasterTest.php" + #line: 27 + -trace: { + %sExceptionCasterTest.php: 27 + %sExceptionCasterTest.php: %d +%A +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $e); + } + + public function testHtmlDump() + { + $e = $this->getTestException(1); + ExceptionCaster::$srcContext = -1; + + $cloner = new VarCloner(); + $cloner->setMaxItems(1); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dump = $dumper->dump($cloner->cloneVar($e)->withRefHandles(false), true); + + $expectedDump = <<<'EODUMP' +Exception { + #message: "1" + #code: 0 + #file: "%sTests%eCaster%eExceptionCasterTest.php" + #line: 27 + -trace: { + %sVarDumper%eTests%eCaster%eExceptionCasterTest.php: 27 + …%d + } +} + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } + + /** + * @requires function Twig\Template::getSourceContext + */ + public function testFrameWithTwig() + { + require_once dirname(__DIR__).'/Fixtures/Twig.php'; + + $f = array( + new FrameStub(array( + 'file' => dirname(__DIR__).'/Fixtures/Twig.php', + 'line' => 20, + 'class' => '__TwigTemplate_VarDumperFixture_u75a09', + )), + new FrameStub(array( + 'file' => dirname(__DIR__).'/Fixtures/Twig.php', + 'line' => 21, + 'class' => '__TwigTemplate_VarDumperFixture_u75a09', + 'object' => new \__TwigTemplate_VarDumperFixture_u75a09(null, __FILE__), + )), + ); + + $expectedDump = <<<'EODUMP' +array:2 [ + 0 => { + class: "__TwigTemplate_VarDumperFixture_u75a09" + src: { + %sTwig.php:1: { + : + : foo bar + : twig source + } + } + } + 1 => { + class: "__TwigTemplate_VarDumperFixture_u75a09" + object: __TwigTemplate_VarDumperFixture_u75a09 { + %A + } + src: { + %sExceptionCasterTest.php:2: { + : foo bar + : twig source + : + } + } + } +] + +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $f); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/PdoCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/PdoCasterTest.php index faa65341170..31bfac7e2da 100644 --- a/htdocs/includes/symfony/var-dumper/Tests/Caster/PdoCasterTest.php +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/PdoCasterTest.php @@ -11,47 +11,54 @@ namespace Symfony\Component\VarDumper\Tests\Caster; +use PHPUnit\Framework\TestCase; use Symfony\Component\VarDumper\Caster\PdoCaster; use Symfony\Component\VarDumper\Cloner\Stub; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; /** * @author Nicolas Grekas */ -class PdoCasterTest extends \PHPUnit_Framework_TestCase +class PdoCasterTest extends TestCase { - /** - * @requires extension pdo_sqlite - */ - public function testCastPdo() - { - $pdo = new \PDO('sqlite::memory:'); - $pdo->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array($pdo))); + use VarDumperTestTrait; - $cast = PdoCaster::castPdo($pdo, array(), new Stub(), false); + /** + * @requires extension pdo_sqlite + */ + public function testCastPdo() + { + $pdo = new \PDO('sqlite::memory:'); + $pdo->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array($pdo))); - $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\EnumStub', $cast["\0~\0attributes"]); + $cast = PdoCaster::castPdo($pdo, array(), new Stub(), false); - $attr = $cast["\0~\0attributes"] = $cast["\0~\0attributes"]->value; - $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\ConstStub', $attr['CASE']); - $this->assertSame('NATURAL', $attr['CASE']->class); - $this->assertSame('BOTH', $attr['DEFAULT_FETCH_MODE']->class); + $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\EnumStub', $cast["\0~\0attributes"]); - $xCast = array( - "\0~\0inTransaction" => $pdo->inTransaction(), - "\0~\0attributes" => array( - 'CASE' => $attr['CASE'], - 'ERRMODE' => $attr['ERRMODE'], - 'PERSISTENT' => false, - 'DRIVER_NAME' => 'sqlite', - 'ORACLE_NULLS' => $attr['ORACLE_NULLS'], - 'CLIENT_VERSION' => $pdo->getAttribute(\PDO::ATTR_CLIENT_VERSION), - 'SERVER_VERSION' => $pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), - 'STATEMENT_CLASS' => array('PDOStatement'), - 'DEFAULT_FETCH_MODE' => $attr['DEFAULT_FETCH_MODE'], - ), - ); - unset($cast["\0~\0attributes"]['STATEMENT_CLASS'][1]); + $attr = $cast["\0~\0attributes"] = $cast["\0~\0attributes"]->value; + $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\ConstStub', $attr['CASE']); + $this->assertSame('NATURAL', $attr['CASE']->class); + $this->assertSame('BOTH', $attr['DEFAULT_FETCH_MODE']->class); - $this->assertSame($xCast, $cast); - } + $xDump = <<<'EODUMP' +array:2 [ + "\x00~\x00inTransaction" => false + "\x00~\x00attributes" => array:9 [ + "CASE" => NATURAL + "ERRMODE" => SILENT + "PERSISTENT" => false + "DRIVER_NAME" => "sqlite" + "ORACLE_NULLS" => NATURAL + "CLIENT_VERSION" => "%s" + "SERVER_VERSION" => "%s" + "STATEMENT_CLASS" => array:%d [ + 0 => "PDOStatement"%A + ] + "DEFAULT_FETCH_MODE" => BOTH + ] +] +EODUMP; + + $this->assertDumpMatchesFormat($xDump, $cast); + } } diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/RedisCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/RedisCasterTest.php new file mode 100644 index 00000000000..b096dfe7b6f --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/RedisCasterTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Nicolas Grekas + * @requires extension redis + */ +class RedisCasterTest extends TestCase +{ + use VarDumperTestTrait; + + public function testNotConnected() + { + $redis = new \Redis(); + + if (defined('HHVM_VERSION_ID')) { + $xCast = <<<'EODUMP' +Redis { + #host: "" +%A +} +EODUMP; + } else { + $xCast = <<<'EODUMP' +Redis { + isConnected: false +} +EODUMP; + } + + $this->assertDumpMatchesFormat($xCast, $redis); + } + + public function testConnected() + { + $redis = new \Redis(); + if (!@$redis->connect('127.0.0.1')) { + $e = error_get_last(); + self::markTestSkipped($e['message']); + } + + if (defined('HHVM_VERSION_ID')) { + $xCast = <<<'EODUMP' +Redis { + #host: "127.0.0.1" +%A +} +EODUMP; + } else { + $xCast = <<<'EODUMP' +Redis { + +"socket": Redis Socket Buffer resource + isConnected: true + host: "127.0.0.1" + port: 6379 + auth: null + dbNum: 0 + timeout: 0.0 + persistentId: null + options: { + READ_TIMEOUT: 0.0 + SERIALIZER: NONE + PREFIX: null + SCAN: NORETRY + } +} +EODUMP; + } + + $this->assertDumpMatchesFormat($xCast, $redis); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php index 0d7147fbcd2..63500b9ef4d 100644 --- a/htdocs/includes/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php @@ -11,22 +11,24 @@ namespace Symfony\Component\VarDumper\Tests\Caster; +use PHPUnit\Framework\TestCase; use Symfony\Component\VarDumper\Test\VarDumperTestTrait; use Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo; +use Symfony\Component\VarDumper\Tests\Fixtures\NotLoadableClass; /** * @author Nicolas Grekas */ -class ReflectionCasterTest extends \PHPUnit_Framework_TestCase +class ReflectionCasterTest extends TestCase { - use VarDumperTestTrait; + use VarDumperTestTrait; - public function testReflectionCaster() - { - $var = new \ReflectionClass('ReflectionClass'); + public function testReflectionCaster() + { + $var = new \ReflectionClass('ReflectionClass'); - $this->assertDumpMatchesFormat( - <<<'EOTXT' + $this->assertDumpMatchesFormat( + <<<'EOTXT' ReflectionClass { +name: "ReflectionClass" %Aimplements: array:%d [ @@ -49,23 +51,23 @@ ReflectionClass { "export" => ReflectionMethod { +name: "export" +class: "ReflectionClass" - parameters: { +%A parameters: { $%s: ReflectionParameter { %A position: 0 %A } EOTXT - , $var - ); - } + , $var + ); + } - public function testClosureCaster() - { - $a = $b = 123; - $var = function ($x) use ($a, &$b) {}; + public function testClosureCaster() + { + $a = $b = 123; + $var = function ($x) use ($a, &$b) {}; - $this->assertDumpMatchesFormat( - <<assertDumpMatchesFormat( + <<assertDumpMatchesFormat( - <<<'EOTXT' + $this->assertDumpMatchesFormat( + <<<'EOTXT' ReflectionParameter { +name: "arg1" position: 0 - typeHint: "Symfony\Component\VarDumper\Tests\Caster\NotExistingClass" + typeHint: "Symfony\Component\VarDumper\Tests\Fixtures\NotLoadableClass" default: null } EOTXT - , $var - ); - } + , $var + ); + } - /** - * @requires PHP 7.0 - */ - public function testReflectionParameterScalar() - { - $f = eval('return function (int $a) {};'); - $var = new \ReflectionParameter($f, 0); + /** + * @requires PHP 7.0 + */ + public function testReflectionParameterScalar() + { + $f = eval('return function (int $a) {};'); + $var = new \ReflectionParameter($f, 0); - $this->assertDumpMatchesFormat( - <<<'EOTXT' + $this->assertDumpMatchesFormat( + <<<'EOTXT' ReflectionParameter { +name: "a" position: 0 typeHint: "int" } EOTXT - , $var - ); - } + , $var + ); + } - /** - * @requires PHP 7.0 - */ - public function testReturnType() - { - $f = eval('return function ():int {};'); - $line = __LINE__ - 1; + /** + * @requires PHP 7.0 + */ + public function testReturnType() + { + $f = eval('return function ():int {};'); + $line = __LINE__ - 1; - $this->assertDumpMatchesFormat( - <<assertDumpMatchesFormat( + <<baz(); - $r = new \ReflectionGenerator($g); + /** + * @requires PHP 7.0 + */ + public function testGenerator() + { + if (extension_loaded('xdebug')) { + $this->markTestSkipped('xdebug is active'); + } - $xDump = <<<'EODUMP' + $generator = new GeneratorDemo(); + $generator = $generator->baz(); + + $expectedDump = <<<'EODUMP' Generator { this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …} executing: { Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz(): { - %sGeneratorDemo.php:14: """ - {\n - yield from bar();\n - }\n - """ + %sGeneratorDemo.php:14: { + : { + : yield from bar(); + : } + } } } + closed: false } EODUMP; - $this->assertDumpMatchesFormat($xDump, $g); + $this->assertDumpMatchesFormat($expectedDump, $generator); - foreach ($g as $v) { - break; - } + foreach ($generator as $v) { + break; + } - $xDump = <<<'EODUMP' + $expectedDump = <<<'EODUMP' array:2 [ 0 => ReflectionGenerator { this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …} trace: { - 3. Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo() ==> yield(): { - src: { - %sGeneratorDemo.php:9: """ - {\n - yield 1;\n - }\n - """ - } + %sGeneratorDemo.php:9: { + : { + : yield 1; + : } } - 2. Symfony\Component\VarDumper\Tests\Fixtures\bar() ==> Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo(): { - src: { - %sGeneratorDemo.php:20: """ - {\n - yield from GeneratorDemo::foo();\n - }\n - """ - } + %sGeneratorDemo.php:20: { + : { + : yield from GeneratorDemo::foo(); + : } } - 1. Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz() ==> Symfony\Component\VarDumper\Tests\Fixtures\bar(): { - src: { - %sGeneratorDemo.php:14: """ - {\n - yield from bar();\n - }\n - """ - } + %sGeneratorDemo.php:14: { + : { + : yield from bar(); + : } } } + closed: false } 1 => Generator { executing: { Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo(): { - %sGeneratorDemo.php:10: """ - yield 1;\n - }\n - \n - """ + %sGeneratorDemo.php:10: { + : yield 1; + : } + : + } } } + closed: false } ] EODUMP; - $this->assertDumpMatchesFormat($xDump, array($r, $r->getExecutingGenerator())); - } + $r = new \ReflectionGenerator($generator); + $this->assertDumpMatchesFormat($expectedDump, array($r, $r->getExecutingGenerator())); + + foreach ($generator as $v) { + } + + $expectedDump = <<<'EODUMP' +Generator { + closed: true +} +EODUMP; + $this->assertDumpMatchesFormat($expectedDump, $generator); + } } -function reflectionParameterFixture(NotExistingClass $arg1 = null, $arg2) +function reflectionParameterFixture(NotLoadableClass $arg1 = null, $arg2) { } diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/SplCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/SplCasterTest.php index 5d71e8d379d..04044f68100 100644 --- a/htdocs/includes/symfony/var-dumper/Tests/Caster/SplCasterTest.php +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/SplCasterTest.php @@ -11,19 +11,20 @@ namespace Symfony\Component\VarDumper\Tests\Caster; +use PHPUnit\Framework\TestCase; use Symfony\Component\VarDumper\Test\VarDumperTestTrait; /** * @author Grégoire Pineau */ -class SplCasterTest extends \PHPUnit_Framework_TestCase +class SplCasterTest extends TestCase { - use VarDumperTestTrait; + use VarDumperTestTrait; - public function getCastFileInfoTests() - { - return array( - array(__FILE__, <<<'EOTXT' + public function getCastFileInfoTests() + { + return array( + array(__FILE__, <<<'EOTXT' SplFileInfo { %Apath: "%sCaster" filename: "SplCasterTest.php" @@ -48,8 +49,8 @@ SplFileInfo { link: false %A} EOTXT - ), - array('https://google.com/about', <<<'EOTXT' + ), + array('https://google.com/about', <<<'EOTXT' SplFileInfo { %Apath: "https://google.com" filename: "about" @@ -57,29 +58,23 @@ SplFileInfo { pathname: "https://google.com/about" extension: "" realPath: false - writable: false - readable: false - executable: false - file: false - dir: false - link: false %A} EOTXT - ), - ); - } + ), + ); + } - /** @dataProvider getCastFileInfoTests */ - public function testCastFileInfo($file, $dump) - { - $this->assertDumpMatchesFormat($dump, new \SplFileInfo($file)); - } + /** @dataProvider getCastFileInfoTests */ + public function testCastFileInfo($file, $dump) + { + $this->assertDumpMatchesFormat($dump, new \SplFileInfo($file)); + } - public function testCastFileObject() - { - $var = new \SplFileObject(__FILE__); - $var->setFlags(\SplFileObject::DROP_NEW_LINE | \SplFileObject::SKIP_EMPTY); - $dump = <<<'EOTXT' + public function testCastFileObject() + { + $var = new \SplFileObject(__FILE__); + $var->setFlags(\SplFileObject::DROP_NEW_LINE | \SplFileObject::SKIP_EMPTY); + $dump = <<<'EOTXT' SplFileObject { %Apath: "%sCaster" filename: "SplCasterTest.php" @@ -102,10 +97,10 @@ SplFileObject { file: true dir: false link: false -%AcsvControl: array:2 [ +%AcsvControl: array:%d [ 0 => "," 1 => """ - ] +%A] flags: DROP_NEW_LINE|SKIP_EMPTY maxLineLen: 0 fstat: array:26 [ @@ -121,6 +116,32 @@ SplFileObject { key: 0 } EOTXT; - $this->assertDumpMatchesFormat($dump, $var); - } + $this->assertDumpMatchesFormat($dump, $var); + } + + /** + * @dataProvider provideCastSplDoublyLinkedList + */ + public function testCastSplDoublyLinkedList($modeValue, $modeDump) + { + $var = new \SplDoublyLinkedList(); + $var->setIteratorMode($modeValue); + $dump = <<assertDumpMatchesFormat($dump, $var); + } + + public function provideCastSplDoublyLinkedList() + { + return array( + array(\SplDoublyLinkedList::IT_MODE_FIFO, 'IT_MODE_FIFO | IT_MODE_KEEP'), + array(\SplDoublyLinkedList::IT_MODE_LIFO, 'IT_MODE_LIFO | IT_MODE_KEEP'), + array(\SplDoublyLinkedList::IT_MODE_FIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_FIFO | IT_MODE_DELETE'), + array(\SplDoublyLinkedList::IT_MODE_LIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_LIFO | IT_MODE_DELETE'), + ); + } } diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/StubCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/StubCasterTest.php new file mode 100644 index 00000000000..887d3d82a4f --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/StubCasterTest.php @@ -0,0 +1,171 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Caster\ArgsStub; +use Symfony\Component\VarDumper\Caster\ClassStub; +use Symfony\Component\VarDumper\Caster\LinkStub; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; +use Symfony\Component\VarDumper\Tests\Fixtures\FooInterface; + +class StubCasterTest extends TestCase +{ + use VarDumperTestTrait; + + public function testArgsStubWithDefaults($foo = 234, $bar = 456) + { + $args = array(new ArgsStub(array(123), __FUNCTION__, __CLASS__)); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => { + $foo: 123 + } +] +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $args); + } + + public function testArgsStubWithExtraArgs($foo = 234) + { + $args = array(new ArgsStub(array(123, 456), __FUNCTION__, __CLASS__)); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => { + $foo: 123 + ...: { + 456 + } + } +] +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $args); + } + + public function testArgsStubNoParamWithExtraArgs() + { + $args = array(new ArgsStub(array(123), __FUNCTION__, __CLASS__)); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => { + 123 + } +] +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $args); + } + + public function testArgsStubWithClosure() + { + $args = array(new ArgsStub(array(123), '{closure}', null)); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => { + 123 + } +] +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $args); + } + + public function testLinkStub() + { + $var = array(new LinkStub(__CLASS__, 0, __FILE__)); + + $cloner = new VarCloner(); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dumper->setDisplayOptions(array('fileLinkFormat' => '%f:%l')); + $dump = $dumper->dump($cloner->cloneVar($var), true); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => "Symfony\Component\VarDumper\Tests\Caster\StubCasterTest" +] + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } + + public function testClassStub() + { + $var = array(new ClassStub('hello', array(FooInterface::class, 'foo'))); + + $cloner = new VarCloner(); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dump = $dumper->dump($cloner->cloneVar($var), true, array('fileLinkFormat' => '%f:%l')); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => "hello" +] + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } + + public function testClassStubWithNotExistingClass() + { + $var = array(new ClassStub(NotExisting::class)); + + $cloner = new VarCloner(); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dump = $dumper->dump($cloner->cloneVar($var), true); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => "Symfony\Component\VarDumper\Tests\Caster\NotExisting" +] + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } + + public function testClassStubWithNotExistingMethod() + { + $var = array(new ClassStub('hello', array(FooInterface::class, 'missing'))); + + $cloner = new VarCloner(); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dump = $dumper->dump($cloner->cloneVar($var), true, array('fileLinkFormat' => '%f:%l')); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => "hello" +] + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/XmlReaderCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/XmlReaderCasterTest.php new file mode 100644 index 00000000000..b324d1db9ef --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/XmlReaderCasterTest.php @@ -0,0 +1,248 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Baptiste Clavié + */ +class XmlReaderCasterTest extends TestCase +{ + use VarDumperTestTrait; + + /** @var \XmlReader */ + private $reader; + + protected function setUp() + { + $this->reader = new \XmlReader(); + $this->reader->open(__DIR__.'/../Fixtures/xml_reader.xml'); + } + + protected function tearDown() + { + $this->reader->close(); + } + + public function testParserProperty() + { + $this->reader->setParserProperty(\XMLReader::SUBST_ENTITIES, true); + + $expectedDump = <<<'EODUMP' +XMLReader { + +nodeType: NONE + parserProperties: { + SUBST_ENTITIES: true + …3 + } + …12 +} +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $this->reader); + } + + /** + * @dataProvider provideNodes + */ + public function testNodes($seek, $expectedDump) + { + while ($seek--) { + $this->reader->read(); + } + $this->assertDumpMatchesFormat($expectedDump, $this->reader); + } + + public function provideNodes() + { + return array( + array(0, <<<'EODUMP' +XMLReader { + +nodeType: NONE + …13 +} +EODUMP + ), + array(1, <<<'EODUMP' +XMLReader { + +localName: "foo" + +nodeType: ELEMENT + +baseURI: "%sxml_reader.xml" + …11 +} +EODUMP + ), + array(2, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: SIGNIFICANT_WHITESPACE + +depth: 1 + +value: """ + \n + + """ + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(3, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: ELEMENT + +depth: 1 + +baseURI: "%sxml_reader.xml" + …10 +} +EODUMP + ), + array(4, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: END_ELEMENT + +depth: 1 + +baseURI: "%sxml_reader.xml" + …10 +} +EODUMP + ), + array(6, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: ELEMENT + +depth: 1 + +isEmptyElement: true + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(9, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: TEXT + +depth: 2 + +value: "With text" + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(12, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: ELEMENT + +depth: 1 + +attributeCount: 2 + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(13, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: END_ELEMENT + +depth: 1 + +baseURI: "%sxml_reader.xml" + …10 +} +EODUMP + ), + array(15, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: ELEMENT + +depth: 1 + +attributeCount: 1 + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(16, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: SIGNIFICANT_WHITESPACE + +depth: 2 + +value: """ + \n + + """ + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(17, <<<'EODUMP' +XMLReader { + +localName: "baz" + +prefix: "baz" + +nodeType: ELEMENT + +depth: 2 + +namespaceURI: "http://symfony.com" + +baseURI: "%sxml_reader.xml" + …8 +} +EODUMP + ), + array(18, <<<'EODUMP' +XMLReader { + +localName: "baz" + +prefix: "baz" + +nodeType: END_ELEMENT + +depth: 2 + +namespaceURI: "http://symfony.com" + +baseURI: "%sxml_reader.xml" + …8 +} +EODUMP + ), + array(19, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: SIGNIFICANT_WHITESPACE + +depth: 2 + +value: """ + \n + + """ + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(21, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: SIGNIFICANT_WHITESPACE + +depth: 1 + +value: "\n" + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(22, <<<'EODUMP' +XMLReader { + +localName: "foo" + +nodeType: END_ELEMENT + +baseURI: "%sxml_reader.xml" + …11 +} +EODUMP + ), + ); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/CliDumperTest.php b/htdocs/includes/symfony/var-dumper/Tests/CliDumperTest.php index cd6d64d1c03..9a7404cea05 100644 --- a/htdocs/includes/symfony/var-dumper/Tests/CliDumperTest.php +++ b/htdocs/includes/symfony/var-dumper/Tests/CliDumperTest.php @@ -11,43 +11,46 @@ namespace Symfony\Component\VarDumper\Tests; +use PHPUnit\Framework\TestCase; use Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\CliDumper; use Symfony\Component\VarDumper\Test\VarDumperTestTrait; +use Twig\Environment; +use Twig\Loader\FilesystemLoader; /** * @author Nicolas Grekas */ -class CliDumperTest extends \PHPUnit_Framework_TestCase +class CliDumperTest extends TestCase { - use VarDumperTestTrait; + use VarDumperTestTrait; - public function testGet() - { - require __DIR__.'/Fixtures/dumb-var.php'; + public function testGet() + { + require __DIR__.'/Fixtures/dumb-var.php'; - $dumper = new CliDumper('php://output'); - $dumper->setColors(false); - $cloner = new VarCloner(); - $cloner->addCasters(array( - ':stream' => function ($res, $a) { - unset($a['uri'], $a['wrapper_data']); + $dumper = new CliDumper('php://output'); + $dumper->setColors(false); + $cloner = new VarCloner(); + $cloner->addCasters(array( + ':stream' => function ($res, $a) { + unset($a['uri'], $a['wrapper_data']); - return $a; - }, - )); - $data = $cloner->cloneVar($var); + return $a; + }, + )); + $data = $cloner->cloneVar($var); - ob_start(); - $dumper->dump($data); - $out = ob_get_clean(); - $out = preg_replace('/[ \t]+$/m', '', $out); - $intMax = PHP_INT_MAX; - $res = (int) $var['res']; + ob_start(); + $dumper->dump($data); + $out = ob_get_clean(); + $out = preg_replace('/[ \t]+$/m', '', $out); + $intMax = PHP_INT_MAX; + $res = (int) $var['res']; - $r = defined('HHVM_VERSION') ? '' : '#%d'; - $this->assertStringMatchesFormat( - <<assertStringMatchesFormat( + << 1 0 => &1 null @@ -62,15 +65,12 @@ array:24 [ 7 => b"é\\x00" "[]" => [] "res" => stream resource {@{$res} - wrapper_type: "plainfile" +%A wrapper_type: "plainfile" stream_type: "STDIO" mode: "r" unread_bytes: 0 seekable: true - timed_out: false - blocked: true - eof: false - options: [] +%A options: [] } "obj" => Symfony\Component\VarDumper\Tests\Fixture\DumbFoo {#%d +foo: "foo" @@ -105,20 +105,20 @@ array:24 [ ] EOTXT - , - $out - ); - } + , + $out + ); + } - /** - * @requires extension xml - */ - public function testXmlResource() - { - $var = xml_parser_create(); + /** + * @requires extension xml + */ + public function testXmlResource() + { + $var = xml_parser_create(); - $this->assertDumpMatchesFormat( - <<assertDumpMatchesFormat( + <<<'EOTXT' xml resource { current_byte_index: %i current_column_number: %i @@ -126,199 +126,257 @@ xml resource { error_code: XML_ERROR_NONE } EOTXT - , - $var - ); - } + , + $var + ); + } - public function testClosedResource() - { - if (defined('HHVM_VERSION') && HHVM_VERSION_ID < 30600) { - $this->markTestSkipped(); - } + public function testJsonCast() + { + $var = (array) json_decode('{"0":{},"1":null}'); + foreach ($var as &$v) { + } + $var[] = &$v; + $var[''] = 2; - $var = fopen(__FILE__, 'r'); - fclose($var); + if (\PHP_VERSION_ID >= 70200) { + $this->assertDumpMatchesFormat( + <<<'EOTXT' +array:4 [ + 0 => {} + 1 => &1 null + 2 => &1 null + "" => 2 +] +EOTXT + , + $var + ); + } else { + $this->assertDumpMatchesFormat( + <<<'EOTXT' +array:4 [ + "0" => {} + "1" => &1 null + 0 => &1 null + "" => 2 +] +EOTXT + , + $var + ); + } + } - $dumper = new CliDumper('php://output'); - $dumper->setColors(false); - $cloner = new VarCloner(); - $data = $cloner->cloneVar($var); + public function testObjectCast() + { + $var = (object) array(1 => 1); + $var->{1} = 2; - ob_start(); - $dumper->dump($data); - $out = ob_get_clean(); - $res = (int) $var; + if (\PHP_VERSION_ID >= 70200) { + $this->assertDumpMatchesFormat( + <<<'EOTXT' +{ + +"1": 2 +} +EOTXT + , + $var + ); + } else { + $this->assertDumpMatchesFormat( + <<<'EOTXT' +{ + +1: 1 + +"1": 2 +} +EOTXT + , + $var + ); + } + } - $this->assertStringMatchesFormat( - <<markTestSkipped(); + } + + $var = fopen(__FILE__, 'r'); + fclose($var); + + $dumper = new CliDumper('php://output'); + $dumper->setColors(false); + $cloner = new VarCloner(); + $data = $cloner->cloneVar($var); + + ob_start(); + $dumper->dump($data); + $out = ob_get_clean(); + $res = (int) $var; + + $this->assertStringMatchesFormat( + << 'bar'), + ); - $dumper = new CliDumper(); - $dumper->setColors(false); - $cloner = new VarCloner(); - $cloner->addCasters(array( - ':stream' => function ($res, $a) { - unset($a['wrapper_data']); + $this->assertDumpEquals( + << (3) "foo" + 2 => (3) "bar" + ] +] +EOTXT + , + $var + ); - return $a; - }, - )); - $cloner->addCasters(array( - ':stream' => eval('return function () use ($twig) { + putenv('DUMP_LIGHT_ARRAY='); + putenv('DUMP_STRING_LENGTH='); + } + + /** + * @requires function Twig\Template::getSourceContext + */ + public function testThrowingCaster() + { + $out = fopen('php://memory', 'r+b'); + + require_once __DIR__.'/Fixtures/Twig.php'; + $twig = new \__TwigTemplate_VarDumperFixture_u75a09(new Environment(new FilesystemLoader())); + + $dumper = new CliDumper(); + $dumper->setColors(false); + $cloner = new VarCloner(); + $cloner->addCasters(array( + ':stream' => function ($res, $a) { + unset($a['wrapper_data']); + + return $a; + }, + )); + $cloner->addCasters(array( + ':stream' => eval('return function () use ($twig) { try { $twig->render(array()); - } catch (\Twig_Error_Runtime $e) { + } catch (\Twig\Error\RuntimeError $e) { throw $e->getPrevious(); } };'), - )); - $line = __LINE__ - 2; - $ref = (int) $out; + )); + $ref = (int) $out; - $data = $cloner->cloneVar($out); - $dumper->dump($data, $out); - rewind($out); - $out = stream_get_contents($out); + $data = $cloner->cloneVar($out); + $dumper->dump($data, $out); + $out = stream_get_contents($out, -1, 0); - if (method_exists($twig, 'getSource')) { - $twig = <<assertStringMatchesFormat( - <<assertStringMatchesFormat( + <<doDisplay(\$context, \$blocks); + : } catch (Twig%sError \$e) { + } + %sTemplate.php:%d: { + : { + : \$this->displayWithErrorHandling(\$this->env->mergeGlobals(\$context), array_merge(\$this->blocks, \$blocks)); + : } + } + %sTemplate.php:%d: { + : try { + : \$this->display(\$context); + : } catch (%s \$e) { + } + %sCliDumperTest.php:%d: { +%A + } + } + } +%Awrapper_type: "PHP" stream_type: "MEMORY" mode: "%s+b" unread_bytes: 0 seekable: true uri: "php://memory" - timed_out: false - blocked: true - eof: false - options: [] - ⚠: Symfony\Component\VarDumper\Exception\ThrowingCasterException {{$r} - #message: "Unexpected Exception thrown from a caster: Foobar" - -trace: { - %d. __TwigTemplate_VarDumperFixture_u75a09->doDisplay() ==> new Exception(): { - src: { - %sTwig.php:19: """ - // line 2\\n - throw new \Exception('Foobar');\\n - }\\n - """ -{$twig} } - } - %d. Twig_Template->displayWithErrorHandling() ==> __TwigTemplate_VarDumperFixture_u75a09->doDisplay(): { - src: { - %sTemplate.php:%d: """ - try {\\n - \$this->doDisplay(\$context, \$blocks);\\n - } catch (Twig_Error \$e) {\\n - """ - } - } - %d. Twig_Template->display() ==> Twig_Template->displayWithErrorHandling(): { - src: { - %sTemplate.php:%d: """ - {\\n - \$this->displayWithErrorHandling(\$this->env->mergeGlobals(\$context), array_merge(\$this->blocks, \$blocks));\\n - }\\n - """ - } - } - %d. Twig_Template->render() ==> Twig_Template->display(): { - src: { - %sTemplate.php:%d: """ - try {\\n - \$this->display(\$context);\\n - } catch (Exception \$e) {\\n - """ - } - } - %d. %slosure%s() ==> Twig_Template->render(): { - src: { - %sCliDumperTest.php:{$line}: """ - }\\n - };'),\\n - ));\\n - """ - } - } - } - } +%Aoptions: [] } EOTXT - , - $out - ); - } + , + $out + ); + } - public function testRefsInProperties() - { - $var = (object) array('foo' => 'foo'); - $var->bar = &$var->foo; + public function testRefsInProperties() + { + $var = (object) array('foo' => 'foo'); + $var->bar = &$var->foo; - $dumper = new CliDumper(); - $dumper->setColors(false); - $cloner = new VarCloner(); + $dumper = new CliDumper(); + $dumper->setColors(false); + $cloner = new VarCloner(); - $out = fopen('php://memory', 'r+b'); - $data = $cloner->cloneVar($var); - $dumper->dump($data, $out); - rewind($out); - $out = stream_get_contents($out); + $data = $cloner->cloneVar($var); + $out = $dumper->dump($data, true); - $r = defined('HHVM_VERSION') ? '' : '#%d'; - $this->assertStringMatchesFormat( - <<assertStringMatchesFormat( + <<getSpecialVars(); + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + * @requires PHP 5.6 + */ + public function testSpecialVars56() + { + $var = $this->getSpecialVars(); - $this->assertDumpEquals( - <<assertDumpEquals( + <<<'EOTXT' array:3 [ 0 => array:1 [ 0 => &1 array:1 [ @@ -333,38 +391,38 @@ array:3 [ 2 => &2 array:1 [&2] ] EOTXT - , - $var - ); - } + , + $var + ); + } - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - */ - public function testGlobalsNoExt() - { - $var = $this->getSpecialVars(); - unset($var[0]); - $out = ''; + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testGlobalsNoExt() + { + $var = $this->getSpecialVars(); + unset($var[0]); + $out = ''; - $dumper = new CliDumper(function ($line, $depth) use (&$out) { - if ($depth >= 0) { - $out .= str_repeat(' ', $depth).$line."\n"; - } - }); - $dumper->setColors(false); - $cloner = new VarCloner(); + $dumper = new CliDumper(function ($line, $depth) use (&$out) { + if ($depth >= 0) { + $out .= str_repeat(' ', $depth).$line."\n"; + } + }); + $dumper->setColors(false); + $cloner = new VarCloner(); - $refl = new \ReflectionProperty($cloner, 'useExt'); - $refl->setAccessible(true); - $refl->setValue($cloner, false); + $refl = new \ReflectionProperty($cloner, 'useExt'); + $refl->setAccessible(true); + $refl->setValue($cloner, false); - $data = $cloner->cloneVar($var); - $dumper->dump($data); + $data = $cloner->cloneVar($var); + $dumper->dump($data); - $this->assertSame( - <<assertSame( + <<<'EOTXT' array:2 [ 1 => array:1 [ "GLOBALS" => &1 array:1 [ @@ -375,38 +433,38 @@ array:2 [ ] EOTXT - , - $out - ); - } + , + $out + ); + } - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - */ - public function testBuggyRefs() - { - if (PHP_VERSION_ID >= 50600) { - $this->markTestSkipped('PHP 5.6 fixed refs counting'); - } + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testBuggyRefs() + { + if (\PHP_VERSION_ID >= 50600) { + $this->markTestSkipped('PHP 5.6 fixed refs counting'); + } - $var = $this->getSpecialVars(); - $var = $var[0]; + $var = $this->getSpecialVars(); + $var = $var[0]; - $dumper = new CliDumper(); - $dumper->setColors(false); - $cloner = new VarCloner(); + $dumper = new CliDumper(); + $dumper->setColors(false); + $cloner = new VarCloner(); - $data = $cloner->cloneVar($var)->withMaxDepth(3); - $out = ''; - $dumper->dump($data, function ($line, $depth) use (&$out) { - if ($depth >= 0) { - $out .= str_repeat(' ', $depth).$line."\n"; - } - }); + $data = $cloner->cloneVar($var)->withMaxDepth(3); + $out = ''; + $dumper->dump($data, function ($line, $depth) use (&$out) { + if ($depth >= 0) { + $out .= str_repeat(' ', $depth).$line."\n"; + } + }); - $this->assertSame( - <<assertSame( + <<<'EOTXT' array:1 [ 0 => array:1 [ 0 => array:1 [ @@ -416,26 +474,41 @@ array:1 [ ] EOTXT - , - $out - ); - } + , + $out + ); + } - private function getSpecialVars() - { - foreach (array_keys($GLOBALS) as $var) { - if ('GLOBALS' !== $var) { - unset($GLOBALS[$var]); - } - } + public function testIncompleteClass() + { + $unserializeCallbackHandler = ini_set('unserialize_callback_func', null); + $var = unserialize('O:8:"Foo\Buzz":0:{}'); + ini_set('unserialize_callback_func', $unserializeCallbackHandler); - $var = function &() { - $var = array(); - $var[] = &$var; + $this->assertDumpMatchesFormat( + <<parent = false; + public function __construct(Twig\Environment $env = null, $path = null) + { + if (null !== $env) { + parent::__construct($env); + } + $this->parent = false; + $this->blocks = array(); + $this->path = $path; + } - $this->blocks = array( - ); - } + protected function doDisplay(array $context, array $blocks = array()) + { + // line 2 + throw new \Exception('Foobar'); + } - protected function doDisplay(array $context, array $blocks = array()) - { - // line 2 - throw new \Exception('Foobar'); - } + public function getTemplateName() + { + return 'foo.twig'; + } - public function getTemplateName() - { - return 'foo.twig'; - } + public function getDebugInfo() + { + return array(20 => 1, 21 => 2); + } - public function getDebugInfo() - { - return array (19 => 2); - } + public function getSourceContext() + { + return new Twig\Source(" foo bar\n twig source\n\n", 'foo.twig', $this->path ?: __FILE__); + } } -/* foo bar*/ -/* twig source*/ -/* */ diff --git a/htdocs/includes/symfony/var-dumper/Tests/Fixtures/xml_reader.xml b/htdocs/includes/symfony/var-dumper/Tests/Fixtures/xml_reader.xml new file mode 100644 index 00000000000..740c399fc44 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Fixtures/xml_reader.xml @@ -0,0 +1,10 @@ + + + + + With text + + + + + diff --git a/htdocs/includes/symfony/var-dumper/Tests/HtmlDumperTest.php b/htdocs/includes/symfony/var-dumper/Tests/HtmlDumperTest.php index 3090435c5d4..96fcbac5b49 100644 --- a/htdocs/includes/symfony/var-dumper/Tests/HtmlDumperTest.php +++ b/htdocs/includes/symfony/var-dumper/Tests/HtmlDumperTest.php @@ -11,44 +11,45 @@ namespace Symfony\Component\VarDumper\Tests; +use PHPUnit\Framework\TestCase; use Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\HtmlDumper; /** * @author Nicolas Grekas */ -class HtmlDumperTest extends \PHPUnit_Framework_TestCase +class HtmlDumperTest extends TestCase { - public function testGet() - { - require __DIR__.'/Fixtures/dumb-var.php'; + public function testGet() + { + require __DIR__.'/Fixtures/dumb-var.php'; - $dumper = new HtmlDumper('php://output'); - $dumper->setDumpHeader(''); - $dumper->setDumpBoundaries('', ''); - $cloner = new VarCloner(); - $cloner->addCasters(array( - ':stream' => function ($res, $a) { - unset($a['uri'], $a['wrapper_data']); + $dumper = new HtmlDumper('php://output'); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $cloner = new VarCloner(); + $cloner->addCasters(array( + ':stream' => function ($res, $a) { + unset($a['uri'], $a['wrapper_data']); - return $a; - }, - )); - $data = $cloner->cloneVar($var); + return $a; + }, + )); + $data = $cloner->cloneVar($var); - ob_start(); - $dumper->dump($data); - $out = ob_get_clean(); - $out = preg_replace('/[ \t]+$/m', '', $out); - $var['file'] = htmlspecialchars($var['file'], ENT_QUOTES, 'UTF-8'); - $intMax = PHP_INT_MAX; - preg_match('/sf-dump-\d+/', $out, $dumpId); - $dumpId = $dumpId[0]; - $res = (int) $var['res']; + ob_start(); + $dumper->dump($data); + $out = ob_get_clean(); + $out = preg_replace('/[ \t]+$/m', '', $out); + $var['file'] = htmlspecialchars($var['file'], ENT_QUOTES, 'UTF-8'); + $intMax = PHP_INT_MAX; + preg_match('/sf-dump-\d+/', $out, $dumpId); + $dumpId = $dumpId[0]; + $res = (int) $var['res']; - $r = defined('HHVM_VERSION') ? '' : '#%d'; - $this->assertStringMatchesFormat( - <<#%d'; + $this->assertStringMatchesFormat( + <<array:24 [ "number" => 1 0 => &1 null @@ -59,26 +60,24 @@ class HtmlDumperTest extends \PHPUnit_Framework_TestCase 4 => INF 5 => -INF 6 => {$intMax} - "str" => "d&%s;j&%s;\\n" - 7 => b"&%s;\\x00" + "str" => "d&%s;j&%s;\\n" + 7 => b"&%s;\\x00" "[]" => [] "res" => stream resource @{$res} - wrapper_type: "plainfile" +%A wrapper_type: "plainfile" stream_type: "STDIO" mode: "r" unread_bytes: 0 seekable: true - timed_out: false - blocked: true - eof: false - options: [] +%A options: [] } "obj" => DumbFoo {#%d +foo: "foo" +"bar": "bar" } "closure" => Closure {{$r} - class: "Symfony\Component\VarDumper\Tests\HtmlDumperTest" + class: "Symfony\Component\VarDumper\Tests\HtmlDumperTest" this: HtmlDumperTest {{$r} &%s;} parameters: { \$a: {} @@ -87,7 +86,8 @@ class HtmlDumperTest extends \PHPUnit_Framework_TestCase default: null } } - file: "{$var['file']}" + file: "%sTests%eFixtures%edumb-var.php" line: "{$var['line']} to {$var['line']}" } "line" => {$var['line']} @@ -107,36 +107,57 @@ class HtmlDumperTest extends \PHPUnit_Framework_TestCase EOTXT - , + , + $out + ); + } - $out - ); - } + public function testCharset() + { + $var = mb_convert_encoding('Словарь', 'CP1251', 'UTF-8'); - public function testCharset() - { - $var = mb_convert_encoding('Словарь', 'CP1251', 'UTF-8'); + $dumper = new HtmlDumper('php://output', 'CP1251'); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $cloner = new VarCloner(); - $dumper = new HtmlDumper('php://output', 'CP1251'); - $dumper->setDumpHeader(''); - $dumper->setDumpBoundaries('', ''); - $cloner = new VarCloner(); + $data = $cloner->cloneVar($var); + $out = $dumper->dump($data, true); - $data = $cloner->cloneVar($var); - $out = fopen('php://memory', 'r+b'); - $dumper->dump($data, $out); - rewind($out); - $out = stream_get_contents($out); - - $this->assertStringMatchesFormat( - <<assertStringMatchesFormat( + <<<'EOTXT' b"Словарь" EOTXT - , + , + $out + ); + } - $out - ); - } + public function testAppend() + { + $out = fopen('php://memory', 'r+b'); + + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $cloner = new VarCloner(); + + $dumper->dump($cloner->cloneVar(123), $out); + $dumper->dump($cloner->cloneVar(456), $out); + + $out = stream_get_contents($out, -1, 0); + + $this->assertSame(<<<'EOTXT' +123 + +456 + + +EOTXT + , + $out + ); + } } diff --git a/htdocs/includes/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php b/htdocs/includes/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php index 3295797179c..c76f6be4144 100644 --- a/htdocs/includes/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php +++ b/htdocs/includes/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php @@ -11,20 +11,21 @@ namespace Symfony\Component\VarDumper\Tests\Test; +use PHPUnit\Framework\TestCase; use Symfony\Component\VarDumper\Test\VarDumperTestTrait; -class VarDumperTestTraitTest extends \PHPUnit_Framework_TestCase +class VarDumperTestTraitTest extends TestCase { - use VarDumperTestTrait; + use VarDumperTestTrait; - public function testItComparesLargeData() - { - $howMany = 700; - $data = array_fill_keys(range(0, $howMany), array('a', 'b', 'c', 'd')); + public function testItComparesLargeData() + { + $howMany = 700; + $data = array_fill_keys(range(0, $howMany), array('a', 'b', 'c', 'd')); - $expected = sprintf("array:%d [\n", $howMany + 1); - for ($i = 0; $i <= $howMany; ++$i) { - $expected .= << array:4 [ 0 => "a" 1 => "b" @@ -32,9 +33,9 @@ class VarDumperTestTraitTest extends \PHPUnit_Framework_TestCase 3 => "d" ]\n EODUMP; - } - $expected .= "]\n"; + } + $expected .= "]\n"; - $this->assertDumpEquals($expected, $data); - } + $this->assertDumpEquals($expected, $data); + } } diff --git a/htdocs/includes/symfony/var-dumper/Tests/VarClonerTest.php b/htdocs/includes/symfony/var-dumper/Tests/VarClonerTest.php index 31e3a40ae04..2234ba6902d 100644 --- a/htdocs/includes/symfony/var-dumper/Tests/VarClonerTest.php +++ b/htdocs/includes/symfony/var-dumper/Tests/VarClonerTest.php @@ -11,21 +11,22 @@ namespace Symfony\Component\VarDumper\Tests; +use PHPUnit\Framework\TestCase; use Symfony\Component\VarDumper\Cloner\VarCloner; /** * @author Nicolas Grekas */ -class VarClonerTest extends \PHPUnit_Framework_TestCase +class VarClonerTest extends TestCase { - public function testMaxIntBoundary() - { - $data = array(PHP_INT_MAX => 123); + public function testMaxIntBoundary() + { + $data = array(PHP_INT_MAX => 123); - $cloner = new VarCloner(); - $clone = $cloner->cloneVar($data); + $cloner = new VarCloner(); + $clone = $cloner->cloneVar($data); - $expected = << Array @@ -41,6 +42,10 @@ Symfony\Component\VarDumper\Cloner\Data Object [handle] => 0 [refCount] => 0 [position] => 1 + [attr] => Array + ( + ) + ) ) @@ -52,23 +57,25 @@ Symfony\Component\VarDumper\Cloner\Data Object ) + [position:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [key:Symfony\Component\VarDumper\Cloner\Data:private] => 0 [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 ) EOTXT; - $this->assertSame(sprintf($expected, PHP_INT_MAX), print_r($clone, true)); - } + $this->assertSame(sprintf($expected, PHP_INT_MAX), print_r($clone, true)); + } - public function testClone() - { - $json = json_decode('{"1":{"var":"val"},"2":{"var":"val"}}'); + public function testClone() + { + $json = json_decode('{"1":{"var":"val"},"2":{"var":"val"}}'); - $cloner = new VarCloner(); - $clone = $cloner->cloneVar($json); + $cloner = new VarCloner(); + $clone = $cloner->cloneVar($json); - $expected = << Array @@ -84,6 +91,10 @@ Symfony\Component\VarDumper\Cloner\Data Object [handle] => %i [refCount] => 0 [position] => 1 + [attr] => Array + ( + ) + ) ) @@ -99,6 +110,10 @@ Symfony\Component\VarDumper\Cloner\Data Object [handle] => %i [refCount] => 0 [position] => 2 + [attr] => Array + ( + ) + ) [\000+\0002] => Symfony\Component\VarDumper\Cloner\Stub Object @@ -110,6 +125,10 @@ Symfony\Component\VarDumper\Cloner\Data Object [handle] => %i [refCount] => 0 [position] => 3 + [attr] => Array + ( + ) + ) ) @@ -126,30 +145,112 @@ Symfony\Component\VarDumper\Cloner\Data Object ) + [position:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [key:Symfony\Component\VarDumper\Cloner\Data:private] => 0 [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 ) EOTXT; - $this->assertStringMatchesFormat($expected, print_r($clone, true)); + $this->assertStringMatchesFormat($expected, print_r($clone, true)); + } + + public function testJsonCast() + { + if (ini_get('xdebug.overload_var_dump') == 2) { + $this->markTestSkipped('xdebug is active'); + } + + $data = (array) json_decode('{"1":{}}'); + + $cloner = new VarCloner(); + $clone = $cloner->cloneVar($data); + + $expected = <<<'EOTXT' +object(Symfony\Component\VarDumper\Cloner\Data)#%i (6) { + ["data":"Symfony\Component\VarDumper\Cloner\Data":private]=> + array(2) { + [0]=> + array(1) { + [0]=> + object(Symfony\Component\VarDumper\Cloner\Stub)#%i (8) { + ["type"]=> + string(5) "array" + ["class"]=> + string(5) "assoc" + ["value"]=> + int(1) + ["cut"]=> + int(0) + ["handle"]=> + int(0) + ["refCount"]=> + int(0) + ["position"]=> + int(1) + ["attr"]=> + array(0) { + } + } } + [1]=> + array(1) { + ["1"]=> + object(Symfony\Component\VarDumper\Cloner\Stub)#%i (8) { + ["type"]=> + string(6) "object" + ["class"]=> + string(8) "stdClass" + ["value"]=> + NULL + ["cut"]=> + int(0) + ["handle"]=> + int(%i) + ["refCount"]=> + int(0) + ["position"]=> + int(0) + ["attr"]=> + array(0) { + } + } + } + } + ["position":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(0) + ["key":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(0) + ["maxDepth":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(20) + ["maxItemsPerDepth":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(-1) + ["useRefHandles":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(-1) +} - public function testCaster() - { - $cloner = new VarCloner(array( - '*' => function ($obj, $array) { - return array('foo' => 123); - }, - __CLASS__ => function ($obj, $array) { - ++$array['foo']; +EOTXT; + ob_start(); + var_dump($clone); + $this->assertStringMatchesFormat(\PHP_VERSION_ID >= 70200 ? str_replace('"1"', '1', $expected) : $expected, ob_get_clean()); + } - return $array; - }, - )); - $clone = $cloner->cloneVar($this); + public function testCaster() + { + $cloner = new VarCloner(array( + '*' => function ($obj, $array) { + return array('foo' => 123); + }, + __CLASS__ => function ($obj, $array) { + ++$array['foo']; - $expected = <<cloneVar($this); + + $expected = << Array @@ -165,6 +266,10 @@ Symfony\Component\VarDumper\Cloner\Data Object [handle] => %i [refCount] => 0 [position] => 1 + [attr] => Array + ( + ) + ) ) @@ -176,12 +281,14 @@ Symfony\Component\VarDumper\Cloner\Data Object ) + [position:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [key:Symfony\Component\VarDumper\Cloner\Data:private] => 0 [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 ) EOTXT; - $this->assertStringMatchesFormat($expected, print_r($clone, true)); - } + $this->assertStringMatchesFormat($expected, print_r($clone, true)); + } } diff --git a/htdocs/includes/symfony/var-dumper/composer.json b/htdocs/includes/symfony/var-dumper/composer.json index 05955f69430..44dbdebcce2 100644 --- a/htdocs/includes/symfony/var-dumper/composer.json +++ b/htdocs/includes/symfony/var-dumper/composer.json @@ -20,9 +20,14 @@ "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "twig/twig": "~1.20|~2.0" + "ext-iconv": "*", + "twig/twig": "~1.34|~2.4" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" }, "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", "ext-symfony_debug": "" }, "autoload": { @@ -35,7 +40,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } } } diff --git a/htdocs/includes/symfony/var-dumper/phpunit.xml.dist b/htdocs/includes/symfony/var-dumper/phpunit.xml.dist index bb16a3a4ec0..4a25f42db82 100644 --- a/htdocs/includes/symfony/var-dumper/phpunit.xml.dist +++ b/htdocs/includes/symfony/var-dumper/phpunit.xml.dist @@ -5,9 +5,13 @@ backupGlobals="false" colors="true" bootstrap="vendor/autoload.php" + failOnRisky="true" + failOnWarning="true" > + + diff --git a/htdocs/includes/tcpdi/tcpdi.php b/htdocs/includes/tcpdi/tcpdi.php index f4c0bd00391..aaa1d70c095 100644 --- a/htdocs/includes/tcpdi/tcpdi.php +++ b/htdocs/includes/tcpdi/tcpdi.php @@ -483,7 +483,7 @@ class TCPDI extends FPDF_TPL { reset ($value[1]); - while (list($k, $v) = each($value[1])) { + foreach ($value[1] as $k => $v) { $this->_straightOut($k . ' '); $this->pdf_write_value($v); } diff --git a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php index 969bb165e62..d66ec482549 100644 --- a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php +++ b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php @@ -49,7 +49,8 @@ * @version 1.1.1 * @author Nicola Asuni - info@tecnick.com */ -class TCPDF_STATIC { +class TCPDF_STATIC +{ /** * Current TCPDF version. @@ -114,7 +115,8 @@ class TCPDF_STATIC { * @since 5.9.012 (2010-11-10) * @public static */ - public static function getTCPDFVersion() { + public static function getTCPDFVersion() + { return self::$tcpdf_version; } @@ -124,7 +126,8 @@ class TCPDF_STATIC { * @since 6.0.000 (2013-03-16) * @public static */ - public static function getTCPDFProducer() { + public static function getTCPDFProducer() + { return "\x54\x43\x50\x44\x46\x20".self::getTCPDFVersion()."\x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x74\x63\x70\x64\x66\x2e\x6f\x72\x67\x29"; } @@ -134,7 +137,8 @@ class TCPDF_STATIC { * @since 4.6.025 (2009-08-17) * @public static */ - public static function set_mqr($mqr) { + public static function set_mqr($mqr) + { if (!defined('PHP_VERSION_ID')) { $version = PHP_VERSION; define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4])); @@ -150,7 +154,8 @@ class TCPDF_STATIC { * @since 4.6.025 (2009-08-17) * @public static */ - public static function get_mqr() { + public static function get_mqr() + { if (!defined('PHP_VERSION_ID')) { $version = PHP_VERSION; define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4])); @@ -168,9 +173,10 @@ class TCPDF_STATIC { * @since 5.9.204 (2013-01-28) * @public static */ - public static function isValidURL($url) { + public static function isValidURL($url) + { $headers = @get_headers($url); - return (strpos($headers[0], '200') !== false); + return (strpos($headers[0], '200') !== false); } /** @@ -190,7 +196,8 @@ class TCPDF_STATIC { * @since (4.5.019) 2009-02-28 * @public static */ - public static function removeSHY($txt='', $unicode=true) { + public static function removeSHY($txt = '', $unicode = true) + { $txt = preg_replace('/([\\xc2]{1}[\\xad]{1})/', '', $txt); if (!$unicode) { $txt = preg_replace('/([\\xad]{1})/', '', $txt); @@ -208,7 +215,8 @@ class TCPDF_STATIC { * @since 4.4.002 (2008-12-09) * @public static */ - public static function getBorderMode($brd, $position='start', $opencell=true) { + public static function getBorderMode($brd, $position = 'start', $opencell = true) + { if ((!$opencell) OR empty($brd)) { return $brd; } @@ -280,7 +288,8 @@ class TCPDF_STATIC { * @since 4.5.044 (2009-04-16) * @public static */ - public static function empty_string($str) { + public static function empty_string($str) + { return (is_null($str) OR (is_string($str) AND (strlen($str) == 0))); } @@ -292,7 +301,8 @@ class TCPDF_STATIC { * @since 4.5.000 (2008-12-31) * @public static */ - public static function getObjFilename($type='tmp', $file_id='') { + public static function getObjFilename($type = 'tmp', $file_id = '') + { return tempnam(K_PATH_CACHE, '__tcpdf_'.$file_id.'_'.$type.'_'.md5(TCPDF_STATIC::getRandomSeed()).'_'); } @@ -302,7 +312,8 @@ class TCPDF_STATIC { * @return string escaped string. * @public static */ - public static function _escape($s) { + public static function _escape($s) + { // the chr(13) substitution fixes the Bugs item #1421290. return strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\', chr(13) => '\r')); } @@ -314,7 +325,8 @@ class TCPDF_STATIC { * @since 5.9.121 (2011-09-28) * @public static */ - public static function _escapeXML($str) { + public static function _escapeXML($str) + { $replaceTable = array("\0" => '', '&' => '&', '<' => '<', '>' => '>'); $str = strtr($str, $replaceTable); return $str; @@ -327,7 +339,8 @@ class TCPDF_STATIC { * @since 4.5.029 (2009-03-19) * @public static */ - public static function objclone($object) { + public static function objclone($object) + { if (($object instanceof Imagick) AND (version_compare(phpversion('imagick'), '3.0.1') !== 1)) { // on the versions after 3.0.1 the clone() method was deprecated in favour of clone keyword return @$object->clone(); @@ -342,7 +355,8 @@ class TCPDF_STATIC { * @since 5.9.086 * @public static */ - public static function sendOutputData($data, $length) { + public static function sendOutputData($data, $length) + { if (!isset($_SERVER['HTTP_ACCEPT_ENCODING']) OR empty($_SERVER['HTTP_ACCEPT_ENCODING'])) { // the content length may vary if the server is using compression header('Content-Length: '.$length); @@ -358,7 +372,8 @@ class TCPDF_STATIC { * @return replaced page content and updated $diff parameter as array. * @public static */ - public static function replacePageNumAliases($page, $replace, $diff=0) { + public static function replacePageNumAliases($page, $replace, $diff = 0) + { foreach ($replace as $rep) { foreach ($rep[3] as $a) { if (strpos($page, $a) !== false) { @@ -377,7 +392,8 @@ class TCPDF_STATIC { * @since 5.9.152 (2012-03-23) * @public static */ - public static function getTimestamp($date) { + public static function getTimestamp($date) + { if (($date[0] == 'D') AND ($date[1] == ':')) { // remove date prefix if present $date = substr($date, 2); @@ -392,7 +408,8 @@ class TCPDF_STATIC { * @since 5.9.152 (2012-03-23) * @public static */ - public static function getFormattedDate($time) { + public static function getFormattedDate($time) + { return substr_replace(date('YmdHisO', intval($time)), '\'', (0 - 2), 0).'\''; } @@ -404,7 +421,8 @@ class TCPDF_STATIC { * @since 5.9.006 (2010-10-19) * @public static */ - public static function getRandomSeed($seed='') { + public static function getRandomSeed($seed = '') + { $rnd = uniqid(rand().microtime(true), true); if (function_exists('posix_getpid')) { $rnd .= posix_getpid(); @@ -427,7 +445,8 @@ class TCPDF_STATIC { * @since 2.0.000 (2008-01-02) * @public static */ - public static function _md5_16($str) { + public static function _md5_16($str) + { return pack('H*', md5($str)); } @@ -441,12 +460,13 @@ class TCPDF_STATIC { * @since 5.0.005 (2010-05-11) * @public static */ - public static function _AES($key, $text) { + public static function _AES($key, $text) + { // padding (RFC 2898, PKCS #5: Password-Based Cryptography Specification Version 2.0) $padding = 16 - (strlen($text) % 16); $text .= str_repeat(chr($padding), $padding); if (extension_loaded('openssl')) { - $iv = openssl_random_pseudo_bytes (openssl_cipher_iv_length('aes-256-cbc')); + $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc')); $text = openssl_encrypt($text, 'aes-256-cbc', $key, OPENSSL_RAW_DATA, $iv); return $iv.substr($text, 0, -16); } @@ -466,7 +486,8 @@ class TCPDF_STATIC { * @since TODO * @public static */ - public static function _AESnopad($key, $text) { + public static function _AESnopad($key, $text) + { if (extension_loaded('openssl')) { $iv = str_repeat("\x00", openssl_cipher_iv_length('aes-256-cbc')); $text = openssl_encrypt($text, 'aes-256-cbc', $key, OPENSSL_RAW_DATA, $iv); @@ -489,7 +510,8 @@ class TCPDF_STATIC { * @author Klemen Vodopivec, Nicola Asuni * @public static */ - public static function _RC4($key, $text, &$last_enc_key, &$last_enc_key_c) { + public static function _RC4($key, $text, &$last_enc_key, &$last_enc_key_c) + { if (function_exists('mcrypt_encrypt') AND ($out = @mcrypt_encrypt(MCRYPT_ARCFOUR, $key, $text, MCRYPT_MODE_STREAM, ''))) { // try to use mcrypt function if exist return $out; @@ -533,7 +555,8 @@ class TCPDF_STATIC { * @author Nicola Asuni * @public static */ - public static function getUserPermissionCode($permissions, $mode=0) { + public static function getUserPermissionCode($permissions, $mode = 0) + { $options = array( 'owner' => 2, // bit 2 -- inverted logic: cleared by default 'print' => 4, // bit 3 @@ -570,7 +593,8 @@ class TCPDF_STATIC { * @author Nicola Asuni * @public static */ - public static function convertHexStringToString($bs) { + public static function convertHexStringToString($bs) + { $string = ''; // string to be returned $bslength = strlen($bs); if (($bslength % 2) != 0) { @@ -592,7 +616,8 @@ class TCPDF_STATIC { * @author Nicola Asuni * @public static */ - public static function convertStringToHexString($s) { + public static function convertStringToHexString($s) + { $bs = ''; $chars = preg_split('//', $s, -1, PREG_SPLIT_NO_EMPTY); foreach ($chars as $c) { @@ -609,7 +634,8 @@ class TCPDF_STATIC { * @author Nicola Asuni * @public static */ - public static function getEncPermissionsString($protection) { + public static function getEncPermissionsString($protection) + { $binprot = sprintf('%032b', $protection); $str = chr(bindec(substr($binprot, 24, 8))); $str .= chr(bindec(substr($binprot, 16, 8))); @@ -626,7 +652,8 @@ class TCPDF_STATIC { * @since 5.9.097 (2011-06-23) * @public static */ - public static function encodeNameObject($name) { + public static function encodeNameObject($name) + { $escname = ''; $length = strlen($name); for ($i = 0; $i < $length; ++$i) { @@ -650,7 +677,8 @@ class TCPDF_STATIC { * @since 4.8.000 (2009-09-06) * @public static */ - public static function getAnnotOptFromJSProp($prop, &$spot_colors, $rtl=false) { + public static function getAnnotOptFromJSProp($prop, &$spot_colors, $rtl = false) + { if (isset($prop['aopt']) AND is_array($prop['aopt'])) { // the annotation options area lready defined return $prop['aopt']; @@ -1016,8 +1044,9 @@ class TCPDF_STATIC { * @since 4.2.005 (2008-11-06) * @public static */ - public static function formatPageNumber($num) { - return number_format((float)$num, 0, '', '.'); + public static function formatPageNumber($num) + { + return number_format((float) $num, 0, '', '.'); } /** @@ -1028,8 +1057,9 @@ class TCPDF_STATIC { * @see addTOC(), addHTMLTOC() * @public static */ - public static function formatTOCPageNumber($num) { - return number_format((float)$num, 0, '', '.'); + public static function formatTOCPageNumber($num) + { + return number_format((float) $num, 0, '', '.'); } /** @@ -1040,7 +1070,8 @@ class TCPDF_STATIC { * @since 5.1.000 (2010-05-25) * @public static */ - public static function extractCSSproperties($cssdata) { + public static function extractCSSproperties($cssdata) + { if (empty($cssdata)) { return array(); } @@ -1136,7 +1167,8 @@ class TCPDF_STATIC { * @see setHtmlVSpace() * @public static */ - public static function fixHTMLCode($html, $default_css='', $tagvs='', $tidy_options='', &$tagvspaces) { + public static function fixHTMLCode($html, $default_css = '', $tagvs = '', $tidy_options = '', &$tagvspaces) + { // configure parameters for HTML Tidy if ($tidy_options === '') { $tidy_options = array ( @@ -1202,7 +1234,8 @@ class TCPDF_STATIC { * @since 5.1.000 (2010-05-25) * @public static */ - public static function isValidCSSSelectorForTag($dom, $key, $selector) { + public static function isValidCSSSelectorForTag($dom, $key, $selector) + { $valid = false; // value to be returned $tag = $dom[$key]['value']; $class = array(); @@ -1362,7 +1395,8 @@ class TCPDF_STATIC { * @since 5.1.000 (2010-05-25) * @public static */ - public static function getCSSdataArray($dom, $key, $css) { + public static function getCSSdataArray($dom, $key, $css) + { $cssarray = array(); // style to be returned // get parent CSS selectors $selectors = array(); @@ -1370,7 +1404,7 @@ class TCPDF_STATIC { $selectors = $dom[($dom[$key]['parent'])]['csssel']; } // get all styles that apply - foreach($css as $selector => $style) { + foreach ($css as $selector => $style) { $pos = strpos($selector, ' '); // get specificity $specificity = substr($selector, 0, $pos); @@ -1407,7 +1441,8 @@ class TCPDF_STATIC { * @since 5.9.070 (2011-04-19) * @public static */ - public static function getTagStyleFromCSSarray($css) { + public static function getTagStyleFromCSSarray($css) + { $tagstyle = ''; // value to be returned foreach ($css as $style) { // split single css commands @@ -1438,8 +1473,13 @@ class TCPDF_STATIC { * @since 4.4.004 (2008-12-10) * @public static */ - public static function intToRoman($number) { + public static function intToRoman($number) + { $roman = ''; + if ($number >= 4000) { + // do not represent numbers above 4000 in Roman numerals + return strval($number); + } while ($number >= 1000) { $roman .= 'M'; $number -= 1000; @@ -1504,7 +1544,8 @@ class TCPDF_STATIC { * @since 4.8.038 (2010-03-13) * @public static */ - public static function revstrpos($haystack, $needle, $offset = 0) { + public static function revstrpos($haystack, $needle, $offset = 0) + { $length = strlen($haystack); $offset = ($offset > 0)?($length - $offset):abs($offset); $pos = strpos(strrev($haystack), strrev($needle), $offset); @@ -1519,7 +1560,8 @@ class TCPDF_STATIC { * @since 4.9.012 (2010-04-12) * @public static */ - public static function getHyphenPatternsFromTEX($file) { + public static function getHyphenPatternsFromTEX($file) + { // TEX patterns are available at: // http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ $data = file_get_contents($file); @@ -1533,7 +1575,7 @@ class TCPDF_STATIC { $patterns_array = preg_split('/[\s]+/', $data); // create new language array of patterns $patterns = array(); - foreach($patterns_array as $val) { + foreach ($patterns_array as $val) { if (!TCPDF_STATIC::empty_string($val)) { $val = trim($val); $val = str_replace('\'', '\\\'', $val); @@ -1547,27 +1589,28 @@ class TCPDF_STATIC { /** * Get the Path-Painting Operators. * @param $style (string) Style of rendering. Possible values are: - *
      - *
    • S or D: Stroke the path.
    • - *
    • s or d: Close and stroke the path.
    • - *
    • f or F: Fill the path, using the nonzero winding number rule to determine the region to fill.
    • - *
    • f* or F*: Fill the path, using the even-odd rule to determine the region to fill.
    • - *
    • B or FD or DF: Fill and then stroke the path, using the nonzero winding number rule to determine the region to fill.
    • - *
    • B* or F*D or DF*: Fill and then stroke the path, using the even-odd rule to determine the region to fill.
    • - *
    • b or fd or df: Close, fill, and then stroke the path, using the nonzero winding number rule to determine the region to fill.
    • - *
    • b or f*d or df*: Close, fill, and then stroke the path, using the even-odd rule to determine the region to fill.
    • - *
    • CNZ: Clipping mode using the even-odd rule to determine which regions lie inside the clipping path.
    • - *
    • CEO: Clipping mode using the nonzero winding number rule to determine which regions lie inside the clipping path
    • - *
    • n: End the path object without filling or stroking it.
    • - *
    + *
      + *
    • S or D: Stroke the path.
    • + *
    • s or d: Close and stroke the path.
    • + *
    • f or F: Fill the path, using the nonzero winding number rule to determine the region to fill.
    • + *
    • f* or F*: Fill the path, using the even-odd rule to determine the region to fill.
    • + *
    • B or FD or DF: Fill and then stroke the path, using the nonzero winding number rule to determine the region to fill.
    • + *
    • B* or F*D or DF*: Fill and then stroke the path, using the even-odd rule to determine the region to fill.
    • + *
    • b or fd or df: Close, fill, and then stroke the path, using the nonzero winding number rule to determine the region to fill.
    • + *
    • b or f*d or df*: Close, fill, and then stroke the path, using the even-odd rule to determine the region to fill.
    • + *
    • CNZ: Clipping mode using the even-odd rule to determine which regions lie inside the clipping path.
    • + *
    • CEO: Clipping mode using the nonzero winding number rule to determine which regions lie inside the clipping path
    • + *
    • n: End the path object without filling or stroking it.
    • + *
    * @param $default (string) default style * @author Nicola Asuni * @since 5.0.000 (2010-04-30) * @public static */ - public static function getPathPaintOperator($style, $default='S') { + public static function getPathPaintOperator($style, $default = 'S') + { $op = ''; - switch($style) { + switch ($style) { case 'S': case 'D': { $op = 'S'; @@ -1644,7 +1687,8 @@ class TCPDF_STATIC { * @since 5.0.000 (2010-05-02) * @public static */ - public static function getTransformationMatrixProduct($ta, $tb) { + public static function getTransformationMatrixProduct($ta, $tb) + { $tm = array(); $tm[0] = ($ta[0] * $tb[0]) + ($ta[2] * $tb[1]); $tm[1] = ($ta[1] * $tb[0]) + ($ta[3] * $tb[1]); @@ -1663,7 +1707,8 @@ class TCPDF_STATIC { * @since 5.0.000 (2010-05-02) * @public static */ - public static function getSVGTransformMatrix($attribute) { + public static function getSVGTransformMatrix($attribute) + { // identity matrix $tm = array(1, 0, 0, 1, 0, 0); $transform = array(); @@ -1760,7 +1805,8 @@ class TCPDF_STATIC { * @since 5.0.000 (2010-05-04) * @public static */ - public static function getVectorsAngle($x1, $y1, $x2, $y2) { + public static function getVectorsAngle($x1, $y1, $x2, $y2) + { $dprod = ($x1 * $x2) + ($y1 * $y2); $dist1 = sqrt(($x1 * $x1) + ($y1 * $y1)); $dist2 = sqrt(($x2 * $x2) + ($y2 * $y2)); @@ -1787,14 +1833,15 @@ class TCPDF_STATIC { * @since 6.0.023 * @public static */ - public static function pregSplit($pattern, $modifiers, $subject, $limit=NULL, $flags=NULL) { + public static function pregSplit($pattern, $modifiers, $subject, $limit = null, $flags = null) + { // the bug only happens on PHP 5.2 when using the u modifier - if ((strpos($modifiers, 'u') === FALSE) OR (count(preg_split('//u', "\n\t", -1, PREG_SPLIT_NO_EMPTY)) == 2)) { + if ((strpos($modifiers, 'u') === false) OR (count(preg_split('//u', "\n\t", -1, PREG_SPLIT_NO_EMPTY)) == 2)) { return preg_split($pattern.$modifiers, $subject, $limit, $flags); } // preg_split is bugged - try alternative solution $ret = array(); - while (($nl = strpos($subject, "\n")) !== FALSE) { + while (($nl = strpos($subject, "\n")) !== false) { $ret = array_merge($ret, preg_split($pattern.$modifiers, substr($subject, 0, $nl), $limit, $flags)); $ret[] = "\n"; $subject = substr($subject, ($nl + 1)); @@ -1805,28 +1852,28 @@ class TCPDF_STATIC { return $ret; } - /** - * Wrapper to use fopen only with local files - * @param string $filename The full path to the file to open - * @param string $mode Acceses type for the file ('r', 'r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+' or 'e') - * @return resource Returns a file pointer resource on success, or FALSE on error. - * @public static - */ - public static function fopenLocal($filename, $mode) - { - if (strpos($filename, '//') === 0) { - // Share folder on a (windows) server - // e.g.: "//[MyServerName]/[MySharedFolder]/" - // - // nothing to change - } elseif (strpos($filename, '://') === false) { - $filename = 'file://'.$filename; - } elseif (stream_is_local($filename) !== true) { - return false; - } + /** + * Wrapper to use fopen only with local files + * @param string $filename The full path to the file to open + * @param string $mode Acceses type for the file ('r', 'r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+' or 'e') + * @return resource Returns a file pointer resource on success, or FALSE on error. + * @public static + */ + public static function fopenLocal($filename, $mode) + { + if (strpos($filename, '//') === 0) { + // Share folder on a (windows) server + // e.g.: "//[MyServerName]/[MySharedFolder]/" + // + // nothing to change + } elseif (strpos($filename, '://') === false) { + $filename = 'file://'.$filename; + } elseif (stream_is_local($filename) !== true) { + return false; + } - return fopen($filename, $mode); - } + return fopen($filename, $mode); + } /** * Check if the URL exist. @@ -1834,7 +1881,8 @@ class TCPDF_STATIC { * @return Returns TRUE if the URL exists; FALSE otherwise. * @public static */ - public static function url_exists($url) { + public static function url_exists($url) + { $crs = curl_init(); curl_setopt($crs, CURLOPT_URL, $url); curl_setopt($crs, CURLOPT_NOBODY, true); @@ -1861,7 +1909,8 @@ class TCPDF_STATIC { * @return Returns TRUE if the file or directory specified by filename exists; FALSE otherwise. * @public static */ - public static function file_exists($filename) { + public static function file_exists($filename) + { if (preg_match('|^https?://|', $filename) == 1) { return self::url_exists($filename); } @@ -1880,24 +1929,25 @@ class TCPDF_STATIC { * @since 6.0.025 * @public static */ - public static function fileGetContents($file) { + public static function fileGetContents($file) + { $alt = array($file); // if ((strlen($file) > 1) - && ($file[0] === '/') - && ($file[1] !== '/') - && !empty($_SERVER['DOCUMENT_ROOT']) - && ($_SERVER['DOCUMENT_ROOT'] !== '/') + && ($file[0] === '/') + && ($file[1] !== '/') + && !empty($_SERVER['DOCUMENT_ROOT']) + && ($_SERVER['DOCUMENT_ROOT'] !== '/') ) { - $findroot = strpos($file, $_SERVER['DOCUMENT_ROOT']); - if (($findroot === false) || ($findroot > 1)) { - $alt[] = htmlspecialchars_decode(urldecode($_SERVER['DOCUMENT_ROOT'].$file)); - } + $findroot = strpos($file, $_SERVER['DOCUMENT_ROOT']); + if (($findroot === false) || ($findroot > 1)) { + $alt[] = htmlspecialchars_decode(urldecode($_SERVER['DOCUMENT_ROOT'].$file)); + } } // $protocol = 'http'; if (!empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) != 'off')) { - $protocol .= 's'; + $protocol .= 's'; } // $url = $file; @@ -1908,26 +1958,26 @@ class TCPDF_STATIC { $alt[] = $url; // if (preg_match('%^(https?)://%', $url) - && empty($_SERVER['HTTP_HOST']) - && empty($_SERVER['DOCUMENT_ROOT']) + && empty($_SERVER['HTTP_HOST']) + && empty($_SERVER['DOCUMENT_ROOT']) ) { $urldata = parse_url($url); if (empty($urldata['query'])) { $host = $protocol.'://'.$_SERVER['HTTP_HOST']; if (strpos($url, $host) === 0) { - // convert URL to full server path - $tmp = str_replace($host, $_SERVER['DOCUMENT_ROOT'], $url); - $alt[] = htmlspecialchars_decode(urldecode($tmp)); + // convert URL to full server path + $tmp = str_replace($host, $_SERVER['DOCUMENT_ROOT'], $url); + $alt[] = htmlspecialchars_decode(urldecode($tmp)); } } } // if (isset($_SERVER['SCRIPT_URI']) - && !preg_match('%^(https?|ftp)://%', $file) - && !preg_match('%^//%', $file) + && !preg_match('%^(https?|ftp)://%', $file) + && !preg_match('%^//%', $file) ) { - $urldata = @parse_url($_SERVER['SCRIPT_URI']); - $alt[] = $urldata['scheme'].'://'.$urldata['host'].(($file[0] == '/') ? '' : '/').$file; + $urldata = @parse_url($_SERVER['SCRIPT_URI']); + $alt[] = $urldata['scheme'].'://'.$urldata['host'].(($file[0] == '/') ? '' : '/').$file; } // $alt = array_unique($alt); @@ -1937,7 +1987,7 @@ class TCPDF_STATIC { } $ret = @file_get_contents($path); if ( $ret != false ) { - return $ret; + return $ret; } // try to use CURL for URLs if (!ini_get('allow_url_fopen') @@ -1951,7 +2001,7 @@ class TCPDF_STATIC { curl_setopt($crs, CURLOPT_FAILONERROR, true); curl_setopt($crs, CURLOPT_RETURNTRANSFER, true); if ((ini_get('open_basedir') == '') && (!ini_get('safe_mode'))) { - curl_setopt($crs, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($crs, CURLOPT_FOLLOWLOCATION, true); } curl_setopt($crs, CURLOPT_CONNECTTIMEOUT, 5); curl_setopt($crs, CURLOPT_TIMEOUT, 30); @@ -1977,7 +2027,8 @@ class TCPDF_STATIC { * @since 5.2.000 (2010-06-02) * @public static */ - public static function _getULONG($str, $offset) { + public static function _getULONG($str, $offset) + { $v = unpack('Ni', substr($str, $offset, 4)); return $v['i']; } @@ -1991,7 +2042,8 @@ class TCPDF_STATIC { * @since 5.2.000 (2010-06-02) * @public static */ - public static function _getUSHORT($str, $offset) { + public static function _getUSHORT($str, $offset) + { $v = unpack('ni', substr($str, $offset, 2)); return $v['i']; } @@ -2005,7 +2057,8 @@ class TCPDF_STATIC { * @since 5.2.000 (2010-06-02) * @public static */ - public static function _getSHORT($str, $offset) { + public static function _getSHORT($str, $offset) + { $v = unpack('si', substr($str, $offset, 2)); return $v['i']; } @@ -2019,7 +2072,8 @@ class TCPDF_STATIC { * @since 5.9.123 (2011-09-30) * @public static */ - public static function _getFWORD($str, $offset) { + public static function _getFWORD($str, $offset) + { $v = self::_getUSHORT($str, $offset); if ($v > 0x7fff) { $v -= 0x10000; @@ -2036,7 +2090,8 @@ class TCPDF_STATIC { * @since 5.9.123 (2011-09-30) * @public static */ - public static function _getUFWORD($str, $offset) { + public static function _getUFWORD($str, $offset) + { $v = self::_getUSHORT($str, $offset); return $v; } @@ -2050,7 +2105,8 @@ class TCPDF_STATIC { * @since 5.9.123 (2011-09-30) * @public static */ - public static function _getFIXED($str, $offset) { + public static function _getFIXED($str, $offset) + { // mantissa $m = self::_getFWORD($str, $offset); // fraction @@ -2068,7 +2124,8 @@ class TCPDF_STATIC { * @since 5.2.000 (2010-06-02) * @public static */ - public static function _getBYTE($str, $offset) { + public static function _getBYTE($str, $offset) + { $v = unpack('Ci', substr($str, $offset, 1)); return $v['i']; } @@ -2082,7 +2139,8 @@ class TCPDF_STATIC { * @since 4.5.027 (2009-03-16) * @public static */ - public static function rfread($handle, $length) { + public static function rfread($handle, $length) + { $data = fread($handle, $length); if ($data === false) { return false; @@ -2100,7 +2158,8 @@ class TCPDF_STATIC { * @return 4-byte integer * @public static */ - public static function _freadint($f) { + public static function _freadint($f) + { $a = unpack('Ni', fread($f, 4)); return $a['i']; } @@ -2470,7 +2529,8 @@ class TCPDF_STATIC { * @since 5.0.010 (2010-05-17) * @public static */ - public static function getPageSizeFromFormat($format) { + public static function getPageSizeFromFormat($format) + { if (isset(self::$page_formats[$format])) { return self::$page_formats[$format]; } @@ -2492,7 +2552,8 @@ class TCPDF_STATIC { * @since 5.0.010 (2010-05-17) * @public static */ - public static function setPageBoxes($page, $type, $llx, $lly, $urx, $ury, $points=false, $k, $pagedim=array()) { + public static function setPageBoxes($page, $type, $llx, $lly, $urx, $ury, $points = false, $k, $pagedim = array()) + { if (!isset($pagedim[$page])) { // initialize array $pagedim[$page] = array(); @@ -2518,7 +2579,8 @@ class TCPDF_STATIC { * @since 5.0.010 (2010-05-17) * @public static */ - public static function swapPageBoxCoordinates($page, $pagedim) { + public static function swapPageBoxCoordinates($page, $pagedim) + { foreach (self::$pageboxes as $type) { // swap X and Y coordinates if (isset($pagedim[$page][$type])) { @@ -2539,7 +2601,8 @@ class TCPDF_STATIC { * @return (string) Canonical page layout name. * @public static */ - public static function getPageLayoutMode($layout='SinglePage') { + public static function getPageLayoutMode($layout = 'SinglePage') + { switch ($layout) { case 'default': case 'single': @@ -2582,7 +2645,8 @@ class TCPDF_STATIC { * @return (string) Canonical page mode name. * @public static */ - public static function getPageMode($mode='UseNone') { + public static function getPageMode($mode = 'UseNone') + { switch ($mode) { case 'UseNone': { $page_mode = 'UseNone'; @@ -2614,8 +2678,6 @@ class TCPDF_STATIC { } return $page_mode; } - - } // END OF TCPDF_STATIC CLASS //============================================================+ diff --git a/htdocs/index.php b/htdocs/index.php index 8c1433c79cb..1884d9a823a 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -26,7 +26,7 @@ */ -define('CSRFCHECK_WITH_TOKEN', 1); // We force need to use a token to login when making a POST +define('CSRFCHECK_WITH_TOKEN', 1); // We force need to use a token to login when making a POST require 'main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; diff --git a/htdocs/install/mysql/data/llx_c_units.sql b/htdocs/install/mysql/data/llx_c_units.sql index 3a11453c9f8..59692793fe2 100644 --- a/htdocs/install/mysql/data/llx_c_units.sql +++ b/htdocs/install/mysql/data/llx_c_units.sql @@ -1,7 +1,9 @@ -- ======================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- Copyright (C) 2019 Florian Henry +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- Copyright (C) 2019 Florian Henry +-- Copyright (C) 2021 Alexandre Spangaro +-- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or @@ -17,45 +19,45 @@ -- -- ======================================================================== -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('T', '3','WeightUnitton','T', 'weight', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('KG', '0','WeightUnitkg','kg', 'weight', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('G', '-3','WeightUnitg','g', 'weight', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MG','-6','WeightUnitmg','mg', 'weight', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('OZ','98','WeightUnitounce','Oz', 'weight', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('LB','99','WeightUnitpound','lb', 'weight', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('T', '100', '3','WeightUnitton','T', 'weight', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('KG','110', '0','WeightUnitkg','kg', 'weight', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('G', '120','-3','WeightUnitg','g', 'weight', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('MG','130','-6','WeightUnitmg','mg', 'weight', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('OZ','140','98','WeightUnitounce','Oz', 'weight', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('LB','150','99','WeightUnitpound','lb', 'weight', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('M', '0','SizeUnitm','m', 'size', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('DM','-1','SizeUnitdm','dm', 'size', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('CM','-2','SizeUnitcm','cm', 'size', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MM','-3','SizeUnitmm','mm', 'size', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('FT','98','SizeUnitfoot','ft', 'size', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('IN','99','SizeUnitinch','in', 'size', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('M', '200', '0','SizeUnitm','m', 'size', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('DM','210','-1','SizeUnitdm','dm', 'size', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('CM','220','-2','SizeUnitcm','cm', 'size', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('MM','230','-3','SizeUnitmm','mm', 'size', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('FT','240','98','SizeUnitfoot','ft', 'size', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('IN','250','99','SizeUnitinch','in', 'size', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('M2', '0','SurfaceUnitm2','m2', 'surface', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('DM2','-2','SurfaceUnitdm2','dm2', 'surface', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('CM2','-4','SurfaceUnitcm2','cm2', 'surface', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MM2','-6','SurfaceUnitmm2','mm2', 'surface', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('FT2','98','SurfaceUnitfoot2','ft2', 'surface', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('IN2','99','SurfaceUnitinch2','in2', 'surface', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('M2', '300', '0','SurfaceUnitm2','m2', 'surface', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('DM2','310','-2','SurfaceUnitdm2','dm2', 'surface', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('CM2','320','-4','SurfaceUnitcm2','cm2', 'surface', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('MM2','330','-6','SurfaceUnitmm2','mm2', 'surface', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('FT2','340','98','SurfaceUnitfoot2','ft2', 'surface', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('IN2','350','99','SurfaceUnitinch2','in2', 'surface', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('M3', '0','VolumeUnitm3','m3', 'volume', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('DM3','-3','VolumeUnitdm3','dm3', 'volume', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('CM3','-6','VolumeUnitcm3','cm3', 'volume', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MM3','-9','VolumeUnitmm3','mm3', 'volume', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('FT3','88','VolumeUnitfoot3','ft3', 'volume', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('IN3','89','VolumeUnitinch3','in3', 'volume', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('OZ3','97','VolumeUnitounce','Oz', 'volume', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('L', '98','VolumeUnitlitre','L', 'volume', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('GAL','99','VolumeUnitgallon','gal', 'volume', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('M3', '400', '0','VolumeUnitm3','m3', 'volume', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('DM3','410','-3','VolumeUnitdm3','dm3', 'volume', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('CM3','420','-6','VolumeUnitcm3','cm3', 'volume', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('MM3','430','-9','VolumeUnitmm3','mm3', 'volume', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('FT3','440','88','VolumeUnitfoot3','ft3', 'volume', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('IN3','450','89','VolumeUnitinch3','in3', 'volume', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('OZ3','460','97','VolumeUnitounce','Oz', 'volume', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('L', '470','98','VolumeUnitlitre','L', 'volume', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('GAL','480','99','VolumeUnitgallon','gal', 'volume', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('P', '0','Piece','p', 'qty', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('SET', '0','Set','set', 'qty', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('P', '500', '0','Piece','p', 'qty', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('SET','510', '0','Set','set', 'qty', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('S', '0','second','s', 'time', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MI', '60','minute','i', 'time', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('H', '3600','hour','h', 'time', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('D', '86400','day','d', 'time', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('W', '604800','week','w', 'time', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('MO','2629800','month','m', 'time', 1); -INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('Y','31557600','year','y', 'time', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('S', '600', '0','second','s', 'time', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('MI','610', '60','minute','i', 'time', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('H', '620', '3600','hour','h', 'time', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('D', '630', '86400','day','d', 'time', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('W', '640', '604800','week','w', 'time', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('MO','650', '2629800','month','m', 'time', 1); +INSERT INTO llx_c_units (code, sortorder, scale, label, short_label, unit_type, active) VALUES ('Y', '660','31557600','year','y', 'time', 1); diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index d6e21f17aeb..03110b4425e 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -627,3 +627,5 @@ CREATE TABLE llx_onlinesignature ALTER TABLE llx_facture_fourn CHANGE COLUMN fk_mode_transport fk_transport_mode integer; +ALTER TABLE llx_c_socialnetworks DROP INDEX idx_c_socialnetworks_code; +ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code_entity (code, entity); diff --git a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql index 3243d63bcc6..6ea11c25499 100644 --- a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql +++ b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql @@ -35,6 +35,7 @@ -- VMYSQL4.3 ALTER TABLE llx_partnership MODIFY COLUMN date_partnership_end date NULL; -- VPGSQL8.2 ALTER TABLE llx_partnership ALTER COLUMN date_partnership_end DROP NOT NULL; +ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_export datetime DEFAULT NULL; ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_project integer NOT NULL; ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_invoice integer NULL; @@ -59,7 +60,7 @@ ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_ -- VMYSQL4.3 ALTER TABLE llx_eventorganization_conferenceorboothattendee MODIFY COLUMN fk_actioncomm integer NULL; -- VPGSQL8.2 ALTER TABLE llx_eventorganization_conferenceorboothattendee ALTER COLUMN fk_actioncomm DROP NOT NULL; - +ALTER TABLE llx_mrp_mo ADD COLUMN last_main_doc varchar(255); UPDATE llx_extrafields SET elementtype = 'salary' WHERE elementtype = 'payment_salary'; ALTER TABLE llx_payment_salary_extrafields RENAME TO llx_salary_extrafields; @@ -379,6 +380,61 @@ ALTER TABLE llx_hrm_skillrank ADD CONSTRAINT llx_hrm_skillrank_fk_user_creat FOR --END GRH/HRM MODULE +ALTER TABLE llx_c_units ADD COLUMN sortorder smallint AFTER code; + -- Manage accountancy auxiliary account for thirdparties per entity ALTER TABLE llx_societe_perentity ADD COLUMN accountancy_code_customer varchar(24) AFTER entity; -- equivalent to code_compta in llx_societe ALTER TABLE llx_societe_perentity ADD COLUMN accountancy_code_supplier varchar(24) AFTER accountancy_code_customer; -- equivalent to code_compta_supplier in llx_societe + +ALTER TABLE llx_projet_task ADD COLUMN budget_amount double(24,8) AFTER priority; + +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_ticket_by_severity.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_ticket_by_severity.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_nb_ticket_last_x_days.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_nb_ticket_last_x_days.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_nb_tickets_type.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_nb_tickets_type.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_new_vs_close_ticket.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_new_vs_close_ticket.php' AND entity = 1); + +ALTER TABLE llx_user DROP COLUMN jabberid; +ALTER TABLE llx_user DROP COLUMN skype; +ALTER TABLE llx_user DROP COLUMN twitter; +ALTER TABLE llx_user DROP COLUMN facebook; +ALTER TABLE llx_user DROP COLUMN linkedin; +ALTER TABLE llx_user DROP COLUMN instagram; +ALTER TABLE llx_user DROP COLUMN snapchat; +ALTER TABLE llx_user DROP COLUMN googleplus; +ALTER TABLE llx_user DROP COLUMN youtube; +ALTER TABLE llx_user DROP COLUMN whatsapp; + +ALTER TABLE llx_adherent DROP COLUMN jabberid; +ALTER TABLE llx_adherent DROP COLUMN skype; +ALTER TABLE llx_adherent DROP COLUMN twitter; +ALTER TABLE llx_adherent DROP COLUMN facebook; +ALTER TABLE llx_adherent DROP COLUMN linkedin; +ALTER TABLE llx_adherent DROP COLUMN instagram; +ALTER TABLE llx_adherent DROP COLUMN snapchat; +ALTER TABLE llx_adherent DROP COLUMN googleplus; +ALTER TABLE llx_adherent DROP COLUMN youtube; +ALTER TABLE llx_adherent DROP COLUMN whatsapp; + +ALTER TABLE llx_societe DROP COLUMN jabberid; +ALTER TABLE llx_societe DROP COLUMN skype; +ALTER TABLE llx_societe DROP COLUMN twitter; +ALTER TABLE llx_societe DROP COLUMN facebook; +ALTER TABLE llx_societe DROP COLUMN linkedin; +ALTER TABLE llx_societe DROP COLUMN instagram; +ALTER TABLE llx_societe DROP COLUMN snapchat; +ALTER TABLE llx_societe DROP COLUMN googleplus; +ALTER TABLE llx_societe DROP COLUMN youtube; +ALTER TABLE llx_societe DROP COLUMN whatsapp; + +ALTER TABLE llx_socpeople DROP COLUMN jabberid; +ALTER TABLE llx_socpeople DROP COLUMN skype; +ALTER TABLE llx_socpeople DROP COLUMN twitter; +ALTER TABLE llx_socpeople DROP COLUMN facebook; +ALTER TABLE llx_socpeople DROP COLUMN linkedin; +ALTER TABLE llx_socpeople DROP COLUMN instagram; +ALTER TABLE llx_socpeople DROP COLUMN snapchat; +ALTER TABLE llx_socpeople DROP COLUMN googleplus; +ALTER TABLE llx_socpeople DROP COLUMN youtube; +ALTER TABLE llx_socpeople DROP COLUMN whatsapp; + + \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 1d3a784dd74..bd74c33c688 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -51,15 +51,15 @@ create table llx_adherent url varchar(255) NULL, socialnetworks text DEFAULT NULL, -- json with socialnetworks - skype varchar(255), -- deprecated - twitter varchar(255), -- deprecated - facebook varchar(255), -- deprecated - linkedin varchar(255), -- deprecated - instagram varchar(255), -- deprecated - snapchat varchar(255), -- deprecated - googleplus varchar(255), -- deprecated - youtube varchar(255), -- deprecated - whatsapp varchar(255), -- deprecated + --skype varchar(255), -- deprecated + --twitter varchar(255), -- deprecated + --facebook varchar(255), -- deprecated + --linkedin varchar(255), -- deprecated + --instagram varchar(255), -- deprecated + --snapchat varchar(255), -- deprecated + --googleplus varchar(255), -- deprecated + --youtube varchar(255), -- deprecated + --whatsapp varchar(255), -- deprecated phone varchar(30), phone_perso varchar(30), diff --git a/htdocs/install/mysql/tables/llx_c_socialnetworks.key.sql b/htdocs/install/mysql/tables/llx_c_socialnetworks.key.sql index 2b7dcdc9d4e..3d3afb94d8a 100644 --- a/htdocs/install/mysql/tables/llx_c_socialnetworks.key.sql +++ b/htdocs/install/mysql/tables/llx_c_socialnetworks.key.sql @@ -16,4 +16,4 @@ -- ======================================================================== -ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code (code); +ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code_entity (entity, code); diff --git a/htdocs/install/mysql/tables/llx_c_units.sql b/htdocs/install/mysql/tables/llx_c_units.sql index d4ff78b79f1..ef77703ae6e 100644 --- a/htdocs/install/mysql/tables/llx_c_units.sql +++ b/htdocs/install/mysql/tables/llx_c_units.sql @@ -19,11 +19,12 @@ -- ======================================================================== create table llx_c_units( - rowid integer AUTO_INCREMENT PRIMARY KEY, - code varchar(3), - scale integer, - label varchar(50), - short_label varchar(5), - unit_type varchar(10), - active tinyint DEFAULT 1 NOT NULL + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(3), + sortorder smallint, + scale integer, + label varchar(50), + short_label varchar(5), + unit_type varchar(10), + active tinyint DEFAULT 1 NOT NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_mrp_mo.sql b/htdocs/install/mysql/tables/llx_mrp_mo.sql index 185ea1583c9..88dc5d42789 100644 --- a/htdocs/install/mysql/tables/llx_mrp_mo.sql +++ b/htdocs/install/mysql/tables/llx_mrp_mo.sql @@ -39,6 +39,7 @@ CREATE TABLE llx_mrp_mo( date_start_planned datetime, date_end_planned datetime, fk_bom integer, - fk_project integer + fk_project integer, + last_main_doc varchar(255) -- END MODULEBUILDER FIELDS -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_projet_task.sql b/htdocs/install/mysql/tables/llx_projet_task.sql index 01edb857738..721dbf8355f 100644 --- a/htdocs/install/mysql/tables/llx_projet_task.sql +++ b/htdocs/install/mysql/tables/llx_projet_task.sql @@ -35,6 +35,7 @@ create table llx_projet_task planned_workload real DEFAULT 0, progress integer DEFAULT 0, -- percentage increase priority integer DEFAULT 0, -- priority + budget_amount double(24,8), fk_user_creat integer, -- user who created the task fk_user_modif integer, -- user who modify the task fk_user_valid integer, -- user who validated the task diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index 48fed38d196..142ca684feb 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -52,15 +52,15 @@ create table llx_societe email varchar(128), -- socialnetworks text DEFAULT NULL, -- json with socialnetworks - skype varchar(255), -- deprecated - twitter varchar(255), -- deprecated - facebook varchar(255), -- deprecated - linkedin varchar(255), -- deprecated - instagram varchar(255), -- deprecated - snapchat varchar(255), -- deprecated - googleplus varchar(255), -- deprecated - youtube varchar(255), -- deprecated - whatsapp varchar(255), -- deprecated + --skype varchar(255), -- deprecated + --twitter varchar(255), -- deprecated + --facebook varchar(255), -- deprecated + --linkedin varchar(255), -- deprecated + --instagram varchar(255), -- deprecated + --snapchat varchar(255), -- deprecated + --googleplus varchar(255), -- deprecated + --youtube varchar(255), -- deprecated + --whatsapp varchar(255), -- deprecated fk_effectif integer DEFAULT 0, -- fk_typent integer DEFAULT NULL, -- type ent diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index 1f28534d5d3..59bd22ddfdc 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -44,16 +44,16 @@ create table llx_socpeople email varchar(255), socialnetworks text DEFAULT NULL, -- json with socialnetworks - jabberid varchar(255), - skype varchar(255), - twitter varchar(255), -- - facebook varchar(255), -- - linkedin varchar(255), -- - instagram varchar(255), -- - snapchat varchar(255), -- - googleplus varchar(255), -- - youtube varchar(255), -- - whatsapp varchar(255), -- + --jabberid varchar(255), + --skype varchar(255), + --twitter varchar(255), -- + --facebook varchar(255), -- + --linkedin varchar(255), -- + --instagram varchar(255), -- + --snapchat varchar(255), -- + --googleplus varchar(255), -- + --youtube varchar(255), -- + --whatsapp varchar(255), -- photo varchar(255), no_email smallint NOT NULL DEFAULT 0, -- deprecated. Use table llx_mailing_unsubscribe instead diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 3bc37960bf3..16ed758b1f8 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -565,7 +565,7 @@ if ($ok && GETPOST('restore_user_pictures', 'alpha')) { $filetotestsmall = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_small'.$ext; $filetotestmini = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_mini'.$ext; $exists = dol_is_file($filetotest); - print 'Check user '.$obj->rowid.' lastname='.$obj->lastname.' fistname='.$obj->firstname.' photo='.$obj->photo.' file '.$filetotest." exists=".$exists."
    \n"; + print 'Check user '.$obj->rowid.' lastname='.$obj->lastname.' firstname='.$obj->firstname.' photo='.$obj->photo.' file '.$filetotest." exists=".$exists."
    \n"; if ($exists) { $filetarget = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/'.$name.$ext; $filetargetsmall = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/thumbs/'.$name.'_small'.$ext; diff --git a/htdocs/install/step2.php b/htdocs/install/step2.php index 1835c87f759..30bee881584 100644 --- a/htdocs/install/step2.php +++ b/htdocs/install/step2.php @@ -570,19 +570,27 @@ dolibarr_install_syslog("Exit ".$ret); dolibarr_install_syslog("- step2: end"); +// Force here a value we need after because master.inc.php is not loaded into step2. +// This code must be similar with the one into main.inc.php +$conf->file->instance_unique_id = (empty($dolibarr_main_instance_unique_id) ? (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id); // Unique id of instance -$out = ' '; +$hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id); + +$out = 'global->MAIN_FIRST_PING_OK_ID) && $conf->global->MAIN_FIRST_PING_OK_ID == 'disabled') ? '' : ' value="checked" checked="true"').'> '; $out .= ''; $out .= ''; $out .= ''; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 27d34e2aa51..9440e166429 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -530,7 +530,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Can call a dedicated external upgrade process if (!$error) { - $parameters = array('versionfrom'=>$versionfrom, 'versionto='.$versionto); + $parameters = array('versionfrom' => $versionfrom, 'versionto' => $versionto); $object = new stdClass(); $action = "upgrade"; $reshook = $hookmanager->executeHooks('doUpgrade2', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -4360,7 +4360,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod = new $classname($db); //$mod->remove('noboxes'); - $mod->delete_menus(); // We must delete to be sure it is inserted with new values + $mod->delete_menus(); // We must delete to be sure it is inserted with new values $mod->init($reloadmode); } else { dolibarr_install_syslog('Failed to include '.DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php'); @@ -4537,7 +4537,8 @@ and rowid in (...) */ /** - * Migrate users fields facebook and co to socialnetworks + * Migrate users fields facebook and co to socialnetworks. + * Can be called only when version is 10.0.* or lower. Fields does not exists after. * * @return void */ @@ -4628,6 +4629,7 @@ function migrate_users_socialnetworks() /** * Migrate members fields facebook and co to socialnetworks + * Can be called only when version is 10.0.* or lower. Fields does not exists after. * * @return void */ @@ -4719,6 +4721,7 @@ function migrate_members_socialnetworks() /** * Migrate contacts fields facebook and co to socialnetworks + * Can be called only when version is 10.0.* or lower. Fields does not exists after. * * @return void */ @@ -4814,6 +4817,7 @@ function migrate_contacts_socialnetworks() /** * Migrate thirdparties fields facebook and co to socialnetworks + * Can be called only when version is 10.0.* or lower. Fields does not exists after. * * @return void */ diff --git a/htdocs/intracommreport/admin/intracommreport.php b/htdocs/intracommreport/admin/intracommreport.php index c696dddcabd..13231c43af2 100644 --- a/htdocs/intracommreport/admin/intracommreport.php +++ b/htdocs/intracommreport/admin/intracommreport.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/admin/intracommreport.php + * \file htdocs/intracommreport/admin/intracommreport.php * \ingroup intracommreport * \brief Page to setup the module intracomm report */ diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index 11048db0502..a152a693343 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -827,12 +827,12 @@ class KnowledgeRecord extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("knowledgemanagement"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Validated'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status'.$status; diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php index 70cda7254c8..8cdbee53395 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019-2021 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ */ /** - * \file htdocs/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php + * \file htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php * \ingroup knowledgemanagement * \brief File containing class for advanced numbering model of KnowledgeRecord */ diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php index 9833fa9bfb7..ba5a3c3b391 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php + * \file htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php * \ingroup knowledgemanagement * \brief File of class to manage KnowledgeRecord numbering rules standard */ diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/modules_knowledgerecord.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/modules_knowledgerecord.php index 58def153c4b..edfe6beff62 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/modules_knowledgerecord.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/modules_knowledgerecord.php @@ -23,7 +23,7 @@ */ /** - * \file htdocs/core/modules/knowledgemanagement/modules_knowledgerecord.php + * \file htdocs/knowledgemanagement/core/modules/knowledgemanagement/modules_knowledgerecord.php * \ingroup knowledgemanagement * \brief File that contains parent class for knowledgerecords document models and parent class for knowledgerecords numbering models */ diff --git a/htdocs/knowledgemanagement/knowledgemanagementindex.php b/htdocs/knowledgemanagement/knowledgemanagementindex.php index d9b1f07e6e0..ccb3503eb2f 100644 --- a/htdocs/knowledgemanagement/knowledgemanagementindex.php +++ b/htdocs/knowledgemanagement/knowledgemanagementindex.php @@ -145,7 +145,7 @@ if (! empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemana END MODULEBUILDER DRAFT MYOBJECT */ -print '
    '; +print '
    '; $NBMAX = (empty($conf->global->MAIN_SIZE_SHORTLIST_LIMIT) ? 25 : $conf->global->MAIN_SIZE_SHORTLIST_LIMIT); @@ -202,7 +202,7 @@ if (! empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemana } */ -print '
    '; +print ''; // End of page llxFooter(); diff --git a/htdocs/knowledgemanagement/knowledgerecord_card.php b/htdocs/knowledgemanagement/knowledgerecord_card.php index 8af0431f361..d06028ac4d9 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_card.php +++ b/htdocs/knowledgemanagement/knowledgerecord_card.php @@ -418,7 +418,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Clone - print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().'&object=scrumsprint', '', $permissiontoadd); + print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken().'&object=scrumsprint', '', $permissiontoadd); /* if ($permissiontoadd) { @@ -471,7 +471,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -484,7 +484,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } //Select mail models is same action as presend diff --git a/htdocs/knowledgemanagement/knowledgerecord_document.php b/htdocs/knowledgemanagement/knowledgerecord_document.php index f3d23fba4bd..90bb9f736cc 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_document.php +++ b/htdocs/knowledgemanagement/knowledgerecord_document.php @@ -80,7 +80,7 @@ if ($id > 0 || !empty($ref)) { //if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'knowledgemanagement', $object->id); -$permissiontoadd = $user->rights->knowledgemanagement->knowledgerecord->write; // Used by the include of actions_addupdatedelete.inc.php +$permissiontoadd = $user->rights->knowledgemanagement->knowledgerecord->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index 75aa11cf771..d4a702f26b8 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -612,7 +612,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php b/htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php index e70b4654d19..e77439970ba 100644 --- a/htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php +++ b/htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php @@ -1,5 +1,5 @@ * * 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 @@ -16,7 +16,7 @@ */ /** - * \file htdocs/knowledgemanagementlib/knowledgemanagement_knowledgerecord.lib.php + * \file htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php * \ingroup knowledgemanagement * \brief Library files with common functions for KnowledgeRecord */ diff --git a/htdocs/langs/ar_IQ/accountancy.lang b/htdocs/langs/ar_IQ/accountancy.lang index 771f0a83e7b..3bb3fbfab17 100644 --- a/htdocs/langs/ar_IQ/accountancy.lang +++ b/htdocs/langs/ar_IQ/accountancy.lang @@ -1,434 +1,3 @@ -# Dolibarr language file - en_US - Accountancy (Double entries) -Accountancy=Accountancy -Accounting=Accounting -ACCOUNTING_EXPORT_SEPARATORCSV=Column separator for export file -ACCOUNTING_EXPORT_DATE=Date format for export file -ACCOUNTING_EXPORT_PIECE=Export the number of piece -ACCOUNTING_EXPORT_GLOBAL_ACCOUNT=Export with global account -ACCOUNTING_EXPORT_LABEL=Export label -ACCOUNTING_EXPORT_AMOUNT=Export amount -ACCOUNTING_EXPORT_DEVISE=Export currency -Selectformat=Select the format for the file -ACCOUNTING_EXPORT_FORMAT=Select the format for the file -ACCOUNTING_EXPORT_ENDLINE=Select the carriage return type -ACCOUNTING_EXPORT_PREFIX_SPEC=Specify the prefix for the file name -ThisService=This service -ThisProduct=This product -DefaultForService=Default for service -DefaultForProduct=Default for product -ProductForThisThirdparty=Product for this thirdparty -ServiceForThisThirdparty=Service for this thirdparty -CantSuggest=Can't suggest -AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s -ConfigAccountingExpert=Configuration of the module accounting (double entry) -Journalization=Journalization -Journals=Journals -JournalFinancial=Financial journals -BackToChartofaccounts=Return chart of accounts -Chartofaccounts=Chart of accounts -ChartOfSubaccounts=Chart of individual accounts -ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger -CurrentDedicatedAccountingAccount=Current dedicated account -AssignDedicatedAccountingAccount=New account to assign -InvoiceLabel=Invoice label -OverviewOfAmountOfLinesNotBound=Overview of amount of lines not bound to an accounting account -OverviewOfAmountOfLinesBound=Overview of amount of lines already bound to an accounting account -OtherInfo=Other information -DeleteCptCategory=Remove accounting account from group -ConfirmDeleteCptCategory=Are you sure you want to remove this accounting account from the accounting account group? -JournalizationInLedgerStatus=Status of journalization +# Dolibarr language file - Source file is en_US - accountancy AlreadyInGeneralLedger=Already transferred in accounting journals and ledger NotYetInGeneralLedger=Not yet transferred in accouting journals and ledger -GroupIsEmptyCheckSetup=Group is empty, check setup of the personalized accounting group -DetailByAccount=Show detail by account -AccountWithNonZeroValues=Accounts with non-zero values -ListOfAccounts=List of accounts -CountriesInEEC=Countries in EEC -CountriesNotInEEC=Countries not in EEC -CountriesInEECExceptMe=Countries in EEC except %s -CountriesExceptMe=All countries except %s -AccountantFiles=Export source documents -ExportAccountingSourceDocHelp=With this tool, you can export the source events (list in CSV and PDFs) that were used to generate your accountancy. -ExportAccountingSourceDocHelp2=To export your journals, use the menu entry %s - %s. -VueByAccountAccounting=View by accounting account -VueBySubAccountAccounting=View by accounting subaccount - -MainAccountForCustomersNotDefined=Main accounting account for customers not defined in setup -MainAccountForSuppliersNotDefined=Main accounting account for vendors not defined in setup -MainAccountForUsersNotDefined=Main accounting account for users not defined in setup -MainAccountForVatPaymentNotDefined=Main accounting account for VAT payment not defined in setup -MainAccountForSubscriptionPaymentNotDefined=Main accounting account for subscription payment not defined in setup - -AccountancyArea=Accounting area -AccountancyAreaDescIntro=Usage of the accountancy module is done in several step: -AccountancyAreaDescActionOnce=The following actions are usually executed one time only, or once per year... -AccountancyAreaDescActionOnceBis=Next steps should be done to save you time in future by suggesting you the correct default accounting account when making the journalization (writing record in Journals and General ledger) -AccountancyAreaDescActionFreq=The following actions are usually executed every month, week or day for very large companies... - -AccountancyAreaDescJournalSetup=STEP %s: Create or check content of your journal list from menu %s -AccountancyAreaDescChartModel=STEP %s: Check that a model of chart of account exists or create one from menu %s -AccountancyAreaDescChart=STEP %s: Select and|or complete your chart of account from menu %s - -AccountancyAreaDescVat=STEP %s: Define accounting accounts for each VAT Rates. For this, use the menu entry %s. -AccountancyAreaDescDefault=STEP %s: Define default accounting accounts. For this, use the menu entry %s. -AccountancyAreaDescExpenseReport=STEP %s: Define default accounting accounts for each type of expense report. For this, use the menu entry %s. -AccountancyAreaDescSal=STEP %s: Define default accounting accounts for payment of salaries. For this, use the menu entry %s. -AccountancyAreaDescContrib=STEP %s: Define default accounting accounts for special expenses (miscellaneous taxes). For this, use the menu entry %s. -AccountancyAreaDescDonation=STEP %s: Define default accounting accounts for donation. For this, use the menu entry %s. -AccountancyAreaDescSubscription=STEP %s: Define default accounting accounts for member subscription. For this, use the menu entry %s. -AccountancyAreaDescMisc=STEP %s: Define mandatory default account and default accounting accounts for miscellaneous transactions. For this, use the menu entry %s. -AccountancyAreaDescLoan=STEP %s: Define default accounting accounts for loans. For this, use the menu entry %s. -AccountancyAreaDescBank=STEP %s: Define accounting accounts and journal code for each bank and financial accounts. For this, use the menu entry %s. -AccountancyAreaDescProd=STEP %s: Define accounting accounts on your products/services. For this, use the menu entry %s. - -AccountancyAreaDescBind=STEP %s: Check the binding between existing %s lines and accounting account is done, so application will be able to journalize transactions in Ledger in one click. Complete missing bindings. For this, use the menu entry %s. -AccountancyAreaDescWriteRecords=STEP %s: Write transactions into the Ledger. For this, go into menu %s, and click into button %s. -AccountancyAreaDescAnalyze=STEP %s: Add or edit existing transactions and generate reports and exports. - -AccountancyAreaDescClosePeriod=STEP %s: Close period so we can't make modification in a future. - -TheJournalCodeIsNotDefinedOnSomeBankAccount=A mandatory step in setup has not been completed (accounting code journal not defined for all bank accounts) -Selectchartofaccounts=Select active chart of accounts -ChangeAndLoad=Change and load -Addanaccount=Add an accounting account -AccountAccounting=Accounting account -AccountAccountingShort=Account -SubledgerAccount=Subledger account -SubledgerAccountLabel=Subledger account label -ShowAccountingAccount=Show accounting account -ShowAccountingJournal=Show accounting journal -ShowAccountingAccountInLedger=Show accounting account in ledger -ShowAccountingAccountInJournals=Show accounting account in journals -AccountAccountingSuggest=Accounting account suggested -MenuDefaultAccounts=Default accounts -MenuBankAccounts=Bank accounts -MenuVatAccounts=Vat accounts -MenuTaxAccounts=Tax accounts -MenuExpenseReportAccounts=Expense report accounts -MenuLoanAccounts=Loan accounts -MenuProductsAccounts=Product accounts -MenuClosureAccounts=Closure accounts -MenuAccountancyClosure=Closure -MenuAccountancyValidationMovements=Validate movements -ProductsBinding=Products accounts -TransferInAccounting=Transfer in accounting -RegistrationInAccounting=Registration in accounting -Binding=Binding to accounts -CustomersVentilation=Customer invoice binding -SuppliersVentilation=Vendor invoice binding -ExpenseReportsVentilation=Expense report binding -CreateMvts=Create new transaction -UpdateMvts=Modification of a transaction -ValidTransaction=Validate transaction -WriteBookKeeping=Register transactions in accounting -Bookkeeping=Ledger -BookkeepingSubAccount=Subledger -AccountBalance=Account balance -ObjectsRef=Source object ref -CAHTF=Total purchase vendor before tax -TotalExpenseReport=Total expense report -InvoiceLines=Lines of invoices to bind -InvoiceLinesDone=Bound lines of invoices -ExpenseReportLines=Lines of expense reports to bind -ExpenseReportLinesDone=Bound lines of expense reports -IntoAccount=Bind line with the accounting account -TotalForAccount=Total accounting account - - -Ventilate=Bind -LineId=Id line -Processing=Processing -EndProcessing=Process terminated. -SelectedLines=Selected lines -Lineofinvoice=Line of invoice -LineOfExpenseReport=Line of expense report -NoAccountSelected=No accounting account selected -VentilatedinAccount=Binded successfully to the accounting account -NotVentilatedinAccount=Not bound to the accounting account -XLineSuccessfullyBinded=%s products/services successfully bound to an accounting account -XLineFailedToBeBinded=%s products/services were not bound to any accounting account - -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) -ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin the sorting of the page "Binding to do" by the most recent elements -ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin the sorting of the page "Binding done" by the most recent elements - -ACCOUNTING_LENGTH_DESCRIPTION=Truncate product & services description in listings after x chars (Best = 50) -ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Truncate product & services account description form in listings after x chars (Best = 50) -ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounting accounts (If you set value to 6 here, the account '706' will appear like '706000' on screen) -ACCOUNTING_LENGTH_AACCOUNT=Length of the third-party accounting accounts (If you set value to 6 here, the account '401' will appear like '401000' on screen) -ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of an accounting account. Needed by some countries (like Switzerland). If set to off (default), you can set the following two parameters to ask the application to add virtual zeros. -BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account -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_SELL_JOURNAL=Sell journal -ACCOUNTING_PURCHASE_JOURNAL=Purchase journal -ACCOUNTING_MISCELLANEOUS_JOURNAL=Miscellaneous journal -ACCOUNTING_EXPENSEREPORT_JOURNAL=Expense report journal -ACCOUNTING_SOCIAL_JOURNAL=Social journal -ACCOUNTING_HAS_NEW_JOURNAL=Has new Journal - -ACCOUNTING_RESULT_PROFIT=Result accounting account (Profit) -ACCOUNTING_RESULT_LOSS=Result accounting account (Loss) -ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Journal of closure - -ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transitional bank transfer -TransitionalAccount=Transitional bank transfer account - -ACCOUNTING_ACCOUNT_SUSPENSE=Accounting account of wait -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 - -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) -ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought products and imported out of EEC (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Accounting account by default for the products sold in EEC (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Accounting account by default for the products sold and exported out of EEC (used if not defined in the product sheet) - -ACCOUNTING_SERVICE_BUY_ACCOUNT=Accounting account by default for the bought services (used if not defined in the service sheet) -ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Accounting account by default for the bought services in EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought services and imported out of EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_SOLD_ACCOUNT=Accounting account by default for the sold services (used if not defined in the service sheet) -ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Accounting account by default for the services sold in EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Accounting account by default for the services sold and exported out of EEC (used if not defined in the service sheet) - -Doctype=Type of document -Docdate=Date -Docref=Reference -LabelAccount=Label account -LabelOperation=Label operation -Sens=Direction -AccountingDirectionHelp=For an accounting account of a customer, use Credit to record a payment you have received
    For an accounting account of a supplier, use Debit to record a payment you made -LetteringCode=Lettering code -Lettering=Lettering -Codejournal=Journal -JournalLabel=Journal label -NumPiece=Piece number -TransactionNumShort=Num. transaction -AccountingCategory=Custom group -GroupByAccountAccounting=Group by general ledger account -GroupBySubAccountAccounting=Group by subledger account -AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. -ByAccounts=By accounts -ByPredefinedAccountGroups=By predefined groups -ByPersonalizedAccountGroups=By personalized groups -ByYear=By year -NotMatch=Not Set -DeleteMvt=Delete some operation lines from accounting -DelMonth=Month to delete -DelYear=Year to delete -DelJournal=Journal to delete -ConfirmDeleteMvt=This will delete all operation lines of the accounting for the year/month and/or for a specific journal (At least one criterion is required). You will have to reuse the feature '%s' to have the deleted record back in the ledger. -ConfirmDeleteMvtPartial=This will delete the transaction from the accounting (all operation lines related to the same transaction will be deleted) -FinanceJournal=Finance journal -ExpenseReportsJournal=Expense reports journal -DescFinanceJournal=Finance journal including all the types of payments by bank account -DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Journals and Ledger. -VATAccountNotDefined=Account for VAT not defined -ThirdpartyAccountNotDefined=Account for third party not defined -ProductAccountNotDefined=Account for product not defined -FeeAccountNotDefined=Account for fee not defined -BankAccountNotDefined=Account for bank not defined -CustomerInvoicePayment=Payment of invoice customer -ThirdPartyAccount=Third-party account -NewAccountingMvt=New transaction -NumMvts=Numero of transaction -ListeMvts=List of movements -ErrorDebitCredit=Debit and Credit cannot have a value at the same time -AddCompteFromBK=Add accounting accounts to the group -ReportThirdParty=List third-party account -DescThirdPartyReport=Consult here the list of third-party customers and vendors and their accounting accounts -ListAccounts=List of the accounting accounts -UnknownAccountForThirdparty=Unknown third-party account. We will use %s -UnknownAccountForThirdpartyBlocking=Unknown third-party account. Blocking error -ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Subledger account not defined or third party or user unknown. We will use %s -ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unknown and subledger not defined on the payment. We will keep the subledger account value empty. -ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Subledger account not defined or third party or user unknown. Blocking error. -UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error -PaymentsNotLinkedToProduct=Payment not linked to any product / service -OpeningBalance=Opening balance -ShowOpeningBalance=Show opening balance -HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by level - -Pcgtype=Group of account -PcgtypeDesc=Group of account are used as predefined 'filter' and 'grouping' criteria for some accounting reports. For example, 'INCOME' or 'EXPENSE' are used as groups for accounting accounts of products to build the expense/income report. - -Reconcilable=Reconcilable - -TotalVente=Total turnover before tax -TotalMarge=Total sales margin - -DescVentilCustomer=Consult here the list of customer invoice lines bound (or not) to a product accounting account -DescVentilMore=In most cases, if you use predefined products or services and you set the account number on the product/service card, the application will be able to make all the binding between your invoice lines and the accounting account of your chart of accounts, just in one click with the button "%s". If account was not set on product/service cards or if you still have some lines not bound to an account, you will have to make a manual binding from the menu "%s". -DescVentilDoneCustomer=Consult here the list of the lines of invoices customers and their product accounting account -DescVentilTodoCustomer=Bind invoice lines not already bound with a product accounting account -ChangeAccount=Change the product/service accounting account for selected lines with the following accounting account: -Vide=- -DescVentilSupplier=Consult here the list of vendor invoice lines bound or not yet bound to a product accounting account (only record not already transfered in accountancy are visible) -DescVentilDoneSupplier=Consult here the list of the lines of vendor invoices and their accounting account -DescVentilTodoExpenseReport=Bind expense report lines not already bound with a fee accounting account -DescVentilExpenseReport=Consult here the list of expense report lines bound (or not) to a fee accounting account -DescVentilExpenseReportMore=If you setup accounting account on type of expense report lines, the application will be able to make all the binding between your expense report lines and the accounting account of your chart of accounts, just in one click with the button "%s". If account was not set on fees dictionary or if you still have some lines not bound to any account, you will have to make a manual binding from the menu "%s". -DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account - -Closure=Annual closure -DescClosure=Consult here the number of movements by month who are not validated & fiscal years already open -OverviewOfMovementsNotValidated=Step 1/ Overview of movements not validated. (Necessary to close a fiscal year) -AllMovementsWereRecordedAsValidated=All movements were recorded as validated -NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated -ValidateMovements=Validate movements -DescValidateMovements=Any modification or deletion of writing, lettering and deletes will be prohibited. All entries for an exercise must be validated otherwise closing will not be possible - -ValidateHistory=Bind Automatically -AutomaticBindingDone=Automatic binding done - -ErrorAccountancyCodeIsAlreadyUse=Error, you cannot delete this accounting account because it is used -MvtNotCorrectlyBalanced=Movement not correctly balanced. Debit = %s | Credit = %s -Balancing=Balancing -FicheVentilation=Binding card -GeneralLedgerIsWritten=Transactions are written in the Ledger -GeneralLedgerSomeRecordWasNotRecorded=Some of the transactions could not be journalized. If there is no other error message, this is probably because they were already journalized. -NoNewRecordSaved=No more record to journalize -ListOfProductsWithoutAccountingAccount=List of products not bound to any accounting account -ChangeBinding=Change the binding -Accounted=Accounted in ledger -NotYetAccounted=Not yet accounted in the ledger -ShowTutorial=Show Tutorial -NotReconciled=Not reconciled -WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view - -## Admin -BindingOptions=Binding options -ApplyMassCategories=Apply mass categories -AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group -CategoryDeleted=Category for the accounting account has been removed -AccountingJournals=Accounting journals -AccountingJournal=Accounting journal -NewAccountingJournal=New accounting journal -ShowAccountingJournal=Show accounting journal -NatureOfJournal=Nature of Journal -AccountingJournalType1=Miscellaneous operations -AccountingJournalType2=Sales -AccountingJournalType3=Purchases -AccountingJournalType4=Bank -AccountingJournalType5=Expenses report -AccountingJournalType8=Inventory -AccountingJournalType9=Has-new -ErrorAccountingJournalIsAlreadyUse=This journal is already use -AccountingAccountForSalesTaxAreDefinedInto=Note: Accounting account for Sales tax are defined into menu %s - %s -NumberOfAccountancyEntries=Number of entries -NumberOfAccountancyMovements=Number of movements -ACCOUNTING_DISABLE_BINDING_ON_SALES=Disable binding & transfer in accountancy on sales (customer invoices will not be taken into account in accounting) -ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Disable binding & transfer in accountancy on purchases (vendor invoices will not be taken into account in accounting) -ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting) - -## Export -NotifiedExportDate=Notified export date (modification of the entries will not be possible) -NotifiedValidationDate=Validation of the entries (modification or deletion of the entries will not be possible) -ConfirmExportFile=Confirmation of the generation of the accounting export file ? -ExportDraftJournal=Export draft journal -Modelcsv=Model of export -Selectmodelcsv=Select a model of export -Modelcsv_normal=Classic export -Modelcsv_CEGID=Export for CEGID Expert Comptabilité -Modelcsv_COALA=Export for Sage Coala -Modelcsv_bob50=Export for Sage BOB 50 -Modelcsv_ciel=Export for Sage50, Ciel Compta or Compta Evo. (Format XIMPORT) -Modelcsv_quadratus=Export for Quadratus QuadraCompta -Modelcsv_ebp=Export for EBP -Modelcsv_cogilog=Export for Cogilog -Modelcsv_agiris=Export for Agiris -Modelcsv_LDCompta=Export for LD Compta (v9) (Test) -Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) -Modelcsv_openconcerto=Export for OpenConcerto (Test) -Modelcsv_configurable=Export CSV Configurable -Modelcsv_FEC=Export FEC -Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) -Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland -Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta -Modelcsv_Gestinumv3=Export for Gestinum (v3) -Modelcsv_Gestinumv5Export for Gestinum (v5) -ChartofaccountsId=Chart of accounts Id - -## Tools - Init accounting account on product / service -InitAccountancy=Init accountancy -InitAccountancyDesc=This page can be used to initialize an accounting account on products and services that does not have accounting account defined for sales and purchases. -DefaultBindingDesc=This page can be used to set a default account to use to link transactions record about payment salaries, donation, taxes and vat when no specific accounting account were already set. -DefaultClosureDesc=This page can be used to set parameters used for accounting closures. -Options=Options -OptionModeProductSell=Mode sales -OptionModeProductSellIntra=Mode sales exported in EEC -OptionModeProductSellExport=Mode sales exported in other countries -OptionModeProductBuy=Mode purchases -OptionModeProductBuyIntra=Mode purchases imported in EEC -OptionModeProductBuyExport=Mode purchased imported from other countries -OptionModeProductSellDesc=Show all products with accounting account for sales. -OptionModeProductSellIntraDesc=Show all products with accounting account for sales in EEC. -OptionModeProductSellExportDesc=Show all products with accounting account for other foreign sales. -OptionModeProductBuyDesc=Show all products with accounting account for purchases. -OptionModeProductBuyIntraDesc=Show all products with accounting account for purchases in EEC. -OptionModeProductBuyExportDesc=Show all products with accounting account for other foreign purchases. -CleanFixHistory=Remove accounting code from lines that not exists into charts of account -CleanHistory=Reset all bindings for selected year -PredefinedGroups=Predefined groups -WithoutValidAccount=Without valid dedicated account -WithValidAccount=With valid dedicated account -ValueNotIntoChartOfAccount=This value of accounting account does not exist into chart of account -AccountRemovedFromGroup=Account removed from group -SaleLocal=Local sale -SaleExport=Export sale -SaleEEC=Sale in EEC -SaleEECWithVAT=Sale in EEC with a VAT not null, so we suppose this is NOT an intracommunautary sale and the suggested account is the standard product account. -SaleEECWithoutVATNumber=Sale in EEC with no VAT but the VAT ID of thirdparty is not defined. We fallback on the product account for standard sales. You can fix the VAT ID of thirdparty or the product account if needed. - -## Dictionary -Range=Range of accounting account -Calculated=Calculated -Formula=Formula - -## Error -SomeMandatoryStepsOfSetupWereNotDone=Some mandatory steps of setup was not done, please complete them -ErrorNoAccountingCategoryForThisCountry=No accounting account group available for country %s (See Home - Setup - Dictionaries) -ErrorInvoiceContainsLinesNotYetBounded=You try to journalize some lines of the invoice %s, but some other lines are not yet bounded to accounting account. Journalization of all invoice lines for this invoice are refused. -ErrorInvoiceContainsLinesNotYetBoundedShort=Some lines on invoice are not bound to accounting account. -ExportNotSupported=The export format setuped is not supported into this page -BookeppingLineAlreayExists=Lines already existing into bookkeeping -NoJournalDefined=No journal defined -Binded=Lines bound -ToBind=Lines to bind -UseMenuToSetBindindManualy=Lines not yet bound, use menu %s to make the binding manually - -## Import -ImportAccountingEntries=Accounting entries -ImportAccountingEntriesFECFormat=Accounting entries - FEC format -FECFormatJournalCode=Code journal (JournalCode) -FECFormatJournalLabel=Label journal (JournalLib) -FECFormatEntryNum=Piece number (EcritureNum) -FECFormatEntryDate=Piece date (EcritureDate) -FECFormatGeneralAccountNumber=General account number (CompteNum) -FECFormatGeneralAccountLabel=General account label (CompteLib) -FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) -FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) -FECFormatPieceRef=Piece ref (PieceRef) -FECFormatPieceDate=Piece date creation (PieceDate) -FECFormatLabelOperation=Label operation (EcritureLib) -FECFormatDebit=Debit (Debit) -FECFormatCredit=Credit (Credit) -FECFormatReconcilableCode=Reconcilable code (EcritureLet) -FECFormatReconcilableDate=Reconcilable date (DateLet) -FECFormatValidateDate=Piece date validated (ValidDate) -FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) -FECFormatMulticurrencyCode=Multicurrency code (Idevise) - -DateExport=Date export -WarningReportNotReliable=Warning, this report is not based on the Ledger, so does not contains transaction modified manually in the Ledger. If your journalization is up to date, the bookkeeping view is more accurate. -ExpenseReportJournal=Expense Report Journal -InventoryJournal=Inventory Journal - -NAccounts=%s accounts diff --git a/htdocs/langs/ar_IQ/admin.lang b/htdocs/langs/ar_IQ/admin.lang index f52c28a9da3..052a23ce875 100644 --- a/htdocs/langs/ar_IQ/admin.lang +++ b/htdocs/langs/ar_IQ/admin.lang @@ -1,2161 +1,10 @@ # Dolibarr language file - Source file is en_US - admin -Foundation=Foundation -Version=Version -Publisher=Publisher -VersionProgram=Version program -VersionLastInstall=Initial install version -VersionLastUpgrade=Latest version upgrade -VersionExperimental=Experimental -VersionDevelopment=Development -VersionUnknown=Unknown -VersionRecommanded=Recommended -FileCheck=Fileset Integrity Checks -FileCheckDesc=This tool allows you to check the integrity of files and the setup of your application, comparing each file with the official one. The value of some setup constants may also be checked. You can use this tool to determine if any files have been modified (e.g by a hacker). -FileIntegrityIsStrictlyConformedWithReference=Files integrity is strictly conformed with the reference. -FileIntegrityIsOkButFilesWereAdded=Files integrity check has passed, however some new files have been added. -FileIntegritySomeFilesWereRemovedOrModified=Files integrity check has failed. Some files were modified, removed or added. -GlobalChecksum=Global checksum -MakeIntegrityAnalysisFrom=Make integrity analysis of application files from -LocalSignature=Embedded local signature (less reliable) -RemoteSignature=Remote distant signature (more reliable) -FilesMissing=Missing Files -FilesUpdated=Updated Files -FilesModified=Modified Files -FilesAdded=Added Files -FileCheckDolibarr=Check integrity of application files -AvailableOnlyOnPackagedVersions=The local file for integrity checking is only available when the application is installed from an official package -XmlNotFound=Xml Integrity File of application not found -SessionId=Session ID -SessionSaveHandler=Handler to save sessions -SessionSavePath=Session save location -PurgeSessions=Purge of sessions -ConfirmPurgeSessions=Do you really want to purge all sessions? This will disconnect every user (except yourself). -NoSessionListWithThisHandler=Save session handler configured in your PHP does not allow listing all running sessions. -LockNewSessions=Lock new connections -ConfirmLockNewSessions=Are you sure you want to restrict any new Dolibarr connection to yourself? Only user %s will be able to connect after that. -UnlockNewSessions=Remove connection lock -YourSession=Your session -Sessions=Users Sessions -WebUserGroup=Web server user/group -PermissionsOnFiles=Permissions on files -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s -NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (%s) may be protected (for example by OS permissions or by PHP directive open_basedir). -DBStoringCharset=Database charset to store data -DBSortingCharset=Database charset to sort data -HostCharset=Host charset -ClientCharset=Client charset -ClientSortingCharset=Client collation -WarningModuleNotActive=Module %s must be enabled -WarningOnlyPermissionOfActivatedModules=Only permissions related to activated modules are shown here. You can activate other modules in the Home->Setup->Modules page. -DolibarrSetup=Dolibarr install or upgrade -InternalUser=Internal user -ExternalUser=External user -InternalUsers=Internal users -ExternalUsers=External users -UserInterface=User interface -GUISetup=Display -SetupArea=Setup -UploadNewTemplate=Upload new template(s) -FormToTestFileUploadForm=Form to test file upload (according to setup) -ModuleMustBeEnabled=The module/application %s must be enabled -ModuleIsEnabled=The module/application %s has been enabled -IfModuleEnabled=Note: yes is effective only if module %s is enabled -RemoveLock=Remove/rename file %s if it exists, to allow usage of the Update/Install tool. -RestoreLock=Restore file %s, with read permission only, to disable any further use of the Update/Install tool. -SecuritySetup=Security setup -PHPSetup=PHP setup -OSSetup=OS setup -SecurityFilesDesc=Define here options related to security about uploading files. -ErrorModuleRequirePHPVersion=Error, this module requires PHP version %s or higher -ErrorModuleRequireDolibarrVersion=Error, this module requires Dolibarr version %s or higher -ErrorDecimalLargerThanAreForbidden=Error, a precision higher than %s is not supported. -DictionarySetup=Dictionary setup -Dictionary=Dictionaries -ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record -ErrorCodeCantContainZero=Code can't contain value 0 -DisableJavascript=Disable JavaScript and Ajax functions DisableJavascriptNote=Note: For test or debug purpose. For optimization for blind person or text browsers, you may prefer to use the setup on the profile of user -UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -DelaiedFullListToSelectCompany=Wait until a key is pressed before loading content of Third Parties combo list.
    This may increase performance if you have a large number of third parties, but it is less convenient. -DelaiedFullListToSelectContact=Wait until a key is pressed before loading content of Contact combo list.
    This may increase performance if you have a large number of contacts, but it is less convenient. -NumberOfKeyToSearch=Number of characters to trigger search: %s -NumberOfBytes=Number of Bytes -SearchString=Search string -NotAvailableWhenAjaxDisabled=Not available when Ajax disabled -AllowToSelectProjectFromOtherCompany=On document of a third party, can choose a project linked to another third party -TimesheetPreventAfterFollowingMonths=Prevent recording time spent after the following number of months -JavascriptDisabled=JavaScript disabled -UsePreviewTabs=Use preview tabs -ShowPreview=Show preview -ShowHideDetails=Show-Hide details -PreviewNotAvailable=Preview not available -ThemeCurrentlyActive=Theme currently active -MySQLTimeZone=TimeZone MySql (database) -TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). -Space=Space -Table=Table -Fields=Fields -Index=Index -Mask=Mask -NextValue=Next value -NextValueForInvoices=Next value (invoices) -NextValueForCreditNotes=Next value (credit notes) -NextValueForDeposit=Next value (down payment) -NextValueForReplacements=Next value (replacements) -MustBeLowerThanPHPLimit=Note: your PHP configuration currently limits the maximum filesize for upload to %s %s, irrespective of the value of this parameter -NoMaxSizeByPHPLimit=Note: No limit is set in your PHP configuration -MaxSizeForUploadedFiles=Maximum size for uploaded files (0 to disallow any upload) -UseCaptchaCode=Use graphical code (CAPTCHA) on login page -AntiVirusCommand=Full path to antivirus command -AntiVirusCommandExample=Example for ClamAv Daemon (require clamav-daemon): /usr/bin/clamdscan
    Example for ClamWin (very very slow): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe -AntiVirusParam= More parameters on command line -AntiVirusParamExample=Example for ClamAv Daemon: --fdpass
    Example for ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" -ComptaSetup=Accounting module setup -UserSetup=User management setup -MultiCurrencySetup=Multi-currency setup -MenuLimits=Limits and accuracy -MenuIdParent=Parent menu ID -DetailMenuIdParent=ID of parent menu (empty for a top menu) -ParentID=Parent ID -DetailPosition=Sort number to define menu position -AllMenus=All -NotConfigured=Module/Application not configured -Active=Active -SetupShort=Setup -OtherOptions=Other options -OtherSetup=Other Setup -CurrentValueSeparatorDecimal=Decimal separator -CurrentValueSeparatorThousand=Thousand separator -Destination=Destination -IdModule=Module ID -IdPermissions=Permissions ID -LanguageBrowserParameter=Parameter %s -LocalisationDolibarrParameters=Localization parameters -ClientTZ=Client Time Zone (user) -ClientHour=Client time (user) -OSTZ=Server OS Time Zone -PHPTZ=PHP server Time Zone -DaylingSavingTime=Daylight saving time -CurrentHour=PHP Time (server) -CurrentSessionTimeOut=Current session timeout -YouCanEditPHPTZ=To set a different PHP timezone (not required), you can try to add a .htaccess file with a line like this "SetEnv TZ Europe/Paris" -HoursOnThisPageAreOnServerTZ=Warning, in contrary of other screens, hours on this page are not in your local timezone, but of the timezone of the server. -Box=Widget -Boxes=Widgets -MaxNbOfLinesForBoxes=Max. number of lines for widgets -AllWidgetsWereEnabled=All available widgets are enabled -PositionByDefault=Default order -Position=Position -MenusDesc=Menu managers set content of the two menu bars (horizontal and vertical). -MenusEditorDesc=The menu editor allows you to define custom menu entries. Use it carefully to avoid instability and permanently unreachable menu entries.
    Some modules add menu entries (in menu All mostly). If you remove some of these entries by mistake, you can restore them disabling and reenabling the module. -MenuForUsers=Menu for users -LangFile=.lang file -Language_en_US_es_MX_etc=Language (en_US, es_MX, ...) -System=System -SystemInfo=System information -SystemToolsArea=System tools area -SystemToolsAreaDesc=This area provides administration functions. Use the menu to choose the required feature. -Purge=Purge -PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in %s directory). Using this feature is not normally necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server. -PurgeDeleteLogFile=Delete log files, including %s defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete log and temporary files -PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: %s.
    This will delete all generated documents related to elements (third parties, invoices etc...), files uploaded into the ECM module, database backup dumps and temporary files. -PurgeRunNow=Purge now -PurgeNothingToDelete=No directory or files to delete. -PurgeNDirectoriesDeleted=%s files or directories deleted. -PurgeNDirectoriesFailed=Failed to delete %s files or directories. -PurgeAuditEvents=Purge all security events -ConfirmPurgeAuditEvents=Are you sure you want to purge all security events? All security logs will be deleted, no other data will be removed. -GenerateBackup=Generate backup -Backup=Backup -Restore=Restore -RunCommandSummary=Backup has been launched with the following command -BackupResult=Backup result -BackupFileSuccessfullyCreated=Backup file successfully generated -YouCanDownloadBackupFile=The generated file can now be downloaded -NoBackupFileAvailable=No backup files available. -ExportMethod=Export method -ImportMethod=Import method -ToBuildBackupFileClickHere=To build a backup file, click here. -ImportMySqlDesc=To import a MySQL backup file, you may use phpMyAdmin via your hosting or use the mysql command from the Command line.
    For example: -ImportPostgreSqlDesc=To import a backup file, you must use pg_restore command from command line: -ImportMySqlCommand=%s %s < mybackupfile.sql -ImportPostgreSqlCommand=%s %s mybackupfile.sql -FileNameToGenerate=Filename for backup: -Compression=Compression -CommandsToDisableForeignKeysForImport=Command to disable foreign keys on import -CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later -ExportCompatibility=Compatibility of generated export file -ExportUseMySQLQuickParameter=Use the --quick parameter -ExportUseMySQLQuickParameterHelp=The '--quick' parameter helps limit RAM consumption for large tables. -MySqlExportParameters=MySQL export parameters -PostgreSqlExportParameters= PostgreSQL export parameters -UseTransactionnalMode=Use transactional mode -FullPathToMysqldumpCommand=Full path to mysqldump command -FullPathToPostgreSQLdumpCommand=Full path to pg_dump command -AddDropDatabase=Add DROP DATABASE command -AddDropTable=Add DROP TABLE command -ExportStructure=Structure -NameColumn=Name columns -ExtendedInsert=Extended INSERT -NoLockBeforeInsert=No lock commands around INSERT -DelayedInsert=Delayed insert -EncodeBinariesInHexa=Encode binary data in hexadecimal -IgnoreDuplicateRecords=Ignore errors of duplicate record (INSERT IGNORE) -AutoDetectLang=Autodetect (browser language) -FeatureDisabledInDemo=Feature disabled in demo -FeatureAvailableOnlyOnStable=Feature only available on official stable versions -BoxesDesc=Widgets are components showing some information that you can add to personalize some pages. You can choose between showing the widget or not by selecting target page and clicking 'Activate', or by clicking the trashcan to disable it. -OnlyActiveElementsAreShown=Only elements from enabled modules are shown. -ModulesDesc=The modules/applications determine which features are available in the software. Some modules require permissions to be granted to users after activating the module. Click the on/off button %s of each module to enable or disable a module/application. -ModulesDesc2=Click the wheel button %s to configure the module/application. -ModulesMarketPlaceDesc=You can find more modules to download on external websites on the Internet... -ModulesDeployDesc=If permissions on your file system allow it, you can use this tool to deploy an external module. The module will then be visible on the tab %s. -ModulesMarketPlaces=Find external app/modules -ModulesDevelopYourModule=Develop your own app/modules -ModulesDevelopDesc=You may also develop your own module or find a partner to develop one for you. -DOLISTOREdescriptionLong=Instead of switching on www.dolistore.com web site to find an external module, you can use this embedded tool that will perform the search on the external market place for you (may be slow, need an internet access)... -NewModule=New module -FreeModule=Free -CompatibleUpTo=Compatible with version %s -NotCompatible=This module does not seem compatible with your Dolibarr %s (Min %s - Max %s). -CompatibleAfterUpdate=This module requires an update to your Dolibarr %s (Min %s - Max %s). -SeeInMarkerPlace=See in Market place -SeeSetupOfModule=See setup of module %s -SetOptionTo=Set option %s to %s -Updated=Updated -AchatTelechargement=Buy / Download -GoModuleSetupArea=To deploy/install a new module, go to the Module setup area: %s. -DoliStoreDesc=DoliStore, the official market place for Dolibarr ERP/CRM external modules -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. -WebSiteDesc=External websites for more add-on (non-core) modules... -DevelopYourModuleDesc=Some solutions to develop your own module... -URL=URL -RelativeURL=Relative URL -BoxesAvailable=Widgets available -BoxesActivated=Widgets activated -ActivateOn=Activate on -ActiveOn=Activated on -ActivatableOn=Activatable on -SourceFile=Source file -AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled -Required=Required -UsedOnlyWithTypeOption=Used by some agenda option only -Security=Security -Passwords=Passwords -DoNotStoreClearPassword=Encrypt passwords stored in database (NOT as plain-text). It is strongly recommended to activate this option. -MainDbPasswordFileConfEncrypted=Encrypt database password stored in conf.php. It is strongly recommended to activate this option. -InstrucToEncodePass=To have password encoded into the conf.php file, replace the line
    $dolibarr_main_db_pass="...";
    by
    $dolibarr_main_db_pass="crypted:%s"; -InstrucToClearPass=To have password decoded (clear) into the conf.php file, replace the line
    $dolibarr_main_db_pass="crypted:...";
    by
    $dolibarr_main_db_pass="%s"; -ProtectAndEncryptPdfFiles=Protect generated PDF files. This is NOT recommended as it breaks bulk PDF generation. -ProtectAndEncryptPdfFilesDesc=Protection of a PDF document keeps it available to read and print with any PDF browser. However, editing and copying is not possible anymore. Note that using this feature makes building of a global merged PDFs not working. -Feature=Feature -DolibarrLicense=License -Developpers=Developers/contributors -OfficialWebSite=Dolibarr official web site -OfficialWebSiteLocal=Local web site (%s) -OfficialWiki=Dolibarr documentation / Wiki -OfficialDemo=Dolibarr online demo -OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Referenced web hosting services (Cloud hosting) -ReferencedPreferredPartners=Preferred Partners -OtherResources=Other resources -ExternalResources=External Resources -SocialNetworks=Social Networks -SocialNetworkId=Social Network ID -ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s -ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s -HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. -HelpCenterDesc2=Some of these resources are only available in english. -CurrentMenuHandler=Current menu handler -MeasuringUnit=Measuring unit -LeftMargin=Left margin -TopMargin=Top margin -PaperSize=Paper type -Orientation=Orientation -SpaceX=Space X -SpaceY=Space Y -FontSize=Font size -Content=Content -NoticePeriod=Notice period -NewByMonth=New by month -Emails=Emails -EMailsSetup=Emails setup -EMailsDesc=This page allows you to set parameters or options for email sending. -EmailSenderProfiles=Emails sender profiles -EMailsSenderProfileDesc=You can keep this section empty. If you enter some emails here, they will be added to the list of possible senders into the combobox when your write a new email. -MAIN_MAIL_SMTP_PORT=SMTP/SMTPS Port (default value in php.ini: %s) -MAIN_MAIL_SMTP_SERVER=SMTP/SMTPS Host (default value in php.ini: %s) -MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP/SMTPS Port (Not defined into PHP on Unix-like systems) -MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP/SMTPS Host (Not defined into PHP on Unix-like systems) -MAIN_MAIL_EMAIL_FROM=Sender email for automatic emails (default value in php.ini: %s) -MAIN_MAIL_ERRORS_TO=Email used for error returns emails (fields 'Errors-To' in emails sent) -MAIN_MAIL_AUTOCOPY_TO= Copy (Bcc) all sent emails to -MAIN_DISABLE_ALL_MAILS=Disable all email sending (for test purposes or demos) -MAIN_MAIL_FORCE_SENDTO=Send all emails to (instead of real recipients, for test purposes) -MAIN_MAIL_ENABLED_USER_DEST_SELECT=Suggest emails of employees (if defined) into the list of predefined recipient when writing a new email -MAIN_MAIL_SENDMODE=Email sending method -MAIN_MAIL_SMTPS_ID=SMTP ID (if sending server requires authentication) -MAIN_MAIL_SMTPS_PW=SMTP Password (if sending server requires authentication) -MAIN_MAIL_EMAIL_TLS=Use TLS (SSL) encryption -MAIN_MAIL_EMAIL_STARTTLS=Use TLS (STARTTLS) encryption -MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Authorise les certificats auto-signés -MAIN_MAIL_EMAIL_DKIM_ENABLED=Use DKIM to generate email signature -MAIN_MAIL_EMAIL_DKIM_DOMAIN=Email Domain for use with dkim -MAIN_MAIL_EMAIL_DKIM_SELECTOR=Name of dkim selector -MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Private key for dkim signing -MAIN_DISABLE_ALL_SMS=Disable all SMS sending (for test purposes or demos) -MAIN_SMS_SENDMODE=Method to use to send SMS -MAIN_MAIL_SMS_FROM=Default sender phone number for SMS sending -MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email or Company email) -UserEmail=User email -CompanyEmail=Company Email -FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. -FixOnTransifex=Fix the translation on the online translation platform of project -SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr -ModuleSetup=Module setup -ModulesSetup=Modules/Application setup -ModuleFamilyBase=System -ModuleFamilyCrm=Customer Relationship Management (CRM) -ModuleFamilySrm=Vendor Relationship Management (VRM) -ModuleFamilyProducts=Product Management (PM) -ModuleFamilyHr=Human Resource Management (HR) -ModuleFamilyProjects=Projects/Collaborative work -ModuleFamilyOther=Other -ModuleFamilyTechnic=Multi-modules tools -ModuleFamilyExperimental=Experimental modules -ModuleFamilyFinancial=Financial Modules (Accounting/Treasury) -ModuleFamilyECM=Electronic Content Management (ECM) -ModuleFamilyPortal=Websites and other frontal application -ModuleFamilyInterface=Interfaces with external systems -MenuHandlers=Menu handlers -MenuAdmin=Menu editor -DoNotUseInProduction=Do not use in production -ThisIsProcessToFollow=Upgrade procedure: -ThisIsAlternativeProcessToFollow=This is an alternative setup to process manually: -StepNb=Step %s -FindPackageFromWebSite=Find a package that provides the features you need (for example on the official web site %s). -DownloadPackageFromWebSite=Download package (for example from the official web site %s). -UnpackPackageInDolibarrRoot=Unpack/unzip the packaged files into your Dolibarr server directory: %s -UnpackPackageInModulesRoot=To deploy/install an external module, unpack/unzip the packaged files into the server directory dedicated to external modules:
    %s -SetupIsReadyForUse=Module deployment is finished. You must however enable and setup the module in your application by going to the page setup modules: %s. -NotExistsDirect=The alternative root directory is not defined to an existing directory.
    -InfDirAlt=Since version 3, it is possible to define an alternative root directory. This allows you to store, into a dedicated directory, plug-ins and custom templates.
    Just create a directory at the root of Dolibarr (eg: custom).
    -InfDirExample=
    Then declare it in the file conf.php
    $dolibarr_main_url_root_alt='/custom'
    $dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'
    If these lines are commented with "#", to enable them, just uncomment by removing the "#" character. -YouCanSubmitFile=You can upload the .zip file of module package from here: -CurrentVersion=Dolibarr current version -CallUpdatePage=Browse to the page that updates the database structure and data: %s. -LastStableVersion=Latest stable version -LastActivationDate=Latest activation date -LastActivationAuthor=Latest activation author -LastActivationIP=Latest activation IP -UpdateServerOffline=Update server offline -WithCounter=Manage a counter -GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:
    {000000} corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask.
    {000000+000} same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s.
    {000000@x} same as the previous one but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then the sequence {yy}{mm} or {yyyy}{mm} is also required.
    {dd} day (01 to 31).
    {mm} month (01 to 12).
    {yy}, {yyyy} or {y} year over 2, 4 or 1 numbers.
    -GenericMaskCodes2={cccc} the client code on n characters
    {cccc000} the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.
    {tttt} The code of third party type on n characters (see menu Home - Setup - Dictionary - Types of third parties). If you add this tag, the counter will be different for each type of third party.
    -GenericMaskCodes3=All other characters in the mask will remain intact.
    Spaces are not allowed.
    -GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).
    Spaces are not allowed.
    In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.
    -GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany, with date 2007-01-31:
    -GenericMaskCodes4b=Example on third party created on 2007-03-01:
    -GenericMaskCodes4c=Example on product created on 2007-03-01:
    -GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC0701-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX
    IN{yy}{mm}-{0000}-{t} will give IN0701-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI' -GenericNumRefModelDesc=Returns a customizable number according to a defined mask. -ServerAvailableOnIPOrPort=Server is available at address %s on port %s -ServerNotAvailableOnIPOrPort=Server is not available at address %s on port %s -DoTestServerAvailability=Test server connectivity -DoTestSend=Test sending -DoTestSendHTML=Test sending HTML -ErrorCantUseRazIfNoYearInMask=Error, can't use option @ to reset counter each year if sequence {yy} or {yyyy} is not in mask. -ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Error, can't use option @ if sequence {yy}{mm} or {yyyy}{mm} is not in mask. -UMask=UMask parameter for new files on Unix/Linux/BSD/Mac file system. -UMaskExplanation=This parameter allow you to define permissions set by default on files created by Dolibarr on server (during upload for example).
    It must be the octal value (for example, 0666 means read and write for everyone).
    This parameter is useless on a Windows server. -SeeWikiForAllTeam=Take a look at the Wiki page for a list of contributors and their organization -UseACacheDelay= Delay for caching export response in seconds (0 or empty for no cache) DisableLinkToHelpCenter=Hide link "Need help or support" on login page DisableLinkToHelp=Hide link to online help "%s" -AddCRIfTooLong=There is no automatic text wrapping, text that is too long will not display on documents. Please add carriage returns in the text area if needed. -ConfirmPurge=Are you sure you want to execute this purge?
    This will permanently delete all your data files with no way to restore them (ECM files, attached files...). -MinLength=Minimum length -LanguageFilesCachedIntoShmopSharedMemory=Files .lang loaded in shared memory -LanguageFile=Language file -ExamplesWithCurrentSetup=Examples with current configuration -ListOfDirectories=List of OpenDocument templates directories -ListOfDirectoriesForModelGenODT=List of directories containing templates files with OpenDocument format.

    Put here full path of directories.
    Add a carriage return between eah directory.
    To add a directory of the GED module, add here DOL_DATA_ROOT/ecm/yourdirectoryname.

    Files in those directories must end with .odt or .ods. -NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories -ExampleOfDirectoriesForModelGen=Examples of syntax:
    c:\\myapp\\mydocumentdir\\mysubdir
    /home/myapp/mydocumentdir/mysubdir
    DOL_DATA_ROOT/ecm/ecmdir -FollowingSubstitutionKeysCanBeUsed=
    To know how to create your odt document templates, before storing them in those directories, read wiki documentation: -FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template -FirstnameNamePosition=Position of Name/Lastname -DescWeather=The following images will be shown on the dashboard when the number of late actions reach the following values: -KeyForWebServicesAccess=Key to use Web Services (parameter "dolibarrkey" in webservices) -TestSubmitForm=Input test form -ThisForceAlsoTheme=Using this menu manager will also use its own theme whatever the user choice. Also this menu manager specialized for smartphones does not work on all smartphone. Use another menu manager if you experience problems with yours. -ThemeDir=Skins directory -ConnectionTimeout=Connection timeout -ResponseTimeout=Response timeout -SmsTestMessage=Test message from __PHONEFROM__ to __PHONETO__ -ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this feature. -SecurityToken=Key to secure URLs -NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s -PDF=PDF -PDFDesc=Global options for PDF generation -PDFOtherDesc=PDF Option specific to some modules -PDFAddressForging=Rules for address section -HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT -PDFRulesForSalesTax=Rules for Sales Tax / VAT -PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT -HideDescOnPDF=Hide products description -HideRefOnPDF=Hide products ref. -HideDetailsOnPDF=Hide product lines details -PlaceCustomerAddressToIsoLocation=Use french standard position (La Poste) for customer address position -Library=Library -UrlGenerationParameters=Parameters to secure URLs -SecurityTokenIsUnique=Use a unique securekey parameter for each URL -EnterRefToBuildUrl=Enter reference for object %s -GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) -OldVATRates=Old VAT rate -NewVATRates=New VAT rate -PriceBaseTypeToChange=Modify on prices with base reference value defined on -MassConvert=Launch bulk conversion -PriceFormatInCurrentLanguage=Price Format In Current Language -String=String -String1Line=String (1 line) -TextLong=Long text -TextLongNLines=Long text (n lines) -HtmlText=Html text -Int=Integer -Float=Float -DateAndTime=Date and hour -Unique=Unique -Boolean=Boolean (one checkbox) -ExtrafieldPhone = Phone -ExtrafieldPrice = Price -ExtrafieldMail = Email -ExtrafieldUrl = Url -ExtrafieldSelect = Select list -ExtrafieldSelectList = Select from table -ExtrafieldSeparator=Separator (not a field) -ExtrafieldPassword=Password -ExtrafieldRadio=Radio buttons (one choice only) -ExtrafieldCheckBox=Checkboxes -ExtrafieldCheckBoxFromList=Checkboxes from table -ExtrafieldLink=Link to an object -ComputedFormula=Computed field -ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $object.
    WARNING: Only some properties of $object may be available. If you need a properties not loaded, just fetch yourself the object into your formula like in the second example.
    Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

    Example of formula:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Example to reload object
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Other example of formula to force load of object and its parent object:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' -Computedpersistent=Store computed field -ComputedpersistentDesc=Computed extra fields will be stored in the database, however, the value will only be recalculated when the object of this field is changed. If the computed field depends on other objects or global data this value might be wrong!! -ExtrafieldParamHelpPassword=Leaving this field blank means this value will be stored without encryption (field must be only hidden with star on screen).
    Set 'auto' to use the default encryption rule to save password into database (then value read will be the hash only, no way to retrieve original value) -ExtrafieldParamHelpselect=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    code3,value3
    ...

    In order to have the list depending on another complementary attribute list:
    1,value1|options_parent_list_code:parent_key
    2,value2|options_parent_list_code:parent_key

    In order to have the list depending on another list:
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarly a primary int key
    - filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1) to display only active value
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath
    Syntax: ObjectName:Classpath -ExtrafieldParamHelpSeparator=Keep empty for a simple separator
    Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)
    Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) -LibraryToBuildPDF=Library used for PDF generation -LocalTaxDesc=Some countries may apply two or three taxes on each invoice line. If this is the case, choose the type for the second and third tax and its rate. Possible type are:
    1: local tax apply on products and services without vat (localtax is calculated on amount without tax)
    2: local tax apply on products and services including vat (localtax is calculated on amount + main tax)
    3: local tax apply on products without vat (localtax is calculated on amount without tax)
    4: local tax apply on products including vat (localtax is calculated on amount + main vat)
    5: local tax apply on services without vat (localtax is calculated on amount without tax)
    6: local tax apply on services including vat (localtax is calculated on amount + tax) -SMS=SMS -LinkToTestClickToDial=Enter a phone number to call to show a link to test the ClickToDial url for user %s -RefreshPhoneLink=Refresh link -LinkToTest=Clickable link generated for user %s (click phone number to test) -KeepEmptyToUseDefault=Keep empty to use default value -KeepThisEmptyInMostCases=In most cases, you can keep this field empy. -DefaultLink=Default link -SetAsDefault=Set as default -ValueOverwrittenByUserSetup=Warning, this value may be overwritten by user specific setup (each user can set his own clicktodial url) -ExternalModule=External module -InstalledInto=Installed into directory %s -BarcodeInitForThirdparties=Mass barcode init for third-parties -BarcodeInitForProductsOrServices=Mass barcode init or reset for products or services -CurrentlyNWithoutBarCode=Currently, you have %s record on %s %s without barcode defined. -InitEmptyBarCode=Init value for next %s empty records -EraseAllCurrentBarCode=Erase all current barcode values -ConfirmEraseAllCurrentBarCode=Are you sure you want to erase all current barcode values? -AllBarcodeReset=All barcode values have been removed -NoBarcodeNumberingTemplateDefined=No numbering barcode template enabled in the Barcode module setup. -EnableFileCache=Enable file cache -ShowDetailsInPDFPageFoot=Add more details into footer, such as company address or manager names (in addition to professional ids, company capital and VAT number). -NoDetails=No additional details in footer -DisplayCompanyInfo=Display company address -DisplayCompanyManagers=Display manager names -DisplayCompanyInfoAndManagers=Display company address and manager names -EnableAndSetupModuleCron=If you want to have this recurring invoice generated automatically, module *%s* must be enabled and correctly setup. Otherwise, generation of invoices must be done manually from this template using the *Create* button. Note that even if you enabled automatic generation, you can still safely launch manual generation. Generation of duplicates for the same period is not possible. -ModuleCompanyCodeCustomerAquarium=%s followed by customer code for a customer accounting code -ModuleCompanyCodeSupplierAquarium=%s followed by vendor code for a vendor accounting code -ModuleCompanyCodePanicum=Return an empty accounting code. -ModuleCompanyCodeDigitaria=Returns a compound accounting code according to the name of the third party. The code consists of a prefix that can be defined in the first position followed by the number of characters defined in the third party code. -ModuleCompanyCodeCustomerDigitaria=%s followed by the truncated customer name by the number of characters: %s for the customer accounting code. -ModuleCompanyCodeSupplierDigitaria=%s followed by the truncated supplier name by the number of characters: %s for the supplier accounting code. -Use3StepsApproval=By default, Purchase Orders need to be created and approved by 2 different users (one step/user to create and one step/user to approve. Note that if user has both permission to create and approve, one step/user will be enough). You can ask with this option to introduce a third step/user approval, if amount is higher than a dedicated value (so 3 steps will be necessary: 1=validation, 2=first approval and 3=second approval if amount is enough).
    Set this to empty if one approval (2 steps) is enough, set it to a very low value (0.1) if a second approval (3 steps) is always required. -UseDoubleApproval=Use a 3 steps approval when amount (without tax) is higher than... -WarningPHPMail=WARNING: The setup to send emails from the application is using the default generic setup. It is often better to setup outgoing emails to use the email server of your Email Service Provider instead of the default setup for several reasons: -WarningPHPMailA=- Using the server of the Email Service Provider increases the trustability of your email, so it increases the deliverablity without being flagged as SPAM -WarningPHPMailB=- Some Email Service Providers (like Yahoo) do not allow you to send an email from another server than their own server. Your current setup uses the server of the application to send email and not the server of your email provider, so some recipients (the one compatible with the restrictive DMARC protocol), will ask your email provider if they can accept your email and some email providers (like Yahoo) may respond "no" because the server is not theirs, so few of your sent Emails may not be accepted for delivery (be careful also of your email provider's sending quota). -WarningPHPMailC=- Using the SMTP server of your own Email Service Provider to send emails is also interesting so all emails sent from application will also be saved into your "Sent" directory of your mailbox. -WarningPHPMailD=If the method 'PHP Mail' is really the method you would like to use, you can remove this warning by adding the constant MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP to 1 in Home - Setup - Other. -WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (very rare), this is the IP address of the mail user agent (MUA) for your ERP CRM application: %s. -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask you domain name registar), you must add the following IPs in the SPF record of the DNS of your domain: %s. -ClickToShowDescription=Click to show description -DependsOn=This module needs the module(s) -RequiredBy=This module is required by module(s) -TheKeyIsTheNameOfHtmlField=This is the name of the HTML field. Technical knowledge is required to read the content of the HTML page to get the key name of a field. -PageUrlForDefaultValues=You must enter the relative path of the page URL. If you include parameters in URL, the default values will be effective if all parameters are set to same value. -PageUrlForDefaultValuesCreate=
    Example:
    For the form to create a new third party, it is %s.
    For URL of external modules installed into custom directory, do not include the "custom/", so use path like mymodule/mypage.php and not custom/mymodule/mypage.php.
    If you want default value only if url has some parameter, you can use %s -PageUrlForDefaultValuesList=
    Example:
    For the page that lists third parties, it is %s.
    For URL of external modules installed into custom directory, do not include the "custom/" so use a path like mymodule/mypagelist.php and not custom/mymodule/mypagelist.php.
    If you want default value only if url has some parameter, you can use %s -AlsoDefaultValuesAreEffectiveForActionCreate=Also note that overwritting default values for form creation works only for pages that were correctly designed (so with parameter action=create or presend...) -EnableDefaultValues=Enable customization of default values -EnableOverwriteTranslation=Enable usage of overwritten translation -GoIntoTranslationMenuToChangeThis=A translation has been found for the key with this code. To change this value, you must edit it from Home-Setup-translation. -WarningSettingSortOrder=Warning, setting a default sort order may result in a technical error when going on the list page if field is an unknown field. If you experience such an error, come back to this page to remove the default sort order and restore default behavior. -Field=Field -ProductDocumentTemplates=Document templates to generate product document -FreeLegalTextOnExpenseReports=Free legal text on expense reports -WatermarkOnDraftExpenseReports=Watermark on draft expense reports -AttachMainDocByDefault=Set this to 1 if you want to attach main document to email by default (if applicable) -FilesAttachedToEmail=Attach file -SendEmailsReminders=Send agenda reminders by emails -davDescription=Setup a WebDAV server -DAVSetup=Setup of module DAV -DAV_ALLOW_PRIVATE_DIR=Enable the generic private directory (WebDAV dedicated directory named "private" - login required) -DAV_ALLOW_PRIVATE_DIRTooltip=The generic private directory is a WebDAV directory anybody can access with its application login/pass. -DAV_ALLOW_PUBLIC_DIR=Enable the generic public directory (WebDAV dedicated directory named "public" - no login required) -DAV_ALLOW_PUBLIC_DIRTooltip=The generic public directory is a WebDAV directory anybody can access (in read and write mode), with no authorization required (login/password account). -DAV_ALLOW_ECM_DIR=Enable the DMS/ECM private directory (root directory of the DMS/ECM module - login required) -DAV_ALLOW_ECM_DIRTooltip=The root directory where all files are manually uploaded when using the DMS/ECM module. Similarly as access from the web interface, you will need a valid login/password with adecuate permissions to access it. -# Modules -Module0Name=Users & Groups -Module0Desc=Users / Employees and Groups management -Module1Name=Third Parties -Module1Desc=Companies and contacts management (customers, prospects...) -Module2Name=Commercial -Module2Desc=Commercial management -Module10Name=Accounting (simplified) -Module10Desc=Simple accounting reports (journals, turnover) based on database content. Does not use any ledger table. -Module20Name=Proposals -Module20Desc=Commercial proposal management -Module22Name=Mass Emailings -Module22Desc=Manage bulk emailing -Module23Name=Energy -Module23Desc=Monitoring the consumption of energies -Module25Name=Sales Orders -Module25Desc=Sales order management -Module30Name=Invoices -Module30Desc=Management of invoices and credit notes for customers. Management of invoices and credit notes for suppliers -Module40Name=Vendors -Module40Desc=Vendors and purchase management (purchase orders and billing of supplier invoices) -Module42Name=Debug Logs -Module42Desc=Logging facilities (file, syslog, ...). Such logs are for technical/debug purposes. -Module43Name=Debug Bar -Module43Desc=A tool for developper adding a debug bar in your browser. -Module49Name=Editors -Module49Desc=Editor management -Module50Name=Products -Module50Desc=Management of Products -Module51Name=Mass mailings -Module51Desc=Mass paper mailing management -Module52Name=Stocks -Module52Desc=Stock management -Module53Name=Services -Module53Desc=Management of Services -Module54Name=Contracts/Subscriptions -Module54Desc=Management of contracts (services or recurring subscriptions) -Module55Name=Barcodes -Module55Desc=Barcode or QR code management -Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Payments by Direct Debit -Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. -Module58Name=ClickToDial -Module58Desc=Integration of a ClickToDial system (Asterisk, ...) -Module60Name=Stickers -Module60Desc=Management of stickers -Module70Name=Interventions -Module70Desc=Intervention management -Module75Name=Expense and trip notes -Module75Desc=Expense and trip notes management -Module80Name=Shipments -Module80Desc=Shipments and delivery note management -Module85Name=Banks & Cash -Module85Desc=Management of bank or cash accounts -Module100Name=External Site -Module100Desc=Add a link to an external website as a main menu icon. Website is shown in a frame under the top menu. -Module105Name=Mailman and SPIP -Module105Desc=Mailman or SPIP interface for member module -Module200Name=LDAP -Module200Desc=LDAP directory synchronization -Module210Name=PostNuke -Module210Desc=PostNuke integration -Module240Name=Data exports -Module240Desc=Tool to export Dolibarr data (with assistance) -Module250Name=Data imports -Module250Desc=Tool to import data into Dolibarr (with assistance) -Module310Name=Members -Module310Desc=Foundation members management -Module320Name=RSS Feed -Module320Desc=Add a RSS feed to Dolibarr pages -Module330Name=Bookmarks & Shortcuts -Module330Desc=Create shortcuts, always accessible, to the internal or external pages to which you frequently access -Module400Name=Projects or Leads -Module400Desc=Management of projects, leads/opportunities and/or tasks. You can also assign any element (invoice, order, proposal, intervention, ...) to a project and get a transversal view from the project view. -Module410Name=Webcalendar -Module410Desc=Webcalendar integration -Module500Name=Taxes & Special Expenses -Module500Desc=Management of other expenses (sale taxes, social or fiscal taxes, dividends, ...) -Module510Name=Salaries -Module510Desc=Record and track employee payments -Module520Name=Loans -Module520Desc=Management of loans -Module600Name=Notifications on business event -Module600Desc=Send email notifications triggered by a business event: per user (setup defined on each user), per third-party contacts (setup defined on each third party) or by specific emails -Module600Long=Note that this module sends emails in real-time when a specific business event occurs. If you are looking for a feature to send email reminders for agenda events, go into the setup of module Agenda. -Module610Name=Product Variants -Module610Desc=Creation of product variants (color, size etc.) -Module700Name=Donations -Module700Desc=Donation management -Module770Name=Expense Reports -Module770Desc=Manage expense reports claims (transportation, meal, ...) -Module1120Name=Vendor Commercial Proposals -Module1120Desc=Request vendor commercial proposal and prices -Module1200Name=Mantis -Module1200Desc=Mantis integration -Module1520Name=Document Generation -Module1520Desc=Mass email document generation -Module1780Name=Tags/Categories -Module1780Desc=Create tags/category (products, customers, suppliers, contacts or members) -Module2000Name=WYSIWYG editor -Module2000Desc=Allow text fields to be edited/formatted using CKEditor (html) -Module2200Name=Dynamic Prices -Module2200Desc=Use maths expressions for auto-generation of prices -Module2300Name=Scheduled jobs -Module2300Desc=Scheduled jobs management (alias cron or chrono table) -Module2400Name=Events/Agenda -Module2400Desc=Track events. Log automatic events for tracking purposes or record manual events or meetings. This is the principal module for good Customer or Vendor Relationship Management. -Module2500Name=DMS / ECM -Module2500Desc=Document Management System / Electronic Content Management. Automatic organization of your generated or stored documents. Share them when you need. -Module2600Name=API/Web services (SOAP server) -Module2600Desc=Enable the Dolibarr SOAP server providing API services -Module2610Name=API/Web services (REST server) -Module2610Desc=Enable the Dolibarr REST server providing API services -Module2660Name=Call WebServices (SOAP client) -Module2660Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Only Purchase orders are currently supported.) -Module2700Name=Gravatar -Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Needs Internet access -Module2800Desc=FTP Client -Module2900Name=GeoIPMaxmind -Module2900Desc=GeoIP Maxmind conversions capabilities -Module3200Name=Unalterable Archives -Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. -Module3400Name=Social Networks -Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). -Module4000Name=HRM -Module4000Desc=Human resources management (management of department, employee contracts and feelings) -Module5000Name=Multi-company -Module5000Desc=Allows you to manage multiple companies -Module6000Name=Inter-modules Workflow -Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) -Module10000Name=Websites -Module10000Desc=Create websites (public) with a WYSIWYG editor. This is a webmaster or developer oriented CMS (it is better to know HTML and CSS language). Just setup your web server (Apache, Nginx, ...) to point to the dedicated Dolibarr directory to have it online on the internet with your own domain name. -Module20000Name=Leave Request Management -Module20000Desc=Define and track employee leave requests -Module39000Name=Product Lots -Module39000Desc=Lots, serial numbers, eat-by/sell-by date management for products -Module40000Name=Multicurrency -Module40000Desc=Use alternative currencies in prices and documents -Module50000Name=PayBox -Module50000Desc=Offer customers a PayBox online payment page (credit/debit cards). This can be used to allow your customers to make ad-hoc payments or payments related to a specific Dolibarr object (invoice, order etc...) -Module50100Name=POS SimplePOS -Module50100Desc=Point of Sale module SimplePOS (simple POS). -Module50150Name=POS TakePOS -Module50150Desc=Point of Sale module TakePOS (touchscreen POS, for shops, bars or restaurants). -Module50200Name=Paypal -Module50200Desc=Offer customers a PayPal online payment page (PayPal account or credit/debit cards). This can be used to allow your customers to make ad-hoc payments or payments related to a specific Dolibarr object (invoice, order etc...) -Module50300Name=Stripe -Module50300Desc=Offer customers a Stripe online payment page (credit/debit cards). This can be used to allow your customers to make ad-hoc payments or payments related to a specific Dolibarr object (invoice, order etc...) -Module50400Name=Accounting (double entry) -Module50400Desc=Accounting management (double entries, support General and Subsidiary Ledgers). Export the ledger in several other accounting software formats. -Module54000Name=PrintIPP -Module54000Desc=Direct print (without opening the documents) using Cups IPP interface (Printer must be visible from server, and CUPS must be installed on server). -Module55000Name=Poll, Survey or Vote -Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) -Module59000Name=Margins -Module59000Desc=Module to follow margins -Module60000Name=Commissions -Module60000Desc=Module to manage commissions -Module62000Name=Incoterms -Module62000Desc=Add features to manage Incoterms -Module63000Name=Resources -Module63000Desc=Manage resources (printers, cars, rooms, ...) for allocating to events -Permission11=Read customer invoices -Permission12=Create/modify customer invoices -Permission13=Invalidate customer invoices -Permission14=Validate customer invoices -Permission15=Send customer invoices by email -Permission16=Create payments for customer invoices -Permission19=Delete customer invoices -Permission21=Read commercial proposals -Permission22=Create/modify commercial proposals -Permission24=Validate commercial proposals -Permission25=Send commercial proposals -Permission26=Close commercial proposals -Permission27=Delete commercial proposals -Permission28=Export commercial proposals -Permission31=Read products -Permission32=Create/modify products -Permission34=Delete products -Permission36=See/manage hidden products -Permission38=Export products -Permission39=Ignore minimum price -Permission41=Read projects and tasks (shared project and projects I'm contact for). Can also enter time consumed, for me or my hierarchy, on assigned tasks (Timesheet) -Permission42=Create/modify projects (shared project and projects I'm contact for). Can also create tasks and assign users to project and tasks -Permission44=Delete projects (shared project and projects I'm contact for) -Permission45=Export projects -Permission61=Read interventions -Permission62=Create/modify interventions -Permission64=Delete interventions -Permission67=Export interventions -Permission68=Send interventions by email -Permission69=Validate interventions -Permission70=Invalidate interventions -Permission71=Read members -Permission72=Create/modify members -Permission74=Delete members -Permission75=Setup types of membership -Permission76=Export data -Permission78=Read subscriptions -Permission79=Create/modify subscriptions -Permission81=Read customers orders -Permission82=Create/modify customers orders -Permission84=Validate customers orders -Permission86=Send customers orders -Permission87=Close customers orders -Permission88=Cancel customers orders -Permission89=Delete customers orders -Permission91=Read social or fiscal taxes and vat -Permission92=Create/modify social or fiscal taxes and vat -Permission93=Delete social or fiscal taxes and vat -Permission94=Export social or fiscal taxes -Permission95=Read reports -Permission101=Read sendings -Permission102=Create/modify sendings -Permission104=Validate sendings -Permission105=Send sendings by email -Permission106=Export sendings -Permission109=Delete sendings -Permission111=Read financial accounts -Permission112=Create/modify/delete and compare transactions -Permission113=Setup financial accounts (create, manage categories) -Permission114=Reconcile transactions -Permission115=Export transactions and account statements -Permission116=Transfers between accounts -Permission117=Manage checks dispatching -Permission121=Read third parties linked to user -Permission122=Create/modify third parties linked to user -Permission125=Delete third parties linked to user -Permission126=Export third parties -Permission141=Read all projects and tasks (also private projects for which I am not a contact) -Permission142=Create/modify all projects and tasks (also private projects for which I am not a contact) -Permission144=Delete all projects and tasks (also private projects i am not contact for) -Permission146=Read providers -Permission147=Read stats -Permission151=Read direct debit payment orders -Permission152=Create/modify a direct debit payment orders -Permission153=Send/Transmit direct debit payment orders -Permission154=Record Credits/Rejections of direct debit payment orders -Permission161=Read contracts/subscriptions -Permission162=Create/modify contracts/subscriptions -Permission163=Activate a service/subscription of a contract -Permission164=Disable a service/subscription of a contract -Permission165=Delete contracts/subscriptions -Permission167=Export contracts -Permission171=Read trips and expenses (yours and your subordinates) -Permission172=Create/modify trips and expenses -Permission173=Delete trips and expenses -Permission174=Read all trips and expenses -Permission178=Export trips and expenses -Permission180=Read suppliers -Permission181=Read purchase orders -Permission182=Create/modify purchase orders -Permission183=Validate purchase orders -Permission184=Approve purchase orders -Permission185=Order or cancel purchase orders -Permission186=Receive purchase orders -Permission187=Close purchase orders -Permission188=Cancel purchase orders -Permission192=Create lines -Permission193=Cancel lines -Permission194=Read the bandwidth lines -Permission202=Create ADSL connections -Permission203=Order connections orders -Permission204=Order connections -Permission205=Manage connections -Permission206=Read connections -Permission211=Read Telephony -Permission212=Order lines -Permission213=Activate line -Permission214=Setup Telephony -Permission215=Setup providers -Permission221=Read emailings -Permission222=Create/modify emailings (topic, recipients...) -Permission223=Validate emailings (allows sending) -Permission229=Delete emailings -Permission237=View recipients and info -Permission238=Manually send mailings -Permission239=Delete mailings after validation or sent -Permission241=Read categories -Permission242=Create/modify categories -Permission243=Delete categories -Permission244=See the contents of the hidden categories -Permission251=Read other users and groups -PermissionAdvanced251=Read other users -Permission252=Read permissions of other users -Permission253=Create/modify other users, groups and permissions -PermissionAdvanced253=Create/modify internal/external users and permissions -Permission254=Create/modify external users only -Permission255=Modify other users password -Permission256=Delete or disable other users -Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).
    Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).
    Not effective for projects (only rules on project permissions, visibility and assignment matters). -Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).
    Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).
    Not effective for projects (only rules on project permissions, visibility and assignment matters). -Permission271=Read CA -Permission272=Read invoices -Permission273=Issue invoices -Permission281=Read contacts -Permission282=Create/modify contacts -Permission283=Delete contacts -Permission286=Export contacts -Permission291=Read tariffs -Permission292=Set permissions on the tariffs -Permission293=Modify customer's tariffs -Permission300=Read barcodes -Permission301=Create/modify barcodes -Permission302=Delete barcodes -Permission311=Read services -Permission312=Assign service/subscription to contract -Permission331=Read bookmarks -Permission332=Create/modify bookmarks -Permission333=Delete bookmarks -Permission341=Read its own permissions -Permission342=Create/modify his own user information -Permission343=Modify his own password -Permission344=Modify its own permissions -Permission351=Read groups -Permission352=Read groups permissions -Permission353=Create/modify groups -Permission354=Delete or disable groups -Permission358=Export users -Permission401=Read discounts -Permission402=Create/modify discounts -Permission403=Validate discounts -Permission404=Delete discounts -Permission430=Use Debug Bar -Permission511=Read salaries and payments (yours and subordinates) -Permission512=Create/modify salaries and payments -Permission514=Delete salaries and payments -Permission517=Read salaries and payments everybody -Permission519=Export salaries -Permission520=Read Loans -Permission522=Create/modify loans -Permission524=Delete loans -Permission525=Access loan calculator -Permission527=Export loans -Permission531=Read services -Permission532=Create/modify services -Permission534=Delete services -Permission536=See/manage hidden services -Permission538=Export services -Permission561=Read payment orders by credit transfer -Permission562=Create/modify payment order by credit transfer -Permission563=Send/Transmit payment order by credit transfer -Permission564=Record Debits/Rejections of credit transfer -Permission601=Read stickers -Permission602=Create/modify stickers -Permission609=Delete stickers -Permission650=Read Bills of Materials -Permission651=Create/Update Bills of Materials -Permission652=Delete Bills of Materials -Permission660=Read Manufacturing Order (MO) -Permission661=Create/Update Manufacturing Order (MO) -Permission662=Delete Manufacturing Order (MO) -Permission701=Read donations -Permission702=Create/modify donations -Permission703=Delete donations -Permission771=Read expense reports (yours and your subordinates) -Permission772=Create/modify expense reports -Permission773=Delete expense reports -Permission774=Read all expense reports (even for user not subordinates) -Permission775=Approve expense reports -Permission776=Pay expense reports -Permission777=Read expense reports of everybody -Permission778=Create/modify expense reports of everybody -Permission779=Export expense reports -Permission1001=Read stocks -Permission1002=Create/modify warehouses -Permission1003=Delete warehouses -Permission1004=Read stock movements -Permission1005=Create/modify stock movements -Permission1101=Read delivery receipts -Permission1102=Create/modify delivery receipts -Permission1104=Validate delivery receipts -Permission1109=Delete delivery receipts -Permission1121=Read supplier proposals -Permission1122=Create/modify supplier proposals -Permission1123=Validate supplier proposals -Permission1124=Send supplier proposals -Permission1125=Delete supplier proposals -Permission1126=Close supplier price requests -Permission1181=Read suppliers -Permission1182=Read purchase orders -Permission1183=Create/modify purchase orders -Permission1184=Validate purchase orders -Permission1185=Approve purchase orders -Permission1186=Order purchase orders -Permission1187=Acknowledge receipt of purchase orders -Permission1188=Delete purchase orders -Permission1189=Check/Uncheck a purchase order reception -Permission1190=Approve (second approval) purchase orders -Permission1191=Export supplier orders and their attributes -Permission1201=Get result of an export -Permission1202=Create/Modify an export -Permission1231=Read vendor invoices -Permission1232=Create/modify vendor invoices -Permission1233=Validate vendor invoices -Permission1234=Delete vendor invoices -Permission1235=Send vendor invoices by email -Permission1236=Export vendor invoices, attributes and payments -Permission1237=Export purchase orders and their details -Permission1251=Run mass imports of external data into database (data load) -Permission1321=Export customer invoices, attributes and payments -Permission1322=Reopen a paid bill -Permission1421=Export sales orders and attributes -Permission1521=Read documents -Permission1522=Delete documents -Permission2401=Read actions (events or tasks) linked to his user account (if owner of event or just assigned to) -Permission2402=Create/modify actions (events or tasks) linked to his user account (if owner of event) -Permission2403=Delete actions (events or tasks) linked to his user account (if owner of event) -Permission2411=Read actions (events or tasks) of others -Permission2412=Create/modify actions (events or tasks) of others -Permission2413=Delete actions (events or tasks) of others -Permission2414=Export actions/tasks of others -Permission2501=Read/Download documents -Permission2502=Download documents -Permission2503=Submit or delete documents -Permission2515=Setup documents directories -Permission2801=Use FTP client in read mode (browse and download only) -Permission2802=Use FTP client in write mode (delete or upload files) -Permission3200=Read archived events and fingerprints -Permission3301=Generate new modules -Permission4001=See employees -Permission4002=Create employees -Permission4003=Delete employees -Permission4004=Export employees -Permission10001=Read website content -Permission10002=Create/modify website content (html and javascript content) -Permission10003=Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers. -Permission10005=Delete website content -Permission20001=Read leave requests (your leave and those of your subordinates) -Permission20002=Create/modify your leave requests (your leave and those of your subordinates) -Permission20003=Delete leave requests -Permission20004=Read all leave requests (even of user not subordinates) -Permission20005=Create/modify leave requests for everybody (even of user not subordinates) -Permission20006=Admin leave requests (setup and update balance) -Permission20007=Approve leave requests -Permission23001=Read Scheduled job -Permission23002=Create/update Scheduled job -Permission23003=Delete Scheduled job -Permission23004=Execute Scheduled job -Permission50101=Use Point of Sale (SimplePOS) -Permission50151=Use Point of Sale (TakePOS) -Permission50152=Edit sales lines -Permission50153=Edit ordered sales lines -Permission50201=Read transactions -Permission50202=Import transactions -Permission50330=Read objects of Zapier -Permission50331=Create/Update objects of Zapier -Permission50332=Delete objects of Zapier -Permission50401=Bind products and invoices with accounting accounts -Permission50411=Read operations in ledger -Permission50412=Write/Edit operations in ledger -Permission50414=Delete operations in ledger -Permission50415=Delete all operations by year and journal in ledger -Permission50418=Export operations of the ledger -Permission50420=Report and export reports (turnover, balance, journals, ledger) -Permission50430=Define fiscal periods. Validate transactions and close fiscal periods. -Permission50440=Manage chart of accounts, setup of accountancy -Permission51001=Read assets -Permission51002=Create/Update assets -Permission51003=Delete assets -Permission51005=Setup types of asset -Permission54001=Print -Permission55001=Read polls -Permission55002=Create/modify polls -Permission59001=Read commercial margins -Permission59002=Define commercial margins -Permission59003=Read every user margin -Permission63001=Read resources -Permission63002=Create/modify resources -Permission63003=Delete resources -Permission63004=Link resources to agenda events -Permission64001=Allow direct printing -Permission67000=Allow printing of receipts -Permission68001=Read intracomm report -Permission68002=Create/modify intracomm report -Permission68004=Delete intracomm report -Permission941601=Read receipts -Permission941602=Create and modify receipts -Permission941603=Validate receipts -Permission941604=Send receipts by email -Permission941605=Export receipts -Permission941606=Delete receipts -DictionaryCompanyType=Third-party types -DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential level for companies -DictionaryProspectContactLevel=Prospect potential level for contacts -DictionaryCanton=States/Provinces -DictionaryRegion=Regions -DictionaryCountry=Countries -DictionaryCurrency=Currencies -DictionaryCivility=Honorific titles -DictionaryActions=Types of agenda events -DictionarySocialContributions=Types of social or fiscal taxes -DictionaryVAT=VAT Rates or Sales Tax Rates -DictionaryRevenueStamp=Amount of tax stamps -DictionaryPaymentConditions=Payment Terms -DictionaryPaymentModes=Payment Modes -DictionaryTypeContact=Contact/Address types -DictionaryTypeOfContainer=Website - Type of website pages/containers -DictionaryEcotaxe=Ecotax (WEEE) -DictionaryPaperFormat=Paper formats -DictionaryFormatCards=Card formats -DictionaryFees=Expense report - Types of expense report lines -DictionarySendingMethods=Shipping methods -DictionaryStaff=Number of Employees -DictionaryAvailability=Delivery delay DictionaryOrderMethods=Ordering methods -DictionarySource=Origin of proposals/orders -DictionaryAccountancyCategory=Personalized groups for reports -DictionaryAccountancysystem=Models for chart of accounts -DictionaryAccountancyJournal=Accounting journals -DictionaryEMailTemplates=Email Templates -DictionaryUnits=Units -DictionaryMeasuringUnits=Measuring Units -DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status for companies -DictionaryProspectContactStatus=Prospect status for contacts -DictionaryHolidayTypes=Leave - Types of leave -DictionaryOpportunityStatus=Lead status for project/lead -DictionaryExpenseTaxCat=Expense report - Transportation categories -DictionaryExpenseTaxRange=Expense report - Range by transportation category -DictionaryTransportMode=Intracomm report - Transport mode -DictionaryBatchStatus=Product lot/serial Quality Control status -TypeOfUnit=Type of unit -SetupSaved=Setup saved -SetupNotSaved=Setup not saved -BackToModuleList=Back to Module list -BackToDictionaryList=Back to Dictionaries list -TypeOfRevenueStamp=Type of tax stamp -VATManagement=Sales Tax Management -VATIsUsedDesc=By default when creating prospects, invoices, orders etc. the Sales Tax rate follows the active standard rule:
    If the seller is not subject to Sales tax, then Sales tax defaults to 0. End of rule.
    If the (seller's country = buyer's country), then the Sales tax by default equals the Sales tax of the product in the seller's country. End of rule.
    If the seller and buyer are both in the European Community and goods are transport-related products (haulage, shipping, airline), the default VAT is 0. This rule is dependant on the seller's country - please consult with your accountant. The VAT should be paid by the buyer to the customs office in their country and not to the seller. End of rule.
    If the seller and buyer are both in the European Community and the buyer is not a company (with a registered intra-Community VAT number) then the VAT defaults to the VAT rate of the seller's country. End of rule.
    If the seller and buyer are both in the European Community and the buyer is a company (with a registered intra-Community VAT number), then the VAT is 0 by default. End of rule.
    In any other case the proposed default is Sales tax=0. End of rule. -VATIsNotUsedDesc=By default the proposed Sales tax is 0 which can be used for cases like associations, individuals or small companies. -VATIsUsedExampleFR=In France, it means companies or organizations having a real fiscal system (Simplified real or normal real). A system in which VAT is declared. -VATIsNotUsedExampleFR=In France, it means associations that are non Sales tax declared or companies, organizations or liberal professions that have chosen the micro enterprise fiscal system (Sales tax in franchise) and paid a franchise Sales tax without any Sales tax declaration. This choice will display the reference "Non applicable Sales tax - art-293B of CGI" on invoices. -##### Local Taxes ##### -TypeOfSaleTaxes=Type of sales tax -LTRate=Rate -LocalTax1IsNotUsed=Do not use second tax -LocalTax1IsUsedDesc=Use a second type of tax (other than first one) -LocalTax1IsNotUsedDesc=Do not use other type of tax (other than first one) -LocalTax1Management=Second type of tax -LocalTax1IsUsedExample= -LocalTax1IsNotUsedExample= -LocalTax2IsNotUsed=Do not use third tax -LocalTax2IsUsedDesc=Use a third type of tax (other than first one) -LocalTax2IsNotUsedDesc=Do not use other type of tax (other than first one) -LocalTax2Management=Third type of tax -LocalTax2IsUsedExample= -LocalTax2IsNotUsedExample= -LocalTax1ManagementES=RE Management -LocalTax1IsUsedDescES=The RE rate by default when creating prospects, invoices, orders etc. follow the active standard rule:
    If the buyer is not subjected to RE, RE by default=0. End of rule.
    If the buyer is subjected to RE then the RE by default. End of rule.
    -LocalTax1IsNotUsedDescES=By default the proposed RE is 0. End of rule. -LocalTax1IsUsedExampleES=In Spain they are professionals subject to some specific sections of the Spanish IAE. -LocalTax1IsNotUsedExampleES=In Spain they are professional and societies and subject to certain sections of the Spanish IAE. -LocalTax2ManagementES=IRPF Management -LocalTax2IsUsedDescES=The IRPF rate by default when creating prospects, invoices, orders etc. follow the active standard rule:
    If the seller is not subjected to IRPF, then IRPF by default=0. End of rule.
    If the seller is subjected to IRPF then the IRPF by default. End of rule.
    -LocalTax2IsNotUsedDescES=By default the proposed IRPF is 0. End of rule. -LocalTax2IsUsedExampleES=In Spain, freelancers and independent professionals who provide services and companies who have chosen the tax system of modules. -LocalTax2IsNotUsedExampleES=In Spain they are businesses not subject to tax system of modules. -RevenueStampDesc=The "tax stamp" or "revenue stamp" is a fixed tax you per invoice (It does not depend on amount of invoice). It can also be a percent tax but using the second or third type of tax is better for percent taxes as tax stamps does not provide any reporting. Only few countries uses this type of tax. -UseRevenueStamp=Use a tax stamp -UseRevenueStampExample=The value of tax stamp is defined by default into the setup of dictionaries (%s - %s - %s) -CalcLocaltax=Reports on local taxes -CalcLocaltax1=Sales - Purchases -CalcLocaltax1Desc=Local Taxes reports are calculated with the difference between localtaxes sales and localtaxes purchases -CalcLocaltax2=Purchases -CalcLocaltax2Desc=Local Taxes reports are the total of localtaxes purchases -CalcLocaltax3=Sales -CalcLocaltax3Desc=Local Taxes reports are the total of localtaxes sales -NoLocalTaxXForThisCountry=According to the setup of taxes (See %s - %s - %s), your country does not need to use such type of tax -LabelUsedByDefault=Label used by default if no translation can be found for code -LabelOnDocuments=Label on documents -LabelOrTranslationKey=Label or translation key -ValueOfConstantKey=Value of a configuration constant -ConstantIsOn=Option %s is on -NbOfDays=No. of days -AtEndOfMonth=At end of month -CurrentNext=Current/Next -Offset=Offset -AlwaysActive=Always active -Upgrade=Upgrade -MenuUpgrade=Upgrade / Extend -AddExtensionThemeModuleOrOther=Deploy/install external app/module -WebServer=Web server -DocumentRootServer=Web server's root directory -DataRootServer=Data files directory -IP=IP -Port=Port -VirtualServerName=Virtual server name -OS=OS -PhpWebLink=Web-Php link -Server=Server -Database=Database -DatabaseServer=Database host -DatabaseName=Database name -DatabasePort=Database port -DatabaseUser=Database user -DatabasePassword=Database password -Tables=Tables -TableName=Table name -NbOfRecord=No. of records -Host=Server -DriverType=Driver type -SummarySystem=System information summary -SummaryConst=List of all Dolibarr setup parameters -MenuCompanySetup=Company/Organization -DefaultMenuManager= Standard menu manager -DefaultMenuSmartphoneManager=Smartphone menu manager -Skin=Skin theme -DefaultSkin=Default skin theme -MaxSizeList=Max length for list -DefaultMaxSizeList=Default max length for lists -DefaultMaxSizeShortList=Default max length for short lists (i.e. in customer card) -MessageOfDay=Message of the day -MessageLogin=Login page message -LoginPage=Login page -BackgroundImageLogin=Background image -PermanentLeftSearchForm=Permanent search form on left menu -DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships -EnableShowLogo=Show the company logo in the menu -CompanyInfo=Company/Organization -CompanyIds=Company/Organization identities -CompanyName=Name -CompanyAddress=Address -CompanyZip=Zip -CompanyTown=Town -CompanyCountry=Country -CompanyCurrency=Main currency -CompanyObject=Object of the company -IDCountry=ID country -Logo=Logo -LogoDesc=Main logo of company. Will be used into generated documents (PDF, ...) -LogoSquarred=Logo (squarred) -LogoSquarredDesc=Must be a squarred icon (width = height). This logo will be used as the favorite icon or other need like for the top menu bar (if not disabled into display setup). -DoNotSuggestPaymentMode=Do not suggest -NoActiveBankAccountDefined=No active bank account defined -OwnerOfBankAccount=Owner of bank account %s -BankModuleNotActive=Bank accounts module not enabled -ShowBugTrackLink=Define the link "%s" (empty to not display this link, 'github' for the link to the Dolibarr project or define directly an url 'https://...') -Alerts=Alerts -DelaysOfToleranceBeforeWarning=Delay before displaying a warning alert for: -DelaysOfToleranceDesc=Set the delay before an alert icon %s is shown onscreen for the late element. -Delays_MAIN_DELAY_ACTIONS_TODO=Planned events (agenda events) not completed -Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Project not closed in time -Delays_MAIN_DELAY_TASKS_TODO=Planned task (project tasks) not completed -Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Order not processed -Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Purchase order not processed -Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Proposal not closed -Delays_MAIN_DELAY_PROPALS_TO_BILL=Proposal not billed -Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Service to activate -Delays_MAIN_DELAY_RUNNING_SERVICES=Expired service -Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Unpaid vendor invoice -Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Unpaid customer invoice -Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Pending bank reconciliation -Delays_MAIN_DELAY_MEMBERS=Delayed membership fee -Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Check deposit not done -Delays_MAIN_DELAY_EXPENSEREPORTS=Expense report to approve -Delays_MAIN_DELAY_HOLIDAYS=Leave requests to approve -SetupDescription1=Before starting to use Dolibarr some initial parameters must be defined and modules enabled/configured. -SetupDescription2=The following two sections are mandatory (the two first entries in the Setup menu): -SetupDescription3=%s -> %s

    Basic parameters used to customize the default behavior of your application (e.g for country-related features). -SetupDescription4=%s -> %s

    This software is a suite of many modules/applications. The modules related to your needs must be enabled and configured. Menu entries will appears with the activation of these modules. -SetupDescription5=Other Setup menu entries manage optional parameters. -SetupDescriptionLink=%s - %s -SetupDescription3b=Basic parameters used to customize the default behavior of your application (e.g for country-related features). -SetupDescription4b=This software is a suite of many modules/applications. The modules related to your needs must be enabled and configured. Menu entries will appears with the activation of these modules. -AuditedSecurityEvents=Security events that are audited -NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s -Audit=Security events -InfoDolibarr=About Dolibarr -InfoBrowser=About Browser -InfoOS=About OS -InfoWebServer=About Web Server -InfoDatabase=About Database -InfoPHP=About PHP -InfoPerf=About Performances -InfoSecurity=About Security -BrowserName=Browser name -BrowserOS=Browser OS -ListOfSecurityEvents=List of Dolibarr security events -SecurityEventsPurged=Security events purged -LogEventDesc=Enable logging for specific security events. Administrators the log via menu %s - %s. Warning, this feature can generate a large amount of data in the database. -AreaForAdminOnly=Setup parameters can be set by administrator users only. -SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only. -SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction. -CompanyFundationDesc=Edit the information of your company/organization. Click on "%s" button at the bottom of the page when done. -AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information. -AccountantFileNumber=Accountant code -DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here. -AvailableModules=Available app/modules -ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules). -SessionTimeOut=Time out for session -SessionExplanation=This number guarantees that the session will never expire before this delay, if the session cleaner is done by Internal PHP session cleaner (and nothing else). Internal PHP session cleaner does not guarantee that the session will expire after this delay. It will expire, after this delay, and when the session cleaner is run, so every %s/%s access, but only during access made by other sessions (if value is 0, it means clearing of session is done only by an external process).
    Note: on some servers with an external session cleaning mechanism (cron under debian, ubuntu ...), the sessions can be destroyed after a period defined by an external setup, no matter what the value entered here is. -SessionsPurgedByExternalSystem=Sessions on this server seems to be cleaned by an external mechanism (cron under debian, ubuntu ...), probably every %s seconds (= value of parameter session.gc_maxlifetime), so changing the value here has no effect. You must ask the server administrator to change session delay. -TriggersAvailable=Available triggers -TriggersDesc=Triggers are files that will modify the behavior of Dolibarr workflow once copied into the directory htdocs/core/triggers. They realize new actions, activated on Dolibarr events (new company creation, invoice validation, ...). -TriggerDisabledByName=Triggers in this file are disabled by the -NORUN suffix in their name. -TriggerDisabledAsModuleDisabled=Triggers in this file are disabled as module %s is disabled. -TriggerAlwaysActive=Triggers in this file are always active, whatever are the activated Dolibarr modules. -TriggerActiveAsModuleActive=Triggers in this file are active as module %s is enabled. -GeneratedPasswordDesc=Choose the method to be used for auto-generated passwords. -DictionaryDesc=Insert all reference data. You can add your values to the default. -ConstDesc=This page allows you to edit (override) parameters not available in other pages. These are mostly reserved parameters for developers/advanced troubleshooting only. -MiscellaneousDesc=All other security related parameters are defined here. -LimitsSetup=Limits/Precision setup -LimitsDesc=You can define limits, precisions and optimizations used by Dolibarr here -MAIN_MAX_DECIMALS_UNIT=Max. decimals for unit prices -MAIN_MAX_DECIMALS_TOT=Max. decimals for total prices -MAIN_MAX_DECIMALS_SHOWN=Max. decimals for prices shown on screen. Add an ellipsis ... after this parameter (e.g. "2...") if you want to see "..." suffixed to the truncated price. -MAIN_ROUNDING_RULE_TOT=Step of rounding range (for countries where rounding is done on something other than base 10. For example, put 0.05 if rounding is done by 0.05 steps) -UnitPriceOfProduct=Net unit price of a product -TotalPriceAfterRounding=Total price (excl/vat/incl tax) after rounding -ParameterActiveForNextInputOnly=Parameter effective for next input only -NoEventOrNoAuditSetup=No security event has been logged. This is normal if Audit has not been enabled in the "Setup - Security - Events" page. -NoEventFoundWithCriteria=No security event has been found for this search criteria. -SeeLocalSendMailSetup=See your local sendmail setup -BackupDesc=A complete backup of a Dolibarr installation requires two steps. -BackupDesc2=Backup the contents of the "documents" directory (%s) containing all uploaded and generated files. This will also include all the dump files generated in Step 1. This operation may last several minutes. -BackupDesc3=Backup the structure and contents of your database (%s) into a dump file. For this, you can use the following assistant. -BackupDescX=The archived directory should be stored in a secure place. -BackupDescY=The generated dump file should be stored in a secure place. -BackupPHPWarning=Backup cannot be guaranteed with this method. Previous one recommended. -RestoreDesc=To restore a Dolibarr backup, two steps are required. -RestoreDesc2=Restore the backup file (zip file for example) of the "documents" directory to a new Dolibarr installation or into this current documents directory (%s). -RestoreDesc3=Restore the database structure and data from a backup dump file into the database of the new Dolibarr installation or into the database of this current installation (%s). Warning, once the restore is complete, you must use a login/password, that existed from the backup time/installation to connect again.
    To restore a backup database into this current installation, you can follow this assistant. -RestoreMySQL=MySQL import -ForcedToByAModule=This rule is forced to %s by an activated module -ValueIsForcedBySystem=This value is forced by the system. You can't change it. -PreviousDumpFiles=Existing backup files -PreviousArchiveFiles=Existing archive files -WeekStartOnDay=First day of the week -RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be required (Program version %s differs from Database version %s) -YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user %s or you must add -W option at end of command line to provide %s password. -YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP -DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset -SimpleNumRefNoDateModelDesc=Returns the reference number in the format %s-nnnn where nnnn is a sequential auto-incrementing number with no reset -ShowProfIdInAddress=Show professional ID with addresses -ShowVATIntaInAddress=Hide intra-Community VAT number -TranslationUncomplete=Partial translation -MAIN_DISABLE_METEO=Disable meteorological view -MeteoStdMod=Standard mode -MeteoStdModEnabled=Standard mode enabled -MeteoPercentageMod=Percentage mode -MeteoPercentageModEnabled=Percentage mode enabled -MeteoUseMod=Click to use %s -TestLoginToAPI=Test login to API -ProxyDesc=Some features of Dolibarr require internet access. Define here the internet connection parameters such as access through a proxy server if necessary. -ExternalAccess=External/Internet Access -MAIN_PROXY_USE=Use a proxy server (otherwise access is direct to the internet) -MAIN_PROXY_HOST=Proxy server: Name/Address -MAIN_PROXY_PORT=Proxy server: Port -MAIN_PROXY_USER=Proxy server: Login/User -MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s -ExtraFields=Complementary attributes -ExtraFieldsLines=Complementary attributes (lines) -ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) -ExtraFieldsSupplierOrdersLines=Complementary attributes (order lines) -ExtraFieldsSupplierInvoicesLines=Complementary attributes (invoice lines) -ExtraFieldsThirdParties=Complementary attributes (third party) -ExtraFieldsContacts=Complementary attributes (contacts/address) -ExtraFieldsMember=Complementary attributes (member) -ExtraFieldsMemberType=Complementary attributes (member type) -ExtraFieldsCustomerInvoices=Complementary attributes (invoices) -ExtraFieldsCustomerInvoicesRec=Complementary attributes (templates invoices) -ExtraFieldsSupplierOrders=Complementary attributes (orders) -ExtraFieldsSupplierInvoices=Complementary attributes (invoices) -ExtraFieldsProject=Complementary attributes (projects) -ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldsSalaries=Complementary attributes (salaries) -ExtraFieldHasWrongValue=Attribute %s has a wrong value. -AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space -SendmailOptionNotComplete=Warning, on some Linux systems, to send email from your email, sendmail execution setup must contains option -ba (parameter mail.force_extra_parameters into your php.ini file). If some recipients never receive emails, try to edit this PHP parameter with mail.force_extra_parameters = -ba). -PathToDocuments=Path to documents -PathDirectory=Directory -SendmailOptionMayHurtBuggedMTA=Feature to send mails using method "PHP mail direct" will generate a mail message that might not be parsed correctly by some receiving mail servers. The result is that some mails can't be read by people hosted by those bugged platforms. This is the case for some Internet providers (Ex: Orange in France). This is not a problem with Dolibarr or PHP but with the receiving mail server. You can however add an option MAIN_FIX_FOR_BUGGED_MTA to 1 in Setup - Other to modify Dolibarr to avoid this. However, you may experience problems with other servers that strictly use the SMTP standard. The other solution (recommended) is to use the method "SMTP socket library" which has no disadvantages. -TranslationSetup=Setup of translation -TranslationKeySearch=Search a translation key or string -TranslationOverwriteKey=Overwrite a translation string -TranslationDesc=How to set the display language:
    * Default/Systemwide: menu Home -> Setup -> Display
    * Per user: Click on the username at the top of the screen and modify the User Display Setup tab on the user card. -TranslationOverwriteDesc=You can also override strings filling the following table. Choose your language from "%s" dropdown, insert the translation key string into "%s" and your new translation into "%s" -TranslationOverwriteDesc2=You can use the other tab to help you know which translation key to use -TranslationString=Translation string -CurrentTranslationString=Current translation string -WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least for key or translation string -NewTranslationStringToShow=New translation string to show -OriginalValueWas=The original translation is overwritten. Original value was:

    %s -TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TitleNumberOfActivatedModules=Activated modules -TotalNumberOfActivatedModules=Activated modules: %s / %s -YouMustEnableOneModule=You must at least enable 1 module -ClassNotFoundIntoPathWarning=Class %s not found in PHP path -YesInSummer=Yes in summer -OnlyFollowingModulesAreOpenedToExternalUsers=Note, only the following modules are available to external users (irrespective of the permissions of such users) and only if permissions are granted:
    -SuhosinSessionEncrypt=Session storage encrypted by Suhosin -ConditionIsCurrently=Condition is currently %s -YouUseBestDriver=You use driver %s which is the best driver currently available. -YouDoNotUseBestDriver=You use driver %s but driver %s is recommended. -NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization. -ComboListOptim=Combo list loading optimization -SearchOptim=Search optimization -YouHaveXObjectUseComboOptim=You have %s %s in the database. You can go into setup of module to enable loading of combo list on key pressed event. -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can add the constant %s to 1 in Home-Setup-Other. -YouHaveXObjectUseSearchOptimDesc=This limits the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. -YouHaveXObjectAndSearchOptimOn=You have %s %s in the database and constant %s is set to %s in Home-Setup-Other. -BrowserIsOK=You are using the %s web browser. This browser is ok for security and performance. -BrowserIsKO=You are using the %s web browser. This browser is known to be a bad choice for security, performance and reliability. We recommend using Firefox, Chrome, Opera or Safari. -PHPModuleLoaded=PHP component %s is loaded -PreloadOPCode=Preloaded OPCode is used -AddRefInList=Display Customer/Vendor ref. info list (select list or combobox) and most of hyperlink.
    Third Parties will appear with a name format of "CC12345 - SC45678 - The Big Company corp." instead of "The Big Company corp". -AddAdressInList=Display Customer/Vendor adress info list (select list or combobox)
    Third Parties will appear with a name format of "The Big Company corp. - 21 jump street 123456 Big town - USA" instead of "The Big Company corp". -AddEmailPhoneTownInContactList=Display Contact email (or phones if not defined) and town info list (select list or combobox)
    Contacts will appear with a name format of "Dupond Durand - dupond.durand@email.com - Paris" or "Dupond Durand - 06 07 59 65 66 - Paris" instead of "Dupond Durand". -AskForPreferredShippingMethod=Ask for preferred shipping method for Third Parties. -FieldEdition=Edition of field %s -FillThisOnlyIfRequired=Example: +2 (fill only if timezone offset problems are experienced) -GetBarCode=Get barcode -NumberingModules=Numbering models -DocumentModules=Document models -##### Module password generation -PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: %s characters containing shared numbers and characters in lowercase. -PasswordGenerationNone=Do not suggest a generated password. Password must be typed in manually. -PasswordGenerationPerso=Return a password according to your personally defined configuration. -SetupPerso=According to your configuration -PasswordPatternDesc=Password pattern description -##### Users setup ##### -RuleForGeneratedPasswords=Rules to generate and validate passwords -DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link on the Login page -UsersSetup=Users module setup -UserMailRequired=Email required to create a new user -UserHideInactive=Hide inactive users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on old users on some pages) -UsersDocModules=Document templates for documents generated from user record -GroupsDocModules=Document templates for documents generated from a group record -##### HRM setup ##### -HRMSetup=HRM module setup -##### Company setup ##### -CompanySetup=Companies module setup -CompanyCodeChecker=Options for automatic generation of customer/vendor codes -AccountCodeManager=Options for automatic generation of customer/vendor accounting codes -NotificationsDesc=Email notifications can be sent automatically for some Dolibarr events.
    Recipients of notifications can be defined: -NotificationsDescUser=* per user, one user at a time. -NotificationsDescContact=* per third-party contacts (customers or vendors), one contact at a time. -NotificationsDescGlobal=* or by setting global email addresses in this setup page. -ModelModules=Document Templates -DocumentModelOdt=Generate documents from OpenDocument templates (.ODT / .ODS files from LibreOffice, OpenOffice, KOffice, TextEdit,...) -WatermarkOnDraft=Watermark on draft document -JSOnPaimentBill=Activate feature to autofill payment lines on payment form -CompanyIdProfChecker=Rules for Professional IDs -MustBeUnique=Must be unique? -MustBeMandatory=Mandatory to create third parties (if VAT number or type of company defined) ? -MustBeInvoiceMandatory=Mandatory to validate invoices? -TechnicalServicesProvided=Technical services provided -#####DAV ##### -WebDAVSetupDesc=This is the link to access the WebDAV directory. It contains a "public" dir open to any user knowing the URL (if public directory access allowed) and a "private" directory that needs an existing login account/password for access. -WebDavServer=Root URL of %s server: %s -##### Webcal setup ##### -WebCalUrlForVCalExport=An export link to %s format is available at following link: %s -##### Invoices ##### -BillsSetup=Invoices module setup -BillsNumberingModule=Invoices and credit notes numbering model -BillsPDFModules=Invoice documents models -BillsPDFModulesAccordindToInvoiceType=Invoice documents models according to invoice type -PaymentsPDFModules=Payment documents models -ForceInvoiceDate=Force invoice date to validation date -SuggestedPaymentModesIfNotDefinedInInvoice=Suggested payments mode on invoice by default if not defined on the invoice -SuggestPaymentByRIBOnAccount=Suggest payment by withdrawal on account -SuggestPaymentByChequeToAddress=Suggest payment by check to -FreeLegalTextOnInvoices=Free text on invoices -WatermarkOnDraftInvoices=Watermark on draft invoices (none if empty) -PaymentsNumberingModule=Payments numbering model -SuppliersPayment=Vendor payments -SupplierPaymentSetup=Vendor payments setup -##### Proposals ##### -PropalSetup=Commercial proposals module setup -ProposalsNumberingModules=Commercial proposal numbering models -ProposalsPDFModules=Commercial proposal documents models -SuggestedPaymentModesIfNotDefinedInProposal=Suggested payments mode on proposal by default if not defined on the proposal -FreeLegalTextOnProposal=Free text on commercial proposals -WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) -BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL=Ask for bank account destination of proposal -##### SupplierProposal ##### -SupplierProposalSetup=Price requests suppliers module setup -SupplierProposalNumberingModules=Price requests suppliers numbering models -SupplierProposalPDFModules=Price requests suppliers documents models -FreeLegalTextOnSupplierProposal=Free text on price requests suppliers -WatermarkOnDraftSupplierProposal=Watermark on draft price requests suppliers (none if empty) -BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Ask for bank account destination of price request -WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Ask for Warehouse Source for order -##### Suppliers Orders ##### -BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Ask for bank account destination of purchase order -##### Orders ##### -SuggestedPaymentModesIfNotDefinedInOrder=Suggested payments mode on sale order by default if not defined on the order -OrdersSetup=Sales Orders management setup -OrdersNumberingModules=Orders numbering models -OrdersModelModule=Order documents models -FreeLegalTextOnOrders=Free text on orders -WatermarkOnDraftOrders=Watermark on draft orders (none if empty) -ShippableOrderIconInList=Add an icon in Orders list which indicate if order is shippable -BANK_ASK_PAYMENT_BANK_DURING_ORDER=Ask for bank account destination of order -##### Interventions ##### -InterventionsSetup=Interventions module setup -FreeLegalTextOnInterventions=Free text on intervention documents -FicheinterNumberingModules=Intervention numbering models -TemplatePDFInterventions=Intervention card documents models -WatermarkOnDraftInterventionCards=Watermark on intervention card documents (none if empty) -##### Contracts ##### -ContractsSetup=Contracts/Subscriptions module setup -ContractsNumberingModules=Contracts numbering modules -TemplatePDFContracts=Contracts documents models -FreeLegalTextOnContracts=Free text on contracts -WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty) -##### Members ##### -MembersSetup=Members module setup -MemberMainOptions=Main options -AdherentLoginRequired= Manage a Login for each member -AdherentMailRequired=Email required to create a new member -MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default -MemberCreateAnExternalUserForSubscriptionValidated=Create an external user login for each new member subscription validated -VisitorCanChooseItsPaymentMode=Visitor can choose from available payment modes -MEMBER_REMINDER_EMAIL=Enable automatic reminder by email of expired subscriptions. Note: Module %s must be enabled and correctly setup to send reminders. -MembersDocModules=Document templates for documents generated from member record -##### LDAP setup ##### -LDAPSetup=LDAP Setup -LDAPGlobalParameters=Global parameters -LDAPUsersSynchro=Users -LDAPGroupsSynchro=Groups -LDAPContactsSynchro=Contacts -LDAPMembersSynchro=Members -LDAPMembersTypesSynchro=Members types -LDAPSynchronization=LDAP synchronisation -LDAPFunctionsNotAvailableOnPHP=LDAP functions are not available on your PHP -LDAPToDolibarr=LDAP -> Dolibarr -DolibarrToLDAP=Dolibarr -> LDAP -LDAPNamingAttribute=Key in LDAP -LDAPSynchronizeUsers=Organization of users in LDAP -LDAPSynchronizeGroups=Organization of groups in LDAP -LDAPSynchronizeContacts=Organization of contacts in LDAP -LDAPSynchronizeMembers=Organization of foundation's members in LDAP -LDAPSynchronizeMembersTypes=Organization of foundation's members types in LDAP -LDAPPrimaryServer=Primary server -LDAPSecondaryServer=Secondary server -LDAPServerPort=Server port -LDAPServerPortExample=Default port: 389 -LDAPServerProtocolVersion=Protocol version -LDAPServerUseTLS=Use TLS LDAPServerUseTLSExample=Your LDAP server use TLS -LDAPServerDn=Server DN -LDAPAdminDn=Administrator DN -LDAPAdminDnExample=Complete DN (ex: cn=admin,dc=example,dc=com or cn=Administrator,cn=Users,dc=example,dc=com for active directory) -LDAPPassword=Administrator password -LDAPUserDn=Users' DN -LDAPUserDnExample=Complete DN (ex: ou=users,dc=example,dc=com) -LDAPGroupDn=Groups' DN -LDAPGroupDnExample=Complete DN (ex: ou=groups,dc=example,dc=com) -LDAPServerExample=Server address (ex: localhost, 192.168.0.2, ldaps://ldap.example.com/) -LDAPServerDnExample=Complete DN (ex: dc=example,dc=com) -LDAPDnSynchroActive=Users and groups synchronization -LDAPDnSynchroActiveExample=LDAP to Dolibarr or Dolibarr to LDAP synchronization -LDAPDnContactActive=Contacts' synchronization -LDAPDnContactActiveExample=Activated/Unactivated synchronization -LDAPDnMemberActive=Members' synchronization -LDAPDnMemberActiveExample=Activated/Unactivated synchronization -LDAPDnMemberTypeActive=Members types' synchronization -LDAPDnMemberTypeActiveExample=Activated/Unactivated synchronization -LDAPContactDn=Dolibarr contacts' DN -LDAPContactDnExample=Complete DN (ex: ou=contacts,dc=example,dc=com) -LDAPMemberDn=Dolibarr members DN -LDAPMemberDnExample=Complete DN (ex: ou=members,dc=example,dc=com) -LDAPMemberObjectClassList=List of objectClass -LDAPMemberObjectClassListExample=List of objectClass defining record attributes (ex: top,inetOrgPerson or top,user for active directory) -LDAPMemberTypeDn=Dolibarr members types DN -LDAPMemberTypepDnExample=Complete DN (ex: ou=memberstypes,dc=example,dc=com) -LDAPMemberTypeObjectClassList=List of objectClass -LDAPMemberTypeObjectClassListExample=List of objectClass defining record attributes (ex: top,groupOfUniqueNames) -LDAPUserObjectClassList=List of objectClass -LDAPUserObjectClassListExample=List of objectClass defining record attributes (ex: top,inetOrgPerson or top,user for active directory) -LDAPGroupObjectClassList=List of objectClass -LDAPGroupObjectClassListExample=List of objectClass defining record attributes (ex: top,groupOfUniqueNames) -LDAPContactObjectClassList=List of objectClass -LDAPContactObjectClassListExample=List of objectClass defining record attributes (ex: top,inetOrgPerson or top,user for active directory) -LDAPTestConnect=Test LDAP connection -LDAPTestSynchroContact=Test contacts synchronization -LDAPTestSynchroUser=Test user synchronization -LDAPTestSynchroGroup=Test group synchronization -LDAPTestSynchroMember=Test member synchronization -LDAPTestSynchroMemberType=Test member type synchronization -LDAPTestSearch= Test a LDAP search -LDAPSynchroOK=Synchronization test successful -LDAPSynchroKO=Failed synchronization test -LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that the connection to the server is correctly configured and allows LDAP updates -LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) -LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authenticate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPBindKO=Connect/Authenticate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPSetupForVersion3=LDAP server configured for version 3 -LDAPSetupForVersion2=LDAP server configured for version 2 -LDAPDolibarrMapping=Dolibarr Mapping -LDAPLdapMapping=LDAP Mapping -LDAPFieldLoginUnix=Login (unix) -LDAPFieldLoginExample=Example: uid -LDAPFilterConnection=Search filter -LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) -LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) -LDAPFieldLoginSamba=Login (samba, activedirectory) -LDAPFieldLoginSambaExample=Example: samaccountname -LDAPFieldFullname=Full name -LDAPFieldFullnameExample=Example: cn -LDAPFieldPasswordNotCrypted=Password not encrypted -LDAPFieldPasswordCrypted=Password encrypted -LDAPFieldPasswordExample=Example: userPassword -LDAPFieldCommonNameExample=Example: cn -LDAPFieldName=Name -LDAPFieldNameExample=Example: sn -LDAPFieldFirstName=First name -LDAPFieldFirstNameExample=Example: givenName -LDAPFieldMail=Email address -LDAPFieldMailExample=Example: mail -LDAPFieldPhone=Professional phone number -LDAPFieldPhoneExample=Example: telephonenumber -LDAPFieldHomePhone=Personal phone number -LDAPFieldHomePhoneExample=Example: homephone -LDAPFieldMobile=Cellular phone -LDAPFieldMobileExample=Example: mobile -LDAPFieldFax=Fax number -LDAPFieldFaxExample=Example: facsimiletelephonenumber -LDAPFieldAddress=Street -LDAPFieldAddressExample=Example: street -LDAPFieldZip=Zip -LDAPFieldZipExample=Example: postalcode -LDAPFieldTown=Town -LDAPFieldTownExample=Example: l -LDAPFieldCountry=Country -LDAPFieldDescription=Description -LDAPFieldDescriptionExample=Example: description -LDAPFieldNotePublic=Public Note -LDAPFieldNotePublicExample=Example: publicnote -LDAPFieldGroupMembers= Group members -LDAPFieldGroupMembersExample= Example: uniqueMember -LDAPFieldBirthdate=Birthdate -LDAPFieldCompany=Company -LDAPFieldCompanyExample=Example: o -LDAPFieldSid=SID -LDAPFieldSidExample=Example: objectsid -LDAPFieldEndLastSubscription=Date of subscription end -LDAPFieldTitle=Job position -LDAPFieldTitleExample=Example: title -LDAPFieldGroupid=Group id -LDAPFieldGroupidExample=Exemple : gidnumber -LDAPFieldUserid=User id -LDAPFieldUseridExample=Exemple : uidnumber -LDAPFieldHomedirectory=Home directory -LDAPFieldHomedirectoryExample=Exemple : homedirectory -LDAPFieldHomedirectoryprefix=Home directory prefix -LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) -LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. -LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. -LDAPDescUsers=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr users. -LDAPDescGroups=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr groups. -LDAPDescMembers=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr members module. -LDAPDescMembersTypes=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr members types. -LDAPDescValues=Example values are designed for OpenLDAP with following loaded schemas: core.schema, cosine.schema, inetorgperson.schema). If you use thoose values and OpenLDAP, modify your LDAP config file slapd.conf to have all thoose schemas loaded. -ForANonAnonymousAccess=For an authenticated access (for a write access for example) -PerfDolibarr=Performance setup/optimizing report -YouMayFindPerfAdviceHere=This page provides some checks or advice related to performance. -NotInstalled=Not installed. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. -ApplicativeCache=Applicative cache -MemcachedNotAvailable=No applicative cache found. You can enhance performance by installing a cache server Memcached and a module able to use this cache server.
    More information here http://wiki.dolibarr.org/index.php/Module_MemCached_EN.
    Note that a lot of web hosting provider does not provide such cache server. -MemcachedModuleAvailableButNotSetup=Module memcached for applicative cache found but setup of module is not complete. -MemcachedAvailableAndSetup=Module memcached dedicated to use memcached server is enabled. -OPCodeCache=OPCode cache -NoOPCodeCacheFound=No OPCode cache found. Maybe you are using an OPCode cache other than XCache or eAccelerator (good), or maybe you don't have OPCode cache (very bad). -HTTPCacheStaticResources=HTTP cache for static resources (css, img, javascript) -FilesOfTypeCached=Files of type %s are cached by HTTP server -FilesOfTypeNotCached=Files of type %s are not cached by HTTP server -FilesOfTypeCompressed=Files of type %s are compressed by HTTP server -FilesOfTypeNotCompressed=Files of type %s are not compressed by HTTP server -CacheByServer=Cache by server -CacheByServerDesc=For example using the Apache directive "ExpiresByType image/gif A2592000" -CacheByClient=Cache by browser -CompressionOfResources=Compression of HTTP responses -CompressionOfResourcesDesc=For example using the Apache directive "AddOutputFilterByType DEFLATE" -TestNotPossibleWithCurrentBrowsers=Such an automatic detection is not possible with current browsers -DefaultValuesDesc=Here you may define the default value you wish to use when creating a new record, and/or default filters or the sort order when you list records. -DefaultCreateForm=Default values (to use on forms) -DefaultSearchFilters=Default search filters -DefaultSortOrder=Default sort orders -DefaultFocus=Default focus fields -DefaultMandatory=Mandatory form fields -##### Products ##### -ProductSetup=Products module setup -ServiceSetup=Services module setup -ProductServiceSetup=Products and Services modules setup -NumberOfProductShowInSelect=Maximum number of products to show in combo select lists (0=no limit) -ViewProductDescInFormAbility=Display product descriptions in forms (otherwise shown in a tooltip popup) -DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms -OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document -AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product -DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically. -DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents -MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) -UseSearchToSelectProductTooltip=Also if you have a large number of products (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectProduct=Wait until you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient) -SetDefaultBarcodeTypeProducts=Default barcode type to use for products -SetDefaultBarcodeTypeThirdParties=Default barcode type to use for third parties -UseUnits=Define a unit of measure for Quantity during order, proposal or invoice lines edition -ProductCodeChecker= Module for product code generation and checking (product or service) -ProductOtherConf= Product / Service configuration -IsNotADir=is not a directory! -##### Syslog ##### -SyslogSetup=Logs module setup -SyslogOutput=Logs outputs -SyslogFacility=Facility -SyslogLevel=Level -SyslogFilename=File name and path -YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file. -ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant -OnlyWindowsLOG_USER=On Windows, only the LOG_USER facility will be supported -CompressSyslogs=Compression and backup of debug log files (generated by module Log for debug) -SyslogFileNumberOfSaves=Number of backup logs to keep -ConfigureCleaningCronjobToSetFrequencyOfSaves=Configure cleaning scheduled job to set log backup frequency -##### Donations ##### -DonationsSetup=Donation module setup -DonationsReceiptModel=Template of donation receipt -##### Barcode ##### -BarcodeSetup=Barcode setup -PaperFormatModule=Print format module -BarcodeEncodeModule=Barcode encoding type -CodeBarGenerator=Barcode generator -ChooseABarCode=No generator defined -FormatNotSupportedByGenerator=Format not supported by this generator -BarcodeDescEAN8=Barcode of type EAN8 -BarcodeDescEAN13=Barcode of type EAN13 -BarcodeDescUPC=Barcode of type UPC -BarcodeDescISBN=Barcode of type ISBN -BarcodeDescC39=Barcode of type C39 -BarcodeDescC128=Barcode of type C128 -BarcodeDescDATAMATRIX=Barcode of type Datamatrix -BarcodeDescQRCODE=Barcode of type QR code -GenbarcodeLocation=Bar code generation command line tool (used by internal engine for some bar code types). Must be compatible with "genbarcode".
    For example: /usr/local/bin/genbarcode -BarcodeInternalEngine=Internal engine -BarCodeNumberManager=Manager to auto define barcode numbers -##### Prelevements ##### -WithdrawalsSetup=Setup of module Direct Debit payments -##### ExternalRSS ##### -ExternalRSSSetup=External RSS imports setup -NewRSS=New RSS Feed -RSSUrl=RSS URL -RSSUrlExample=An interesting RSS feed -##### Mailing ##### -MailingSetup=EMailing module setup -MailingEMailFrom=Sender email (From) for emails sent by emailing module -MailingEMailError=Return Email (Errors-to) for emails with errors -MailingDelay=Seconds to wait after sending next message -##### Notification ##### -NotificationSetup=Email Notification module setup -NotificationEMailFrom=Sender email (From) for emails sent by the Notifications module -FixedEmailTarget=Recipient -##### Sendings ##### -SendingsSetup=Shipping module setup -SendingsReceiptModel=Sending receipt model -SendingsNumberingModules=Sendings numbering modules -SendingsAbility=Support shipping sheets for customer deliveries -NoNeedForDeliveryReceipts=In most cases, shipping sheets are used both as sheets for customer deliveries (list of products to send) and sheets that are received and signed by customer. Hence the product deliveries receipt is a duplicated feature and is rarely activated. -FreeLegalTextOnShippings=Free text on shipments -##### Deliveries ##### -DeliveryOrderNumberingModules=Products deliveries receipt numbering module -DeliveryOrderModel=Products deliveries receipt model -DeliveriesOrderAbility=Support products deliveries receipts -FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts -##### FCKeditor ##### -AdvancedEditor=Advanced editor -ActivateFCKeditor=Activate advanced editor for: FCKeditorForCompany=WYSIWIG creation/edition of elements description and note (except products/services) FCKeditorForProduct=WYSIWIG creation/edition of products/services description and note -FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files. -FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing) -FCKeditorForUserSignature=WYSIWIG creation/edition of user signature -FCKeditorForMail=WYSIWIG creation/edition for all mail (except Tools->eMailing) -FCKeditorForTicket=WYSIWIG creation/edition for tickets -##### Stock ##### -StockSetup=Stock module setup -IfYouUsePointOfSaleCheckModule=If you use the Point of Sale module (POS) provided by default or an external module, this setup may be ignored by your POS module. Most POS modules are designed by default to create an invoice immediately and decrease stock irrespective of the options here. So if you need or not to have a stock decrease when registering a sale from your POS, check also your POS module setup. -##### Menu ##### -MenuDeleted=Menu deleted -Menu=Menu -Menus=Menus -TreeMenuPersonalized=Personalized menus -NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry -NewMenu=New menu -MenuHandler=Menu handler -MenuModule=Source module -HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) -DetailId=Id menu -DetailMenuHandler=Menu handler where to show new menu -DetailMenuModule=Module name if menu entry come from a module -DetailType=Type of menu (top or left) -DetailTitre=Menu label or label code for translation -DetailUrl=URL where menu send you (Absolute URL link or external link with http://) -DetailEnabled=Condition to show or not entry -DetailRight=Condition to display unauthorized grey menus -DetailLangs=Lang file name for label code translation -DetailUser=Intern / Extern / All -Target=Target -DetailTarget=Target for links (_blank top opens a new window) -DetailLevel=Level (-1:top menu, 0:header menu, >0 menu and sub menu) -ModifMenu=Menu change -DeleteMenu=Delete menu entry -ConfirmDeleteMenu=Are you sure you want to delete menu entry %s? -FailedToInitializeMenu=Failed to initialize menu -##### Tax ##### -TaxSetup=Taxes, social or fiscal taxes and dividends module setup -OptionVatMode=VAT due -OptionVATDefault=Standard basis -OptionVATDebitOption=Accrual basis -OptionVatDefaultDesc=VAT is due:
    - on delivery of goods (based on invoice date)
    - on payments for services -OptionVatDebitOptionDesc=VAT is due:
    - on delivery of goods (based on invoice date)
    - on invoice (debit) for services -OptionPaymentForProductAndServices=Cash basis for products and services -OptionPaymentForProductAndServicesDesc=VAT is due:
    - on payment for goods
    - on payments for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT eligibility by default according to chosen option: -OnDelivery=On delivery -OnPayment=On payment -OnInvoice=On invoice -SupposedToBePaymentDate=Payment date used -SupposedToBeInvoiceDate=Invoice date used -Buy=Buy -Sell=Sell -InvoiceDateUsed=Invoice date used -YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Setup - Company/Organization), so there is no VAT options to setup. -AccountancyCode=Accounting Code -AccountancyCodeSell=Sale account. code -AccountancyCodeBuy=Purchase account. code -CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax -##### Agenda ##### -AgendaSetup=Events and agenda module setup -PasswordTogetVCalExport=Key to authorize export link -SecurityKey = Security Key -PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) -AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form -AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view -AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda -AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup). -AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification -AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). -AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the scheduled job %s must be enough to be sure that the remind are sent at the correct moment. -AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view -##### Clicktodial ##### -ClickToDialSetup=Click To Dial module setup -ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. -ClickToDialUseTelLink=Use just a link "tel:" on phone numbers -ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface, installed on the same computer as the browser, and called when you click on a link starting with "tel:" in your browser. If you need a link that start with "sip:" or a full server solution (no need of local software installation), you must set this to "No" and fill the next field. -##### Point Of Sale (CashDesk) ##### -CashDesk=Point of Sale -CashDeskSetup=Point of Sales module setup -CashDeskThirdPartyForSell=Default generic third party to use for sales -CashDeskBankAccountForSell=Default account to use to receive cash payments -CashDeskBankAccountForCheque=Default account to use to receive payments by check -CashDeskBankAccountForCB=Default account to use to receive payments by credit cards -CashDeskBankAccountForSumup=Default bank account to use to receive payments by SumUp -CashDeskDoNotDecreaseStock=Disable stock decrease when a sale is done from Point of Sale (if "no", stock decrease is done for each sale done from POS, irrespective of the option set in module Stock). -CashDeskIdWareHouse=Force and restrict warehouse to use for stock decrease -StockDecreaseForPointOfSaleDisabled=Stock decrease from Point of Sale disabled -StockDecreaseForPointOfSaleDisabledbyBatch=Stock decrease in POS is not compatible with module Serial/Lot management (currently active) so stock decrease is disabled. -CashDeskYouDidNotDisableStockDecease=You did not disable stock decrease when making a sale from Point of Sale. Hence a warehouse is required. -CashDeskForceDecreaseStockLabel=Stock decrease for batch products was forced. -CashDeskForceDecreaseStockDesc=Decrease first by the oldest eatby and sellby dates. -CashDeskReaderKeyCodeForEnter=Key code for "Enter" defined in barcode reader (Example: 13) -##### Bookmark ##### -BookmarkSetup=Bookmark module setup -BookmarkDesc=This module allows you to manage bookmarks. You can also add shortcuts to any Dolibarr pages or external web sites on your left menu. -NbOfBoomarkToShow=Maximum number of bookmarks to show in left menu -##### WebServices ##### -WebServicesSetup=Webservices module setup -WebServicesDesc=By enabling this module, Dolibarr become a web service server to provide miscellaneous web services. -WSDLCanBeDownloadedHere=WSDL descriptor files of provided services can be download here -EndPointIs=SOAP clients must send their requests to the Dolibarr endpoint available at URL -##### API #### -ApiSetup=API module setup -ApiDesc=By enabling this module, Dolibarr become a REST server to provide miscellaneous web services. -ApiProductionMode=Enable production mode (this will activate use of a cache for services management) -ApiExporerIs=You can explore and test the APIs at URL -OnlyActiveElementsAreExposed=Only elements from enabled modules are exposed -ApiKey=Key for API -WarningAPIExplorerDisabled=The API explorer has been disabled. API explorer is not required to provide API services. It is a tool for developer to find/test REST APIs. If you need this tool, go into setup of module API REST to activate it. -##### Bank ##### -BankSetupModule=Bank module setup -FreeLegalTextOnChequeReceipts=Free text on check receipts -BankOrderShow=Display order of bank accounts for countries using "detailed bank number" -BankOrderGlobal=General -BankOrderGlobalDesc=General display order -BankOrderES=Spanish -BankOrderESDesc=Spanish display order -ChequeReceiptsNumberingModule=Check Receipts Numbering Module -##### Multicompany ##### -MultiCompanySetup=Multi-company module setup -##### Suppliers ##### -SuppliersSetup=Vendor module setup -SuppliersCommandModel=Complete template of Purchase Order -SuppliersCommandModelMuscadet=Complete template of Purchase Order (old implementation of cornas template) -SuppliersInvoiceModel=Complete template of Vendor Invoice -SuppliersInvoiceNumberingModel=Vendor invoices numbering models -IfSetToYesDontForgetPermission=If set to a non null value, don't forget to provide permissions to groups or users allowed for the second approval -##### GeoIPMaxmind ##### -GeoIPMaxmindSetup=GeoIP Maxmind module setup -PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation.
    Examples:
    /usr/local/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoLite2-Country.mmdb -NoteOnPathLocation=Note that your ip to country data file must be inside a directory your PHP can read (Check your PHP open_basedir setup and filesystem permissions). -YouCanDownloadFreeDatFileTo=You can download a free demo version of the Maxmind GeoIP country file at %s. -YouCanDownloadAdvancedDatFileTo=You can also download a more complete version, with updates, of the Maxmind GeoIP country file at %s. -TestGeoIPResult=Test of a conversion IP -> country -##### Projects ##### -ProjectsNumberingModules=Projects numbering module -ProjectsSetup=Project module setup -ProjectsModelModule=Project reports document model -TasksNumberingModules=Tasks numbering module -TaskModelModule=Tasks reports document model -UseSearchToSelectProject=Wait until a key is pressed before loading content of Project combo list.
    This may improve performance if you have a large number of projects, but it is less convenient. -##### ECM (GED) ##### -##### Fiscal Year ##### -AccountingPeriods=Accounting periods -AccountingPeriodCard=Accounting period -NewFiscalYear=New accounting period -OpenFiscalYear=Open accounting period -CloseFiscalYear=Close accounting period -DeleteFiscalYear=Delete accounting period -ConfirmDeleteFiscalYear=Are you sure to delete this accounting period? -ShowFiscalYear=Show accounting period -AlwaysEditable=Can always be edited -MAIN_APPLICATION_TITLE=Force visible name of application (warning: setting your own name here may break autofill login feature when using DoliDroid mobile application) -NbMajMin=Minimum number of uppercase characters -NbNumMin=Minimum number of numeric characters -NbSpeMin=Minimum number of special characters -NbIteConsecutive=Maximum number of repeating same characters -NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0","O") for automatic generation -SalariesSetup=Setup of module salaries -SortOrder=Sort order -Format=Format -TypePaymentDesc=0:Customer payment type, 1:Vendor payment type, 2:Both customers and suppliers payment type -IncludePath=Include path (defined into variable %s) -ExpenseReportsSetup=Setup of module Expense Reports -TemplatePDFExpenseReports=Document templates to generate expense report document -ExpenseReportsRulesSetup=Setup of module Expense Reports - Rules -ExpenseReportNumberingModules=Expense reports numbering module -NoModueToManageStockIncrease=No module able to manage automatic stock increase has been activated. Stock increase will be done on manual input only. -YouMayFindNotificationsFeaturesIntoModuleNotification=You may find options for email notifications by enabling and configuring the module "Notification". -ListOfNotificationsPerUser=List of automatic notifications per user* -ListOfNotificationsPerUserOrContact=List of possible automatic notifications (on business event) available per user* or per contact** -ListOfFixedNotifications=List of automatic fixed notifications -GoOntoUserCardToAddMore=Go to the tab "Notifications" of a user to add or remove notifications for users -GoOntoContactCardToAddMore=Go to the tab "Notifications" of a third party to add or remove notifications for contacts/addresses -Threshold=Threshold -BackupDumpWizard=Wizard to build the database dump file -BackupZipWizard=Wizard to build the archive of documents directory -SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason: -SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is a manual process only a privileged user may perform. -InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file %s to allow this feature. -ConfFileMustContainCustom=Installing or building an external module from application need to save the module files into directory %s. To have this directory processed by Dolibarr, you must setup your conf/conf.php to add the 2 directive lines:
    $dolibarr_main_url_root_alt='/custom';
    $dolibarr_main_document_root_alt='%s/custom'; -HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over -HighlightLinesColor=Highlight color of the line when the mouse passes over (use 'ffffff' for no highlight) -HighlightLinesChecked=Highlight color of the line when it is checked (use 'ffffff' for no highlight) -TextTitleColor=Text color of Page title -LinkColor=Color of links -PressF5AfterChangingThis=Press CTRL+F5 on keyboard or clear your browser cache after changing this value to have it effective -NotSupportedByAllThemes=Will works with core themes, may not be supported by external themes -BackgroundColor=Background color -TopMenuBackgroundColor=Background color for Top menu -TopMenuDisableImages=Hide images in Top menu -LeftMenuBackgroundColor=Background color for Left menu -BackgroundTableTitleColor=Background color for Table title line -BackgroundTableTitleTextColor=Text color for Table title line -BackgroundTableTitleTextlinkColor=Text color for Table title link line -BackgroundTableLineOddColor=Background color for odd table lines -BackgroundTableLineEvenColor=Background color for even table lines -MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) -NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. -Enter0or1=Enter 0 or 1 -UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] -ColorFormat=The RGB color is in HEX format, eg: FF0000 -PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) -PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate -RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. -UrlTrackingDesc=If the provider or transport service offers a page or web site to check the status of your shipments, you may enter it here. You can use the key {TRACKID} in the URL parameters so the system will replace it with the tracking number the user entered into the shipment card. -OpportunityPercent=When you create a lead, you will define an estimated amount of project/lead. According to status of the lead, this amount may be multiplied by this rate to evaluate a total amount all your leads may generate. Value is a percentage (between 0 and 100). TemplateForElement=This template record is dedicated to which element -TypeOfTemplate=Type of template -TemplateIsVisibleByOwnerOnly=Template is visible to owner only -VisibleEverywhere=Visible everywhere -VisibleNowhere=Visible nowhere -FixTZ=TimeZone fix -FillFixTZOnlyIfRequired=Example: +2 (fill only if problem experienced) -ExpectedChecksum=Expected Checksum -CurrentChecksum=Current Checksum -ExpectedSize=Expected size -CurrentSize=Current size -ForcedConstants=Required constant values -MailToSendProposal=Customer proposals -MailToSendOrder=Sales orders -MailToSendInvoice=Customer invoices -MailToSendShipment=Shipments -MailToSendIntervention=Interventions -MailToSendSupplierRequestForQuotation=Quotation request -MailToSendSupplierOrder=Purchase orders -MailToSendSupplierInvoice=Vendor invoices -MailToSendContract=Contracts -MailToSendReception=Receptions -MailToThirdparty=Third parties -MailToMember=Members -MailToUser=Users -MailToProject=Projects -MailToTicket=Tickets -ByDefaultInList=Show by default on list view -YouUseLastStableVersion=You use the latest stable version -TitleExampleForMajorRelease=Example of message you can use to announce this major release (feel free to use it on your web sites) -TitleExampleForMaintenanceRelease=Example of message you can use to announce this maintenance release (feel free to use it on your web sites) -ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read ChangeLog for complete list of changes. -ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. -MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. -ModelModulesProduct=Templates for product documents -WarehouseModelModules=Templates for documents of warehouses -ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. -SeeSubstitutionVars=See * note for list of possible substitution variables -SeeChangeLog=See ChangeLog file (english only) -AllPublishers=All publishers -UnknownPublishers=Unknown publishers -AddRemoveTabs=Add or remove tabs -AddDataTables=Add object tables -AddDictionaries=Add dictionaries tables -AddData=Add objects or dictionaries data -AddBoxes=Add widgets -AddSheduledJobs=Add scheduled jobs -AddHooks=Add hooks -AddTriggers=Add triggers -AddMenus=Add menus -AddPermissions=Add permissions -AddExportProfiles=Add export profiles -AddImportProfiles=Add import profiles -AddOtherPagesOrServices=Add other pages or services -AddModels=Add document or numbering templates -AddSubstitutions=Add keys substitutions -DetectionNotPossible=Detection not possible -UrlToGetKeyToUseAPIs=Url to get token to use API (once token has been received it is saved in database user table and must be provided on each API call) -ListOfAvailableAPIs=List of available APIs -activateModuleDependNotSatisfied=Module "%s" depends on module "%s", that is missing, so module "%1$s" may not work correctly. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise -CommandIsNotInsideAllowedCommands=The command you are trying to run is not in the list of allowed commands defined in parameter $dolibarr_main_restrict_os_commands in the conf.php file. -LandingPage=Landing page -SamePriceAlsoForSharedCompanies=If you use a multicompany module, with the choice "Single price", the price will also be the same for all companies if products are shared between environments -ModuleEnabledAdminMustCheckRights=Module has been activated. Permissions for activated module(s) were given to admin users only. You may need to grant permissions to other users or groups manually if necessary. -UserHasNoPermissions=This user has no permissions defined -TypeCdr=Use "None" if the date of payment term is date of invoice plus a delta in days (delta is field "%s")
    Use "At end of month", if, after delta, the date must be increased to reach the end of month (+ an optional "%s" in days)
    Use "Current/Next" to have payment term date being the first Nth of the month after delta (delta is field "%s", N is stored into field "%s") -BaseCurrency=Reference currency of the company (go into setup of company to change this) -WarningNoteModuleInvoiceForFrenchLaw=This module %s is compliant with French laws (Loi Finance 2016). -WarningNoteModulePOSForFrenchLaw=This module %s is compliant with French laws (Loi Finance 2016) because module Non Reversible Logs is automatically activated. -WarningInstallationMayBecomeNotCompliantWithLaw=You are trying to install module %s that is an external module. Activating an external module means you trust the publisher of that module and that you are sure that this module does not adversely impact the behavior of your application, and is compliant with laws of your country (%s). If the module introduces an illegal feature, you become responsible for the use of illegal software. -MAIN_PDF_MARGIN_LEFT=Left margin on PDF -MAIN_PDF_MARGIN_RIGHT=Right margin on PDF -MAIN_PDF_MARGIN_TOP=Top margin on PDF -MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF -MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF -MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal line -PROPOSAL_PDF_HIDE_PAYMENTTERM=Hide payments conditions -PROPOSAL_PDF_HIDE_PAYMENTMODE=Hide payment mode -MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF -NothingToSetup=There is no specific setup required for this module. -SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups -EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.
    For example:
    CODEGRP1+CODEGRP2 -SeveralLangugeVariatFound=Several language variants found -RemoveSpecialChars=Remove special characters -COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) -COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter to clean value (COMPANY_DIGITARIA_CLEAN_REGEX) -COMPANY_DIGITARIA_UNIQUE_CODE=Duplicate not allowed -GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact) -GDPRContactDesc=If you store data about European companies/citizens, you can name the contact who is responsible for the General Data Protection Regulation here -HelpOnTooltip=Help text to show on tooltip -HelpOnTooltipDesc=Put text or a translation key here for the text to show in a tooltip when this field appears in a form -YouCanDeleteFileOnServerWith=You can delete this file on the server with Command Line:
    %s -ChartLoaded=Chart of account loaded -SocialNetworkSetup=Setup of module Social Networks -EnableFeatureFor=Enable features for %s -VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to Off in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. -SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. -EmailCollector=Email collector -EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). -NewEmailCollector=New Email Collector -EMailHost=Host of email IMAP server -MailboxSourceDirectory=Mailbox source directory -MailboxTargetDirectory=Mailbox target directory -EmailcollectorOperations=Operations to do by collector -EmailcollectorOperationsDesc=Operations are executed from top to bottom order -MaxEmailCollectPerCollect=Max number of emails collected per collect -CollectNow=Collect now -ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ? -DateLastCollectResult=Date of latest collect try -DateLastcollectResultOk=Date of latest collect success -LastResult=Latest result -EmailCollectorConfirmCollectTitle=Email collect confirmation -EmailCollectorConfirmCollect=Do you want to run the collection for this collector now ? -NoNewEmailToProcess=No new email (matching filters) to process -NothingProcessed=Nothing done -XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) -RecordEvent=Record email event -CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) -CodeLastResult=Latest result code -NbOfEmailsInInbox=Number of emails in source directory -LoadThirdPartyFromName=Load third party searching on %s (load only) -LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr -WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr -WithDolTrackingIDInMsgId=Message sent from Dolibarr -WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create job application -FormatZip=Zip -MainMenuCode=Menu entry code (mainmenu) -ECMAutoTree=Show automatic ECM tree -OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. -OpeningHours=Opening hours -OpeningHoursDesc=Enter here the regular opening hours of your company. -ResourceSetup=Configuration of Resource module -UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list). -DisabledResourceLinkUser=Disable feature to link a resource to users -DisabledResourceLinkContact=Disable feature to link a resource to contacts -EnableResourceUsedInEventCheck=Enable feature to check if a resource is in use in an event -ConfirmUnactivation=Confirm module reset -OnMobileOnly=On small screen (smartphone) only -DisableProspectCustomerType=Disable the "Prospect + Customer" third party type (so third party must be "Prospect" or "Customer", but can't be both) -MAIN_OPTIMIZEFORTEXTBROWSER=Simplify interface for blind person -MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or Links. -MAIN_OPTIMIZEFORCOLORBLIND=Change interface's color for color blind person -MAIN_OPTIMIZEFORCOLORBLINDDesc=Enable this option if you are a color blind person, in some case interface will change color setup to increase contrast. -Protanopia=Protanopia -Deuteranopes=Deuteranopes -Tritanopes=Tritanopes -ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s' -DefaultCustomerType=Default thirdparty type for "New customer" creation form -ABankAccountMustBeDefinedOnPaymentModeSetup=Note: The bank account must be defined on the module of each payment mode (Paypal, Stripe, ...) to have this feature working. -RootCategoryForProductsToSell=Root category of products to sell -RootCategoryForProductsToSellDesc=If defined, only products inside this category or childs of this category will be available in the Point Of Sale -DebugBar=Debug Bar -DebugBarDesc=Toolbar that comes with a plenty of tools to simplify debugging -DebugBarSetup=DebugBar Setup -GeneralOptions=General Options -LogsLinesNumber=Number of lines to show on logs tab -UseDebugBar=Use the debug bar -DEBUGBAR_LOGS_LINES_NUMBER=Number of last log lines to keep in console -WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramaticaly output -ModuleActivated=Module %s is activated and slows the interface -ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances and security) -ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) -IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. -AntivirusEnabledOnUpload=Antivirus enabled on uploaded files -SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode -EXPORTS_SHARE_MODELS=Export models are share with everybody -ExportSetup=Setup of module Export -ImportSetup=Setup of module Import -InstanceUniqueID=Unique ID of the instance -SmallerThan=Smaller than -LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into email, or if the email is an answer of an email aready collected and linked to an object, the created event will be automatically linked to the known related object. -WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. -EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. -EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it.
    For example, if you want to create a thirdparty with a name extracted a string 'Name: name to find' found into the body, use sender email as email, you can set the parameter field like this:
    'email=HEADER:^From:(.*);name=EXTRACT:BODY:Name:\\s([^\\s]*);client=SET:2;'
    -EndPointFor=End point for %s : %s -DeleteEmailCollector=Delete email collector -ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector? -RecipientEmailsWillBeReplacedWithThisValue=Recipient emails will be always replaced with this value -AtLeastOneDefaultBankAccountMandatory=At least 1 default bank account must be defined -RESTRICT_ON_IP=Allow access to some host IP only (wildcard not allowed, use space between values). Empty means every hosts can access. -IPListExample=127.0.0.1 192.168.0.2 [::1] -BaseOnSabeDavVersion=Based on the library SabreDAV version -NotAPublicIp=Not a public IP -MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation. -FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled -EmailTemplate=Template for email -EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax -PDF_SHOW_PROJECT=Show project on document -ShowProjectLabel=Project Label -PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF. -FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book. -RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard -JumpToBoxes=Jump to Setup -> Widgets -MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" -MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. -TemplateAdded=Template added -TemplateUpdated=Template updated -TemplateDeleted=Template deleted -MailToSendEventPush=Event reminder email -SwitchThisForABetterSecurity=Switching this value to %s is recommended for more security -DictionaryProductNature= Nature of product -CountryIfSpecificToOneCountry=Country (if specific to a given country) -YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. -ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. -CombinationsSeparator=Separator character for product combinations -SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples -SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module %s is used, show details of subproducts of a kit on PDF. -AskThisIDToYourBank=Contact your bank to get this ID -AdvancedModeOnly=Permision available in Advanced permission mode only -ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. -MailToSendEventOrganization=Event Organization -MailToPartnership=Partnership -AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form -YouShouldDisablePHPFunctions=You should disable PHP functions -IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands in custom code, you shoud disable PHP functions -PHPFunctionsRequiredForCLI=For shell purpose (like scheduled job backup or running an anitivurs program), you must keep PHP functions -NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) -RecommendedValueIs=Recommended: %s -Recommended=Recommended -NotRecommended=Not recommended -ARestrictedPath=A restricted path -CheckForModuleUpdate=Check for external modules updates -CheckForModuleUpdateHelp=This action will connect to editors of external modules to check if a new version is available. -ModuleUpdateAvailable=An update is available -NoExternalModuleWithUpdate=No updates found for external modules -SwaggerDescriptionFile=Swagger API description file (for use with redoc for example) -YouEnableDeprecatedWSAPIsUseRESTAPIsInstead=You enabled deprecated WS API. You should use REST API instead. -RandomlySelectedIfSeveral=Randomly selected if several pictures are available -DatabasePasswordObfuscated=Database password is obfuscated in conf file -DatabasePasswordNotObfuscated=Database password is NOT obfuscated in conf file -APIsAreNotEnabled=APIs modules are not enabled -YouShouldSetThisToOff=You should set this to 0 or off -InstallAndUpgradeLockedBy=Install and upgrades are locked by the file %s -OldImplementation=Old implementation diff --git a/htdocs/langs/ar_IQ/agenda.lang b/htdocs/langs/ar_IQ/agenda.lang deleted file mode 100644 index a1183841b00..00000000000 --- a/htdocs/langs/ar_IQ/agenda.lang +++ /dev/null @@ -1,172 +0,0 @@ -# Dolibarr language file - Source file is en_US - agenda -IdAgenda=ID event -Actions=Events -Agenda=Agenda -TMenuAgenda=Agenda -Agendas=Agendas -LocalAgenda=Default calendar -ActionsOwnedBy=Event owned by -ActionsOwnedByShort=Owner -AffectedTo=Assigned to -Event=Event -Events=Events -EventsNb=Number of events -ListOfActions=List of events -EventReports=Event reports -Location=Location -ToUserOfGroup=Event assigned to any user in the group -EventOnFullDay=Event on all day(s) -MenuToDoActions=All incomplete events -MenuDoneActions=All terminated events -MenuToDoMyActions=My incomplete events -MenuDoneMyActions=My terminated events -ListOfEvents=List of events (default calendar) -ActionsAskedBy=Events reported by -ActionsToDoBy=Events assigned to -ActionsDoneBy=Events done by -ActionAssignedTo=Event assigned to -ViewCal=Month view -ViewDay=Day view -ViewWeek=Week view -ViewPerUser=Per user view -ViewPerType=Per type view -AutoActions= Automatic filling -AgendaAutoActionDesc= Here you may define events which you want Dolibarr to create automatically in Agenda. If nothing is checked, only manual actions will be included in logs and displayed in Agenda. Automatic tracking of business actions done on objects (validation, status change) will not be saved. -AgendaSetupOtherDesc= This page provides options to allow the export of your Dolibarr events into an external calendar (Thunderbird, Google Calendar etc...) -AgendaExtSitesDesc=This page allows to declare external sources of calendars to see their events into Dolibarr agenda. -ActionsEvents=Events for which Dolibarr will create an action in agenda automatically -EventRemindersByEmailNotEnabled=Event reminders by email was not enabled into %s module setup. -##### Agenda event labels ##### -NewCompanyToDolibarr=Third party %s created -COMPANY_MODIFYInDolibarr=Third party %s modified -COMPANY_DELETEInDolibarr=Third party %s deleted -ContractValidatedInDolibarr=Contract %s validated -CONTRACT_DELETEInDolibarr=Contract %s deleted -PropalClosedSignedInDolibarr=Proposal %s signed -PropalClosedRefusedInDolibarr=Proposal %s refused -PropalValidatedInDolibarr=Proposal %s validated -PropalClassifiedBilledInDolibarr=Proposal %s classified billed -InvoiceValidatedInDolibarr=Invoice %s validated -InvoiceValidatedInDolibarrFromPos=Invoice %s validated from POS -InvoiceBackToDraftInDolibarr=Invoice %s go back to draft status -InvoiceDeleteDolibarr=Invoice %s deleted -InvoicePaidInDolibarr=Invoice %s changed to paid -InvoiceCanceledInDolibarr=Invoice %s canceled -MemberValidatedInDolibarr=Member %s validated -MemberModifiedInDolibarr=Member %s modified -MemberResiliatedInDolibarr=Member %s terminated -MemberDeletedInDolibarr=Member %s deleted -MemberSubscriptionAddedInDolibarr=Subscription %s for member %s added -MemberSubscriptionModifiedInDolibarr=Subscription %s for member %s modified -MemberSubscriptionDeletedInDolibarr=Subscription %s for member %s deleted -ShipmentValidatedInDolibarr=Shipment %s validated -ShipmentClassifyClosedInDolibarr=Shipment %s classified billed -ShipmentUnClassifyCloseddInDolibarr=Shipment %s classified re-open -ShipmentBackToDraftInDolibarr=Shipment %s go back to draft status -ShipmentDeletedInDolibarr=Shipment %s deleted -ReceptionValidatedInDolibarr=Reception %s validated -OrderCreatedInDolibarr=Order %s created -OrderValidatedInDolibarr=Order %s validated -OrderDeliveredInDolibarr=Order %s classified delivered -OrderCanceledInDolibarr=Order %s canceled -OrderBilledInDolibarr=Order %s classified billed -OrderApprovedInDolibarr=Order %s approved -OrderRefusedInDolibarr=Order %s refused -OrderBackToDraftInDolibarr=Order %s go back to draft status -ProposalSentByEMail=Commercial proposal %s sent by email -ContractSentByEMail=Contract %s sent by email -OrderSentByEMail=Sales order %s sent by email -InvoiceSentByEMail=Customer invoice %s sent by email -SupplierOrderSentByEMail=Purchase order %s sent by email -ORDER_SUPPLIER_DELETEInDolibarr=Purchase order %s deleted -SupplierInvoiceSentByEMail=Vendor invoice %s sent by email -ShippingSentByEMail=Shipment %s sent by email -ShippingValidated= Shipment %s validated -InterventionSentByEMail=Intervention %s sent by email -ProposalDeleted=Proposal deleted -OrderDeleted=Order deleted -InvoiceDeleted=Invoice deleted -DraftInvoiceDeleted=Draft invoice deleted -CONTACT_CREATEInDolibarr=Contact %s created -CONTACT_MODIFYInDolibarr=Contact %s modified -CONTACT_DELETEInDolibarr=Contact %s deleted -PRODUCT_CREATEInDolibarr=Product %s created -PRODUCT_MODIFYInDolibarr=Product %s modified -PRODUCT_DELETEInDolibarr=Product %s deleted -HOLIDAY_CREATEInDolibarr=Request for leave %s created -HOLIDAY_MODIFYInDolibarr=Request for leave %s modified -HOLIDAY_APPROVEInDolibarr=Request for leave %s approved -HOLIDAY_VALIDATEInDolibarr=Request for leave %s validated -HOLIDAY_DELETEInDolibarr=Request for leave %s deleted -EXPENSE_REPORT_CREATEInDolibarr=Expense report %s created -EXPENSE_REPORT_VALIDATEInDolibarr=Expense report %s validated -EXPENSE_REPORT_APPROVEInDolibarr=Expense report %s approved -EXPENSE_REPORT_DELETEInDolibarr=Expense report %s deleted -EXPENSE_REPORT_REFUSEDInDolibarr=Expense report %s refused -PROJECT_CREATEInDolibarr=Project %s created -PROJECT_MODIFYInDolibarr=Project %s modified -PROJECT_DELETEInDolibarr=Project %s deleted -TICKET_CREATEInDolibarr=Ticket %s created -TICKET_MODIFYInDolibarr=Ticket %s modified -TICKET_ASSIGNEDInDolibarr=Ticket %s assigned -TICKET_CLOSEInDolibarr=Ticket %s closed -TICKET_DELETEInDolibarr=Ticket %s deleted -BOM_VALIDATEInDolibarr=BOM validated -BOM_UNVALIDATEInDolibarr=BOM unvalidated -BOM_CLOSEInDolibarr=BOM disabled -BOM_REOPENInDolibarr=BOM reopen -BOM_DELETEInDolibarr=BOM deleted -MRP_MO_VALIDATEInDolibarr=MO validated -MRP_MO_UNVALIDATEInDolibarr=MO set to draft status -MRP_MO_PRODUCEDInDolibarr=MO produced -MRP_MO_DELETEInDolibarr=MO deleted -MRP_MO_CANCELInDolibarr=MO canceled -PAIDInDolibarr=%s paid -##### End agenda events ##### -AgendaModelModule=Document templates for event -DateActionStart=Start date -DateActionEnd=End date -AgendaUrlOptions1=You can also add following parameters to filter output: -AgendaUrlOptions3=logina=%s to restrict output to actions owned by a user %s. -AgendaUrlOptionsNotAdmin=logina=!%s to restrict output to actions not owned by user %s. -AgendaUrlOptions4=logint=%s to restrict output to actions assigned to user %s (owner and others). -AgendaUrlOptionsProject=project=__PROJECT_ID__ to restrict output to actions linked to project __PROJECT_ID__. -AgendaUrlOptionsNotAutoEvent=notactiontype=systemauto to exclude automatic events. -AgendaUrlOptionsIncludeHolidays=includeholidays=1 to include events of holidays. -AgendaShowBirthdayEvents=Birthdays of contacts -AgendaHideBirthdayEvents=Hide birthdays of contacts -Busy=Busy -ExportDataset_event1=List of agenda events -DefaultWorkingDays=Default working days range in week (Example: 1-5, 1-6) -DefaultWorkingHours=Default working hours in day (Example: 9-18) -# External Sites ical -ExportCal=Export calendar -ExtSites=Import external calendars -ExtSitesEnableThisTool=Show external calendars (defined in global setup) in Agenda. Does not affect external calendars defined by users. -ExtSitesNbOfAgenda=Number of calendars -AgendaExtNb=Calendar no. %s -ExtSiteUrlAgenda=URL to access .ical file -ExtSiteNoLabel=No Description -VisibleTimeRange=Visible time range -VisibleDaysRange=Visible days range -AddEvent=Create event -MyAvailability=My availability -ActionType=Event type -DateActionBegin=Start event date -ConfirmCloneEvent=Are you sure you want to clone the event %s? -RepeatEvent=Repeat event -OnceOnly=Once only -EveryWeek=Every week -EveryMonth=Every month -DayOfMonth=Day of month -DayOfWeek=Day of week -DateStartPlusOne=Date start + 1 hour -SetAllEventsToTodo=Set all events to todo -SetAllEventsToInProgress=Set all events to in progress -SetAllEventsToFinished=Set all events to finished -ReminderTime=Reminder period before the event -TimeType=Duration type -ReminderType=Callback type -AddReminder=Create an automatic reminder notification for this event -ErrorReminderActionCommCreation=Error creating the reminder notification for this event -BrowserPush=Browser Popup Notification diff --git a/htdocs/langs/ar_IQ/assets.lang b/htdocs/langs/ar_IQ/assets.lang deleted file mode 100644 index afafc98503f..00000000000 --- a/htdocs/langs/ar_IQ/assets.lang +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (C) 2018 Alexandre Spangaro -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# -# Generic -# -Assets = Assets -NewAsset = New asset -AccountancyCodeAsset = Accounting code (asset) -AccountancyCodeDepreciationAsset = Accounting code (depreciation asset account) -AccountancyCodeDepreciationExpense = Accounting code (depreciation expense account) -NewAssetType=New asset type -AssetsTypeSetup=Asset type setup -AssetTypeModified=Asset type modified -AssetType=Asset type -AssetsLines=Assets -DeleteType=Delete -DeleteAnAssetType=Delete an asset type -ConfirmDeleteAssetType=Are you sure you want to delete this asset type? -ShowTypeCard=Show type '%s' - -# Module label 'ModuleAssetsName' -ModuleAssetsName = Assets -# Module description 'ModuleAssetsDesc' -ModuleAssetsDesc = Assets description - -# -# Admin page -# -AssetsSetup = Assets setup -Settings = Settings -AssetsSetupPage = Assets setup page -ExtraFieldsAssetsType = Complementary attributes (Asset type) -AssetsType=Asset type -AssetsTypeId=Asset type id -AssetsTypeLabel=Asset type label -AssetsTypes=Assets types - -# -# Menu -# -MenuAssets = Assets -MenuNewAsset = New asset -MenuTypeAssets = Type assets -MenuListAssets = List -MenuNewTypeAssets = New -MenuListTypeAssets = List - -# -# Module -# -Asset=Asset -NewAssetType=New asset type -NewAsset=New asset -ConfirmDeleteAsset=Are you sure you want to delete this asset ? diff --git a/htdocs/langs/ar_IQ/banks.lang b/htdocs/langs/ar_IQ/banks.lang deleted file mode 100644 index a0b7942d446..00000000000 --- a/htdocs/langs/ar_IQ/banks.lang +++ /dev/null @@ -1,184 +0,0 @@ -# Dolibarr language file - Source file is en_US - banks -Bank=Bank -MenuBankCash=Banks | Cash -MenuVariousPayment=Miscellaneous payments -MenuNewVariousPayment=New Miscellaneous payment -BankName=Bank name -FinancialAccount=Account -BankAccount=Bank account -BankAccounts=Bank accounts -BankAccountsAndGateways=Bank accounts | Gateways -ShowAccount=Show Account -AccountRef=Financial account ref -AccountLabel=Financial account label -CashAccount=Cash account -CashAccounts=Cash accounts -CurrentAccounts=Current accounts -SavingAccounts=Savings accounts -ErrorBankLabelAlreadyExists=Financial account label already exists -BankBalance=Balance -BankBalanceBefore=Balance before -BankBalanceAfter=Balance after -BalanceMinimalAllowed=Minimum allowed balance -BalanceMinimalDesired=Minimum desired balance -InitialBankBalance=Initial balance -EndBankBalance=End balance -CurrentBalance=Current balance -FutureBalance=Future balance -ShowAllTimeBalance=Show balance from start -AllTime=From start -Reconciliation=Reconciliation -RIB=Bank Account Number -IBAN=IBAN number -BIC=BIC/SWIFT code -SwiftValid=BIC/SWIFT valid -SwiftVNotalid=BIC/SWIFT not valid -IbanValid=BAN valid -IbanNotValid=BAN not valid -StandingOrders=Direct debit orders -StandingOrder=Direct debit order -PaymentByDirectDebit=Payment by direct debit -PaymentByBankTransfers=Payments by credit transfer -PaymentByBankTransfer=Payment by credit transfer -AccountStatement=Account statement -AccountStatementShort=Statement -AccountStatements=Account statements -LastAccountStatements=Last account statements -IOMonthlyReporting=Monthly reporting -BankAccountDomiciliation=Bank address -BankAccountCountry=Account country -BankAccountOwner=Account owner name -BankAccountOwnerAddress=Account owner address -RIBControlError=Integrity check of values failed. This means the information for this account number is not complete or is incorrect (check country, numbers and IBAN). -CreateAccount=Create account -NewBankAccount=New account -NewFinancialAccount=New financial account -MenuNewFinancialAccount=New financial account -EditFinancialAccount=Edit account -LabelBankCashAccount=Bank or cash label -AccountType=Account type -BankType0=Savings account -BankType1=Current or credit card account -BankType2=Cash account -AccountsArea=Accounts area -AccountCard=Account card -DeleteAccount=Delete account -ConfirmDeleteAccount=Are you sure you want to delete this account? -Account=Account -BankTransactionByCategories=Bank entries by categories -BankTransactionForCategory=Bank entries for category %s -RemoveFromRubrique=Remove link with category -RemoveFromRubriqueConfirm=Are you sure you want to remove link between the entry and the category? -ListBankTransactions=List of bank entries -IdTransaction=Transaction ID -BankTransactions=Bank entries -BankTransaction=Bank entry -ListTransactions=List entries -ListTransactionsByCategory=List entries/category -TransactionsToConciliate=Entries to reconcile -TransactionsToConciliateShort=To reconcile -Conciliable=Can be reconciled -Conciliate=Reconcile -Conciliation=Reconciliation -SaveStatementOnly=Save statement only -ReconciliationLate=Reconciliation late -IncludeClosedAccount=Include closed accounts -OnlyOpenedAccount=Only open accounts -AccountToCredit=Account to credit -AccountToDebit=Account to debit -DisableConciliation=Disable reconciliation feature for this account -ConciliationDisabled=Reconciliation feature disabled -LinkedToAConciliatedTransaction=Linked to a conciliated entry -StatusAccountOpened=Open -StatusAccountClosed=Closed -AccountIdShort=Number -LineRecord=Transaction -AddBankRecord=Add entry -AddBankRecordLong=Add entry manually -Conciliated=Reconciled -ConciliatedBy=Reconciled by -DateConciliating=Reconcile date -BankLineConciliated=Entry reconciled with bank receipt -Reconciled=Reconciled -NotReconciled=Not reconciled -CustomerInvoicePayment=Customer payment -SupplierInvoicePayment=Vendor payment -SubscriptionPayment=Subscription payment -WithdrawalPayment=Debit payment order -SocialContributionPayment=Social/fiscal tax payment -BankTransfer=Credit transfer -BankTransfers=Credit transfers -MenuBankInternalTransfer=Internal transfer -TransferDesc=Use internal transfer to transfer from one account to another, the application will write two records: a debit in the source account and a credit in the target account. The same amount, label and date will be used for this transaction. -TransferFrom=From -TransferTo=To -TransferFromToDone=A transfer from %s to %s of %s %s has been recorded. -CheckTransmitter=Sender -ValidateCheckReceipt=Validate this check receipt? -ConfirmValidateCheckReceipt=Are you sure that you want to submit this check receipt for validation? No changes will be possible once validated. -DeleteCheckReceipt=Delete this check receipt? -ConfirmDeleteCheckReceipt=Are you sure you want to delete this check receipt? -BankChecks=Bank checks -BankChecksToReceipt=Checks awaiting deposit -BankChecksToReceiptShort=Checks awaiting deposit -ShowCheckReceipt=Show check deposit receipt -NumberOfCheques=No. of check -DeleteTransaction=Delete entry -ConfirmDeleteTransaction=Are you sure you want to delete this entry? -ThisWillAlsoDeleteBankRecord=This will also delete generated bank entry -BankMovements=Movements -PlannedTransactions=Planned entries -Graph=Graphs -ExportDataset_banque_1=Bank entries and account statement -ExportDataset_banque_2=Deposit slip -TransactionOnTheOtherAccount=Transaction on the other account -PaymentNumberUpdateSucceeded=Payment number updated successfully -PaymentNumberUpdateFailed=Payment number could not be updated -PaymentDateUpdateSucceeded=Payment date updated successfully -PaymentDateUpdateFailed=Payment date could not be updated -Transactions=Transactions -BankTransactionLine=Bank entry -AllAccounts=All bank and cash accounts -BackToAccount=Back to account -ShowAllAccounts=Show for all accounts -FutureTransaction=Future transaction. Unable to reconcile. -SelectChequeTransactionAndGenerate=Select/filter the checks which are to be included in the check deposit receipt. Then, click on "Create". -InputReceiptNumber=Choose the bank statement related with the conciliation. Use a sortable numeric value: YYYYMM or YYYYMMDD -EventualyAddCategory=Eventually, specify a category in which to classify the records -ToConciliate=To reconcile? -ThenCheckLinesAndConciliate=Then, check the lines present in the bank statement and click -DefaultRIB=Default BAN -AllRIB=All BAN -LabelRIB=BAN Label -NoBANRecord=No BAN record -DeleteARib=Delete BAN record -ConfirmDeleteRib=Are you sure you want to delete this BAN record? -RejectCheck=Check returned -ConfirmRejectCheck=Are you sure you want to mark this check as rejected? -RejectCheckDate=Date the check was returned -CheckRejected=Check returned -CheckRejectedAndInvoicesReopened=Check returned and invoices re-open -BankAccountModelModule=Document templates for bank accounts -DocumentModelSepaMandate=Template of SEPA mandate. Useful for European countries in EEC only. -DocumentModelBan=Template to print a page with BAN information. -NewVariousPayment=New miscellaneous payment -VariousPayment=Miscellaneous payment -VariousPayments=Miscellaneous payments -ShowVariousPayment=Show miscellaneous payment -AddVariousPayment=Add miscellaneous payment -VariousPaymentId=Miscellaneous payment ID -VariousPaymentLabel=Miscellaneous payment label -ConfirmCloneVariousPayment=Confirm the clone of a miscellaneous payment -SEPAMandate=SEPA mandate -YourSEPAMandate=Your SEPA mandate -FindYourSEPAMandate=This is your SEPA mandate to authorize our company to make direct debit order to your bank. Return it signed (scan of the signed document) or send it by mail to -AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation -CashControl=POS cash desk control -NewCashFence=New cash desk opening or closing -BankColorizeMovement=Colorize movements -BankColorizeMovementDesc=If this function is enable, you can choose specific background color for debit or credit movements -BankColorizeMovementName1=Background color for debit movement -BankColorizeMovementName2=Background color for credit movement -IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. -NoBankAccountDefined=No bank account defined -NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/ar_IQ/bills.lang b/htdocs/langs/ar_IQ/bills.lang index 7b8c997d2e6..a1d32f56bd5 100644 --- a/htdocs/langs/ar_IQ/bills.lang +++ b/htdocs/langs/ar_IQ/bills.lang @@ -1,593 +1,2 @@ # Dolibarr language file - Source file is en_US - bills -Bill=Invoice -Bills=Invoices -BillsCustomers=Customer invoices -BillsCustomer=Customer invoice -BillsSuppliers=Vendor invoices -BillsCustomersUnpaid=Unpaid customer invoices -BillsCustomersUnpaidForCompany=Unpaid customer invoices for %s -BillsSuppliersUnpaid=Unpaid vendor invoices -BillsSuppliersUnpaidForCompany=Unpaid vendors invoices for %s -BillsLate=Late payments -BillsStatistics=Customers invoices statistics -BillsStatisticsSuppliers=Vendors invoices statistics -DisabledBecauseDispatchedInBookkeeping=Disabled because invoice was dispatched into bookkeeping -DisabledBecauseNotLastInvoice=Disabled because invoice is not erasable. Some invoices were recorded after this one and it will create holes in the counter. -DisabledBecauseNotErasable=Disabled because cannot be erased -InvoiceStandard=Standard invoice -InvoiceStandardAsk=Standard invoice -InvoiceStandardDesc=This kind of invoice is the common invoice. -InvoiceDeposit=Down payment invoice -InvoiceDepositAsk=Down payment invoice -InvoiceDepositDesc=This kind of invoice is done when a down payment has been received. -InvoiceProForma=Proforma invoice -InvoiceProFormaAsk=Proforma invoice -InvoiceProFormaDesc=Proforma invoice is an image of a true invoice but has no accountancy value. -InvoiceReplacement=Replacement invoice -InvoiceReplacementAsk=Replacement invoice for invoice -InvoiceReplacementDesc=Replacement invoice is used to completely replace an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. -InvoiceAvoir=Credit note -InvoiceAvoirAsk=Credit note to correct invoice -InvoiceAvoirDesc=The credit note is a negative invoice used to correct the fact that an invoice shows an amount that differs from the amount actually paid (eg the customer paid too much by mistake, or will not pay the complete amount since some products were returned). -invoiceAvoirWithLines=Create Credit Note with lines from the origin invoice -invoiceAvoirWithPaymentRestAmount=Create Credit Note with remaining unpaid of origin invoice -invoiceAvoirLineWithPaymentRestAmount=Credit Note for remaining unpaid amount -ReplaceInvoice=Replace invoice %s -ReplacementInvoice=Replacement invoice -ReplacedByInvoice=Replaced by invoice %s -ReplacementByInvoice=Replaced by invoice -CorrectInvoice=Correct invoice %s -CorrectionInvoice=Correction invoice -UsedByInvoice=Used to pay invoice %s -ConsumedBy=Consumed by -NotConsumed=Not consumed -NoReplacableInvoice=No replaceable invoices -NoInvoiceToCorrect=No invoice to correct -InvoiceHasAvoir=Was source of one or several credit notes -CardBill=Invoice card -PredefinedInvoices=Predefined Invoices -Invoice=Invoice -PdfInvoiceTitle=Invoice -Invoices=Invoices -InvoiceLine=Invoice line -InvoiceCustomer=Customer invoice -CustomerInvoice=Customer invoice -CustomersInvoices=Customer invoices -SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendor invoices -SupplierInvoiceLines=Vendor invoice lines -SupplierBill=Vendor invoice -SupplierBills=Vendor invoices -Payment=Payment -PaymentBack=Refund -CustomerInvoicePaymentBack=Refund -Payments=Payments -PaymentsBack=Refunds -paymentInInvoiceCurrency=in invoices currency -PaidBack=Paid back -DeletePayment=Delete payment -ConfirmDeletePayment=Are you sure you want to delete this payment? -ConfirmConvertToReduc=Do you want to convert this %s into an available credit? -ConfirmConvertToReduc2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this customer. -ConfirmConvertToReducSupplier=Do you want to convert this %s into an available credit? -ConfirmConvertToReducSupplier2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this vendor. -SupplierPayments=Vendor payments -ReceivedPayments=Received payments -ReceivedCustomersPayments=Payments received from customers -PayedSuppliersPayments=Payments paid to vendors -ReceivedCustomersPaymentsToValid=Received customers payments to validate -PaymentsReportsForYear=Payments reports for %s -PaymentsReports=Payments reports -PaymentsAlreadyDone=Payments already done -PaymentsBackAlreadyDone=Refunds already done -PaymentRule=Payment rule -PaymentMode=Payment Type -DefaultPaymentMode=Default Payment Type -DefaultBankAccount=Default Bank Account -PaymentTypeDC=Debit/Credit Card -PaymentTypePP=PayPal -IdPaymentMode=Payment Type (id) -CodePaymentMode=Payment Type (code) -LabelPaymentMode=Payment Type (label) -PaymentModeShort=Payment Type -PaymentTerm=Payment Term -PaymentConditions=Payment Terms -PaymentConditionsShort=Payment Terms -PaymentAmount=Payment amount -PaymentHigherThanReminderToPay=Payment higher than reminder to pay -HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay.
    Edit your entry, otherwise confirm and consider creating a credit note for the excess received for each overpaid invoice. -HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay.
    Edit your entry, otherwise confirm and consider creating a credit note for the excess paid for each overpaid invoice. -ClassifyPaid=Classify 'Paid' -ClassifyUnPaid=Classify 'Unpaid' -ClassifyPaidPartially=Classify 'Paid partially' -ClassifyCanceled=Classify 'Abandoned' -ClassifyClosed=Classify 'Closed' -ClassifyUnBilled=Classify 'Unbilled' -CreateBill=Create Invoice -CreateCreditNote=Create credit note -AddBill=Create invoice or credit note -AddToDraftInvoices=Add to draft invoice -DeleteBill=Delete invoice -SearchACustomerInvoice=Search for a customer invoice -SearchASupplierInvoice=Search for a vendor invoice -CancelBill=Cancel an invoice -SendRemindByMail=Send reminder by email -DoPayment=Enter payment -DoPaymentBack=Enter refund -ConvertToReduc=Mark as credit available -ConvertExcessReceivedToReduc=Convert excess received into available credit -ConvertExcessPaidToReduc=Convert excess paid into available discount -EnterPaymentReceivedFromCustomer=Enter payment received from customer -EnterPaymentDueToCustomer=Make payment due to customer -DisabledBecauseRemainderToPayIsZero=Disabled because remaining unpaid is zero -PriceBase=Base price -BillStatus=Invoice status -StatusOfGeneratedInvoices=Status of generated invoices -BillStatusDraft=Draft (needs to be validated) -BillStatusPaid=Paid -BillStatusPaidBackOrConverted=Credit note refund or marked as credit available -BillStatusConverted=Paid (ready for consumption in final invoice) -BillStatusCanceled=Abandoned -BillStatusValidated=Validated (needs to be paid) -BillStatusStarted=Started -BillStatusNotPaid=Not paid -BillStatusNotRefunded=Not refunded -BillStatusClosedUnpaid=Closed (unpaid) -BillStatusClosedPaidPartially=Paid (partially) -BillShortStatusDraft=Draft -BillShortStatusPaid=Paid -BillShortStatusPaidBackOrConverted=Refunded or converted -Refunded=Refunded -BillShortStatusConverted=Paid -BillShortStatusCanceled=Abandoned -BillShortStatusValidated=Validated -BillShortStatusStarted=Started -BillShortStatusNotPaid=Not paid -BillShortStatusNotRefunded=Not refunded -BillShortStatusClosedUnpaid=Closed -BillShortStatusClosedPaidPartially=Paid (partially) -PaymentStatusToValidShort=To validate -ErrorVATIntraNotConfigured=Intra-Community VAT number not yet defined -ErrorNoPaiementModeConfigured=No default payment type defined. Go to Invoice module setup to fix this. -ErrorCreateBankAccount=Create a bank account, then go to Setup panel of Invoice module to define payment types -ErrorBillNotFound=Invoice %s does not exist -ErrorInvoiceAlreadyReplaced=Error, you tried to validate an invoice to replace invoice %s. But this one has already been replaced by invoice %s. -ErrorDiscountAlreadyUsed=Error, discount already used -ErrorInvoiceAvoirMustBeNegative=Error, correct invoice must have a negative amount -ErrorInvoiceOfThisTypeMustBePositive=Error, this type of invoice must have an amount excluding tax positive (or null) -ErrorCantCancelIfReplacementInvoiceNotValidated=Error, can't cancel an invoice that has been replaced by another invoice that is still in draft status -ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount series cannot be removed. -BillFrom=From -BillTo=To -ActionsOnBill=Actions on invoice -RecurringInvoiceTemplate=Template / Recurring invoice -NoQualifiedRecurringInvoiceTemplateFound=No recurring template invoice qualified for generation. -FoundXQualifiedRecurringInvoiceTemplate=Found %s recurring template invoice(s) qualified for generation. -NotARecurringInvoiceTemplate=Not a recurring template invoice -NewBill=New invoice -LastBills=Latest %s invoices -LatestTemplateInvoices=Latest %s template invoices -LatestCustomerTemplateInvoices=Latest %s customer template invoices -LatestSupplierTemplateInvoices=Latest %s vendor template invoices -LastCustomersBills=Latest %s customer invoices -LastSuppliersBills=Latest %s vendor invoices -AllBills=All invoices -AllCustomerTemplateInvoices=All template invoices -OtherBills=Other invoices -DraftBills=Draft invoices -CustomersDraftInvoices=Customer draft invoices -SuppliersDraftInvoices=Vendor draft invoices -Unpaid=Unpaid -ErrorNoPaymentDefined=Error No payment defined -ConfirmDeleteBill=Are you sure you want to delete this invoice? -ConfirmValidateBill=Are you sure you want to validate this invoice with reference %s? -ConfirmUnvalidateBill=Are you sure you want to change invoice %s to draft status? -ConfirmClassifyPaidBill=Are you sure you want to change invoice %s to status paid? -ConfirmCancelBill=Are you sure you want to cancel invoice %s? -ConfirmCancelBillQuestion=Why do you want to classify this invoice 'abandoned'? -ConfirmClassifyPaidPartially=Are you sure you want to change invoice %s to status paid? -ConfirmClassifyPaidPartiallyQuestion=This invoice has not been paid completely. What is the reason for closing this invoice? -ConfirmClassifyPaidPartiallyReasonAvoir=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I regularize the VAT with a credit note. -ConfirmClassifyPaidPartiallyReasonDiscount=Remaining unpaid (%s %s) is a discount granted because payment was made before term. -ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I accept to lose the VAT on this discount. -ConfirmClassifyPaidPartiallyReasonDiscountVat=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I recover the VAT on this discount without a credit note. -ConfirmClassifyPaidPartiallyReasonBadCustomer=Bad customer -ConfirmClassifyPaidPartiallyReasonProductReturned=Products partially returned -ConfirmClassifyPaidPartiallyReasonOther=Amount abandoned for other reason -ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=This choice is possible if your invoice has been provided with suitable comments. (Example «Only the tax corresponding to the price that has been actually paid gives rights to deduction») -ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=In some countries, this choice might be possible only if your invoice contains correct notes. -ConfirmClassifyPaidPartiallyReasonAvoirDesc=Use this choice if all other does not suit -ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=A bad customer is a customer that refuses to pay his debt. -ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=This choice is used when payment is not complete because some of products were returned -ConfirmClassifyPaidPartiallyReasonOtherDesc=Use this choice if all others are not suitable, for example in following situation:
    - payment not complete because some products were shipped back
    - amount claimed too important because a discount was forgotten
    In all cases, amount over-claimed must be corrected in accountancy system by creating a credit note. -ConfirmClassifyAbandonReasonOther=Other -ConfirmClassifyAbandonReasonOtherDesc=This choice will be used in all other cases. For example because you plan to create a replacing invoice. -ConfirmCustomerPayment=Do you confirm this payment input for %s %s? -ConfirmSupplierPayment=Do you confirm this payment input for %s %s? -ConfirmValidatePayment=Are you sure you want to validate this payment? No change can be made once payment is validated. -ValidateBill=Validate invoice -UnvalidateBill=Unvalidate invoice -NumberOfBills=No. of invoices -NumberOfBillsByMonth=No. of invoices per month -AmountOfBills=Amount of invoices -AmountOfBillsHT=Amount of invoices (net of tax) -AmountOfBillsByMonthHT=Amount of invoices by month (net of tax) -UseSituationInvoices=Allow situation invoice -UseSituationInvoicesCreditNote=Allow situation invoice credit note -Retainedwarranty=Retained warranty -AllowedInvoiceForRetainedWarranty=Retained warranty usable on the following types of invoices -RetainedwarrantyDefaultPercent=Retained warranty default percent -RetainedwarrantyOnlyForSituation=Make "retained warranty" available only for situation invoices -RetainedwarrantyOnlyForSituationFinal=On situation invoices the global "retained warranty" deduction is applied only on the final situation -ToPayOn=To pay on %s -toPayOn=to pay on %s -RetainedWarranty=Retained Warranty -PaymentConditionsShortRetainedWarranty=Retained warranty payment terms -DefaultPaymentConditionsRetainedWarranty=Default retained warranty payment terms -setPaymentConditionsShortRetainedWarranty=Set retained warranty payment terms -setretainedwarranty=Set retained warranty -setretainedwarrantyDateLimit=Set retained warranty date limit -RetainedWarrantyDateLimit=Retained warranty date limit -RetainedWarrantyNeed100Percent=The situation invoice need to be at 100%% progress to be displayed on PDF -AlreadyPaid=Already paid -AlreadyPaidBack=Already paid back -AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and down payments) -Abandoned=Abandoned -RemainderToPay=Remaining unpaid -RemainderToTake=Remaining amount to take -RemainderToPayBack=Remaining amount to refund -Rest=Pending -AmountExpected=Amount claimed -ExcessReceived=Excess received -ExcessPaid=Excess paid -EscompteOffered=Discount offered (payment before term) -EscompteOfferedShort=Discount -SendBillRef=Submission of invoice %s -SendReminderBillRef=Submission of invoice %s (reminder) -NoDraftBills=No draft invoices -NoOtherDraftBills=No other draft invoices -NoDraftInvoices=No draft invoices -RefBill=Invoice ref -ToBill=To bill -RemainderToBill=Remainder to bill -SendBillByMail=Send invoice by email -SendReminderBillByMail=Send reminder by email -RelatedCommercialProposals=Related commercial proposals -RelatedRecurringCustomerInvoices=Related recurring customer invoices -MenuToValid=To valid -DateMaxPayment=Payment due on -DateInvoice=Invoice date -DatePointOfTax=Point of tax -NoInvoice=No invoice -NoOpenInvoice=No open invoice -ClassifyBill=Classify invoice -SupplierBillsToPay=Unpaid vendor invoices -CustomerBillsUnpaid=Unpaid customer invoices -NonPercuRecuperable=Non-recoverable -SetConditions=Set Payment Terms -SetMode=Set Payment Type -SetRevenuStamp=Set revenue stamp -Billed=Billed -RecurringInvoices=Recurring invoices -RepeatableInvoice=Template invoice -RepeatableInvoices=Template invoices -Repeatable=Template -Repeatables=Templates -ChangeIntoRepeatableInvoice=Convert into template invoice -CreateRepeatableInvoice=Create template invoice -CreateFromRepeatableInvoice=Create from template invoice -CustomersInvoicesAndInvoiceLines=Customer invoices and invoice details -CustomersInvoicesAndPayments=Customer invoices and payments -ExportDataset_invoice_1=Customer invoices and invoice details -ExportDataset_invoice_2=Customer invoices and payments -ProformaBill=Proforma Bill: -Reduction=Reduction -ReductionShort=Disc. -Reductions=Reductions -ReductionsShort=Disc. -Discounts=Discounts -AddDiscount=Create discount -AddRelativeDiscount=Create relative discount -EditRelativeDiscount=Edit relative discount -AddGlobalDiscount=Create absolute discount -EditGlobalDiscounts=Edit absolute discounts -AddCreditNote=Create credit note -ShowDiscount=Show discount -ShowReduc=Show the discount -ShowSourceInvoice=Show the source invoice -RelativeDiscount=Relative discount -GlobalDiscount=Global discount -CreditNote=Credit note -CreditNotes=Credit notes -CreditNotesOrExcessReceived=Credit notes or excess received -Deposit=Down payment -Deposits=Down payments -DiscountFromCreditNote=Discount from credit note %s -DiscountFromDeposit=Down payments from invoice %s -DiscountFromExcessReceived=Payments in excess of invoice %s -DiscountFromExcessPaid=Payments in excess of invoice %s -AbsoluteDiscountUse=This kind of credit can be used on invoice before its validation -CreditNoteDepositUse=Invoice must be validated to use this kind of credits -NewGlobalDiscount=New absolute discount -NewRelativeDiscount=New relative discount -DiscountType=Discount type -NoteReason=Note/Reason -ReasonDiscount=Reason -DiscountOfferedBy=Granted by -DiscountStillRemaining=Discounts or credits available -DiscountAlreadyCounted=Discounts or credits already consumed -CustomerDiscounts=Customer discounts -SupplierDiscounts=Vendors discounts -BillAddress=Bill address -HelpEscompte=This discount is a discount granted to customer because payment was made before term. -HelpAbandonBadCustomer=This amount has been abandoned (customer said to be a bad customer) and is considered as an exceptional loss. -HelpAbandonOther=This amount has been abandoned since it was an error (wrong customer or invoice replaced by another for example) -IdSocialContribution=Social/fiscal tax payment id -PaymentId=Payment id -PaymentRef=Payment ref. -InvoiceId=Invoice id -InvoiceRef=Invoice ref. -InvoiceDateCreation=Invoice creation date -InvoiceStatus=Invoice status -InvoiceNote=Invoice note -InvoicePaid=Invoice paid -InvoicePaidCompletely=Paid completely -InvoicePaidCompletelyHelp=Invoice that are paid completely. This excludes invoices that are paid partially. To get list of all 'Closed' or non 'Closed' invoices, prefer to use a filter on the invoice status. -OrderBilled=Order billed -DonationPaid=Donation paid -PaymentNumber=Payment number -RemoveDiscount=Remove discount -WatermarkOnDraftBill=Watermark on draft invoices (nothing if empty) -InvoiceNotChecked=No invoice selected -ConfirmCloneInvoice=Are you sure you want to clone this invoice %s? -DisabledBecauseReplacedInvoice=Action disabled because invoice has been replaced -DescTaxAndDividendsArea=This area presents a summary of all payments made for special expenses. Only records with payments during the fixed year are included here. -NbOfPayments=No. of payments -SplitDiscount=Split discount in two -ConfirmSplitDiscount=Are you sure you want to split this discount of %s %s into two smaller discounts? -TypeAmountOfEachNewDiscount=Input amount for each of two parts: -TotalOfTwoDiscountMustEqualsOriginal=The total of the two new discounts must be equal to the original discount amount. -ConfirmRemoveDiscount=Are you sure you want to remove this discount? -RelatedBill=Related invoice -RelatedBills=Related invoices -RelatedCustomerInvoices=Related customer invoices -RelatedSupplierInvoices=Related vendor invoices -LatestRelatedBill=Latest related invoice -WarningBillExist=Warning, one or more invoices already exist -MergingPDFTool=Merging PDF tool -AmountPaymentDistributedOnInvoice=Payment amount distributed on invoice -PaymentOnDifferentThirdBills=Allow payments on different third parties bills but same parent company -PaymentNote=Payment note -ListOfPreviousSituationInvoices=List of previous situation invoices -ListOfNextSituationInvoices=List of next situation invoices -ListOfSituationInvoices=List of situation invoices -CurrentSituationTotal=Total current situation -DisabledBecauseNotEnouthCreditNote=To remove a situation invoice from cycle, this invoice's credit note total must cover this invoice total -RemoveSituationFromCycle=Remove this invoice from cycle -ConfirmRemoveSituationFromCycle=Remove this invoice %s from cycle ? -ConfirmOuting=Confirm outing -FrequencyPer_d=Every %s days -FrequencyPer_m=Every %s months -FrequencyPer_y=Every %s years -FrequencyUnit=Frequency unit -toolTipFrequency=Examples:
    Set 7, Day: give a new invoice every 7 days
    Set 3, Month: give a new invoice every 3 month -NextDateToExecution=Date for next invoice generation -NextDateToExecutionShort=Date next gen. -DateLastGeneration=Date of latest generation -DateLastGenerationShort=Date latest gen. -MaxPeriodNumber=Max. number of invoice generation -NbOfGenerationDone=Number of invoice generation already done -NbOfGenerationOfRecordDone=Number of record generation already done -NbOfGenerationDoneShort=Number of generation done -MaxGenerationReached=Maximum number of generations reached -InvoiceAutoValidate=Validate invoices automatically -GeneratedFromRecurringInvoice=Generated from template recurring invoice %s -DateIsNotEnough=Date not reached yet -InvoiceGeneratedFromTemplate=Invoice %s generated from recurring template invoice %s -GeneratedFromTemplate=Generated from template invoice %s -WarningInvoiceDateInFuture=Warning, the invoice date is higher than current date -WarningInvoiceDateTooFarInFuture=Warning, the invoice date is too far from current date -ViewAvailableGlobalDiscounts=View available discounts -GroupPaymentsByModOnReports=Group payments by mode on reports -# PaymentConditions -Statut=Status -PaymentConditionShortRECEP=Due Upon Receipt -PaymentConditionRECEP=Due Upon Receipt -PaymentConditionShort30D=30 days -PaymentCondition30D=30 days -PaymentConditionShort30DENDMONTH=30 days of month-end -PaymentCondition30DENDMONTH=Within 30 days following the end of the month -PaymentConditionShort60D=60 days -PaymentCondition60D=60 days -PaymentConditionShort60DENDMONTH=60 days of month-end -PaymentCondition60DENDMONTH=Within 60 days following the end of the month -PaymentConditionShortPT_DELIVERY=Delivery -PaymentConditionPT_DELIVERY=On delivery -PaymentConditionShortPT_ORDER=Order -PaymentConditionPT_ORDER=On order -PaymentConditionShortPT_5050=50-50 -PaymentConditionPT_5050=50%% in advance, 50%% on delivery -PaymentConditionShort10D=10 days -PaymentCondition10D=10 days -PaymentConditionShort10DENDMONTH=10 days of month-end -PaymentCondition10DENDMONTH=Within 10 days following the end of the month -PaymentConditionShort14D=14 days -PaymentCondition14D=14 days -PaymentConditionShort14DENDMONTH=14 days of month-end -PaymentCondition14DENDMONTH=Within 14 days following the end of the month -FixAmount=Fixed amount - 1 line with label '%s' -VarAmount=Variable amount (%% tot.) -VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all lines from origin -# PaymentType -PaymentTypeVIR=Bank transfer -PaymentTypeShortVIR=Bank transfer -PaymentTypePRE=Direct debit payment order -PaymentTypeShortPRE=Debit payment order -PaymentTypeLIQ=Cash -PaymentTypeShortLIQ=Cash -PaymentTypeCB=Credit card -PaymentTypeShortCB=Credit card -PaymentTypeCHQ=Check -PaymentTypeShortCHQ=Check -PaymentTypeTIP=TIP (Documents against Payment) -PaymentTypeShortTIP=TIP Payment -PaymentTypeVAD=Online payment -PaymentTypeShortVAD=Online payment -PaymentTypeTRA=Bank draft -PaymentTypeShortTRA=Draft -PaymentTypeFAC=Factor -PaymentTypeShortFAC=Factor -BankDetails=Bank details -BankCode=Bank code -DeskCode=Branch code -BankAccountNumber=Account number -BankAccountNumberKey=Checksum -Residence=Address -IBANNumber=IBAN account number -IBAN=IBAN -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor -BIC=BIC/SWIFT -BICNumber=BIC/SWIFT code -ExtraInfos=Extra infos -RegulatedOn=Regulated on -ChequeNumber=Check N° -ChequeOrTransferNumber=Check/Transfer N° -ChequeBordereau=Check schedule -ChequeMaker=Check/Transfer sender -ChequeBank=Bank of Check -CheckBank=Check -NetToBePaid=Net to be paid -PhoneNumber=Tel -FullPhoneNumber=Telephone -TeleFax=Fax -PrettyLittleSentence=Accept the amount of payments due by checks issued in my name as a Member of an accounting association approved by the Fiscal Administration. -IntracommunityVATNumber=Intra-Community VAT ID -PaymentByChequeOrderedTo=Check payments (including tax) are payable to %s, send to -PaymentByChequeOrderedToShort=Check payments (incl. tax) are payable to -SendTo=sent to -PaymentByTransferOnThisBankAccount=Payment by transfer to the following bank account -VATIsNotUsedForInvoice=* Non applicable VAT art-293B of CGI -LawApplicationPart1=By application of the law 80.335 of 12/05/80 -LawApplicationPart2=the goods remain the property of -LawApplicationPart3=the seller until full payment of -LawApplicationPart4=their price. -LimitedLiabilityCompanyCapital=SARL with Capital of -UseLine=Apply -UseDiscount=Use discount -UseCredit=Use credit -UseCreditNoteInInvoicePayment=Reduce amount to pay with this credit -MenuChequeDeposits=Check Deposits -MenuCheques=Checks -MenuChequesReceipts=Check receipts -NewChequeDeposit=New deposit -ChequesReceipts=Check receipts -ChequesArea=Check deposits area -ChequeDeposits=Check deposits -Cheques=Checks -DepositId=Id deposit -NbCheque=Number of checks -CreditNoteConvertedIntoDiscount=This %s has been converted into %s -UsBillingContactAsIncoiveRecipientIfExist=Use contact/address with type 'billing contact' instead of third-party address as recipient for invoices -ShowUnpaidAll=Show all unpaid invoices -ShowUnpaidLateOnly=Show late unpaid invoices only -PaymentInvoiceRef=Payment invoice %s -ValidateInvoice=Validate invoice -ValidateInvoices=Validate invoices -Cash=Cash -Reported=Delayed -DisabledBecausePayments=Not possible since there are some payments -CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified paid -CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid -CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid -ExpectedToPay=Expected payment -CantRemoveConciliatedPayment=Can't remove reconciled payment -PayedByThisPayment=Paid by this payment -ClosePaidInvoicesAutomatically=Classify automatically all standard, down payment or replacement invoices as "Paid" when payment is done entirely. -ClosePaidCreditNotesAutomatically=Classify automatically all credit notes as "Paid" when refund is done entirely. -ClosePaidContributionsAutomatically=Classify automatically all social or fiscal contributions as "Paid" when payment is done entirely. -ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. -ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. -AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". -ToMakePayment=Pay -ToMakePaymentBack=Pay back -ListOfYourUnpaidInvoices=List of unpaid invoices -NoteListOfYourUnpaidInvoices=Note: This list contains only invoices for third parties you are linked to as a sale representative. -RevenueStamp=Tax stamp -YouMustCreateInvoiceFromThird=This option is only available when creating an invoice from tab "Customer" of third party -YouMustCreateInvoiceFromSupplierThird=This option is only available when creating an invoice from tab "Vendor" of third party -YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice first and convert it to "template" to create a new template invoice -PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) -PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template -PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 -MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 -TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 -EarlyClosingReason=Early closing reason -EarlyClosingComment=Early closing note -##### Types de contacts ##### -TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice -TypeContact_facture_external_BILLING=Customer invoice contact -TypeContact_facture_external_SHIPPING=Customer shipping contact -TypeContact_facture_external_SERVICE=Customer service contact -TypeContact_invoice_supplier_internal_SALESREPFOLL=Representative following-up vendor invoice -TypeContact_invoice_supplier_external_BILLING=Vendor invoice contact -TypeContact_invoice_supplier_external_SHIPPING=Vendor shipping contact -TypeContact_invoice_supplier_external_SERVICE=Vendor service contact -# Situation invoices -InvoiceFirstSituationAsk=First situation invoice -InvoiceFirstSituationDesc=The situation invoices are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. -InvoiceSituation=Situation invoice -PDFInvoiceSituation=Situation invoice -InvoiceSituationAsk=Invoice following the situation -InvoiceSituationDesc=Create a new situation following an already existing one -SituationAmount=Situation invoice amount(net) -SituationDeduction=Situation subtraction -ModifyAllLines=Modify all lines -CreateNextSituationInvoice=Create next situation -ErrorFindNextSituationInvoice=Error unable to find next situation cycle ref -ErrorOutingSituationInvoiceOnUpdate=Unable to outing this situation invoice. -ErrorOutingSituationInvoiceCreditNote=Unable to outing linked credit note. -NotLastInCycle=This invoice is not the latest in cycle and must not be modified. -DisabledBecauseNotLastInCycle=The next situation already exists. -DisabledBecauseFinal=This situation is final. -situationInvoiceShortcode_AS=AS -situationInvoiceShortcode_S=S -CantBeLessThanMinPercent=The progress can't be smaller than its value in the previous situation. -NoSituations=No open situations -InvoiceSituationLast=Final and general invoice -PDFCrevetteSituationNumber=Situation N°%s -PDFCrevetteSituationInvoiceLineDecompte=Situation invoice - COUNT -PDFCrevetteSituationInvoiceTitle=Situation invoice -PDFCrevetteSituationInvoiceLine=Situation N°%s: Inv. N°%s on %s -TotalSituationInvoice=Total situation -invoiceLineProgressError=Invoice line progress can't be greater than or equal to the next invoice line -updatePriceNextInvoiceErrorUpdateline=Error: update price on invoice line: %s -ToCreateARecurringInvoice=To create a recurring invoice for this contract, first create this draft invoice, then convert it into an invoice template and define the frequency for generation of future invoices. -ToCreateARecurringInvoiceGene=To generate future invoices regularly and manually, just go on menu %s - %s - %s. -ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated automatically, ask your administrator to enable and setup module %s. Note that both methods (manual and automatic) can be used together with no risk of duplication. -DeleteRepeatableInvoice=Delete template invoice -ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s invoice(s) generated -BillXCreated=Invoice %s generated -StatusOfGeneratedDocuments=Status of document generation -DoNotGenerateDoc=Do not generate document file -AutogenerateDoc=Auto generate document file -AutoFillDateFrom=Set start date for service line with invoice date -AutoFillDateFromShort=Set start date -AutoFillDateTo=Set end date for service line with next invoice date -AutoFillDateToShort=Set end date -MaxNumberOfGenerationReached=Max number of gen. reached -BILL_DELETEInDolibarr=Invoice deleted -BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted -UnitPriceXQtyLessDiscount=Unit price x Qty - Discount -CustomersInvoicesArea=Customer billing area -SupplierInvoicesArea=Supplier billing area -FacParentLine=Invoice Line Parent -SituationTotalRayToRest=Remainder to pay without taxe -PDFSituationTitle=Situation n° %d -SituationTotalProgress=Total progress %d %% -SearchUnpaidInvoicesWithDueDate=Search unpaid invoices with a due date = %s diff --git a/htdocs/langs/ar_IQ/blockedlog.lang b/htdocs/langs/ar_IQ/blockedlog.lang deleted file mode 100644 index 44cb183050a..00000000000 --- a/htdocs/langs/ar_IQ/blockedlog.lang +++ /dev/null @@ -1,54 +0,0 @@ -BlockedLog=Unalterable Logs -Field=Field -BlockedLogDesc=This module tracks some events into an unalterable log (that you can't modify once recorded) into a block chain, in real time. This module provides compatibility with requirements of laws of some countries (like France with the law Finance 2016 - Norme NF525). -Fingerprints=Archived events and fingerprints -FingerprintsDesc=This is the tool to browse or extract the unalterable logs. Unalterable logs are generated and archived locally into a dedicated table, in real time when you record a business event. You can use this tool to export this archive and save it into an external support (some countries, like France, ask that you do it every year). Note that, there is no feature to purge this log and every change tried to be done directly into this log (by a hacker for example) will be reported with a non-valid fingerprint. If you really need to purge this table because you used your application for a demo/test purpose and want to clean your data to start your production, you can ask your reseller or integrator to reset your database (all your data will be removed). -CompanyInitialKey=Company initial key (hash of genesis block) -BrowseBlockedLog=Unalterable logs -ShowAllFingerPrintsMightBeTooLong=Show all archived logs (might be long) -ShowAllFingerPrintsErrorsMightBeTooLong=Show all non-valid archive logs (might be long) -DownloadBlockChain=Download fingerprints -KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this record after it was recorded, or has erased the previous archived record (check that line with previous # exists) or has modified checksum of the previous record. -OkCheckFingerprintValidity=Archived log record is valid. The data on this line was not modified and the entry follows the previous one. -OkCheckFingerprintValidityButChainIsKo=Archived log seems valid compared to previous one but the chain was corrupted previously. -AddedByAuthority=Stored into remote authority -NotAddedByAuthorityYet=Not yet stored into remote authority -ShowDetails=Show stored details -logPAYMENT_VARIOUS_CREATE=Payment (not assigned to an invoice) created -logPAYMENT_VARIOUS_MODIFY=Payment (not assigned to an invoice) modified -logPAYMENT_VARIOUS_DELETE=Payment (not assigned to an invoice) logical deletion -logPAYMENT_ADD_TO_BANK=Payment added to bank -logPAYMENT_CUSTOMER_CREATE=Customer payment created -logPAYMENT_CUSTOMER_DELETE=Customer payment logical deletion -logDONATION_PAYMENT_CREATE=Donation payment created -logDONATION_PAYMENT_DELETE=Donation payment logical deletion -logBILL_PAYED=Customer invoice paid -logBILL_UNPAYED=Customer invoice set unpaid -logBILL_VALIDATE=Customer invoice validated -logBILL_SENTBYMAIL=Customer invoice send by mail -logBILL_DELETE=Customer invoice logically deleted -logMODULE_RESET=Module BlockedLog was disabled -logMODULE_SET=Module BlockedLog was enabled -logDON_VALIDATE=Donation validated -logDON_MODIFY=Donation modified -logDON_DELETE=Donation logical deletion -logMEMBER_SUBSCRIPTION_CREATE=Member subscription created -logMEMBER_SUBSCRIPTION_MODIFY=Member subscription modified -logMEMBER_SUBSCRIPTION_DELETE=Member subscription logical deletion -logCASHCONTROL_VALIDATE=Cash desk closing recording -BlockedLogBillDownload=Customer invoice download -BlockedLogBillPreview=Customer invoice preview -BlockedlogInfoDialog=Log Details -ListOfTrackedEvents=List of tracked events -Fingerprint=Fingerprint -DownloadLogCSV=Export archived logs (CSV) -logDOC_PREVIEW=Preview of a validated document in order to print or download -logDOC_DOWNLOAD=Download of a validated document in order to print or send -DataOfArchivedEvent=Full datas of archived event -ImpossibleToReloadObject=Original object (type %s, id %s) not linked (see 'Full datas' column to get unalterable saved data) -BlockedLogAreRequiredByYourCountryLegislation=Unalterable Logs module may be required by the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they can not be validated by a tax audit. -BlockedLogActivatedBecauseRequiredByYourCountryLegislation=Unalterable Logs module was activated because of the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they cannot be validated by a tax audit. -BlockedLogDisableNotAllowedForCountry=List of countries where usage of this module is mandatory (just to prevent to disable the module by error, if your country is in this list, disable of module is not possible without editing this list first. Note also that enabling/disabling this module will keep a track into the unalterable log). -OnlyNonValid=Non-valid -TooManyRecordToScanRestrictFilters=Too many records to scan/analyze. Please restrict list with more restrictive filters. -RestrictYearToExport=Restrict month / year to export diff --git a/htdocs/langs/ar_IQ/bookmarks.lang b/htdocs/langs/ar_IQ/bookmarks.lang deleted file mode 100644 index 87466cadcfa..00000000000 --- a/htdocs/langs/ar_IQ/bookmarks.lang +++ /dev/null @@ -1,21 +0,0 @@ -# Dolibarr language file - Source file is en_US - marque pages -AddThisPageToBookmarks=Add current page to bookmarks -Bookmark=Bookmark -Bookmarks=Bookmarks -ListOfBookmarks=List of bookmarks -EditBookmarks=List/edit bookmarks -NewBookmark=New bookmark -ShowBookmark=Show bookmark -OpenANewWindow=Open a new tab -ReplaceWindow=Replace current tab -BookmarkTargetNewWindowShort=New tab -BookmarkTargetReplaceWindowShort=Current tab -BookmarkTitle=Bookmark name -UrlOrLink=URL -BehaviourOnClick=Behaviour when a bookmark URL is selected -CreateBookmark=Create bookmark -SetHereATitleForLink=Set a name for the bookmark -UseAnExternalHttpLinkOrRelativeDolibarrLink=Use an external/absolute link (https://URL) or an internal/relative link (/DOLIBARR_ROOT/htdocs/...) -ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Choose if the linked page should open in the current tab or a new tab -BookmarksManagement=Bookmarks management -BookmarksMenuShortCut=Ctrl + shift + m diff --git a/htdocs/langs/ar_IQ/boxes.lang b/htdocs/langs/ar_IQ/boxes.lang deleted file mode 100644 index 710d49bfab6..00000000000 --- a/htdocs/langs/ar_IQ/boxes.lang +++ /dev/null @@ -1,120 +0,0 @@ -# Dolibarr language file - Source file is en_US - boxes -BoxDolibarrStateBoard=Statistics on main business objects in database -BoxLoginInformation=Login Information -BoxLastRssInfos=RSS Information -BoxLastProducts=Latest %s Products/Services -BoxProductsAlertStock=Stock alerts for products -BoxLastProductsInContract=Latest %s contracted products/services -BoxLastSupplierBills=Latest Vendor invoices -BoxLastCustomerBills=Latest Customer invoices -BoxOldestUnpaidCustomerBills=Oldest unpaid customer invoices -BoxOldestUnpaidSupplierBills=Oldest unpaid vendor invoices -BoxLastProposals=Latest commercial proposals -BoxLastProspects=Latest modified prospects -BoxLastCustomers=Latest modified customers -BoxLastSuppliers=Latest modified suppliers -BoxLastCustomerOrders=Latest sales orders -BoxLastActions=Latest actions -BoxLastContracts=Latest contracts -BoxLastContacts=Latest contacts/addresses -BoxLastMembers=Latest members -BoxLastModifiedMembers=Latest modified members -BoxLastMembersSubscriptions=Latest member subscriptions -BoxFicheInter=Latest interventions -BoxCurrentAccounts=Open accounts balance -BoxTitleMemberNextBirthdays=Birthdays of this month (members) -BoxTitleMembersByType=Members by type -BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year -BoxTitleLastRssInfos=Latest %s news from %s -BoxTitleLastProducts=Products/Services: last %s modified -BoxTitleProductsAlertStock=Products: stock alert -BoxTitleLastSuppliers=Latest %s recorded suppliers -BoxTitleLastModifiedSuppliers=Vendors: last %s modified -BoxTitleLastModifiedCustomers=Customers: last %s modified -BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s modified Customer invoices -BoxTitleLastSupplierBills=Latest %s modified Vendor invoices -BoxTitleLastModifiedProspects=Prospects: last %s modified -BoxTitleLastModifiedMembers=Latest %s members -BoxTitleLastFicheInter=Latest %s modified interventions -BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid -BoxTitleOldestUnpaidSupplierBills=Vendor Invoices: oldest %s unpaid -BoxTitleCurrentAccounts=Open Accounts: balances -BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception -BoxTitleLastModifiedContacts=Contacts/Addresses: last %s modified -BoxMyLastBookmarks=Bookmarks: latest %s -BoxOldestExpiredServices=Oldest active expired services -BoxLastExpiredServices=Latest %s oldest contacts with active expired services -BoxTitleLastActionsToDo=Latest %s actions to do -BoxTitleLastContracts=Latest %s contracts which were modified -BoxTitleLastModifiedDonations=Latest %s donations which were modified -BoxTitleLastModifiedExpenses=Latest %s expense reports which were modified -BoxTitleLatestModifiedBoms=Latest %s BOMs which were modified -BoxTitleLatestModifiedMos=Latest %s Manufacturing Orders which were modified -BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded -BoxGlobalActivity=Global activity (invoices, proposals, orders) -BoxGoodCustomers=Good customers -BoxTitleGoodCustomers=%s Good customers -BoxScheduledJobs=Scheduled jobs -BoxTitleFunnelOfProspection=Lead funnel -FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s -LastRefreshDate=Latest refresh date -NoRecordedBookmarks=No bookmarks defined. -ClickToAdd=Click here to add. -NoRecordedCustomers=No recorded customers -NoRecordedContacts=No recorded contacts -NoActionsToDo=No actions to do -NoRecordedOrders=No recorded sales orders -NoRecordedProposals=No recorded proposals -NoRecordedInvoices=No recorded customer invoices -NoUnpaidCustomerBills=No unpaid customer invoices -NoUnpaidSupplierBills=No unpaid vendor invoices -NoModifiedSupplierBills=No recorded vendor invoices -NoRecordedProducts=No recorded products/services -NoRecordedProspects=No recorded prospects -NoContractedProducts=No products/services contracted -NoRecordedContracts=No recorded contracts -NoRecordedInterventions=No recorded interventions -BoxLatestSupplierOrders=Latest purchase orders -BoxLatestSupplierOrdersAwaitingReception=Latest Purchase Orders (with a pending reception) -NoSupplierOrder=No recorded purchase order -BoxCustomersInvoicesPerMonth=Customer Invoices per month -BoxSuppliersInvoicesPerMonth=Vendor Invoices per month -BoxCustomersOrdersPerMonth=Sales Orders per month -BoxSuppliersOrdersPerMonth=Vendor Orders per month -BoxProposalsPerMonth=Proposals per month -NoTooLowStockProducts=No products are under the low stock limit -BoxProductDistribution=Products/Services Distribution -ForObject=On %s -BoxTitleLastModifiedSupplierBills=Vendor Invoices: last %s modified -BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified -BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified -BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified -BoxTitleLastModifiedPropals=Latest %s modified proposals -BoxTitleLatestModifiedJobPositions=Latest %s modified job positions -BoxTitleLatestModifiedCandidatures=Latest %s modified job applications -ForCustomersInvoices=Customers invoices -ForCustomersOrders=Customers orders -ForProposals=Proposals -LastXMonthRolling=The latest %s month rolling -ChooseBoxToAdd=Add widget to your dashboard -BoxAdded=Widget was added in your dashboard -BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Latest record in accountancy entered manually or without source document -BoxTitleLastManualEntries=%s latest record entered manually or without source document -NoRecordedManualEntries=No manual entries record in accountancy -BoxSuspenseAccount=Count accountancy operation with suspense account -BoxTitleSuspenseAccount=Number of unallocated lines -NumberOfLinesInSuspenseAccount=Number of line in suspense account -SuspenseAccountNotDefined=Suspense account isn't defined -BoxLastCustomerShipments=Last customer shipments -BoxTitleLastCustomerShipments=Latest %s customer shipments -NoRecordedShipments=No recorded customer shipment -BoxCustomersOutstandingBillReached=Customers with oustanding limit reached -# Pages -UsersHome=Home users and groups -MembersHome=Home Membership -ThirdpartiesHome=Home Thirdparties -TicketsHome=Home Tickets -AccountancyHome=Home Accountancy -ValidatedProjects=Validated projects diff --git a/htdocs/langs/ar_IQ/cashdesk.lang b/htdocs/langs/ar_IQ/cashdesk.lang deleted file mode 100644 index 3bc383ed2a1..00000000000 --- a/htdocs/langs/ar_IQ/cashdesk.lang +++ /dev/null @@ -1,131 +0,0 @@ -# Language file - Source file is en_US - cashdesk -CashDeskMenu=Point of sale -CashDesk=Point of sale -CashDeskBankCash=Bank account (cash) -CashDeskBankCB=Bank account (card) -CashDeskBankCheque=Bank account (cheque) -CashDeskWarehouse=Warehouse -CashdeskShowServices=Selling services -CashDeskProducts=Products -CashDeskStock=Stock -CashDeskOn=on -CashDeskThirdParty=Third party -ShoppingCart=Shopping cart -NewSell=New sell -AddThisArticle=Add this article -RestartSelling=Go back on sell -SellFinished=Sale complete -PrintTicket=Print ticket -SendTicket=Send ticket -NoProductFound=No article found -ProductFound=product found -NoArticle=No article -Identification=Identification -Article=Article -Difference=Difference -TotalTicket=Total ticket -NoVAT=No VAT for this sale -Change=Excess received -BankToPay=Account for payment -ShowCompany=Show company -ShowStock=Show warehouse -DeleteArticle=Click to remove this article -FilterRefOrLabelOrBC=Search (Ref/Label) -UserNeedPermissionToEditStockToUsePos=You ask to decrease stock on invoice creation, so user that uses POS needs to have permission to edit stock. -DolibarrReceiptPrinter=Dolibarr Receipt Printer -PointOfSale=Point of Sale -PointOfSaleShort=POS -CloseBill=Close Bill -Floors=Floors -Floor=Floor -AddTable=Add table -Place=Place -TakeposConnectorNecesary='TakePOS Connector' required -OrderPrinters=Add a button to send the order to some given printers, without payment (for example to send an order to a kitchen) -NotAvailableWithBrowserPrinter=Not available when printer for receipt is set to browser: -SearchProduct=Search product -Receipt=Receipt -Header=Header -Footer=Footer -AmountAtEndOfPeriod=Amount at end of period (day, month or year) -TheoricalAmount=Theorical amount -RealAmount=Real amount -CashFence=Cash desk closing -CashFenceDone=Cash desk closing done for the period -NbOfInvoices=Nb of invoices -Paymentnumpad=Type of Pad to enter payment -Numberspad=Numbers Pad -BillsCoinsPad=Coins and banknotes Pad -DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr -TakeposNeedsCategories=TakePOS needs at least one product categorie to work -TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category %s to work -OrderNotes=Can add some notes to each ordered items -CashDeskBankAccountFor=Default account to use for payments in -NoPaimementModesDefined=No paiment mode defined in TakePOS configuration -TicketVatGrouped=Group VAT by rate in tickets|receipts -AutoPrintTickets=Automatically print tickets|receipts -PrintCustomerOnReceipts=Print customer on tickets|receipts -EnableBarOrRestaurantFeatures=Enable features for Bar or Restaurant -ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ? -ConfirmDiscardOfThisPOSSale=Do you want to discard this current sale ? -History=History -ValidateAndClose=Validate and close -Terminal=Terminal -NumberOfTerminals=Number of Terminals -TerminalSelect=Select terminal you want to use: -POSTicket=POS Ticket -POSTerminal=POS Terminal -POSModule=POS Module -BasicPhoneLayout=Use basic layout for phones -SetupOfTerminalNotComplete=Setup of terminal %s is not complete -DirectPayment=Direct payment -DirectPaymentButton=Add a "Direct cash payment" button -InvoiceIsAlreadyValidated=Invoice is already validated -NoLinesToBill=No lines to bill -CustomReceipt=Custom Receipt -ReceiptName=Receipt Name -ProductSupplements=Manage supplements of products -SupplementCategory=Supplement category -ColorTheme=Color theme -Colorful=Colorful -HeadBar=Head Bar -SortProductField=Field for sorting products -Browser=Browser -BrowserMethodDescription=Simple and easy receipt printing. Only a few parameters to configure the receipt. Print via browser. -TakeposConnectorMethodDescription=External module with extra features. Posibility to print from the cloud. -PrintMethod=Print method -ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. The server hosting the application can't be in the Cloud (must be able to reach the printers in your network). -ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad -CashDeskRefNumberingModules=Numbering module for POS sales -CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number -TakeposGroupSameProduct=Group same products lines -StartAParallelSale=Start a new parallel sale -SaleStartedAt=Sale started at %s -ControlCashOpening=Open the "Control cash" popup when opening the POS -CloseCashFence=Close cash desk control -CashReport=Cash report -MainPrinterToUse=Main printer to use -OrderPrinterToUse=Order printer to use -MainTemplateToUse=Main template to use -OrderTemplateToUse=Order template to use -BarRestaurant=Bar Restaurant -AutoOrder=Order by the customer himself -RestaurantMenu=Menu -CustomerMenu=Customer menu -ScanToMenu=Scan QR code to see the menu -ScanToOrder=Scan QR code to order -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines of images to show -DefineTablePlan=Define tables plan -GiftReceiptButton=Add a "Gift receipt" button -GiftReceipt=Gift receipt -ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first -AllowDelayedPayment=Allow delayed payment -PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts -WeighingScale=Weighing scale -ShowPriceHT = Display the column with the price excluding tax (on screen) -ShowPriceHTOnReceipt = Display the column with the price excluding tax (on the receipt) -CustomerDisplay=Customer display diff --git a/htdocs/langs/ar_IQ/categories.lang b/htdocs/langs/ar_IQ/categories.lang deleted file mode 100644 index 29e08f66541..00000000000 --- a/htdocs/langs/ar_IQ/categories.lang +++ /dev/null @@ -1,99 +0,0 @@ -# Dolibarr language file - Source file is en_US - categories -Rubrique=Tag/Category -Rubriques=Tags/Categories -RubriquesTransactions=Tags/Categories of transactions -categories=tags/categories -NoCategoryYet=No tag/category of this type has been created -In=In -AddIn=Add in -modify=modify -Classify=Classify -CategoriesArea=Tags/Categories area -ProductsCategoriesArea=Product/Service tags/categories area -SuppliersCategoriesArea=Vendor tags/categories area -CustomersCategoriesArea=Customer tags/categories area -MembersCategoriesArea=Member tags/categories area -ContactsCategoriesArea=Contact tags/categories area -AccountsCategoriesArea=Bank account tags/categories area -ProjectsCategoriesArea=Project tags/categories area -UsersCategoriesArea=User tags/categories area -SubCats=Sub-categories -CatList=List of tags/categories -CatListAll=List of tags/categories (all types) -NewCategory=New tag/category -ModifCat=Modify tag/category -CatCreated=Tag/category created -CreateCat=Create tag/category -CreateThisCat=Create this tag/category -NoSubCat=No subcategory. -SubCatOf=Subcategory -FoundCats=Found tags/categories -ImpossibleAddCat=Impossible to add the tag/category %s -WasAddedSuccessfully=%s was added successfully. -ObjectAlreadyLinkedToCategory=Element is already linked to this tag/category. -ProductIsInCategories=Product/service is linked to following tags/categories -CompanyIsInCustomersCategories=This third party is linked to following customers/prospects tags/categories -CompanyIsInSuppliersCategories=This third party is linked to following vendors tags/categories -MemberIsInCategories=This member is linked to following members tags/categories -ContactIsInCategories=This contact is linked to following contacts tags/categories -ProductHasNoCategory=This product/service is not in any tags/categories -CompanyHasNoCategory=This third party is not in any tags/categories -MemberHasNoCategory=This member is not in any tags/categories -ContactHasNoCategory=This contact is not in any tags/categories -ProjectHasNoCategory=This project is not in any tags/categories -ClassifyInCategory=Add to tag/category -NotCategorized=Without tag/category -CategoryExistsAtSameLevel=This category already exists with this ref -ContentsVisibleByAllShort=Contents visible by all -ContentsNotVisibleByAllShort=Contents not visible by all -DeleteCategory=Delete tag/category -ConfirmDeleteCategory=Are you sure you want to delete this tag/category? -NoCategoriesDefined=No tag/category defined -SuppliersCategoryShort=Vendors tag/category -CustomersCategoryShort=Customers tag/category -ProductsCategoryShort=Products tag/category -MembersCategoryShort=Members tag/category -SuppliersCategoriesShort=Vendors tags/categories -CustomersCategoriesShort=Customers tags/categories -ProspectsCategoriesShort=Prospects tags/categories -CustomersProspectsCategoriesShort=Cust./Prosp. tags/categories -ProductsCategoriesShort=Products tags/categories -MembersCategoriesShort=Members tags/categories -ContactCategoriesShort=Contacts tags/categories -AccountsCategoriesShort=Accounts tags/categories -ProjectsCategoriesShort=Projects tags/categories -UsersCategoriesShort=Users tags/categories -StockCategoriesShort=Warehouse tags/categories -ThisCategoryHasNoItems=This category does not contain any items. -CategId=Tag/category id -ParentCategory=Parent tag/category -ParentCategoryLabel=Label of parent tag/category -CatSupList=List of vendors tags/categories -CatCusList=List of customers/prospects tags/categories -CatProdList=List of products tags/categories -CatMemberList=List of members tags/categories -CatContactList=List of contacts tags/categories -CatProjectsList=List of projects tags/categories -CatUsersList=List of users tags/categories -CatSupLinks=Links between vendors and tags/categories -CatCusLinks=Links between customers/prospects and tags/categories -CatContactsLinks=Links between contacts/addresses and tags/categories -CatProdLinks=Links between products/services and tags/categories -CatMembersLinks=Links between members and tags/categories -CatProjectsLinks=Links between projects and tags/categories -CatUsersLinks=Links between users and tags/categories -DeleteFromCat=Remove from tags/category -ExtraFieldsCategories=Complementary attributes -CategoriesSetup=Tags/categories setup -CategorieRecursiv=Link with parent tag/category automatically -CategorieRecursivHelp=If option is on, when you add a product into a subcategory, product will also be added into the parent category. -AddProductServiceIntoCategory=Add the following product/service -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier -ShowCategory=Show tag/category -ByDefaultInList=By default in list -ChooseCategory=Choose category -StocksCategoriesArea=Warehouse Categories -ActionCommCategoriesArea=Event Categories -WebsitePagesCategoriesArea=Page-Container Categories -UseOrOperatorForCategories=Use 'OR' operator for categories diff --git a/htdocs/langs/ar_IQ/commercial.lang b/htdocs/langs/ar_IQ/commercial.lang deleted file mode 100644 index 21d282cd794..00000000000 --- a/htdocs/langs/ar_IQ/commercial.lang +++ /dev/null @@ -1,81 +0,0 @@ -# Dolibarr language file - Source file is en_US - commercial -Commercial=Commerce -CommercialArea=Commerce area -Customer=Customer -Customers=Customers -Prospect=Prospect -Prospects=Prospects -DeleteAction=Delete an event -NewAction=New event -AddAction=Create event -AddAnAction=Create an event -AddActionRendezVous=Create a Rendez-vous event -ConfirmDeleteAction=Are you sure you want to delete this event? -CardAction=Event card -ActionOnCompany=Related company -ActionOnContact=Related contact -TaskRDVWith=Meeting with %s -ShowTask=Show task -ShowAction=Show event -ActionsReport=Events report -ThirdPartiesOfSaleRepresentative=Third parties with sales representative -SaleRepresentativesOfThirdParty=Sales representatives of third party -SalesRepresentative=Sales representative -SalesRepresentatives=Sales representatives -SalesRepresentativeFollowUp=Sales representative (follow-up) -SalesRepresentativeSignature=Sales representative (signature) -NoSalesRepresentativeAffected=No particular sales representative assigned -ShowCustomer=Show customer -ShowProspect=Show prospect -ListOfProspects=List of prospects -ListOfCustomers=List of customers -LastDoneTasks=Latest %s completed actions -LastActionsToDo=Oldest %s not completed actions -DoneAndToDoActions=Completed and To do events -DoneActions=Completed events -ToDoActions=Incomplete events -SendPropalRef=Submission of commercial proposal %s -SendOrderRef=Submission of order %s -StatusNotApplicable=Not applicable -StatusActionToDo=To do -StatusActionDone=Complete -StatusActionInProcess=In process -TasksHistoryForThisContact=Events for this contact -LastProspectDoNotContact=Do not contact -LastProspectNeverContacted=Never contacted -LastProspectToContact=To contact -LastProspectContactInProcess=Contact in process -LastProspectContactDone=Contact done -ActionAffectedTo=Event assigned to -ActionDoneBy=Event done by -ActionAC_TEL=Phone call -ActionAC_FAX=Send fax -ActionAC_PROP=Send proposal by mail -ActionAC_EMAIL=Send Email -ActionAC_EMAIL_IN=Reception of Email -ActionAC_RDV=Meetings -ActionAC_INT=Intervention on site -ActionAC_FAC=Send customer invoice by mail -ActionAC_REL=Send customer invoice by mail (reminder) -ActionAC_CLO=Close -ActionAC_EMAILING=Send mass email -ActionAC_COM=Send sales order by mail -ActionAC_SHIP=Send shipping by mail -ActionAC_SUP_ORD=Send purchase order by mail -ActionAC_SUP_INV=Send vendor invoice by mail -ActionAC_OTH=Other -ActionAC_OTH_AUTO=Other auto -ActionAC_MANUAL=Manually inserted events -ActionAC_AUTO=Automatically inserted events -ActionAC_OTH_AUTOShort=Other -ActionAC_EVENTORGANIZATION=Event organization events -Stats=Sales statistics -StatusProsp=Prospect status -DraftPropals=Draft commercial proposals -NoLimit=No limit -ToOfferALinkForOnlineSignature=Link for online signature -WelcomeOnOnlineSignaturePage=Welcome to the page to accept commercial proposals from %s -ThisScreenAllowsYouToSignDocFrom=This screen allow you to accept and sign, or refuse, a quote/commercial proposal -ThisIsInformationOnDocumentToSign=This is information on document to accept or refuse -SignatureProposalRef=Signature of quote/commercial proposal %s -FeatureOnlineSignDisabled=Feature for online signing disabled or document generated before the feature was enabled diff --git a/htdocs/langs/ar_IQ/companies.lang b/htdocs/langs/ar_IQ/companies.lang index fbe75f09ab0..d781b34a0f8 100644 --- a/htdocs/langs/ar_IQ/companies.lang +++ b/htdocs/langs/ar_IQ/companies.lang @@ -1,477 +1,2 @@ # Dolibarr language file - Source file is en_US - companies -ErrorCompanyNameAlreadyExists=Company name %s already exists. Choose another one. -ErrorSetACountryFirst=Set the country first -SelectThirdParty=Select a third party -ConfirmDeleteCompany=Are you sure you want to delete this company and all related information? -DeleteContact=Delete a contact/address -ConfirmDeleteContact=Are you sure you want to delete this contact and all related information? -MenuNewThirdParty=New Third Party -MenuNewCustomer=New Customer -MenuNewProspect=New Prospect -MenuNewSupplier=New Vendor -MenuNewPrivateIndividual=New private individual -NewCompany=New company (prospect, customer, vendor) -NewThirdParty=New Third Party (prospect, customer, vendor) -CreateDolibarrThirdPartySupplier=Create a third party (vendor) -CreateThirdPartyOnly=Create third party -CreateThirdPartyAndContact=Create a third party + a child contact -ProspectionArea=Prospection area -IdThirdParty=Id third party -IdCompany=Company Id -IdContact=Contact Id -ThirdPartyContacts=Third-party contacts -ThirdPartyContact=Third-party contact/address -Company=Company -CompanyName=Company name -AliasNames=Alias name (commercial, trademark, ...) -AliasNameShort=Alias Name -Companies=Companies -CountryIsInEEC=Country is inside the European Economic Community -PriceFormatInCurrentLanguage=Price display format in the current language and currency -ThirdPartyName=Third-party name -ThirdPartyEmail=Third-party email -ThirdParty=Third-party -ThirdParties=Third-parties -ThirdPartyProspects=Prospects -ThirdPartyProspectsStats=Prospects -ThirdPartyCustomers=Customers -ThirdPartyCustomersStats=Customers -ThirdPartyCustomersWithIdProf12=Customers with %s or %s -ThirdPartySuppliers=Vendors -ThirdPartyType=Third-party type -Individual=Private individual -ToCreateContactWithSameName=Will automatically create a contact/address with same information as the third party under the third party. In most cases, even if your third party is a physical person, creating a third party alone is enough. -ParentCompany=Parent company -Subsidiaries=Subsidiaries -ReportByMonth=Report per month -ReportByCustomers=Report per customer -ReportByThirdparties=Report per thirdparty -ReportByQuarter=Report per rate -CivilityCode=Civility code -RegisteredOffice=Registered office -Lastname=Last name -Firstname=First name -PostOrFunction=Job position -UserTitle=Title -NatureOfThirdParty=Nature of Third party -NatureOfContact=Nature of Contact -Address=Address -State=State/Province -StateCode=State/Province code -StateShort=State -Region=Region -Region-State=Region - State -Country=Country -CountryCode=Country code -CountryId=Country id -Phone=Phone -PhoneShort=Phone -Skype=Skype -Call=Call -Chat=Chat -PhonePro=Bus. phone -PhonePerso=Pers. phone -PhoneMobile=Mobile -No_Email=Refuse bulk emailings -Fax=Fax -Zip=Zip Code -Town=City -Web=Web -Poste= Position -DefaultLang=Default language -VATIsUsed=Sales tax used VATIsUsedWhenSelling=This defines if this third party includes a sale tax or not when it makes an invoice to its own customers -VATIsNotUsed=Sales tax is not used -CopyAddressFromSoc=Copy address from third-party details -ThirdpartyNotCustomerNotSupplierSoNoRef=Third party neither customer nor vendor, no available referring objects -ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Third party neither customer nor vendor, discounts are not available -PaymentBankAccount=Payment bank account -OverAllProposals=Proposals -OverAllOrders=Orders -OverAllInvoices=Invoices -OverAllSupplierProposals=Price requests -##### Local Taxes ##### -LocalTax1IsUsed=Use second tax -LocalTax1IsUsedES= RE is used -LocalTax1IsNotUsedES= RE is not used -LocalTax2IsUsed=Use third tax -LocalTax2IsUsedES= IRPF is used -LocalTax2IsNotUsedES= IRPF is not used -WrongCustomerCode=Customer code invalid -WrongSupplierCode=Vendor code invalid -CustomerCodeModel=Customer code model -SupplierCodeModel=Vendor code model -Gencod=Barcode -##### Professional ID ##### -ProfId1Short=Prof. id 1 -ProfId2Short=Prof. id 2 -ProfId3Short=Prof. id 3 -ProfId4Short=Prof. id 4 -ProfId5Short=Prof. id 5 -ProfId6Short=Prof. id 6 -ProfId1=Professional ID 1 -ProfId2=Professional ID 2 -ProfId3=Professional ID 3 -ProfId4=Professional ID 4 -ProfId5=Professional ID 5 -ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT/CUIL) -ProfId2AR=Prof Id 2 (Revenu brutes) -ProfId3AR=- -ProfId4AR=- -ProfId5AR=- -ProfId6AR=- -ProfId1AT=Prof Id 1 (USt.-IdNr) -ProfId2AT=Prof Id 2 (USt.-Nr) -ProfId3AT=Prof Id 3 (Handelsregister-Nr.) -ProfId4AT=- -ProfId5AT=EORI number -ProfId6AT=- -ProfId1AU=Prof Id 1 (ABN) -ProfId2AU=- -ProfId3AU=- -ProfId4AU=- -ProfId5AU=- -ProfId6AU=- -ProfId1BE=Prof Id 1 (Professional number) -ProfId2BE=- -ProfId3BE=- -ProfId4BE=- -ProfId5BE=EORI number -ProfId6BE=- -ProfId1BR=- -ProfId2BR=IE (Inscricao Estadual) -ProfId3BR=IM (Inscricao Municipal) -ProfId4BR=CPF -#ProfId5BR=CNAE -#ProfId6BR=INSS -ProfId1CH=UID-Nummer -ProfId2CH=- -ProfId3CH=Prof Id 1 (Federal number) -ProfId4CH=Prof Id 2 (Commercial Record number) -ProfId5CH=EORI number -ProfId6CH=- -ProfId1CL=Prof Id 1 (R.U.T.) -ProfId2CL=- -ProfId3CL=- -ProfId4CL=- -ProfId5CL=- -ProfId6CL=- -ProfId1CO=Prof Id 1 (R.U.T.) -ProfId2CO=- -ProfId3CO=- -ProfId4CO=- -ProfId5CO=- -ProfId6CO=- -ProfId1DE=Prof Id 1 (USt.-IdNr) -ProfId2DE=Prof Id 2 (USt.-Nr) -ProfId3DE=Prof Id 3 (Handelsregister-Nr.) -ProfId4DE=- -ProfId5DE=EORI number -ProfId6DE=- -ProfId1ES=Prof Id 1 (CIF/NIF) -ProfId2ES=Prof Id 2 (Social security number) -ProfId3ES=Prof Id 3 (CNAE) -ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=Prof Id 5 (EORI number) -ProfId6ES=- -ProfId1FR=Prof Id 1 (SIREN) -ProfId2FR=Prof Id 2 (SIRET) -ProfId3FR=Prof Id 3 (NAF, old APE) -ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=Prof Id 5 (numéro EORI) -ProfId6FR=- -ProfId1ShortFR=SIREN -ProfId2ShortFR=SIRET -ProfId3ShortFR=NAF -ProfId4ShortFR=RCS -ProfId5ShortFR=EORI -ProfId6ShortFR=- -ProfId1GB=Registration Number -ProfId2GB=- -ProfId3GB=SIC -ProfId4GB=- -ProfId5GB=- -ProfId6GB=- -ProfId1HN=Id prof. 1 (RTN) -ProfId2HN=- -ProfId3HN=- -ProfId4HN=- -ProfId5HN=- -ProfId6HN=- -ProfId1IN=Prof Id 1 (TIN) -ProfId2IN=Prof Id 2 (PAN) -ProfId3IN=Prof Id 3 (SRVC TAX) -ProfId4IN=Prof Id 4 -ProfId5IN=Prof Id 5 -ProfId6IN=- -ProfId1IT=- -ProfId2IT=- -ProfId3IT=- -ProfId4IT=- -ProfId5IT=EORI number -ProfId6IT=- -ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) -ProfId2LU=Id. prof. 2 (Business permit) -ProfId3LU=- -ProfId4LU=- -ProfId5LU=EORI number -ProfId6LU=- -ProfId1MA=Id prof. 1 (R.C.) -ProfId2MA=Id prof. 2 (Patente) -ProfId3MA=Id prof. 3 (I.F.) -ProfId4MA=Id prof. 4 (C.N.S.S.) -ProfId5MA=Id prof. 5 (I.C.E.) -ProfId6MA=- -ProfId1MX=Prof Id 1 (R.F.C). -ProfId2MX=Prof Id 2 (R..P. IMSS) -ProfId3MX=Prof Id 3 (Profesional Charter) -ProfId4MX=- -ProfId5MX=- -ProfId6MX=- -ProfId1NL=KVK nummer -ProfId2NL=- -ProfId3NL=- -ProfId4NL=Burgerservicenummer (BSN) -ProfId5NL=EORI number -ProfId6NL=- -ProfId1PT=Prof Id 1 (NIPC) -ProfId2PT=Prof Id 2 (Social security number) -ProfId3PT=Prof Id 3 (Commercial Record number) -ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=Prof Id 5 (EORI number) -ProfId6PT=- -ProfId1SN=RC -ProfId2SN=NINEA -ProfId3SN=- -ProfId4SN=- -ProfId5SN=- -ProfId6SN=- -ProfId1TN=Prof Id 1 (RC) -ProfId2TN=Prof Id 2 (Fiscal matricule) -ProfId3TN=Prof Id 3 (Douane code) -ProfId4TN=Prof Id 4 (BAN) -ProfId5TN=- -ProfId6TN=- -ProfId1US=Prof Id (FEIN) -ProfId2US=- -ProfId3US=- -ProfId4US=- -ProfId5US=- -ProfId6US=- -ProfId1RO=Prof Id 1 (CUI) -ProfId2RO=Prof Id 2 (Nr. Înmatriculare) -ProfId3RO=Prof Id 3 (CAEN) -ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=Prof Id 5 (EORI number) -ProfId6RO=- -ProfId1RU=Prof Id 1 (OGRN) -ProfId2RU=Prof Id 2 (INN) -ProfId3RU=Prof Id 3 (KPP) -ProfId4RU=Prof Id 4 (OKPO) -ProfId5RU=- -ProfId6RU=- -ProfId1DZ=RC -ProfId2DZ=Art. -ProfId3DZ=NIF -ProfId4DZ=NIS -VATIntra=VAT ID -VATIntraShort=VAT ID -VATIntraSyntaxIsValid=Syntax is valid -VATReturn=VAT return -ProspectCustomer=Prospect / Customer -Prospect=Prospect -CustomerCard=Customer Card -Customer=Customer -CustomerRelativeDiscount=Relative customer discount -SupplierRelativeDiscount=Relative vendor discount -CustomerRelativeDiscountShort=Relative discount -CustomerAbsoluteDiscountShort=Absolute discount -CompanyHasRelativeDiscount=This customer has a default discount of %s%% -CompanyHasNoRelativeDiscount=This customer has no relative discount by default -HasRelativeDiscountFromSupplier=You have a default discount of %s%% from this vendor -HasNoRelativeDiscountFromSupplier=You have no default relative discount from this vendor -CompanyHasAbsoluteDiscount=This customer has discounts available (credits notes or down payments) for %s %s -CompanyHasDownPaymentOrCommercialDiscount=This customer has discounts available (commercial, down payments) for %s %s -CompanyHasCreditNote=This customer still has credit notes for %s %s -HasNoAbsoluteDiscountFromSupplier=You have no discount credit available from this vendor -HasAbsoluteDiscountFromSupplier=You have discounts available (credits notes or down payments) for %s %s from this vendor -HasDownPaymentOrCommercialDiscountFromSupplier=You have discounts available (commercial, down payments) for %s %s from this vendor -HasCreditNoteFromSupplier=You have credit notes for %s %s from this vendor -CompanyHasNoAbsoluteDiscount=This customer has no discount credit available -CustomerAbsoluteDiscountAllUsers=Absolute customer discounts (granted by all users) -CustomerAbsoluteDiscountMy=Absolute customer discounts (granted by yourself) -SupplierAbsoluteDiscountAllUsers=Absolute vendor discounts (entered by all users) -SupplierAbsoluteDiscountMy=Absolute vendor discounts (entered by yourself) -DiscountNone=None -Vendor=Vendor -Supplier=Vendor -AddContact=Create contact -AddContactAddress=Create contact/address -EditContact=Edit contact -EditContactAddress=Edit contact/address -Contact=Contact/Address -Contacts=Contacts/Addresses -ContactId=Contact id -ContactsAddresses=Contacts/Addresses -FromContactName=Name: -NoContactDefinedForThirdParty=No contact defined for this third party -NoContactDefined=No contact defined -DefaultContact=Default contact/address -ContactByDefaultFor=Default contact/address for -AddThirdParty=Create third party -DeleteACompany=Delete a company -PersonalInformations=Personal data -AccountancyCode=Accounting account -CustomerCode=Customer Code -SupplierCode=Vendor Code -CustomerCodeShort=Customer Code -SupplierCodeShort=Vendor Code -CustomerCodeDesc=Customer Code, unique for all customers -SupplierCodeDesc=Vendor Code, unique for all vendors -RequiredIfCustomer=Required if third party is a customer or prospect -RequiredIfSupplier=Required if third party is a vendor -ValidityControledByModule=Validity controlled by the module -ThisIsModuleRules=Rules for this module -ProspectToContact=Prospect to contact -CompanyDeleted=Company "%s" deleted from database. -ListOfContacts=List of contacts/addresses -ListOfContactsAddresses=List of contacts/addresses -ListOfThirdParties=List of Third Parties -ShowCompany=Third Party -ShowContact=Contact-Address -ContactsAllShort=All (No filter) -ContactType=Contact type -ContactForOrders=Order's contact -ContactForOrdersOrShipments=Order's or shipment's contact -ContactForProposals=Proposal's contact -ContactForContracts=Contract's contact -ContactForInvoices=Invoice's contact -NoContactForAnyOrder=This contact is not a contact for any order -NoContactForAnyOrderOrShipments=This contact is not a contact for any order or shipment -NoContactForAnyProposal=This contact is not a contact for any commercial proposal -NoContactForAnyContract=This contact is not a contact for any contract -NoContactForAnyInvoice=This contact is not a contact for any invoice -NewContact=New contact -NewContactAddress=New Contact/Address -MyContacts=My contacts -Capital=Capital -CapitalOf=Capital of %s -EditCompany=Edit company -ThisUserIsNot=This user is not a prospect, customer or vendor -VATIntraCheck=Check -VATIntraCheckDesc=The VAT ID must include the country prefix. The link %s uses the European VAT checker service (VIES) which requires internet access from the Dolibarr server. -VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do -VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commission website -VATIntraManualCheck=You can also check manually on the European Commission website %s -ErrorVATCheckMS_UNAVAILABLE=Check not possible. Check service is not provided by the member state (%s). -NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Business entity type -Workforce=Workforce -Staff=Employees -ProspectLevelShort=Potential -ProspectLevel=Prospect potential -ContactPrivate=Private -ContactPublic=Shared -ContactVisibility=Visibility -ContactOthers=Other -OthersNotLinkedToThirdParty=Others, not linked to a third party -ProspectStatus=Prospect status -PL_NONE=None -PL_UNKNOWN=Unknown -PL_LOW=Low -PL_MEDIUM=Medium -PL_HIGH=High -TE_UNKNOWN=- -TE_STARTUP=Startup -TE_GROUP=Large company -TE_MEDIUM=Medium company -TE_ADMIN=Governmental -TE_SMALL=Small company -TE_RETAIL=Retailer -TE_WHOLE=Wholesaler -TE_PRIVATE=Private individual -TE_OTHER=Other -StatusProspect-1=Do not contact -StatusProspect0=Never contacted -StatusProspect1=To be contacted -StatusProspect2=Contact in process -StatusProspect3=Contact done -ChangeDoNotContact=Change status to 'Do not contact' -ChangeNeverContacted=Change status to 'Never contacted' -ChangeToContact=Change status to 'To be contacted' -ChangeContactInProcess=Change status to 'Contact in process' -ChangeContactDone=Change status to 'Contact done' -ProspectsByStatus=Prospects by status -NoParentCompany=None -ExportCardToFormat=Export card to format -ContactNotLinkedToCompany=Contact not linked to any third party -DolibarrLogin=Dolibarr login -NoDolibarrAccess=No Dolibarr access -ExportDataset_company_1=Third-parties (companies/foundations/physical people) and their properties -ExportDataset_company_2=Contacts and their properties -ImportDataset_company_1=Third-parties and their properties -ImportDataset_company_2=Third-parties additional contacts/addresses and attributes -ImportDataset_company_3=Third-parties Bank accounts -ImportDataset_company_4=Third-parties Sales representatives (assign sales representatives/users to companies) -PriceLevel=Price Level -PriceLevelLabels=Price Level Labels -DeliveryAddress=Delivery address -AddAddress=Add address -SupplierCategory=Vendor category -JuridicalStatus200=Independent -DeleteFile=Delete file -ConfirmDeleteFile=Are you sure you want to delete this file? -AllocateCommercial=Assigned to sales representative -Organization=Organization -FiscalYearInformation=Fiscal Year -FiscalMonthStart=Starting month of the fiscal year -SocialNetworksInformation=Social networks -SocialNetworksFacebookURL=Facebook URL -SocialNetworksTwitterURL=Twitter URL -SocialNetworksLinkedinURL=Linkedin URL -SocialNetworksInstagramURL=Instagram URL -SocialNetworksYoutubeURL=Youtube URL -SocialNetworksGithubURL=Github URL -YouMustAssignUserMailFirst=You must create an email for this user prior to being able to add an email notification. -YouMustCreateContactFirst=To be able to add email notifications, you must first define contacts with valid emails for the third party -ListSuppliersShort=List of Vendors -ListProspectsShort=List of Prospects -ListCustomersShort=List of Customers -ThirdPartiesArea=Third Parties/Contacts -LastModifiedThirdParties=Latest %s Third Parties which were modified -UniqueThirdParties=Total number of Third Parties -InActivity=Open -ActivityCeased=Closed -ThirdPartyIsClosed=Third party is closed -ProductsIntoElements=List of products/services mapped to %s -CurrentOutstandingBill=Current outstanding bill -OutstandingBill=Max. for outstanding bill -OutstandingBillReached=Max. for outstanding bill reached -OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. -LeopardNumRefModelDesc=The code is free. This code can be modified at any time. -ManagingDirectors=Manager(s) name (CEO, director, president...) -MergeOriginThirdparty=Duplicate third party (third party you want to delete) -MergeThirdparties=Merge third parties -ConfirmMergeThirdparties=Are you sure you want to merge the chosen third party with the current one? All linked objects (invoices, orders, ...) will be moved to the current third party, after which the chosen third party will be deleted. -ThirdpartiesMergeSuccess=Third parties have been merged -SaleRepresentativeLogin=Login of sales representative -SaleRepresentativeFirstname=First name of sales representative -SaleRepresentativeLastname=Last name of sales representative -ErrorThirdpartiesMerge=There was an error when deleting the third parties. Please check the log. Changes have been reverted. -NewCustomerSupplierCodeProposed=Customer or Vendor code already used, a new code is suggested -KeepEmptyIfGenericAddress=Keep this field empty if this address is a generic address -#Imports -PaymentTypeCustomer=Payment Type - Customer -PaymentTermsCustomer=Payment Terms - Customer -PaymentTypeSupplier=Payment Type - Vendor -PaymentTermsSupplier=Payment Term - Vendor -PaymentTypeBoth=Payment Type - Customer and Vendor -MulticurrencyUsed=Use Multicurrency -MulticurrencyCurrency=Currency -InEEC=Europe (EEC) -RestOfEurope=Rest of Europe (EEC) -OutOfEurope=Out of Europe (EEC) -CurrentOutstandingBillLate=Current outstanding bill late -BecarefullChangeThirdpartyBeforeAddProductToInvoice=Be carefull, depending on your product price settings, you should change thirdparty before adding product to POS. diff --git a/htdocs/langs/ar_IQ/compta.lang b/htdocs/langs/ar_IQ/compta.lang index 8329346c163..0b2ce4fa537 100644 --- a/htdocs/langs/ar_IQ/compta.lang +++ b/htdocs/langs/ar_IQ/compta.lang @@ -1,294 +1,5 @@ # Dolibarr language file - Source file is en_US - compta -MenuFinancial=Billing | Payment -TaxModuleSetupToModifyRules=Go to Taxes module setup to modify rules for calculation -TaxModuleSetupToModifyRulesLT=Go to Company setup to modify rules for calculation -OptionMode=Option for accountancy -OptionModeTrue=Option Incomes-Expenses -OptionModeVirtual=Option Claims-Debts -OptionModeTrueDesc=In this context, the turnover is calculated over payments (date of payments). The validity of the figures is assured only if the book-keeping is scrutinized through the input/output on the accounts via invoices. -OptionModeVirtualDesc=In this context, the turnover is calculated over invoices (date of validation). When these invoices are due, whether they have been paid or not, they are listed in the turnover output. -FeatureIsSupportedInInOutModeOnly=Feature only available in CREDITS-DEBTS accountancy mode (See Accountancy module configuration) -VATReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Tax module setup. -LTReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Company setup. -Param=Setup -RemainingAmountPayment=Amount payment remaining: -Account=Account -Accountparent=Parent account -Accountsparent=Parent accounts -Income=Income -Outcome=Expense -MenuReportInOut=Income / Expense -ReportInOut=Balance of income and expenses -ReportTurnover=Turnover invoiced -ReportTurnoverCollected=Turnover collected -PaymentsNotLinkedToInvoice=Payments not linked to any invoice, so not linked to any third party -PaymentsNotLinkedToUser=Payments not linked to any user -Profit=Profit -AccountingResult=Accounting result -BalanceBefore=Balance (before) -Balance=Balance -Debit=Debit -Credit=Credit -Piece=Accounting Doc. -AmountHTVATRealReceived=Net collected -AmountHTVATRealPaid=Net paid -VATToPay=Tax sales -VATReceived=Tax received -VATToCollect=Tax purchases -VATSummary=Tax monthly -VATBalance=Tax Balance -VATPaid=Tax paid -LT1Summary=Tax 2 summary -LT2Summary=Tax 3 summary -LT1SummaryES=RE Balance -LT2SummaryES=IRPF Balance -LT1SummaryIN=CGST Balance -LT2SummaryIN=SGST Balance -LT1Paid=Tax 2 paid -LT2Paid=Tax 3 paid -LT1PaidES=RE Paid -LT2PaidES=IRPF Paid -LT1PaidIN=CGST Paid -LT2PaidIN=SGST Paid -LT1Customer=Tax 2 sales -LT1Supplier=Tax 2 purchases -LT1CustomerES=RE sales -LT1SupplierES=RE purchases -LT1CustomerIN=CGST sales -LT1SupplierIN=CGST purchases -LT2Customer=Tax 3 sales -LT2Supplier=Tax 3 purchases -LT2CustomerES=IRPF sales -LT2SupplierES=IRPF purchases -LT2CustomerIN=SGST sales -LT2SupplierIN=SGST purchases -VATCollected=VAT collected -StatusToPay=To pay -SpecialExpensesArea=Area for all special payments -VATExpensesArea=Area for all TVA payments -SocialContribution=Social or fiscal tax -SocialContributions=Social or fiscal taxes -SocialContributionsDeductibles=Deductible social or fiscal taxes -SocialContributionsNondeductibles=Nondeductible social or fiscal taxes -DateOfSocialContribution=Date of social or fiscal tax -LabelContrib=Label contribution -TypeContrib=Type contribution -MenuSpecialExpenses=Special expenses -MenuTaxAndDividends=Taxes and dividends -MenuSocialContributions=Social/fiscal taxes -MenuNewSocialContribution=New social/fiscal tax -NewSocialContribution=New social/fiscal tax -AddSocialContribution=Add social/fiscal tax -ContributionsToPay=Social/fiscal taxes to pay -AccountancyTreasuryArea=Billing and payment area -NewPayment=New payment -PaymentCustomerInvoice=Customer invoice payment -PaymentSupplierInvoice=vendor invoice payment -PaymentSocialContribution=Social/fiscal tax payment -PaymentVat=VAT payment -AutomaticCreationPayment=Automatically record the payment -ListPayment=List of payments -ListOfCustomerPayments=List of customer payments -ListOfSupplierPayments=List of vendor payments -DateStartPeriod=Date start period -DateEndPeriod=Date end period -newLT1Payment=New tax 2 payment -newLT2Payment=New tax 3 payment -LT1Payment=Tax 2 payment -LT1Payments=Tax 2 payments -LT2Payment=Tax 3 payment -LT2Payments=Tax 3 payments -newLT1PaymentES=New RE payment -newLT2PaymentES=New IRPF payment -LT1PaymentES=RE Payment -LT1PaymentsES=RE Payments -LT2PaymentES=IRPF Payment -LT2PaymentsES=IRPF Payments -VATPayment=Sales tax payment -VATPayments=Sales tax payments -VATDeclarations=VAT declarations -VATDeclaration=VAT declaration -VATRefund=Sales tax refund -NewVATPayment=New sales tax payment -NewLocalTaxPayment=New tax %s payment -Refund=Refund -SocialContributionsPayments=Social/fiscal taxes payments -ShowVatPayment=Show VAT payment -TotalToPay=Total to pay -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted on %s and filtered on 1 bank account (with no other filters) -CustomerAccountancyCode=Customer accounting code -SupplierAccountancyCode=Vendor accounting code -CustomerAccountancyCodeShort=Cust. account. code -SupplierAccountancyCodeShort=Sup. account. code -AccountNumber=Account number -NewAccountingAccount=New account -Turnover=Turnover invoiced -TurnoverCollected=Turnover collected -SalesTurnoverMinimum=Minimum turnover -ByExpenseIncome=By expenses & incomes -ByThirdParties=By third parties -ByUserAuthorOfInvoice=By invoice author -CheckReceipt=Check deposit -CheckReceiptShort=Check deposit -LastCheckReceiptShort=Latest %s check receipts -NewCheckReceipt=New discount -NewCheckDeposit=New check deposit -NewCheckDepositOn=Create receipt for deposit on account: %s -NoWaitingChecks=No checks awaiting deposit. -DateChequeReceived=Check receiving date -NbOfCheques=No. of checks -PaySocialContribution=Pay a social/fiscal tax -PayVAT=Pay a VAT declaration -PaySalary=Pay a salary card -ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? -ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? -ConfirmPaySalary=Are you sure you want to classify this salary card as paid? -DeleteSocialContribution=Delete a social or fiscal tax payment -DeleteVAT=Delete a VAT declaration -DeleteSalary=Delete a salary card -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? -ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? -ConfirmDeleteSalary=Are you sure you want to delete this salary? -ExportDataset_tax_1=Social and fiscal taxes and payments -CalcModeVATDebt=Mode %sVAT on commitment accounting%s. -CalcModeVATEngagement=Mode %sVAT on incomes-expenses%s. -CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. -CalcModeEngagement=Analysis of known recorded payments, even if they are not yet accounted in Ledger. -CalcModeBookkeeping=Analysis of data journalized in Bookkeeping Ledger table. -CalcModeLT1= Mode %sRE on customer invoices - suppliers invoices%s -CalcModeLT1Debt=Mode %sRE on customer invoices%s -CalcModeLT1Rec= Mode %sRE on suppliers invoices%s -CalcModeLT2= Mode %sIRPF on customer invoices - suppliers invoices%s -CalcModeLT2Debt=Mode %sIRPF on customer invoices%s -CalcModeLT2Rec= Mode %sIRPF on suppliers invoices%s -AnnualSummaryDueDebtMode=Balance of income and expenses, annual summary -AnnualSummaryInputOutputMode=Balance of income and expenses, annual summary -AnnualByCompanies=Balance of income and expenses, by predefined groups of account -AnnualByCompaniesDueDebtMode=Balance of income and expenses, detail by predefined groups, mode %sClaims-Debts%s said Commitment accounting. -AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by predefined groups, mode %sIncomes-Expenses%s said cash accounting. -SeeReportInInputOutputMode=See %sanalysis of payments%s for a calculation based on recorded payments made even if they are not yet accounted in Ledger -SeeReportInDueDebtMode=See %sanalysis of recorded documents%s for a calculation based on known recorded documents even if they are not yet accounted in Ledger -SeeReportInBookkeepingMode=See %sanalysis of bookeeping ledger table%s for a report based on Bookkeeping Ledger table -RulesAmountWithTaxIncluded=- Amounts shown are with all taxes included -RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.
    - It is based on the billing date of invoices and on the due date for expenses or tax payments. For salaries defined with Salary module, the value date of payment is used. -RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries.
    - It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation. -RulesCADue=- It includes the customer's due invoices whether they are paid or not.
    - It is based on the billing date of these invoices.
    -RulesCAIn=- It includes all the effective payments of invoices received from customers.
    - It is based on the payment date of these invoices
    -RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. -RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME -RulesAmountOnInOutBookkeepingRecord=It includes record in your Ledger with accounting accounts that has the group "EXPENSE" or "INCOME" -RulesResultBookkeepingPredefined=It includes record in your Ledger with accounting accounts that has the group "EXPENSE" or "INCOME" -RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting accounts grouped by personalized groups -SeePageForSetup=See menu %s for setup -DepositsAreNotIncluded=- Down payment invoices are not included -DepositsAreIncluded=- Down payment invoices are included -LT1ReportByMonth=Tax 2 report by month -LT2ReportByMonth=Tax 3 report by month -LT1ReportByCustomers=Report tax 2 by third party -LT2ReportByCustomers=Report tax 3 by third party -LT1ReportByCustomersES=Report by third party RE -LT2ReportByCustomersES=Report by third party IRPF -VATReport=Sale tax report -VATReportByPeriods=Sale tax report by period -VATReportByMonth=Sale tax report by month -VATReportByRates=Sale tax report by rates -VATReportByThirdParties=Sale tax report by third parties -VATReportByCustomers=Sale tax report by customer -VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid -VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid -VATReportShowByRateDetails=Show details of this rate -LT1ReportByQuarters=Report tax 2 by rate -LT2ReportByQuarters=Report tax 3 by rate -LT1ReportByQuartersES=Report by RE rate -LT2ReportByQuartersES=Report by IRPF rate SeeVATReportInInputOutputMode=See report %sVAT encasement%s for a standard calculation SeeVATReportInDueDebtMode=See report %sVAT on flow%s for a calculation with an option on the flow RulesVATInServices=- For services, the report includes the VAT regulations actually received or issued on the basis of the date of payment. -RulesVATInProducts=- For material assets, the report includes the VAT received or issued on the basis of the date of payment. RulesVATDueServices=- For services, the report includes VAT invoices due, paid or not, based on the invoice date. -RulesVATDueProducts=- For material assets, the report includes the VAT invoices, based on the invoice date. -OptionVatInfoModuleComptabilite=Note: For material assets, it should use the date of delivery to be more fair. -ThisIsAnEstimatedValue=This is a preview, based on business events and not from the final ledger table, so final results may differ from this preview values -PercentOfInvoice=%%/invoice -NotUsedForGoods=Not used on goods -ProposalStats=Statistics on proposals -OrderStats=Statistics on orders -InvoiceStats=Statistics on bills -Dispatch=Dispatching -Dispatched=Dispatched -ToDispatch=To dispatch -ThirdPartyMustBeEditAsCustomer=Third party must be defined as a customer -SellsJournal=Sales Journal -PurchasesJournal=Purchases Journal -DescSellsJournal=Sales Journal -DescPurchasesJournal=Purchases Journal -CodeNotDef=Not defined -WarningDepositsNotIncluded=Down payment invoices are not included in this version with this accountancy module. -DatePaymentTermCantBeLowerThanObjectDate=Payment term date can't be lower than object date. -Pcg_version=Chart of accounts models -Pcg_type=Pcg type -Pcg_subtype=Pcg subtype -InvoiceLinesToDispatch=Invoice lines to dispatch -ByProductsAndServices=By product and service -RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". -LinkedOrder=Link to order -Mode1=Method 1 -Mode2=Method 2 -CalculationRuleDesc=To calculate total VAT, there is two methods:
    Method 1 is rounding vat on each line, then summing them.
    Method 2 is summing all vat on each line, then rounding result.
    Final result may differs from few cents. Default mode is mode %s. -CalculationRuleDescSupplier=According to vendor, choose appropriate method to apply same calculation rule and get same result expected by your vendor. -TurnoverPerProductInCommitmentAccountingNotRelevant=The report of Turnover collected per product is not available. This report is only available for turnover invoiced. -TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=The report of Turnover collected per sale tax rate is not available. This report is only available for turnover invoiced. -CalculationMode=Calculation mode -AccountancyJournal=Accounting code journal -ACCOUNTING_VAT_SOLD_ACCOUNT=Accounting account by default for VAT on sales (used if not defined on VAT dictionary setup) -ACCOUNTING_VAT_BUY_ACCOUNT=Accounting account by default for VAT on purchases (used if not defined on VAT dictionary setup) -ACCOUNTING_VAT_PAY_ACCOUNT=Accounting account by default for paying VAT -ACCOUNTING_ACCOUNT_CUSTOMER=Accounting account used for customer third parties -ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on third party card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated customer accounting account on third party is not defined. -ACCOUNTING_ACCOUNT_SUPPLIER=Accounting account used for vendor third parties -ACCOUNTING_ACCOUNT_SUPPLIER_Desc=The dedicated accounting account defined on third party card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated vendor accounting account on third party is not defined. -ConfirmCloneTax=Confirm the clone of a social/fiscal tax -ConfirmCloneVAT=Confirm the clone of a VAT declaration -ConfirmCloneSalary=Confirm the clone of a salary -CloneTaxForNextMonth=Clone it for next month -SimpleReport=Simple report -AddExtraReport=Extra reports (add foreign and national customer report) -OtherCountriesCustomersReport=Foreign customers report -BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=Based on the two first letters of the VAT number being different from your own company's country code -SameCountryCustomersWithVAT=National customers report -BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Based on the two first letters of the VAT number being the same as your own company's country code -LinkedFichinter=Link to an intervention -ImportDataset_tax_contrib=Social/fiscal taxes -ImportDataset_tax_vat=Vat payments -ErrorBankAccountNotFound=Error: Bank account not found -FiscalPeriod=Accounting period -ListSocialContributionAssociatedProject=List of social contributions associated with the project -DeleteFromCat=Remove from accounting group -AccountingAffectation=Accounting assignment -LastDayTaxIsRelatedTo=Last day of period the tax is related to -VATDue=Sale tax claimed -ClaimedForThisPeriod=Claimed for the period -PaidDuringThisPeriod=Paid for this period -PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range -ByVatRate=By sale tax rate -TurnoverbyVatrate=Turnover invoiced by sale tax rate -TurnoverCollectedbyVatrate=Turnover collected by sale tax rate -PurchasebyVatrate=Purchase by sale tax rate -LabelToShow=Short label -PurchaseTurnover=Purchase turnover -PurchaseTurnoverCollected=Purchase turnover collected -RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not.
    - It is based on the invoice date of these invoices.
    -RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.
    - It is based on the payment date of these invoices
    -RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. -RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE -ReportPurchaseTurnover=Purchase turnover invoiced -ReportPurchaseTurnoverCollected=Purchase turnover collected -IncludeVarpaysInResults = Include various payments in reports -IncludeLoansInResults = Include loans in reports -InvoiceLate30Days = Invoices late > 30 days -InvoiceLate15Days = Invoices late > 15 days -InvoiceLateMinus15Days = Invoices late -InvoiceNotLate = To be collected < 15 days -InvoiceNotLate15Days = To be collected in 15 days -InvoiceNotLate30Days = To be collected in 30 days diff --git a/htdocs/langs/ar_IQ/contracts.lang b/htdocs/langs/ar_IQ/contracts.lang deleted file mode 100644 index a9ac308142a..00000000000 --- a/htdocs/langs/ar_IQ/contracts.lang +++ /dev/null @@ -1,104 +0,0 @@ -# Dolibarr language file - Source file is en_US - contracts -ContractsArea=Contracts area -ListOfContracts=List of contracts -AllContracts=All contracts -ContractCard=Contract card -ContractStatusNotRunning=Not running -ContractStatusDraft=Draft -ContractStatusValidated=Validated -ContractStatusClosed=Closed -ServiceStatusInitial=Not running -ServiceStatusRunning=Running -ServiceStatusNotLate=Running, not expired -ServiceStatusNotLateShort=Not expired -ServiceStatusLate=Running, expired -ServiceStatusLateShort=Expired -ServiceStatusClosed=Closed -ShowContractOfService=Show contract of service -Contracts=Contracts -ContractsSubscriptions=Contracts/Subscriptions -ContractsAndLine=Contracts and line of contracts -Contract=Contract -ContractLine=Contract line -Closing=Closing -NoContracts=No contracts -MenuServices=Services -MenuInactiveServices=Services not active -MenuRunningServices=Running services -MenuExpiredServices=Expired services -MenuClosedServices=Closed services -NewContract=New contract -NewContractSubscription=New contract or subscription -AddContract=Create contract -DeleteAContract=Delete a contract -ActivateAllOnContract=Activate all services -CloseAContract=Close a contract -ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services? -ConfirmValidateContract=Are you sure you want to validate this contract under name %s? -ConfirmActivateAllOnContract=This will open all services (not yet active). Are you sure you want to open all services? -ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract? -ConfirmCloseService=Are you sure you want to close this service with date %s? -ValidateAContract=Validate a contract -ActivateService=Activate service -ConfirmActivateService=Are you sure you want to activate this service with date %s? -RefContract=Contract reference -DateContract=Contract date -DateServiceActivate=Service activation date -ListOfServices=List of services -ListOfInactiveServices=List of not active services -ListOfExpiredServices=List of expired active services -ListOfClosedServices=List of closed services -ListOfRunningServices=List of running services -NotActivatedServices=Inactive services (among validated contracts) -BoardNotActivatedServices=Services to activate among validated contracts -BoardNotActivatedServicesShort=Services to activate -LastContracts=Latest %s contracts -LastModifiedServices=Latest %s modified services -ContractStartDate=Start date -ContractEndDate=End date -DateStartPlanned=Planned start date -DateStartPlannedShort=Planned start date -DateEndPlanned=Planned end date -DateEndPlannedShort=Planned end date -DateStartReal=Real start date -DateStartRealShort=Real start date -DateEndReal=Real end date -DateEndRealShort=Real end date -CloseService=Close service -BoardRunningServices=Services running -BoardRunningServicesShort=Services running -BoardExpiredServices=Services expired -BoardExpiredServicesShort=Services expired -ServiceStatus=Status of service -DraftContracts=Drafts contracts -CloseRefusedBecauseOneServiceActive=Contract can't be closed as there is at least one open service on it -ActivateAllContracts=Activate all contract lines -CloseAllContracts=Close all contract lines -DeleteContractLine=Delete a contract line -ConfirmDeleteContractLine=Are you sure you want to delete this contract line? -MoveToAnotherContract=Move service into another contract. -ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. -ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to? -PaymentRenewContractId=Renew contract line (number %s) -ExpiredSince=Expiration date -NoExpiredServices=No expired active services -ListOfServicesToExpireWithDuration=List of Services to expire in %s days -ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -ListOfServicesToExpire=List of Services to expire -NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. -StandardContractsTemplate=Standard contracts template -ContactNameAndSignature=For %s, name and signature: -OnlyLinesWithTypeServiceAreUsed=Only lines with type "Service" will be cloned. -ConfirmCloneContract=Are you sure you want to clone the contract %s? -LowerDateEndPlannedShort=Lower planned end date of active services -SendContractRef=Contract information __REF__ -OtherContracts=Other contracts -##### Types de contacts ##### -TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract -TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract -TypeContact_contrat_external_BILLING=Billing customer contact -TypeContact_contrat_external_CUSTOMER=Follow-up customer contact -TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact -HideClosedServiceByDefault=Hide closed services by default -ShowClosedServices=Show Closed Services -HideClosedServices=Hide Closed Services diff --git a/htdocs/langs/ar_IQ/cron.lang b/htdocs/langs/ar_IQ/cron.lang deleted file mode 100644 index 4fd2220dea6..00000000000 --- a/htdocs/langs/ar_IQ/cron.lang +++ /dev/null @@ -1,91 +0,0 @@ -# Dolibarr language file - Source file is en_US - cron -# About page -# Right -Permission23101 = Read Scheduled job -Permission23102 = Create/update Scheduled job -Permission23103 = Delete Scheduled job -Permission23104 = Execute Scheduled job -# Admin -CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs from a browser -OrToLaunchASpecificJob=Or to check and launch a specific job from a browser -KeyForCronAccess=Security key for URL to launch cron jobs -FileToLaunchCronJobs=Command line to check and launch qualified cron jobs -CronExplainHowToRunUnix=On Unix environment you should use the following crontab entry to run the command line each 5 minutes -CronExplainHowToRunWin=On Microsoft(tm) Windows environment you can use Scheduled Task tools to run the command line each 5 minutes -CronMethodDoesNotExists=Class %s does not contains any method %s -CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods -CronJobDefDesc=Cron job profiles are defined into the module descriptor file. When module is activated, they are loaded and available so you can administer the jobs from the admin tools menu %s. -CronJobProfiles=List of predefined cron job profiles -# Menu -EnabledAndDisabled=Enabled and disabled -# Page list -CronLastOutput=Latest run output -CronLastResult=Latest result code -CronCommand=Command -CronList=Scheduled jobs -CronDelete=Delete scheduled jobs -CronConfirmDelete=Are you sure you want to delete these scheduled jobs? -CronExecute=Launch scheduled job -CronConfirmExecute=Are you sure you want to execute these scheduled jobs now? -CronInfo=Scheduled job module allows to schedule jobs to execute them automatically. Jobs can also be started manually. -CronTask=Job -CronNone=None -CronDtStart=Not before -CronDtEnd=Not after -CronDtNextLaunch=Next execution -CronDtLastLaunch=Start date of latest execution -CronDtLastResult=End date of latest execution -CronFrequency=Frequency -CronClass=Class -CronMethod=Method -CronModule=Module -CronNoJobs=No jobs registered -CronPriority=Priority -CronLabel=Label -CronNbRun=Number of launches -CronMaxRun=Maximum number of launches -CronEach=Every -JobFinished=Job launched and finished -Scheduled=Scheduled -#Page card -CronAdd= Add jobs -CronEvery=Execute job each -CronObject=Instance/Object to create -CronArgs=Parameters -CronSaveSucess=Save successfully -CronNote=Comment -CronFieldMandatory=Fields %s is mandatory -CronErrEndDateStartDt=End date cannot be before start date -StatusAtInstall=Status at module installation -CronStatusActiveBtn=Schedule -CronStatusInactiveBtn=Disable -CronTaskInactive=This job is disabled (not scheduled) -CronId=Id -CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module).
    For example to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for module is
    product -CronClassFileHelp=The relative path and file name to load (path is relative to web server root directory).
    For example to call the fetch method of Dolibarr Product object htdocs/product/class/product.class.php, the value for class file name is
    product/class/product.class.php -CronObjectHelp=The object name to load.
    For example to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for class file name is
    Product -CronMethodHelp=The object method to launch.
    For example to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for method is
    fetch -CronArgsHelp=The method arguments.
    For example to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for paramters can be
    0, ProductRef -CronCommandHelp=The system command line to execute. -CronCreateJob=Create new Scheduled Job -CronFrom=From -# Info -# Common -CronType=Job type -CronType_method=Call method of a PHP Class -CronType_command=Shell command -CronCannotLoadClass=Cannot load class file %s (to use class %s) -CronCannotLoadObject=Class file %s was loaded, but object %s was not found into it -UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. -JobDisabled=Job disabled -MakeLocalDatabaseDumpShort=Local database backup -MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql', 'pgsql', 'auto'), 1, 'auto' or filename to build, number of backup files to keep -WarningCronDelayed=Attention, for performance purpose, whatever is next date of execution of enabled jobs, your jobs may be delayed to a maximum of %s hours, before being run. -DATAPOLICYJob=Data cleaner and anonymizer -JobXMustBeEnabled=Job %s must be enabled -# Cron Boxes -LastExecutedScheduledJob=Last executed scheduled job -NextScheduledJobExecute=Next scheduled job to execute -NumberScheduledJobError=Number of scheduled jobs in error diff --git a/htdocs/langs/ar_IQ/deliveries.lang b/htdocs/langs/ar_IQ/deliveries.lang deleted file mode 100644 index cd8a36e6c70..00000000000 --- a/htdocs/langs/ar_IQ/deliveries.lang +++ /dev/null @@ -1,33 +0,0 @@ -# Dolibarr language file - Source file is en_US - deliveries -Delivery=Delivery -DeliveryRef=Ref Delivery -DeliveryCard=Receipt card -DeliveryOrder=Delivery receipt -DeliveryDate=Delivery date -CreateDeliveryOrder=Generate delivery receipt -DeliveryStateSaved=Delivery state saved -SetDeliveryDate=Set shipping date -ValidateDeliveryReceipt=Validate delivery receipt -ValidateDeliveryReceiptConfirm=Are you sure you want to validate this delivery receipt? -DeleteDeliveryReceipt=Delete delivery receipt -DeleteDeliveryReceiptConfirm=Are you sure you want to delete delivery receipt %s? -DeliveryMethod=Delivery method -TrackingNumber=Tracking number -DeliveryNotValidated=Delivery not validated -StatusDeliveryCanceled=Canceled -StatusDeliveryDraft=Draft -StatusDeliveryValidated=Received -# merou PDF model -NameAndSignature=Name and Signature: -ToAndDate=To___________________________________ on ____/_____/__________ -GoodStatusDeclaration=Have received the goods above in good condition, -Deliverer=Deliverer: -Sender=Sender -Recipient=Recipient -ErrorStockIsNotEnough=There's not enough stock -Shippable=Shippable -NonShippable=Not Shippable -ShowShippableStatus=Show shippable status -ShowReceiving=Show delivery receipt -NonExistentOrder=Nonexistent order -StockQuantitiesAlreadyAllocatedOnPreviousLines = Stock quantities already allocated on previous lines diff --git a/htdocs/langs/ar_IQ/dict.lang b/htdocs/langs/ar_IQ/dict.lang deleted file mode 100644 index 0524cf1ca18..00000000000 --- a/htdocs/langs/ar_IQ/dict.lang +++ /dev/null @@ -1,359 +0,0 @@ -# Dolibarr language file - Source file is en_US - dict -CountryFR=France -CountryBE=Belgium -CountryIT=Italy -CountryES=Spain -CountryDE=Germany -CountryCH=Switzerland -# Warning, country code GB is for United Kingdom. UK Does not exists as country code in ISO standard. -CountryGB=United Kingdom -CountryUK=United Kingdom -CountryIE=Ireland -CountryCN=China -CountryTN=Tunisia -CountryUS=United States -CountryMA=Morocco -CountryDZ=Algeria -CountryCA=Canada -CountryTG=Togo -CountryGA=Gabon -CountryNL=Netherlands -CountryHU=Hungary -CountryRU=Russia -CountrySE=Sweden -CountryCI=Ivory Coast -CountrySN=Senegal -CountryAR=Argentina -CountryCM=Cameroon -CountryPT=Portugal -CountrySA=Saudi Arabia -CountryMC=Monaco -CountryAU=Australia -CountrySG=Singapore -CountryAF=Afghanistan -CountryAX=Åland Islands -CountryAL=Albania -CountryAS=American Samoa -CountryAD=Andorra -CountryAO=Angola -CountryAI=Anguilla -CountryAQ=Antarctica -CountryAG=Antigua and Barbuda -CountryAM=Armenia -CountryAW=Aruba -CountryAT=Austria -CountryAZ=Azerbaijan -CountryBS=Bahamas -CountryBH=Bahrain -CountryBD=Bangladesh -CountryBB=Barbados -CountryBY=Belarus -CountryBZ=Belize -CountryBJ=Benin -CountryBM=Bermuda -CountryBT=Bhutan -CountryBO=Bolivia -CountryBA=Bosnia and Herzegovina -CountryBW=Botswana -CountryBV=Bouvet Island -CountryBR=Brazil -CountryIO=British Indian Ocean Territory -CountryBN=Brunei Darussalam -CountryBG=Bulgaria -CountryBF=Burkina Faso -CountryBI=Burundi -CountryKH=Cambodia -CountryCV=Cape Verde -CountryKY=Cayman Islands -CountryCF=Central African Republic -CountryTD=Chad -CountryCL=Chile -CountryCX=Christmas Island -CountryCC=Cocos (Keeling) Islands -CountryCO=Colombia -CountryKM=Comoros -CountryCG=Congo -CountryCD=Congo, The Democratic Republic of the -CountryCK=Cook Islands -CountryCR=Costa Rica -CountryHR=Croatia -CountryCU=Cuba -CountryCY=Cyprus -CountryCZ=Czech Republic -CountryDK=Denmark -CountryDJ=Djibouti -CountryDM=Dominica -CountryDO=Dominican Republic -CountryEC=Ecuador -CountryEG=Egypt -CountrySV=El Salvador -CountryGQ=Equatorial Guinea -CountryER=Eritrea -CountryEE=Estonia -CountryET=Ethiopia -CountryFK=Falkland Islands -CountryFO=Faroe Islands -CountryFJ=Fiji Islands -CountryFI=Finland -CountryGF=French Guiana -CountryPF=French Polynesia -CountryTF=French Southern Territories -CountryGM=Gambia -CountryGE=Georgia -CountryGH=Ghana -CountryGI=Gibraltar -CountryGR=Greece -CountryGL=Greenland -CountryGD=Grenada -CountryGP=Guadeloupe -CountryGU=Guam -CountryGT=Guatemala -CountryGN=Guinea -CountryGW=Guinea-Bissau -CountryGY=Guyana -CountryHT=Haïti -CountryHM=Heard Island and McDonald -CountryVA=Holy See (Vatican City State) -CountryHN=Honduras -CountryHK=Hong Kong -CountryIS=Iceland -CountryIN=India -CountryID=Indonesia -CountryIR=Iran -CountryIQ=Iraq -CountryIL=Israel -CountryJM=Jamaica -CountryJP=Japan -CountryJO=Jordan -CountryKZ=Kazakhstan -CountryKE=Kenya -CountryKI=Kiribati -CountryKP=North Korea -CountryKR=South Korea -CountryKW=Kuwait -CountryKG=Kyrgyzstan -CountryLA=Lao -CountryLV=Latvia -CountryLB=Lebanon -CountryLS=Lesotho -CountryLR=Liberia -CountryLY=Libyan -CountryLI=Liechtenstein -CountryLT=Lithuania -CountryLU=Luxembourg -CountryMO=Macao -CountryMK=Macedonia, the former Yugoslav of -CountryMG=Madagascar -CountryMW=Malawi -CountryMY=Malaysia -CountryMV=Maldives -CountryML=Mali -CountryMT=Malta -CountryMH=Marshall Islands -CountryMQ=Martinique -CountryMR=Mauritania -CountryMU=Mauritius -CountryYT=Mayotte -CountryMX=Mexico -CountryFM=Micronesia -CountryMD=Moldova -CountryMN=Mongolia -CountryMS=Monserrat -CountryMZ=Mozambique -CountryMM=Myanmar (Burma) -CountryNA=Namibia -CountryNR=Nauru -CountryNP=Nepal -CountryAN=Netherlands Antilles -CountryNC=New Caledonia -CountryNZ=New Zealand -CountryNI=Nicaragua -CountryNE=Niger -CountryNG=Nigeria -CountryNU=Niue -CountryNF=Norfolk Island -CountryMP=Northern Mariana Islands -CountryNO=Norway -CountryOM=Oman -CountryPK=Pakistan -CountryPW=Palau -CountryPS=Palestinian Territory, Occupied -CountryPA=Panama -CountryPG=Papua New Guinea -CountryPY=Paraguay -CountryPE=Peru -CountryPH=Philippines -CountryPN=Pitcairn Islands -CountryPL=Poland -CountryPR=Puerto Rico -CountryQA=Qatar -CountryRE=Reunion -CountryRO=Romania -CountryRW=Rwanda -CountrySH=Saint Helena -CountryKN=Saint Kitts and Nevis -CountryLC=Saint Lucia -CountryPM=Saint Pierre and Miquelon -CountryVC=Saint Vincent and Grenadines -CountryWS=Samoa -CountrySM=San Marino -CountryST=Sao Tome and Principe -CountryRS=Serbia -CountrySC=Seychelles -CountrySL=Sierra Leone -CountrySK=Slovakia -CountrySI=Slovenia -CountrySB=Solomon Islands -CountrySO=Somalia -CountryZA=South Africa -CountryGS=South Georgia and the South Sandwich Islands -CountryLK=Sri Lanka -CountrySD=Sudan -CountrySR=Suriname -CountrySJ=Svalbard and Jan Mayen -CountrySZ=Swaziland -CountrySY=Syrian -CountryTW=Taiwan -CountryTJ=Tajikistan -CountryTZ=Tanzania -CountryTH=Thailand -CountryTL=Timor-Leste -CountryTK=Tokelau -CountryTO=Tonga -CountryTT=Trinidad and Tobago -CountryTR=Turkey -CountryTM=Turkmenistan -CountryTC=Turks and Caicos Islands -CountryTV=Tuvalu -CountryUG=Uganda -CountryUA=Ukraine -CountryAE=United Arab Emirates -CountryUM=United States Minor Outlying Islands -CountryUY=Uruguay -CountryUZ=Uzbekistan -CountryVU=Vanuatu -CountryVE=Venezuela -CountryVN=Viet Nam -CountryVG=Virgin Islands, British -CountryVI=Virgin Islands, U.S. -CountryWF=Wallis and Futuna -CountryEH=Western Sahara -CountryYE=Yemen -CountryZM=Zambia -CountryZW=Zimbabwe -CountryGG=Guernsey -CountryIM=Isle of Man -CountryJE=Jersey -CountryME=Montenegro -CountryBL=Saint Barthelemy -CountryMF=Saint Martin - -##### Civilities ##### -CivilityMME=Mrs. -CivilityMR=Mr. -CivilityMLE=Ms. -CivilityMTRE=Master -CivilityDR=Doctor -##### Currencies ##### -Currencyeuros=Euros -CurrencyAUD=AU Dollars -CurrencySingAUD=AU Dollar -CurrencyCAD=CAN Dollars -CurrencySingCAD=CAN Dollar -CurrencyCHF=Swiss Francs -CurrencySingCHF=Swiss Franc -CurrencyEUR=Euros -CurrencySingEUR=Euro -CurrencyFRF=French Francs -CurrencySingFRF=French Franc -CurrencyGBP=GB Pounds -CurrencySingGBP=GB Pound -CurrencyINR=Indian rupees -CurrencySingINR=Indian rupee -CurrencyMAD=Dirham -CurrencySingMAD=Dirham -CurrencyMGA=Ariary -CurrencySingMGA=Ariary -CurrencyMUR=Mauritius rupees -CurrencySingMUR=Mauritius rupee -CurrencyNOK=Norwegian krones -CurrencySingNOK=Norwegian kronas -CurrencyTND=Tunisian dinars -CurrencySingTND=Tunisian dinar -CurrencyUSD=US Dollars -CurrencySingUSD=US Dollar -CurrencyUAH=Hryvnia -CurrencySingUAH=Hryvnia -CurrencyXAF=CFA Francs BEAC -CurrencySingXAF=CFA Franc BEAC -CurrencyXOF=CFA Francs BCEAO -CurrencySingXOF=CFA Franc BCEAO -CurrencyXPF=CFP Francs -CurrencySingXPF=CFP Franc -CurrencyCentEUR=cents -CurrencyCentSingEUR=cent -CurrencyCentINR=paisa -CurrencyCentSingINR=paise -CurrencyThousandthSingTND=thousandth -#### Input reasons ##### -DemandReasonTypeSRC_INTE=Internet -DemandReasonTypeSRC_CAMP_MAIL=Mailing campaign -DemandReasonTypeSRC_CAMP_EMAIL=EMailing campaign -DemandReasonTypeSRC_CAMP_PHO=Phone campaign -DemandReasonTypeSRC_CAMP_FAX=Fax campaign -DemandReasonTypeSRC_COMM=Commercial contact -DemandReasonTypeSRC_SHOP=Shop contact -DemandReasonTypeSRC_WOM=Word of mouth -DemandReasonTypeSRC_PARTNER=Partner -DemandReasonTypeSRC_EMPLOYEE=Employee -DemandReasonTypeSRC_SPONSORING=Sponsorship -DemandReasonTypeSRC_SRC_CUSTOMER=Incoming contact of a customer -#### Paper formats #### -PaperFormatEU4A0=Format 4A0 -PaperFormatEU2A0=Format 2A0 -PaperFormatEUA0=Format A0 -PaperFormatEUA1=Format A1 -PaperFormatEUA2=Format A2 -PaperFormatEUA3=Format A3 -PaperFormatEUA4=Format A4 -PaperFormatEUA5=Format A5 -PaperFormatEUA6=Format A6 -PaperFormatUSLETTER=Format Letter US -PaperFormatUSLEGAL=Format Legal US -PaperFormatUSEXECUTIVE=Format Executive US -PaperFormatUSLEDGER=Format Ledger/Tabloid -PaperFormatCAP1=Format P1 Canada -PaperFormatCAP2=Format P2 Canada -PaperFormatCAP3=Format P3 Canada -PaperFormatCAP4=Format P4 Canada -PaperFormatCAP5=Format P5 Canada -PaperFormatCAP6=Format P6 Canada -#### Expense report categories #### -ExpAutoCat=Car -ExpCycloCat=Moped -ExpMotoCat=Motorbike -ExpAuto3CV=3 CV -ExpAuto4CV=4 CV -ExpAuto5CV=5 CV -ExpAuto6CV=6 CV -ExpAuto7CV=7 CV -ExpAuto8CV=8 CV -ExpAuto9CV=9 CV -ExpAuto10CV=10 CV -ExpAuto11CV=11 CV -ExpAuto12CV=12 CV -ExpAuto3PCV=3 CV and more -ExpAuto4PCV=4 CV and more -ExpAuto5PCV=5 CV and more -ExpAuto6PCV=6 CV and more -ExpAuto7PCV=7 CV and more -ExpAuto8PCV=8 CV and more -ExpAuto9PCV=9 CV and more -ExpAuto10PCV=10 CV and more -ExpAuto11PCV=11 CV and more -ExpAuto12PCV=12 CV and more -ExpAuto13PCV=13 CV and more -ExpCyclo=Capacity lower to 50cm3 -ExpMoto12CV=Motorbike 1 or 2 CV -ExpMoto345CV=Motorbike 3, 4 or 5 CV -ExpMoto5PCV=Motorbike 5 CV and more diff --git a/htdocs/langs/ar_IQ/donations.lang b/htdocs/langs/ar_IQ/donations.lang deleted file mode 100644 index d512abb2eea..00000000000 --- a/htdocs/langs/ar_IQ/donations.lang +++ /dev/null @@ -1,35 +0,0 @@ -# Dolibarr language file - Source file is en_US - donations -Donation=Donation -Donations=Donations -DonationRef=Donation ref. -Donor=Donor -AddDonation=Create a donation -NewDonation=New donation -DeleteADonation=Delete a donation -ConfirmDeleteADonation=Are you sure you want to delete this donation? -PublicDonation=Public donation -DonationsArea=Donations area -DonationStatusPromiseNotValidated=Draft promise -DonationStatusPromiseValidated=Validated promise -DonationStatusPaid=Donation received -DonationStatusPromiseNotValidatedShort=Draft -DonationStatusPromiseValidatedShort=Validated -DonationStatusPaidShort=Received -DonationTitle=Donation receipt -DonationDate=Donation date -DonationDatePayment=Payment date -ValidPromess=Validate promise -DonationReceipt=Donation receipt -DonationsModels=Documents models for donation receipts -LastModifiedDonations=Latest %s modified donations -DonationRecipient=Donation recipient -IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount -MinimumAmount=Minimum amount is %s -FreeTextOnDonations=Free text to show in footer -FrenchOptions=Options for France -DONATION_ART200=Show article 200 from CGI if you are concerned -DONATION_ART238=Show article 238 from CGI if you are concerned -DONATION_ART885=Show article 885 from CGI if you are concerned -DonationPayment=Donation payment -DonationValidated=Donation %s validated -DonationUseThirdparties=Use an existing thirdparty as coordinates of donators diff --git a/htdocs/langs/ar_IQ/ecm.lang b/htdocs/langs/ar_IQ/ecm.lang deleted file mode 100644 index bc18bed4a29..00000000000 --- a/htdocs/langs/ar_IQ/ecm.lang +++ /dev/null @@ -1,47 +0,0 @@ -# Dolibarr language file - Source file is en_US - ecm -ECMNbOfDocs=No. of documents in directory -ECMSection=Directory -ECMSectionManual=Manual directory -ECMSectionAuto=Automatic directory -ECMSectionsManual=Manual tree -ECMSectionsAuto=Automatic tree -ECMSections=Directories -ECMRoot=ECM Root -ECMNewSection=New directory -ECMAddSection=Add directory -ECMCreationDate=Creation date -ECMNbOfFilesInDir=Number of files in directory -ECMNbOfSubDir=Number of sub-directories -ECMNbOfFilesInSubDir=Number of files in sub-directories -ECMCreationUser=Creator -ECMArea=DMS/ECM area -ECMAreaDesc=The DMS/ECM (Document Management System / Electronic Content Management) area allows you to save, share and search quickly all kind of documents in Dolibarr. -ECMAreaDesc2=* Automatic directories are filled automatically when adding documents from card of an element.
    * Manual directories can be used to save documents not linked to a particular element. -ECMSectionWasRemoved=Directory %s has been deleted. -ECMSectionWasCreated=Directory %s has been created. -ECMSearchByKeywords=Search by keywords -ECMSearchByEntity=Search by object -ECMSectionOfDocuments=Directories of documents -ECMTypeAuto=Automatic -ECMDocsBy=Documents linked to %s -ECMNoDirectoryYet=No directory created -ShowECMSection=Show directory -DeleteSection=Remove directory -ConfirmDeleteSection=Can you confirm you want to delete the directory %s? -ECMDirectoryForFiles=Relative directory for files -CannotRemoveDirectoryContainsFilesOrDirs=Removal not possible because it contains some files or sub-directories -CannotRemoveDirectoryContainsFiles=Removal not possible because it contains some files -ECMFileManager=File manager -ECMSelectASection=Select a directory in the tree... -DirNotSynchronizedSyncFirst=This directory seems to be created or modified outside ECM module. You must click on "Resync" button first to synchronize disk and database to get content of this directory. -ReSyncListOfDir=Resync list of directories -HashOfFileContent=Hash of file content -NoDirectoriesFound=No directories found -FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload it) -ExtraFieldsEcmFiles=Extrafields Ecm Files -ExtraFieldsEcmDirectories=Extrafields Ecm Directories -ECMSetup=ECM Setup -GenerateImgWebp=Duplicate all images with another version with .webp format -ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder (subfolders are not included)... -ConfirmImgWebpCreation=Confirm all images duplication -SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/ar_IQ/errors.lang b/htdocs/langs/ar_IQ/errors.lang deleted file mode 100644 index 45b2c258c41..00000000000 --- a/htdocs/langs/ar_IQ/errors.lang +++ /dev/null @@ -1,305 +0,0 @@ -# Dolibarr language file - Source file is en_US - errors - -# No errors -NoErrorCommitIsDone=No error, we commit -# Errors -ErrorButCommitIsDone=Errors found but we validate despite this -ErrorBadEMail=Email %s is incorrect -ErrorBadMXDomain=Email %s seems incorrect (domain has no valid MX record) -ErrorBadUrl=Url %s is incorrect -ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. -ErrorRefAlreadyExists=Reference %s already exists. -ErrorLoginAlreadyExists=Login %s already exists. -ErrorGroupAlreadyExists=Group %s already exists. -ErrorEmailAlreadyExists=Email %s already exists. -ErrorRecordNotFound=Record not found. -ErrorFailToCopyFile=Failed to copy file '%s' into '%s'. -ErrorFailToCopyDir=Failed to copy directory '%s' into '%s'. -ErrorFailToRenameFile=Failed to rename file '%s' into '%s'. -ErrorFailToDeleteFile=Failed to remove file '%s'. -ErrorFailToCreateFile=Failed to create file '%s'. -ErrorFailToRenameDir=Failed to rename directory '%s' into '%s'. -ErrorFailToCreateDir=Failed to create directory '%s'. -ErrorFailToDeleteDir=Failed to delete directory '%s'. -ErrorFailToMakeReplacementInto=Failed to make replacement into file '%s'. -ErrorFailToGenerateFile=Failed to generate file '%s'. -ErrorThisContactIsAlreadyDefinedAsThisType=This contact is already defined as contact for this type. -ErrorCashAccountAcceptsOnlyCashMoney=This bank account is a cash account, so it accepts payments of type cash only. -ErrorFromToAccountsMustDiffers=Source and targets bank accounts must be different. -ErrorBadThirdPartyName=Bad value for third-party name -ErrorProdIdIsMandatory=The %s is mandatory -ErrorBadCustomerCodeSyntax=Bad syntax for customer code -ErrorBadBarCodeSyntax=Bad syntax for barcode. May be you set a bad barcode type or you defined a barcode mask for numbering that does not match value scanned. -ErrorCustomerCodeRequired=Customer code required -ErrorBarCodeRequired=Barcode required -ErrorCustomerCodeAlreadyUsed=Customer code already used -ErrorBarCodeAlreadyUsed=Barcode already used -ErrorPrefixRequired=Prefix required -ErrorBadSupplierCodeSyntax=Bad syntax for vendor code -ErrorSupplierCodeRequired=Vendor code required -ErrorSupplierCodeAlreadyUsed=Vendor code already used -ErrorBadParameters=Bad parameters -ErrorWrongParameters=Wrong or missing parameters -ErrorBadValueForParameter=Wrong value '%s' for parameter '%s' -ErrorBadImageFormat=Image file has not a supported format (Your PHP does not support functions to convert images of this format) -ErrorBadDateFormat=Value '%s' has wrong date format -ErrorWrongDate=Date is not correct! -ErrorFailedToWriteInDir=Failed to write in directory %s -ErrorFoundBadEmailInFile=Found incorrect email syntax for %s lines in file (example line %s with email=%s) -ErrorUserCannotBeDelete=User cannot be deleted. Maybe it is associated to Dolibarr entities. -ErrorFieldsRequired=Some required fields have been left blank. -ErrorSubjectIsRequired=The email subject is required -ErrorFailedToCreateDir=Failed to create a directory. Check that Web server user has permissions to write into Dolibarr documents directory. If parameter safe_mode is enabled on this PHP, check that Dolibarr php files owns to web server user (or group). -ErrorNoMailDefinedForThisUser=No mail defined for this user -ErrorSetupOfEmailsNotComplete=Setup of emails is not complete -ErrorFeatureNeedJavascript=This feature need javascript to be activated to work. Change this in setup - display. -ErrorTopMenuMustHaveAParentWithId0=A menu of type 'Top' can't have a parent menu. Put 0 in parent menu or choose a menu of type 'Left'. -ErrorLeftMenuMustHaveAParentId=A menu of type 'Left' must have a parent id. -ErrorFileNotFound=File %s not found (Bad path, wrong permissions or access denied by PHP openbasedir or safe_mode parameter) -ErrorDirNotFound=Directory %s not found (Bad path, wrong permissions or access denied by PHP openbasedir or safe_mode parameter) -ErrorFunctionNotAvailableInPHP=Function %s is required for this feature but is not available in this version/setup of PHP. -ErrorDirAlreadyExists=A directory with this name already exists. -ErrorFileAlreadyExists=A file with this name already exists. -ErrorDestinationAlreadyExists=Another file with the name %s already exists. -ErrorPartialFile=File not received completely by server. -ErrorNoTmpDir=Temporary directy %s does not exists. -ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. -ErrorFileSizeTooLarge=File size is too large. -ErrorFieldTooLong=Field %s is too long. -ErrorSizeTooLongForIntType=Size too long for int type (%s digits maximum) -ErrorSizeTooLongForVarcharType=Size too long for string type (%s chars maximum) -ErrorNoValueForSelectType=Please fill value for select list -ErrorNoValueForCheckBoxType=Please fill value for checkbox list -ErrorNoValueForRadioType=Please fill value for radio list -ErrorBadFormatValueList=The list value cannot have more than one comma: %s, but need at least one: key,value -ErrorFieldCanNotContainSpecialCharacters=The field %s must not contains special characters. -ErrorFieldCanNotContainSpecialNorUpperCharacters=The field %s must not contain special characters, nor upper case characters and cannot contain only numbers. -ErrorFieldMustHaveXChar=The field %s must have at least %s characters. -ErrorNoAccountancyModuleLoaded=No accountancy module activated -ErrorExportDuplicateProfil=This profile name already exists for this export set. -ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching is not complete. -ErrorLDAPMakeManualTest=A .ldif file has been generated in directory %s. Try to load it manually from command line to have more information on errors. -ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Reference %s already exists. -ErrorPleaseTypeBankTransactionReportName=Please enter the bank statement name where the entry has to be reported (Format YYYYMM or YYYYMMDD) -ErrorRecordHasChildren=Failed to delete record since it has some child records. -ErrorRecordHasAtLeastOneChildOfType=Object has at least one child of type %s -ErrorRecordIsUsedCantDelete=Can't delete record. It is already used or included into another object. -ErrorModuleRequireJavascript=Javascript must not be disabled to have this feature working. To enable/disable Javascript, go to menu Home->Setup->Display. -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 -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 -ErrorFileIsInfectedWithAVirus=The antivirus program was not able to validate the file (file might be infected by a virus) -ErrorSpecialCharNotAllowedForField=Special characters are not allowed for field "%s" -ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module. -ErrorQtyTooLowForThisSupplier=Quantity too low for this vendor or no price defined on this product for this vendor -ErrorOrdersNotCreatedQtyTooLow=Some orders haven't been created because of too-low quantities -ErrorModuleSetupNotComplete=Setup of module %s looks to be uncomplete. Go on Home - Setup - Modules to complete. -ErrorBadMask=Error on mask -ErrorBadMaskFailedToLocatePosOfSequence=Error, mask without sequence number -ErrorBadMaskBadRazMonth=Error, bad reset value -ErrorMaxNumberReachForThisMask=Maximum number reached for this mask -ErrorCounterMustHaveMoreThan3Digits=Counter must have more than 3 digits -ErrorSelectAtLeastOne=Error, select at least one entry. -ErrorDeleteNotPossibleLineIsConsolidated=Delete not possible because record is linked to a bank transaction that is conciliated -ErrorProdIdAlreadyExist=%s is assigned to another third -ErrorFailedToSendPassword=Failed to send password -ErrorFailedToLoadRSSFile=Fails to get RSS feed. Try to add constant MAIN_SIMPLEXMLLOAD_DEBUG if error messages does not provide enough information. -ErrorForbidden=Access denied.
    You try to access to a page, area or feature of a disabled module or without being in an authenticated session or that is not allowed to your user. -ErrorForbidden2=Permission for this login can be defined by your Dolibarr administrator from menu %s->%s. -ErrorForbidden3=It seems that Dolibarr is not used through an authenticated session. Take a look at Dolibarr setup documentation to know how to manage authentications (htaccess, mod_auth or other...). -ErrorNoImagickReadimage=Class Imagick is not found in this PHP. No preview can be available. Administrators can disable this tab from menu Setup - Display. -ErrorRecordAlreadyExists=Record already exists -ErrorLabelAlreadyExists=This label already exists -ErrorCantReadFile=Failed to read file '%s' -ErrorCantReadDir=Failed to read directory '%s' -ErrorBadLoginPassword=Bad value for login or password -ErrorLoginDisabled=Your account has been disabled -ErrorFailedToRunExternalCommand=Failed to run external command. Check it is available and runnable by your PHP server user. Check also the command is not protected on shell level by a security layer like apparmor. -ErrorFailedToChangePassword=Failed to change password -ErrorLoginDoesNotExists=User with login %s could not be found. -ErrorLoginHasNoEmail=This user has no email address. Process aborted. -ErrorBadValueForCode=Bad value for security code. Try again with new value... -ErrorBothFieldCantBeNegative=Fields %s and %s can't be both negative -ErrorFieldCantBeNegativeOnInvoice=Field %s cannot be negative on this type of invoice. If you need to add a discount line, just create the discount first (from field '%s' in thirdparty card) and apply it to the invoice. -ErrorLinesCantBeNegativeForOneVATRate=Total of lines (net of tax) can't be negative for a given not null VAT rate (Found a negative total for VAT rate %s%%). -ErrorLinesCantBeNegativeOnDeposits=Lines can't be negative in a deposit. You will face problems when you will need to consume the deposit in final invoice if you do so. -ErrorQtyForCustomerInvoiceCantBeNegative=Quantity for line into customer invoices can't be negative -ErrorWebServerUserHasNotPermission=User account %s used to execute web server has no permission for that -ErrorNoActivatedBarcode=No barcode type activated -ErrUnzipFails=Failed to unzip %s with ZipArchive -ErrNoZipEngine=No engine to zip/unzip %s file in this PHP -ErrorFileMustBeADolibarrPackage=The file %s must be a Dolibarr zip package -ErrorModuleFileRequired=You must select a Dolibarr module package file -ErrorPhpCurlNotInstalled=The PHP CURL is not installed, this is essential to talk with Paypal -ErrorFailedToAddToMailmanList=Failed to add record %s to Mailman list %s or SPIP base -ErrorFailedToRemoveToMailmanList=Failed to remove record %s to Mailman list %s or SPIP base -ErrorNewValueCantMatchOldValue=New value can't be equal to old one -ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. -ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). -ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date must be lower than today -ErrorDateMustBeInFuture=The date must be greater than today -ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. -ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. -ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s -ErrorWarehouseMustDiffers=Source and target warehouses must differs -ErrorBadFormat=Bad format! -ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any third party. Link member to an existing third party or create a new third party before creating subscription with invoice. -ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused. -ErrorCantDeletePaymentReconciliated=Can't delete a payment that had generated a bank entry that was reconciled -ErrorCantDeletePaymentSharedWithPayedInvoice=Can't delete a payment shared by at least one invoice with status Paid -ErrorPriceExpression1=Cannot assign to constant '%s' -ErrorPriceExpression2=Cannot redefine built-in function '%s' -ErrorPriceExpression3=Undefined variable '%s' in function definition -ErrorPriceExpression4=Illegal character '%s' -ErrorPriceExpression5=Unexpected '%s' -ErrorPriceExpression6=Wrong number of arguments (%s given, %s expected) -ErrorPriceExpression8=Unexpected operator '%s' -ErrorPriceExpression9=An unexpected error occured -ErrorPriceExpression10=Operator '%s' lacks operand -ErrorPriceExpression11=Expecting '%s' -ErrorPriceExpression14=Division by zero -ErrorPriceExpression17=Undefined variable '%s' -ErrorPriceExpression19=Expression not found -ErrorPriceExpression20=Empty expression -ErrorPriceExpression21=Empty result '%s' -ErrorPriceExpression22=Negative result '%s' -ErrorPriceExpression23=Unknown or non set variable '%s' in %s -ErrorPriceExpression24=Variable '%s' exists but has no value -ErrorPriceExpressionInternal=Internal error '%s' -ErrorPriceExpressionUnknown=Unknown error '%s' -ErrorSrcAndTargetWarehouseMustDiffers=Source and target warehouses must differs -ErrorTryToMakeMoveOnProductRequiringBatchData=Error, trying to make a stock movement without lot/serial information, on product '%s' requiring lot/serial information -ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=All recorded receptions must first be verified (approved or denied) before being allowed to do this action -ErrorCantSetReceptionToTotalDoneWithReceptionDenied=All recorded receptions must first be verified (approved) before being allowed to do this action -ErrorGlobalVariableUpdater0=HTTP request failed with error '%s' -ErrorGlobalVariableUpdater1=Invalid JSON format '%s' -ErrorGlobalVariableUpdater2=Missing parameter '%s' -ErrorGlobalVariableUpdater3=The requested data was not found in result -ErrorGlobalVariableUpdater4=SOAP client failed with error '%s' -ErrorGlobalVariableUpdater5=No global variable selected -ErrorFieldMustBeANumeric=Field %s must be a numeric value -ErrorMandatoryParametersNotProvided=Mandatory parameter(s) not provided -ErrorOppStatusRequiredIfAmount=You set an estimated amount for this lead. So you must also enter it's status. -ErrorFailedToLoadModuleDescriptorForXXX=Failed to load module descriptor class for %s -ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Bad Definition Of Menu Array In Module Descriptor (bad value for key fk_menu) -ErrorSavingChanges=An error has occurred when saving the changes -ErrorWarehouseRequiredIntoShipmentLine=Warehouse is required on the line to ship -ErrorFileMustHaveFormat=File must have format %s -ErrorFilenameCantStartWithDot=Filename can't start with a '.' -ErrorSupplierCountryIsNotDefined=Country for this vendor is not defined. Correct this first. -ErrorsThirdpartyMerge=Failed to merge the two records. Request canceled. -ErrorStockIsNotEnoughToAddProductOnOrder=Stock is not enough for product %s to add it into a new order. -ErrorStockIsNotEnoughToAddProductOnInvoice=Stock is not enough for product %s to add it into a new invoice. -ErrorStockIsNotEnoughToAddProductOnShipment=Stock is not enough for product %s to add it into a new shipment. -ErrorStockIsNotEnoughToAddProductOnProposal=Stock is not enough for product %s to add it into a new proposal. -ErrorFailedToLoadLoginFileForMode=Failed to get the login key for mode '%s'. -ErrorModuleNotFound=File of module was not found. -ErrorFieldAccountNotDefinedForBankLine=Value for Accounting account not defined for source line id %s (%s) -ErrorFieldAccountNotDefinedForInvoiceLine=Value for Accounting account not defined for invoice id %s (%s) -ErrorFieldAccountNotDefinedForLine=Value for Accounting account not defined for the line (%s) -ErrorBankStatementNameMustFollowRegex=Error, bank statement name must follow the following syntax rule %s -ErrorPhpMailDelivery=Check that you don't use a too high number of recipients and that your email content is not similar to a Spam. Ask also your administrator to check firewall and server logs files for a more complete information. -ErrorUserNotAssignedToTask=User must be assigned to task to be able to enter time consumed. -ErrorTaskAlreadyAssigned=Task already assigned to user -ErrorModuleFileSeemsToHaveAWrongFormat=The module package seems to have a wrong format. -ErrorModuleFileSeemsToHaveAWrongFormat2=At least one mandatory directory must exists into zip of module: %s or %s -ErrorFilenameDosNotMatchDolibarrPackageRules=The name of the module package (%s) does not match expected name syntax: %s -ErrorDuplicateTrigger=Error, duplicate trigger name %s. Already loaded from %s. -ErrorNoWarehouseDefined=Error, no warehouses defined. -ErrorBadLinkSourceSetButBadValueForRef=The link you use is not valid. A 'source' for payment is defined, but value for 'ref' is not valid. -ErrorTooManyErrorsProcessStopped=Too many errors. Process was stopped. -ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=Mass validation is not possible when option to increase/decrease stock is set on this action (you must validate one by one so you can define the warehouse to increase/decrease) -ErrorObjectMustHaveStatusDraftToBeValidated=Object %s must have status 'Draft' to be validated. -ErrorObjectMustHaveLinesToBeValidated=Object %s must have lines to be validated. -ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Only validated invoices can be sent using the "Send by email" mass action. -ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a predefined product or not -ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. -ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. -ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. -ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product -ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container %s has the same name or alternative alias that the one your try to use -ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were not loaded, you can still enter them manually. -ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s -ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. -ErrorURLMustEndWith=URL %s must end %s -ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// -ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// -ErrorNewRefIsAlreadyUsed=Error, the new reference is already used -ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Error, delete payment linked to a closed invoice is not possible. -ErrorSearchCriteriaTooSmall=Search criteria too small. -ErrorObjectMustHaveStatusActiveToBeDisabled=Objects must have status 'Active' to be disabled -ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Objects must have status 'Draft' or 'Disabled' to be enabled -ErrorNoFieldWithAttributeShowoncombobox=No fields has property 'showoncombobox' into definition of object '%s'. No way to show the combolist. -ErrorFieldRequiredForProduct=Field '%s' is required for product %s -ProblemIsInSetupOfTerminal=Problem is in setup of terminal %s. -ErrorAddAtLeastOneLineFirst=Add at least one line first -ErrorRecordAlreadyInAccountingDeletionNotPossible=Error, record is already transferred in accounting, deletion is not possible. -ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=Error, language is mandatory if you set the page as a translation of another one. -ErrorLanguageOfTranslatedPageIsSameThanThisPage=Error, language of translated page is same than this one. -ErrorBatchNoFoundForProductInWarehouse=No lot/serial found for product "%s" in warehouse "%s". -ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this lot/serial for product "%s" in warehouse "%s". -ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) -ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? -ErrorReplaceStringEmpty=Error, the string to replace into is empty -ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number -ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number -ErrorFailedToReadObject=Error, failed to read object of type %s -ErrorParameterMustBeEnabledToAllwoThisFeature=Error, parameter %s must be enabled into conf/conf.php to allow use of Command Line Interface by the internal job scheduler -ErrorLoginDateValidity=Error, this login is outside the validity date range -ErrorValueLength=Length of field '%s' must be higher than '%s' -ErrorReservedKeyword=The word '%s' is a reserved keyword -ErrorNotAvailableWithThisDistribution=Not available with this distribution -ErrorPublicInterfaceNotEnabled=Public interface was not enabled -ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page -ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page -ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation -ErrorDateIsInFuture=Error, the date can't be in the future -ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory -ErrorAPercentIsRequired=Error, please fill in the percentage correctly -ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account -ErrorFailedToFindEmailTemplate=Failed to find template with code name %s -ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. - -# Warnings -WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. -WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. -WarningMandatorySetupNotComplete=Click here to setup mandatory parameters -WarningEnableYourModulesApplications=Click here to enable your modules and applications -WarningSafeModeOnCheckExecDir=Warning, PHP option safe_mode is on so command must be stored inside a directory declared by php parameter safe_mode_exec_dir. -WarningBookmarkAlreadyExists=A bookmark with this title or this target (URL) already exists. -WarningPassIsEmpty=Warning, database password is empty. This is a security hole. You should add a password to your database and change your conf.php file to reflect this. -WarningConfFileMustBeReadOnly=Warning, your config file (htdocs/conf/conf.php) can be overwritten by the web server. This is a serious security hole. Modify permissions on file to be in read only mode for operating system user used by Web server. If you use Windows and FAT format for your disk, you must know that this file system does not allow to add permissions on file, so can't be completely safe. -WarningsOnXLines=Warnings on %s source record(s) -WarningNoDocumentModelActivated=No model, for document generation, has been activated. A model will be chosen by default until you check your module setup. -WarningLockFileDoesNotExists=Warning, once setup is finished, you must disable the installation/migration tools by adding a file install.lock into directory %s. Omitting the creation of this file is a grave security risk. -WarningUntilDirRemoved=All security warnings (visible by admin users only) will remain active as long as the vulnerability is present (or that constant MAIN_REMOVE_INSTALL_WARNING is added in Setup->Other Setup). -WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution. -WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. -WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). -WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers. -WarningPaymentDateLowerThanInvoiceDate=Payment date (%s) is earlier than invoice date (%s) for invoice %s. -WarningTooManyDataPleaseUseMoreFilters=Too many data (more than %s lines). Please use more filters or set the constant %s to a higher limit. -WarningSomeLinesWithNullHourlyRate=Some times were recorded by some users while their hourly rate was not defined. A value of 0 %s per hour was used but this may result in wrong valuation of time spent. -WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security purpose you will have to login with your new login before next action. -WarningAnEntryAlreadyExistForTransKey=An entry already exists for the translation key for this language -WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different recipient is limited to %s when using the mass actions on lists -WarningDateOfLineMustBeInExpenseReportRange=Warning, the date of line is not in the range of the expense report -WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. -WarningProjectClosed=Project is closed. You must re-open it first. -WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list. -WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into ECM database index table -WarningTheHiddenOptionIsOn=Warning, the hidden option %s is on. -WarningCreateSubAccounts=Warning, you can't create directly a sub account, you must create a third party or an user and assign them an accounting code to find them in this list -WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. -WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. -ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary -CheckVersionFail=Version check fail -ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it -ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ar_IQ/eventorganization.lang b/htdocs/langs/ar_IQ/eventorganization.lang deleted file mode 100644 index 67a242e640a..00000000000 --- a/htdocs/langs/ar_IQ/eventorganization.lang +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright (C) 2021 Florian Henry -# Copyright (C) 2021 Dorian Vabre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# -# Generic -# -ModuleEventOrganizationName = Event Organization -EventOrganizationDescription = Event Organization through Module Project -EventOrganizationDescriptionLong= Manage Event organization for conference, attendees, speaker, and attendees, with public subcription page -# -# Menu -# -EventOrganizationMenuLeft = Organized events -EventOrganizationConferenceOrBoothMenuLeft = Conference Or Booth - -# -# Admin page -# -EventOrganizationSetup = Event Organization setup -Settings = Settings -EventOrganizationSetupPage = Event Organization setup page -EVENTORGANIZATION_TASK_LABEL = Label of tasks to create automatically when project is validated -EVENTORGANIZATION_TASK_LABELTooltip = When you validate an organized event, some tasks can be automatically created in the project

    For example:
    Send Call for Conference
    Send Call for Booth
    Receive call for conferences
    Receive call for Booth
    Open subscriptions to events for attendees
    Send remind of event to speakers
    Send remind of event to Booth hoster
    Send remind of event to attendees -EVENTORGANIZATION_CATEG_THIRDPARTY_CONF = Category to add to third-parties automatically created when someone suggests a conference -EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH = Category to add to third-parties automatically created when they suggests a booth -EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF = Template of email to send after receiving a suggestion of a conference. -EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH = Template of email to send after receiving a suggestion of a booth. -EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH = Template of email to send after a subscription to a booth has been paid. -EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT = Template of email to send after a subscription to an event has been paid. -EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER = Template of email of massaction to attendes -EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES = Template of email of massaction to speakers -EVENTORGANIZATION_FILTERATTENDEES_CAT = Filter thirdpartie's select list in attendees creation card/form with category -EVENTORGANIZATION_FILTERATTENDEES_TYPE = Filter thirdpartie's select list in attendees creation card/form with customer type - -# -# Object -# -EventOrganizationConfOrBooth= Conference Or Booth -ManageOrganizeEvent = Manage event organisation -ConferenceOrBooth = Conference Or Booth -ConferenceOrBoothTab = Conference Or Booth -AmountOfSubscriptionPaid = Amount of subscription paid -DateSubscription = Date of subscription -ConferenceOrBoothAttendee = Conference Or Booth Attendee - -# -# Template Mail -# -YourOrganizationEventConfRequestWasReceived = Your request for conference was received -YourOrganizationEventBoothRequestWasReceived = Your request for booth was received -EventOrganizationEmailAskConf = Request for conference -EventOrganizationEmailAskBooth = Request for booth -EventOrganizationEmailSubsBooth = Subscription for booth -EventOrganizationEmailSubsEvent = Subscription for an event -EventOrganizationMassEmailAttendees = Communication to attendees -EventOrganizationMassEmailSpeakers = Communication to speakers - -# -# Event -# -AllowUnknownPeopleSuggestConf=Allow unknown people to suggest conferences -AllowUnknownPeopleSuggestConfHelp=Allow unknown people to suggest conferences -AllowUnknownPeopleSuggestBooth=Allow unknown people to suggest booth -AllowUnknownPeopleSuggestBoothHelp=Allow unknown people to suggest booth -PriceOfRegistration=Price of registration -PriceOfRegistrationHelp=Price of registration -PriceOfBooth=Subscription price to stand a booth -PriceOfBoothHelp=Subscription price to stand a booth -EventOrganizationICSLink=Link ICS for events -ConferenceOrBoothInformation=Conference Or Booth informations -Attendees = Attendees -DownloadICSLink = Download ICS link -EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference -SERVICE_BOOTH_LOCATION = Service used for the invoice row about a booth location -SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION = Service used for the invoice row about an attendee subscription to a conference -NbVotes=Number of votes -# -# Status -# -EvntOrgDraft = Draft -EvntOrgSuggested = Suggested -EvntOrgConfirmed = Confirmed -EvntOrgNotQualified = Not Qualified -EvntOrgDone = Done -EvntOrgCancelled = Cancelled -# -# Public page -# -SuggestForm = Suggestion page -RegisterPage = Page for conferences or booth -EvntOrgRegistrationHelpMessage = Here, you can vote for an event, or suggest a new conference or booth for the project -EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference for the project -EvntOrgRegistrationBoothHelpMessage = Here, you can suggest a new booth for the project -ListOfSuggestedConferences = List of suggested conferences -ListOfSuggestedBooths = List of suggested booths -SuggestConference = Suggest a new conference -SuggestBooth = Suggest a booth -ViewAndVote = View and vote for suggested events -PublicAttendeeSubscriptionPage = Public link of registration to a conference -MissingOrBadSecureKey = The security key is invalid or missing -EvntOrgWelcomeMessage = This form allows you to register as a new participant to the conference : '%s' -EvntOrgDuration = This conference starts on %s and ends on %s. -ConferenceAttendeeFee = Conference attendee fee for the event : '%s' occurring from %s to %s. -BoothLocationFee = Booth location for the event : '%s' occurring from %s to %s -EventType = Event type -LabelOfBooth=Booth label -LabelOfconference=Conference label -ConferenceIsNotConfirmed=Subcription not available, conference is not confirmed yet -DateMustBeBeforeThan=%s must be before %s -DateMustBeAfterThan=%s must be after %s - -# -# Vote page -# -EvntOrgRegistrationWelcomeMessage = Welcome on the conference or booth suggestion page. -EvntOrgRegistrationConfWelcomeMessage = Welcome on the conference suggestion page. -EvntOrgRegistrationBoothWelcomeMessage = Welcome on the booth suggestion page. -EvntOrgVoteHelpMessage = Here, you can view and vote for the suggested events for the project -VoteOk = Your vote has been accepted. -AlreadyVoted = You have already voted for this event. -VoteError = An error has occurred during the vote, please try again. - -# -# SubscriptionOk page -# -SubscriptionOk = Your subscription to this conference has been validated -# -# Subscription validation mail -# -ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to a conference -# -# Payment page -# -Attendee = Attendee -PaymentConferenceAttendee = Conference attendee payment -PaymentBoothLocation = Booth location payment diff --git a/htdocs/langs/ar_IQ/exports.lang b/htdocs/langs/ar_IQ/exports.lang index cb652229825..4b7a62067ac 100644 --- a/htdocs/langs/ar_IQ/exports.lang +++ b/htdocs/langs/ar_IQ/exports.lang @@ -1,137 +1,2 @@ # Dolibarr language file - Source file is en_US - exports -ExportsArea=Exports -ImportArea=Import -NewExport=New Export -NewImport=New Import -ExportableDatas=Exportable dataset -ImportableDatas=Importable dataset -SelectExportDataSet=Choose dataset you want to export... -SelectImportDataSet=Choose dataset you want to import... -SelectExportFields=Choose the fields you want to export, or select a predefined export profile -SelectImportFields=Choose the source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: -NotImportedFields=Fields of source file not imported -SaveExportModel=Save your selections as an export profile/template (for reuse). -SaveImportModel=Save this import profile (for reuse) ... -ExportModelName=Export profile name -ExportModelSaved=Export profile saved as %s. -ExportableFields=Exportable fields -ExportedFields=Exported fields -ImportModelName=Import profile name -ImportModelSaved=Import profile saved as %s. -DatasetToExport=Dataset to export -DatasetToImport=Import file into dataset -ChooseFieldsOrdersAndTitle=Choose fields order... -FieldsTitle=Fields title -FieldTitle=Field title -NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... -AvailableFormats=Available Formats -LibraryShort=Library -ExportCsvSeparator=Csv caracter separator -ImportCsvSeparator=Csv caracter separator -Step=Step -FormatedImport=Import Assistant -FormatedImportDesc1=This module allows you to update existing data or add new objects into the database from a file without technical knowledge, using an assistant. -FormatedImportDesc2=First step is to choose the kind of data you want to import, then the format of the source file, then the fields you want to import. -FormatedExport=Export Assistant -FormatedExportDesc1=These tools allow the export of personalized data using an assistant, to help you in the process without requiring technical knowledge. -FormatedExportDesc2=First step is to choose a predefined dataset, then which fields you want to export, and in which order. -FormatedExportDesc3=When data to export are selected, you can choose the format of the output file. -Sheet=Sheet -NoImportableData=No importable data (no module with definitions to allow data imports) -FileSuccessfullyBuilt=File generated -SQLUsedForExport=SQL Request used to extract data -LineId=Id of line -LineLabel=Label of line -LineDescription=Description of line -LineUnitPrice=Unit price of line -LineVATRate=VAT Rate of line -LineQty=Quantity for line -LineTotalHT=Amount excl. tax for line -LineTotalTTC=Amount with tax for line -LineTotalVAT=Amount of VAT for line -TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) -FileWithDataToImport=File with data to import -FileToImport=Source file to import -FileMustHaveOneOfFollowingFormat=File to import must have one of following formats -DownloadEmptyExample=Download template file with field content information -StarAreMandatory=* are mandatory fields -ChooseFormatOfFileToImport=Choose the file format to use as import file format by clicking on the %s icon to select it... -ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... -SourceFileFormat=Source file format -FieldsInSourceFile=Fields in source file -FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) -Field=Field -NoFields=No fields -MoveField=Move field column number %s -ExampleOfImportFile=Example_of_import_file -SaveImportProfile=Save this import profile -ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. -TablesTarget=Targeted tables -FieldsTarget=Targeted fields -FieldTarget=Targeted field -FieldSource=Source field -NbOfSourceLines=Number of lines in source file -NowClickToTestTheImport=Check that the file format (field and string delimiters) of your file matches the options shown and that you have omitted the header line, or these will be flagged as errors in the following simulation.
    Click on the "%s" button to run a check of the file structure/contents and simulate the import process.
    No data will be changed in your database. -RunSimulateImportFile=Run Import Simulation -FieldNeedSource=This field requires data from the source file -SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file -InformationOnSourceFile=Information on source file -InformationOnTargetTables=Information on target fields -SelectAtLeastOneField=Switch at least one source field in the column of fields to export -SelectFormat=Choose this import file format -RunImportFile=Import Data -NowClickToRunTheImport=Check the results of the import simulation. Correct any errors and re-test.
    When the simulation reports no errors you may proceed to import the data into the database. -DataLoadedWithId=The imported data will have an additional field in each database table with this import id: %s, to allow it to be searchable in the case of investigating a problem related to this import. -ErrorMissingMandatoryValue=Mandatory data is empty in the source file for field %s. -TooMuchErrors=There are still %s other source lines with errors but output has been limited. -TooMuchWarnings=There are still %s other source lines with warnings but output has been limited. -EmptyLine=Empty line (will be discarded) -CorrectErrorBeforeRunningImport=You must correct all errors before running the definitive import. -FileWasImported=File was imported with number %s. -YouCanUseImportIdToFindRecord=You can find all the imported records in your database by filtering on field import_key='%s'. -NbOfLinesOK=Number of lines with no errors and no warnings: %s. -NbOfLinesImported=Number of lines successfully imported: %s. -DataComeFromNoWhere=Value to insert comes from nowhere in source file. -DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. -DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find the id of the parent object to use (so the object %s that has the ref. from source file must exist in the database). -DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find the id of the parent object to use (so the code from source file must exist in the dictionary %s). Note that if you know the id, you can also use it in the source file instead of the code. Import should work in both cases. -DataIsInsertedInto=Data coming from source file will be inserted into the following field: -DataIDSourceIsInsertedInto=The id of parent object was found using the data in the source file, will be inserted into the following field: DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -SourceRequired=Data value is mandatory -SourceExample=Example of possible data value -ExampleAnyRefFoundIntoElement=Any ref found for element %s -ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by a separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. -Excel95FormatDesc=Excel file format (.xls)
    This is the native Excel 95 format (BIFF5). -Excel2007FormatDesc=Excel file format (.xlsx)
    This is the native Excel 2007 format (SpreadsheetML). -TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate record (with this field added, all lines will own their own id and will differ). -CsvOptions=CSV format options -Separator=Field Separator -Enclosure=String Delimiter -SpecialCode=Special code -ExportStringFilter=%% allows replacing one or more characters in the text -ExportDateFilter=YYYY, YYYYMM, YYYYMMDD: filters by one year/month/day
    YYYY+YYYY, YYYYMM+YYYYMM, YYYYMMDD+YYYYMMDD: filters over a range of years/months/days
    > YYYY, > YYYYMM, > YYYYMMDD: filters on all following years/months/days
    < YYYY, < YYYYMM, < YYYYMMDD: filters on all previous years/months/days -ExportNumericFilter=NNNNN filters by one value
    NNNNN+NNNNN filters over a range of values
    < NNNNN filters by lower values
    > NNNNN filters by higher values -ImportFromLine=Import starting from line number -EndAtLineNb=End at line number -ImportFromToLine=Limit range (From - To). Eg. to omit header line(s). -SetThisValueTo2ToExcludeFirstLine=For example, set this value to 3 to exclude the 2 first lines.
    If the header lines are NOT omitted, this will result in multiple errors in the Import Simulation. -KeepEmptyToGoToEndOfFile=Keep this field empty to process all lines to the end of the file. -SelectPrimaryColumnsForUpdateAttempt=Select column(s) to use as primary key for an UPDATE import -UpdateNotYetSupportedForThisImport=Update is not supported for this type of import (only insert) -NoUpdateAttempt=No update attempt was performed, only insert -ImportDataset_user_1=Users (employees or not) and properties -ComputedField=Computed field -## filters -SelectFilterFields=If you want to filter on some values, just input values here. -FilteredFields=Filtered fields -FilteredFieldsValues=Value for filter -FormatControlRule=Format control rule -## imports updates -KeysToUseForUpdates=Key (column) to use for updating existing data -NbInsert=Number of inserted lines: %s -NbUpdate=Number of updated lines: %s -MultipleRecordFoundWithTheseFilters=Multiple records have been found with these filters: %s -StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/ar_IQ/externalsite.lang b/htdocs/langs/ar_IQ/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/ar_IQ/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_IQ/ftp.lang b/htdocs/langs/ar_IQ/ftp.lang deleted file mode 100644 index 254a2a698ce..00000000000 --- a/htdocs/langs/ar_IQ/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_IQ/help.lang b/htdocs/langs/ar_IQ/help.lang deleted file mode 100644 index 048de16d3c0..00000000000 --- a/htdocs/langs/ar_IQ/help.lang +++ /dev/null @@ -1,23 +0,0 @@ -# Dolibarr language file - Source file is en_US - help -CommunitySupport=Forum/Wiki support -EMailSupport=Emails support -RemoteControlSupport=Online real-time / remote support -OtherSupport=Other support -ToSeeListOfAvailableRessources=To contact/see available resources: -HelpCenter=Help Center -DolibarrHelpCenter=Dolibarr Help and Support Center -ToGoBackToDolibarr=Otherwise, click here to continue to use Dolibarr. -TypeOfSupport=Type of support -TypeSupportCommunauty=Community (free) -TypeSupportCommercial=Commercial -TypeOfHelp=Type -NeedHelpCenter=Need help or support? -Efficiency=Efficiency -TypeHelpOnly=Help only -TypeHelpDev=Help+Development -TypeHelpDevForm=Help+Development+Training -BackToHelpCenter=Otherwise, go back to Help center home page. -LinkToGoldMember=You can call one of the trainers preselected by Dolibarr for your language (%s) by clicking their Widget (status and maximum price are automatically updated): -PossibleLanguages=Supported languages -SubscribeToFoundation=Help the Dolibarr project, subscribe to the foundation -SeeOfficalSupport=For official Dolibarr support in your language:
    %s diff --git a/htdocs/langs/ar_IQ/holiday.lang b/htdocs/langs/ar_IQ/holiday.lang deleted file mode 100644 index 0527f4c0788..00000000000 --- a/htdocs/langs/ar_IQ/holiday.lang +++ /dev/null @@ -1,136 +0,0 @@ -# Dolibarr language file - Source file is en_US - holiday -HRM=HRM -Holidays=Leave -CPTitreMenu=Leave -MenuReportMonth=Monthly statement -MenuAddCP=New leave request -NotActiveModCP=You must enable the module Leave to view this page. -AddCP=Make a leave request -DateDebCP=Start date -DateFinCP=End date -DraftCP=Draft -ToReviewCP=Awaiting approval -ApprovedCP=Approved -CancelCP=Canceled -RefuseCP=Refused -ValidatorCP=Approver -ListeCP=List of leave -Leave=Leave request -LeaveId=Leave ID -ReviewedByCP=Will be approved by -UserID=User ID -UserForApprovalID=User for approval ID -UserForApprovalFirstname=First name of approval user -UserForApprovalLastname=Last name of approval user -UserForApprovalLogin=Login of approval user -DescCP=Description -SendRequestCP=Create leave request -DelayToRequestCP=Leave requests must be made at least %s day(s) before them. -MenuConfCP=Balance of leave -SoldeCPUser=Leave balance is %s days. -ErrorEndDateCP=You must select an end date greater than the start date. -ErrorSQLCreateCP=An SQL error occurred during the creation: -ErrorIDFicheCP=An error has occurred, the leave request does not exist. -ReturnCP=Return to previous page -ErrorUserViewCP=You are not authorized to read this leave request. -InfosWorkflowCP=Information Workflow -RequestByCP=Requested by -TitreRequestCP=Leave request -TypeOfLeaveId=Type of leave ID -TypeOfLeaveCode=Type of leave code -TypeOfLeaveLabel=Type of leave label -NbUseDaysCP=Number of days of leave used -NbUseDaysCPHelp=The calculation takes into account the non-working days and the holidays defined in the dictionary. -NbUseDaysCPShort=Days of leave -NbUseDaysCPShortInMonth=Days of leave in month -DayIsANonWorkingDay=%s is a non-working day -DateStartInMonth=Start date in month -DateEndInMonth=End date in month -EditCP=Edit -DeleteCP=Delete -ActionRefuseCP=Refuse -ActionCancelCP=Cancel -StatutCP=Status -TitleDeleteCP=Delete the leave request -ConfirmDeleteCP=Confirm the deletion of this leave request? -ErrorCantDeleteCP=Error you don't have the right to delete this leave request. -CantCreateCP=You don't have the right to make leave requests. -InvalidValidatorCP=You must choose the approver for your leave request. -NoDateDebut=You must select a start date. -NoDateFin=You must select an end date. -ErrorDureeCP=Your leave request does not contain working day. -TitleValidCP=Approve the leave request -ConfirmValidCP=Are you sure you want to approve the leave request? -DateValidCP=Date approved -TitleToValidCP=Send leave request -ConfirmToValidCP=Are you sure you want to send the leave request? -TitleRefuseCP=Refuse the leave request -ConfirmRefuseCP=Are you sure you want to refuse the leave request? -NoMotifRefuseCP=You must choose a reason for refusing the request. -TitleCancelCP=Cancel the leave request -ConfirmCancelCP=Are you sure you want to cancel the leave request? -DetailRefusCP=Reason for refusal -DateRefusCP=Date of refusal -DateCancelCP=Date of cancellation -DefineEventUserCP=Assign an exceptional leave for a user -addEventToUserCP=Assign leave -NotTheAssignedApprover=You are not the assigned approver -MotifCP=Reason -UserCP=User -ErrorAddEventToUserCP=An error occurred while adding the exceptional leave. -AddEventToUserOkCP=The addition of the exceptional leave has been completed. -MenuLogCP=View change logs -LogCP=Log of all updates made to "Balance of Leave" -ActionByCP=Updated by -UserUpdateCP=Updated for -PrevSoldeCP=Previous Balance -NewSoldeCP=New Balance -alreadyCPexist=A leave request has already been done on this period. -FirstDayOfHoliday=Beginning day of leave request -LastDayOfHoliday=Ending day of leave request -BoxTitleLastLeaveRequests=Latest %s modified leave requests -HolidaysMonthlyUpdate=Monthly update -ManualUpdate=Manual update -HolidaysCancelation=Leave request cancelation -EmployeeLastname=Employee last name -EmployeeFirstname=Employee first name -TypeWasDisabledOrRemoved=Leave type (id %s) was disabled or removed -LastHolidays=Latest %s leave requests -AllHolidays=All leave requests -HalfDay=Half day -NotTheAssignedApprover=You are not the assigned approver -LEAVE_PAID=Paid vacation -LEAVE_SICK=Sick leave -LEAVE_OTHER=Other leave -LEAVE_PAID_FR=Paid vacation -## Configuration du Module ## -LastUpdateCP=Last automatic update of leave allocation -MonthOfLastMonthlyUpdate=Month of last automatic update of leave allocation -UpdateConfCPOK=Updated successfully. -Module27130Name= Management of leave requests -Module27130Desc= Management of leave requests -ErrorMailNotSend=An error occurred while sending email: -NoticePeriod=Notice period -#Messages -HolidaysToValidate=Validate leave requests -HolidaysToValidateBody=Below is a leave request to validate -HolidaysToValidateDelay=This leave request will take place within a period of less than %s days. -HolidaysToValidateAlertSolde=The user who made this leave request does not have enough available days. -HolidaysValidated=Validated leave requests -HolidaysValidatedBody=Your leave request for %s to %s has been validated. -HolidaysRefused=Request denied -HolidaysRefusedBody=Your leave request for %s to %s has been denied for the following reason: -HolidaysCanceled=Canceled leaved request -HolidaysCanceledBody=Your leave request for %s to %s has been canceled. -FollowedByACounter=1: This type of leave need to be followed by a counter. Counter is incremented manually or automatically and when a leave request is validated, counter is decremented.
    0: Not followed by a counter. -NoLeaveWithCounterDefined=There is no leave types defined that need to be followed by a counter -GoIntoDictionaryHolidayTypes=Go into Home - Setup - Dictionaries - Type of leave to setup the different types of leaves. -HolidaySetup=Setup of module Leave -HolidaysNumberingModules=Numbering models for leave requests -TemplatePDFHolidays=Template for leave requests PDF -FreeLegalTextOnHolidays=Free text on PDF -WatermarkOnDraftHolidayCards=Watermarks on draft leave requests -HolidaysToApprove=Holidays to approve -NobodyHasPermissionToValidateHolidays=Nobody has permission to validate holidays -HolidayBalanceMonthlyUpdate=Monthly update of holiday balance -XIsAUsualNonWorkingDay=%s is usualy a NON working day diff --git a/htdocs/langs/ar_IQ/hrm.lang b/htdocs/langs/ar_IQ/hrm.lang deleted file mode 100644 index da098e10bdb..00000000000 --- a/htdocs/langs/ar_IQ/hrm.lang +++ /dev/null @@ -1,19 +0,0 @@ -# Dolibarr language file - en_US - hrm -# Admin -HRM_EMAIL_EXTERNAL_SERVICE=Email to prevent HRM external service -Establishments=Establishments -Establishment=Establishment -NewEstablishment=New establishment -DeleteEstablishment=Delete establishment -ConfirmDeleteEstablishment=Are you sure you wish to delete this establishment? -OpenEtablishment=Open establishment -CloseEtablishment=Close establishment -# Dictionary -DictionaryPublicHolidays=Leave - Public holidays -DictionaryDepartment=HRM - Department list -DictionaryFunction=HRM - Job positions -# Module -Employees=Employees -Employee=Employee -NewEmployee=New employee -ListOfEmployees=List of employees diff --git a/htdocs/langs/ar_IQ/install.lang b/htdocs/langs/ar_IQ/install.lang deleted file mode 100644 index c1ffee936d7..00000000000 --- a/htdocs/langs/ar_IQ/install.lang +++ /dev/null @@ -1,218 +0,0 @@ -# Dolibarr language file - Source file is en_US - install -InstallEasy=Just follow the instructions step by step. -MiscellaneousChecks=Prerequisites check -ConfFileExists=Configuration file %s exists. -ConfFileDoesNotExistsAndCouldNotBeCreated=Configuration file %s does not exist and could not be created! -ConfFileCouldBeCreated=Configuration file %s could be created. -ConfFileIsNotWritable=Configuration file %s is not writable. Check permissions. For first install, your web server must be able to write into this file during configuration process ("chmod 666" for example on a Unix like OS). -ConfFileIsWritable=Configuration file %s is writable. -ConfFileMustBeAFileNotADir=Configuration file %s must be a file, not a directory. -ConfFileReload=Reloading parameters from configuration file. -PHPSupportPOSTGETOk=This PHP supports variables POST and GET. -PHPSupportPOSTGETKo=It's possible your PHP setup does not support variables POST and/or GET. Check the parameter variables_order in php.ini. -PHPSupportSessions=This PHP supports sessions. -PHPSupport=This PHP supports %s functions. -PHPMemoryOK=Your PHP max session memory is set to %s. This should be enough. -PHPMemoryTooLow=Your PHP max session memory is set to %s bytes. This is too low. Change your php.ini to set memory_limit parameter to at least %s bytes. -Recheck=Click here for a more detailed test -ErrorPHPDoesNotSupportSessions=Your PHP installation does not support sessions. This feature is required to allow Dolibarr to work. Check your PHP setup and permissions of the sessions directory. -ErrorPHPDoesNotSupportGD=Your PHP installation does not support GD graphical functions. No graphs will be available. -ErrorPHPDoesNotSupportCurl=Your PHP installation does not support Curl. -ErrorPHPDoesNotSupportCalendar=Your PHP installation does not support php calendar extensions. -ErrorPHPDoesNotSupportUTF8=Your PHP installation does not support UTF8 functions. Dolibarr cannot work correctly. Resolve this before installing Dolibarr. -ErrorPHPDoesNotSupportIntl=Your PHP installation does not support Intl functions. -ErrorPHPDoesNotSupportxDebug=Your PHP installation does not support extend debug functions. -ErrorPHPDoesNotSupport=Your PHP installation does not support %s functions. -ErrorDirDoesNotExists=Directory %s does not exist. -ErrorGoBackAndCorrectParameters=Go back and check/correct the parameters. -ErrorWrongValueForParameter=You may have typed a wrong value for parameter '%s'. -ErrorFailedToCreateDatabase=Failed to create database '%s'. -ErrorFailedToConnectToDatabase=Failed to connect to database '%s'. -ErrorDatabaseVersionTooLow=Database version (%s) too old. Version %s or higher is required. -ErrorPHPVersionTooLow=PHP version too old. Version %s is required. -ErrorConnectedButDatabaseNotFound=Connection to server successful but database '%s' not found. -ErrorDatabaseAlreadyExists=Database '%s' already exists. -IfDatabaseNotExistsGoBackAndUncheckCreate=If the database does not exist, go back and check option "Create database". -IfDatabaseExistsGoBackAndCheckCreate=If database already exists, go back and uncheck "Create database" option. -WarningBrowserTooOld=Version of browser is too old. Upgrading your browser to a recent version of Firefox, Chrome or Opera is highly recommended. -PHPVersion=PHP Version -License=Using license -ConfigurationFile=Configuration file -WebPagesDirectory=Directory where web pages are stored -DocumentsDirectory=Directory to store uploaded and generated documents -URLRoot=URL Root -ForceHttps=Force secure connections (https) -CheckToForceHttps=Check this option to force secure connections (https).
    This requires that the web server is configured with an SSL certificate. -DolibarrDatabase=Dolibarr Database -DatabaseType=Database type -DriverType=Driver type -Server=Server -ServerAddressDescription=Name or ip address for the database server. Usually 'localhost' when the database server is hosted on the same server as the web server. -ServerPortDescription=Database server port. Keep empty if unknown. -DatabaseServer=Database server -DatabaseName=Database name -DatabasePrefix=Database table prefix -DatabasePrefixDescription=Database table prefix. If empty, defaults to llx_. -AdminLogin=User account for the Dolibarr database owner. -PasswordAgain=Retype password confirmation -AdminPassword=Password for Dolibarr database owner. -CreateDatabase=Create database -CreateUser=Create user account or grant user account permission on the Dolibarr database -DatabaseSuperUserAccess=Database server - Superuser access -CheckToCreateDatabase=Check the box if the database does not exist yet and so must be created.
    In this case, you must also fill in the user name and password for the superuser account at the bottom of this page. -CheckToCreateUser=Check the box if:
    the database user account does not yet exist and so must be created, or
    if the user account exists but the database does not exist and permissions must be granted.
    In this case, you must enter the user account and password and also the superuser account name and password at the bottom of this page. If this box is unchecked, database owner and password must already exist. -DatabaseRootLoginDescription=Superuser account name (to create new databases or new users), mandatory if the database or its owner does not already exist. -KeepEmptyIfNoPassword=Leave empty if superuser has no password (NOT recommended) -SaveConfigurationFile=Saving parameters to -ServerConnection=Server connection -DatabaseCreation=Database creation -CreateDatabaseObjects=Database objects creation -ReferenceDataLoading=Reference data loading -TablesAndPrimaryKeysCreation=Tables and Primary keys creation -CreateTableAndPrimaryKey=Create table %s -CreateOtherKeysForTable=Create foreign keys and indexes for table %s -OtherKeysCreation=Foreign keys and indexes creation -FunctionsCreation=Functions creation -AdminAccountCreation=Administrator login creation -PleaseTypePassword=Please type a password, empty passwords are not allowed! -PleaseTypeALogin=Please type a login! -PasswordsMismatch=Passwords differs, please try again! -SetupEnd=End of setup -SystemIsInstalled=This installation is complete. -SystemIsUpgraded=Dolibarr has been upgraded successfully. -YouNeedToPersonalizeSetup=You need to configure Dolibarr to suit your needs (appearance, features, ...). To do this, please follow the link below: -AdminLoginCreatedSuccessfuly=Dolibarr administrator login '%s' created successfully. -GoToDolibarr=Go to Dolibarr -GoToSetupArea=Go to Dolibarr (setup area) -MigrationNotFinished=The database version is not completely up to date: run the upgrade process again. -GoToUpgradePage=Go to upgrade page again -WithNoSlashAtTheEnd=Without the slash "/" at the end -DirectoryRecommendation=IMPORTANT: You must use a directory that is outside of the web pages (so do not use a subdirectory of previous parameter). -LoginAlreadyExists=Already exists -DolibarrAdminLogin=Dolibarr admin login -AdminLoginAlreadyExists=Dolibarr administrator account '%s' already exists. Go back if you want to create another one. -FailedToCreateAdminLogin=Failed to create Dolibarr administrator account. -WarningRemoveInstallDir=Warning, for security reasons, once the install or upgrade is complete, you should add a file called install.lock into the Dolibarr document directory in order to prevent the accidental/malicious use of the install tools again. -FunctionNotAvailableInThisPHP=Not available in this PHP -ChoosedMigrateScript=Choose migration script -DataMigration=Database migration (data) -DatabaseMigration=Database migration (structure + some data) -ProcessMigrateScript=Script processing -ChooseYourSetupMode=Choose your setup mode and click "Start"... -FreshInstall=Fresh install -FreshInstallDesc=Use this mode if this is your first install. If not, this mode can repair a incomplete previous install. If you want to upgrade your version, choose "Upgrade" mode. -Upgrade=Upgrade -UpgradeDesc=Use this mode if you have replaced old Dolibarr files with files from a newer version. This will upgrade your database and data. -Start=Start -InstallNotAllowed=Setup not allowed by conf.php permissions -YouMustCreateWithPermission=You must create file %s and set write permissions on it for the web server during install process. -CorrectProblemAndReloadPage=Please fix the problem and press F5 to reload the page. -AlreadyDone=Already migrated -DatabaseVersion=Database version -ServerVersion=Database server version -YouMustCreateItAndAllowServerToWrite=You must create this directory and allow for the web server to write into it. -DBSortingCollation=Character sorting order -YouAskDatabaseCreationSoDolibarrNeedToConnect=You selected create database %s, but for this, Dolibarr needs to connect to server %s with super user %s permissions. -YouAskLoginCreationSoDolibarrNeedToConnect=You selected create database user %s, but for this, Dolibarr needs to connect to server %s with super user %s permissions. -BecauseConnectionFailedParametersMayBeWrong=The database connection failed: the host or super user parameters must be wrong. -OrphelinsPaymentsDetectedByMethod=Orphans payment detected by method %s -RemoveItManuallyAndPressF5ToContinue=Remove it manually and press F5 to continue. -FieldRenamed=Field renamed -IfLoginDoesNotExistsCheckCreateUser=If the user does not exist yet, you must check option "Create user" -ErrorConnection=Server "%s", database name "%s", login "%s", or database password may be wrong or the PHP client version may be too old compared to the database version. -InstallChoiceRecommanded=Recommended choice to install version %s from your current version %s -InstallChoiceSuggested=Install choice suggested by installer. -MigrateIsDoneStepByStep=The targeted version (%s) has a gap of several versions. The install wizard will come back to suggest a further migration once this one is complete. -CheckThatDatabasenameIsCorrect=Check that the database name "%s" is correct. -IfAlreadyExistsCheckOption=If this name is correct and that database does not exist yet, you must check option "Create database". -OpenBaseDir=PHP openbasedir parameter -YouAskToCreateDatabaseSoRootRequired=You checked the box "Create database". For this, you need to provide the login/password of superuser (bottom of form). -YouAskToCreateDatabaseUserSoRootRequired=You checked the box "Create database owner". For this, you need to provide the login/password of superuser (bottom of form). -NextStepMightLastALongTime=The current step may take several minutes. Please wait until the next screen is shown completely before continuing. -MigrationCustomerOrderShipping=Migrate shipping for sales orders storage -MigrationShippingDelivery=Upgrade storage of shipping -MigrationShippingDelivery2=Upgrade storage of shipping 2 -MigrationFinished=Migration finished -LastStepDesc=Last step: Define here the login and password you wish to use to connect to Dolibarr. Do not lose this as it is the master account to administer all other/additional user accounts. -ActivateModule=Activate module %s -ShowEditTechnicalParameters=Click here to show/edit advanced parameters (expert mode) -WarningUpgrade=Warning:\nDid you run a database backup first?\nThis is highly recommended. Loss of data (due to for example bugs in mysql version 5.5.40/41/42/43) may be possible during this process, so it is essential to take a complete dump of your database before starting any migration.\n\nClick OK to start migration process... -ErrorDatabaseVersionForbiddenForMigration=Your database version is %s. It has a critical bug, making data loss possible if you make structural changes in your database, such as is required by the migration process. For his reason, migration will not be allowed until you upgrade your database to a layer (patched) version (list of known buggy versions: %s) -KeepDefaultValuesWamp=You used the Dolibarr setup wizard from DoliWamp, so values proposed here are already optimized. Change them only if you know what you are doing. -KeepDefaultValuesDeb=You used the Dolibarr setup wizard from a Linux package (Ubuntu, Debian, Fedora...), so the values proposed here are already optimized. Only the password of the database owner to create must be entered. Change other parameters only if you know what you are doing. -KeepDefaultValuesMamp=You used the Dolibarr setup wizard from DoliMamp, so the values proposed here are already optimized. Change them only if you know what you are doing. -KeepDefaultValuesProxmox=You used the Dolibarr setup wizard from a Proxmox virtual appliance, so the values proposed here are already optimized. Change them only if you know what you are doing. -UpgradeExternalModule=Run dedicated upgrade process of external module -SetAtLeastOneOptionAsUrlParameter=Set at least one option as a parameter in URL. For example: '...repair.php?standard=confirmed' -NothingToDelete=Nothing to clean/delete -NothingToDo=Nothing to do -######### -# upgrade -MigrationFixData=Fix for denormalized data -MigrationOrder=Data migration for customer's orders -MigrationSupplierOrder=Data migration for vendor's orders -MigrationProposal=Data migration for commercial proposals -MigrationInvoice=Data migration for customer's invoices -MigrationContract=Data migration for contracts -MigrationSuccessfullUpdate=Upgrade successful -MigrationUpdateFailed=Failed upgrade process -MigrationRelationshipTables=Data migration for relationship tables (%s) -MigrationPaymentsUpdate=Payment data correction -MigrationPaymentsNumberToUpdate=%s payment(s) to update -MigrationProcessPaymentUpdate=Update payment(s) %s -MigrationPaymentsNothingToUpdate=No more things to do -MigrationPaymentsNothingUpdatable=No more payments that can be corrected -MigrationContractsUpdate=Contract data correction -MigrationContractsNumberToUpdate=%s contract(s) to update -MigrationContractsLineCreation=Create contract line for contract ref %s -MigrationContractsNothingToUpdate=No more things to do -MigrationContractsFieldDontExist=Field fk_facture does not exist anymore. Nothing to do. -MigrationContractsEmptyDatesUpdate=Contract empty date correction -MigrationContractsEmptyDatesUpdateSuccess=Contract empty date correction done successfully -MigrationContractsEmptyDatesNothingToUpdate=No contract empty date to correct -MigrationContractsEmptyCreationDatesNothingToUpdate=No contract creation date to correct -MigrationContractsInvalidDatesUpdate=Bad value date contract correction -MigrationContractsInvalidDateFix=Correct contract %s (Contract date=%s, Starting service date min=%s) -MigrationContractsInvalidDatesNumber=%s contracts modified -MigrationContractsInvalidDatesNothingToUpdate=No date with bad value to correct -MigrationContractsIncoherentCreationDateUpdate=Bad value contract creation date correction -MigrationContractsIncoherentCreationDateUpdateSuccess=Bad value contract creation date correction done successfully -MigrationContractsIncoherentCreationDateNothingToUpdate=No bad value for contract creation date to correct -MigrationReopeningContracts=Open contract closed by error -MigrationReopenThisContract=Reopen contract %s -MigrationReopenedContractsNumber=%s contracts modified -MigrationReopeningContractsNothingToUpdate=No closed contract to open -MigrationBankTransfertsUpdate=Update links between bank entry and a bank transfer -MigrationBankTransfertsNothingToUpdate=All links are up to date -MigrationShipmentOrderMatching=Sendings receipt update -MigrationDeliveryOrderMatching=Delivery receipt update -MigrationDeliveryDetail=Delivery update -MigrationStockDetail=Update stock value of products -MigrationMenusDetail=Update dynamic menus tables -MigrationDeliveryAddress=Update delivery address in shipments -MigrationProjectTaskActors=Data migration for table llx_projet_task_actors -MigrationProjectUserResp=Data migration field fk_user_resp of llx_projet to llx_element_contact -MigrationProjectTaskTime=Update time spent in seconds -MigrationActioncommElement=Update data on actions -MigrationPaymentMode=Data migration for payment type -MigrationCategorieAssociation=Migration of categories -MigrationEvents=Migration of events to add event owner into assignment table -MigrationEventsContact=Migration of events to add event contact into assignment table -MigrationRemiseEntity=Update entity field value of llx_societe_remise -MigrationRemiseExceptEntity=Update entity field value of llx_societe_remise_except -MigrationUserRightsEntity=Update entity field value of llx_user_rights -MigrationUserGroupRightsEntity=Update entity field value of llx_usergroup_rights -MigrationUserPhotoPath=Migration of photo paths for users -MigrationFieldsSocialNetworks=Migration of users fields social networks (%s) -MigrationReloadModule=Reload module %s -MigrationResetBlockedLog=Reset module BlockedLog for v7 algorithm -MigrationImportOrExportProfiles=Migration of import or export profiles (%s) -ShowNotAvailableOptions=Show unavailable options -HideNotAvailableOptions=Hide unavailable options -ErrorFoundDuringMigration=Error(s) were reported during the migration process so next step is not available. To ignore errors, you can click here, but the application or some features may not work correctly until the errors are resolved. -YouTryInstallDisabledByDirLock=The application tried to self-upgrade, but the install/upgrade pages have been disabled for security (directory renamed with .lock suffix).
    -YouTryInstallDisabledByFileLock=The application tried to self-upgrade, but the install/upgrade pages have been disabled for security (by the existence of a lock file install.lock in the dolibarr documents directory).
    -ClickHereToGoToApp=Click here to go to your application -ClickOnLinkOrRemoveManualy=If an upgrade is in progress, please wait. If not, click on the following link. If you always see this same page, you must remove/rename the file install.lock in the documents directory. -Loaded=Loaded -FunctionTest=Function test diff --git a/htdocs/langs/ar_IQ/interventions.lang b/htdocs/langs/ar_IQ/interventions.lang deleted file mode 100644 index ef5df43e546..00000000000 --- a/htdocs/langs/ar_IQ/interventions.lang +++ /dev/null @@ -1,68 +0,0 @@ -# Dolibarr language file - Source file is en_US - interventions -Intervention=Intervention -Interventions=Interventions -InterventionCard=Intervention card -NewIntervention=New intervention -AddIntervention=Create intervention -ChangeIntoRepeatableIntervention=Change to repeatable intervention -ListOfInterventions=List of interventions -ActionsOnFicheInter=Actions on intervention -LastInterventions=Latest %s interventions -AllInterventions=All interventions -CreateDraftIntervention=Create draft -InterventionContact=Intervention contact -DeleteIntervention=Delete intervention -ValidateIntervention=Validate intervention -ModifyIntervention=Modify intervention -DeleteInterventionLine=Delete intervention line -ConfirmDeleteIntervention=Are you sure you want to delete this intervention? -ConfirmValidateIntervention=Are you sure you want to validate this intervention under name %s? -ConfirmModifyIntervention=Are you sure you want to modify this intervention? -ConfirmDeleteInterventionLine=Are you sure you want to delete this intervention line? -ConfirmCloneIntervention=Are you sure you want to clone this intervention? -NameAndSignatureOfInternalContact=Name and signature of intervening: -NameAndSignatureOfExternalContact=Name and signature of customer: -DocumentModelStandard=Standard document model for interventions -InterventionCardsAndInterventionLines=Interventions and lines of interventions -InterventionClassifyBilled=Classify "Billed" -InterventionClassifyUnBilled=Classify "Unbilled" -InterventionClassifyDone=Classify "Done" -StatusInterInvoiced=Billed -SendInterventionRef=Submission of intervention %s -SendInterventionByMail=Send intervention by email -InterventionCreatedInDolibarr=Intervention %s created -InterventionValidatedInDolibarr=Intervention %s validated -InterventionModifiedInDolibarr=Intervention %s modified -InterventionClassifiedBilledInDolibarr=Intervention %s set as billed -InterventionClassifiedUnbilledInDolibarr=Intervention %s set as unbilled -InterventionSentByEMail=Intervention %s sent by email -InterventionDeletedInDolibarr=Intervention %s deleted -InterventionsArea=Interventions area -DraftFichinter=Draft interventions -LastModifiedInterventions=Latest %s modified interventions -FichinterToProcess=Interventions to process -TypeContact_fichinter_external_CUSTOMER=Following-up customer contact -PrintProductsOnFichinter=Print also lines of type "product" (not only services) on intervention card -PrintProductsOnFichinterDetails=interventions generated from orders -UseServicesDurationOnFichinter=Use services duration for interventions generated from orders -UseDurationOnFichinter=Hides the duration field for intervention records -UseDateWithoutHourOnFichinter=Hides hours and minutes off the date field for intervention records -InterventionStatistics=Statistics of interventions -NbOfinterventions=No. of intervention cards -NumberOfInterventionsByMonth=No. of intervention cards by month (date of validation) -AmountOfInteventionNotIncludedByDefault=Amount of intervention is not included by default into profit (in most cases, timesheets are used to count time spent). Add option PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT to 1 into home-setup-other to include them. -InterId=Intervention id -InterRef=Intervention ref. -InterDateCreation=Date creation intervention -InterDuration=Duration intervention -InterStatus=Status intervention -InterNote=Note intervention -InterLine=Line of intervention -InterLineId=Line id intervention -InterLineDate=Line date intervention -InterLineDuration=Line duration intervention -InterLineDesc=Line description intervention -RepeatableIntervention=Template of intervention -ToCreateAPredefinedIntervention=To create a predefined or recurring intervention, create a common intervention and convert it into intervention template -ConfirmReopenIntervention=Are you sure you want to open back the intervention %s? -GenerateInter=Generate intervention diff --git a/htdocs/langs/ar_IQ/intracommreport.lang b/htdocs/langs/ar_IQ/intracommreport.lang deleted file mode 100644 index 93c46f112bb..00000000000 --- a/htdocs/langs/ar_IQ/intracommreport.lang +++ /dev/null @@ -1,40 +0,0 @@ -Module68000Name = Intracomm report -Module68000Desc = Intracomm report management (Support for French DEB/DES format) -IntracommReportSetup = Intracommreport module setup -IntracommReportAbout = About intracommreport - -# Setup -INTRACOMMREPORT_NUM_AGREMENT=Numéro d'agrément (délivré par le CISD de rattachement) -INTRACOMMREPORT_TYPE_ACTEUR=Type d'acteur -INTRACOMMREPORT_ROLE_ACTEUR=Rôle joué par l'acteur -INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION=Niveau d'obligation sur les introductions -INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION=Niveau d'obligation sur les expéditions -INTRACOMMREPORT_CATEG_FRAISDEPORT=Catégorie de services de type "Frais de port" - -INTRACOMMREPORT_NUM_DECLARATION=Numéro de déclarant - -# Menu -MenuIntracommReport=Intracomm report -MenuIntracommReportNew=New declaration -MenuIntracommReportList=List - -# View -NewDeclaration=New declaration -Declaration=Declaration -AnalysisPeriod=Analysis period -TypeOfDeclaration=Type of declaration -DEB=Goods exchange declaration (DEB) -DES=Services exchange declaration (DES) - -# Export page -IntracommReportTitle=Preparation of an XML file in ProDouane format - -# List -IntracommReportList=List of generated declarations -IntracommReportNumber=Numero of declaration -IntracommReportPeriod=Period of analysis -IntracommReportTypeDeclaration=Type of declaration -IntracommReportDownload=download XML file - -# Invoice -IntracommReportTransportMode=Transport mode diff --git a/htdocs/langs/ar_IQ/knowledgemanagement.lang b/htdocs/langs/ar_IQ/knowledgemanagement.lang deleted file mode 100644 index 99425830e53..00000000000 --- a/htdocs/langs/ar_IQ/knowledgemanagement.lang +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) 2021 SuperAdmin -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# -# Generic -# - -# Module label 'ModuleKnowledgeManagementName' -ModuleKnowledgeManagementName = Knowledge Management System -# Module description 'ModuleKnowledgeManagementDesc' -ModuleKnowledgeManagementDesc=Manage a Knowledge Management (KM) or Help-Desk base - -# -# Admin page -# -KnowledgeManagementSetup = Knowledge Management System setup -Settings = Settings -KnowledgeManagementSetupPage = Knowledge Management System setup page - - -# -# About page -# -About = About -KnowledgeManagementAbout = About Knowledge Management -KnowledgeManagementAboutPage = Knowledge Management about page - -KnowledgeManagementArea = Knowledge Management -MenuKnowledgeRecord = Knowledge base -ListKnowledgeRecord = List of articles -NewKnowledgeRecord = New article -ValidateReply = Validate solution -KnowledgeRecords = Articles -KnowledgeRecord = Article -KnowledgeRecordExtraFields = Extrafields for Article -GroupOfTicket=Group of tickets -YouCanLinkArticleToATicketCategory=You can link an article to a ticket group (so the article will be suggested during qualification of new tickets) diff --git a/htdocs/langs/ar_IQ/languages.lang b/htdocs/langs/ar_IQ/languages.lang deleted file mode 100644 index 023edb64c52..00000000000 --- a/htdocs/langs/ar_IQ/languages.lang +++ /dev/null @@ -1,110 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -Language_am_ET=Ethiopian -Language_ar_AR=Arabic -Language_ar_EG=Arabic (Egypt) -Language_ar_MA=Arabic (Moroco) -Language_ar_SA=Arabic -Language_ar_TN=Arabic (Tunisia) -Language_ar_IQ=Arabic (Iraq) -Language_az_AZ=Azerbaijani -Language_bn_BD=Bengali -Language_bn_IN=Bengali (India) -Language_bg_BG=Bulgarian -Language_bs_BA=Bosnian -Language_ca_ES=Catalan -Language_cs_CZ=Czech -Language_da_DA=Danish -Language_da_DK=Danish -Language_de_DE=German -Language_de_AT=German (Austria) -Language_de_CH=German (Switzerland) -Language_el_GR=Greek -Language_el_CY=Greek (Cyprus) -Language_en_AU=English (Australia) -Language_en_CA=English (Canada) -Language_en_GB=English (United Kingdom) -Language_en_IN=English (India) -Language_en_NZ=English (New Zealand) -Language_en_SA=English (Saudi Arabia) -Language_en_SG=English (Singapore) -Language_en_US=English (United States) -Language_en_ZA=English (South Africa) -Language_es_ES=Spanish -Language_es_AR=Spanish (Argentina) -Language_es_BO=Spanish (Bolivia) -Language_es_CL=Spanish (Chile) -Language_es_CO=Spanish (Colombia) -Language_es_DO=Spanish (Dominican Republic) -Language_es_EC=Spanish (Ecuador) -Language_es_GT=Spanish (Guatemala) -Language_es_HN=Spanish (Honduras) -Language_es_MX=Spanish (Mexico) -Language_es_PA=Spanish (Panama) -Language_es_PY=Spanish (Paraguay) -Language_es_PE=Spanish (Peru) -Language_es_PR=Spanish (Puerto Rico) -Language_es_US=Spanish (USA) -Language_es_UY=Spanish (Uruguay) -Language_es_GT=Spanish (Guatemala) -Language_es_VE=Spanish (Venezuela) -Language_et_EE=Estonian -Language_eu_ES=Basque -Language_fa_IR=Persian -Language_fi_FI=Finnish -Language_fr_BE=French (Belgium) -Language_fr_CA=French (Canada) -Language_fr_CH=French (Switzerland) -Language_fr_CI=French (Cost Ivory) -Language_fr_CM=French (Cameroun) -Language_fr_FR=French -Language_fr_GA=French (Gabon) -Language_fr_NC=French (New Caledonia) -Language_fr_SN=French (Senegal) -Language_fy_NL=Frisian -Language_gl_ES=Galician -Language_he_IL=Hebrew -Language_hi_IN=Hindi (India) -Language_hr_HR=Croatian -Language_hu_HU=Hungarian -Language_id_ID=Indonesian -Language_is_IS=Icelandic -Language_it_IT=Italian -Language_it_CH=Italian (Switzerland) -Language_ja_JP=Japanese -Language_ka_GE=Georgian -Language_km_KH=Khmer -Language_kn_IN=Kannada -Language_ko_KR=Korean -Language_lo_LA=Lao -Language_lt_LT=Lithuanian -Language_lv_LV=Latvian -Language_mk_MK=Macedonian -Language_mn_MN=Mongolian -Language_nb_NO=Norwegian (Bokmål) -Language_ne_NP=Nepali -Language_nl_BE=Dutch (Belgium) -Language_nl_NL=Dutch -Language_pl_PL=Polish -Language_pt_AO=Portuguese (Angola) -Language_pt_BR=Portuguese (Brazil) -Language_pt_PT=Portuguese -Language_ro_MD=Romanian (Moldavia) -Language_ro_RO=Romanian -Language_ru_RU=Russian -Language_ru_UA=Russian (Ukraine) -Language_tr_TR=Turkish -Language_sl_SI=Slovenian -Language_sv_SV=Swedish -Language_sv_SE=Swedish -Language_sq_AL=Albanian -Language_sk_SK=Slovakian -Language_sr_RS=Serbian -Language_sw_SW=Kiswahili -Language_th_TH=Thai -Language_uk_UA=Ukrainian -Language_uz_UZ=Uzbek -Language_vi_VN=Vietnamese -Language_zh_CN=Chinese -Language_zh_TW=Chinese (Traditional) -Language_zh_HK=Chinese (Hong Kong) -Language_bh_MY=Malay diff --git a/htdocs/langs/ar_IQ/ldap.lang b/htdocs/langs/ar_IQ/ldap.lang deleted file mode 100644 index 8b6f0864215..00000000000 --- a/htdocs/langs/ar_IQ/ldap.lang +++ /dev/null @@ -1,27 +0,0 @@ -# Dolibarr language file - Source file is en_US - ldap -YouMustChangePassNextLogon=Password for user %s on the domain %s must be changed. -UserMustChangePassNextLogon=User must change password on the domain %s -LDAPInformationsForThisContact=Information in LDAP database for this contact -LDAPInformationsForThisUser=Information in LDAP database for this user -LDAPInformationsForThisGroup=Information in LDAP database for this group -LDAPInformationsForThisMember=Information in LDAP database for this member -LDAPInformationsForThisMemberType=Information in LDAP database for this member type -LDAPAttributes=LDAP attributes -LDAPCard=LDAP card -LDAPRecordNotFound=Record not found in LDAP database -LDAPUsers=Users in LDAP database -LDAPFieldStatus=Status -LDAPFieldFirstSubscriptionDate=First subscription date -LDAPFieldFirstSubscriptionAmount=First subscription amount -LDAPFieldLastSubscriptionDate=Latest subscription date -LDAPFieldLastSubscriptionAmount=Latest subscription amount -LDAPFieldSkype=Skype id -LDAPFieldSkypeExample=Example: skypeName -UserSynchronized=User synchronized -GroupSynchronized=Group synchronized -MemberSynchronized=Member synchronized -MemberTypeSynchronized=Member type synchronized -ContactSynchronized=Contact synchronized -ForceSynchronize=Force synchronizing Dolibarr -> LDAP -ErrorFailedToReadLDAP=Failed to read LDAP database. Check LDAP module setup and database accessibility. -PasswordOfUserInLDAP=Password of user in LDAP diff --git a/htdocs/langs/ar_IQ/link.lang b/htdocs/langs/ar_IQ/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/ar_IQ/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ar_IQ/loan.lang b/htdocs/langs/ar_IQ/loan.lang deleted file mode 100644 index d271ed0c140..00000000000 --- a/htdocs/langs/ar_IQ/loan.lang +++ /dev/null @@ -1,34 +0,0 @@ -# Dolibarr language file - Source file is en_US - loan -Loan=Loan -Loans=Loans -NewLoan=New Loan -ShowLoan=Show Loan -PaymentLoan=Loan payment -LoanPayment=Loan payment -ShowLoanPayment=Show Loan Payment -LoanCapital=Capital -Insurance=Insurance -Interest=Interest -Nbterms=Number of terms -Term=Term -LoanAccountancyCapitalCode=Accounting account capital -LoanAccountancyInsuranceCode=Accounting account insurance -LoanAccountancyInterestCode=Accounting account interest -ConfirmDeleteLoan=Confirm deleting this loan -LoanDeleted=Loan Deleted Successfully -ConfirmPayLoan=Confirm classify paid this loan -LoanPaid=Loan Paid -ListLoanAssociatedProject=List of loan associated with the project -AddLoan=Create loan -FinancialCommitment=Financial commitment -InterestAmount=Interest -CapitalRemain=Capital remain -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule -# Admin -ConfigLoan=Configuration of the module loan -LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default -LOAN_ACCOUNTING_ACCOUNT_INTEREST=Accounting account interest by default -LOAN_ACCOUNTING_ACCOUNT_INSURANCE=Accounting account insurance by default -CreateCalcSchedule=Edit financial commitment diff --git a/htdocs/langs/ar_IQ/mailmanspip.lang b/htdocs/langs/ar_IQ/mailmanspip.lang deleted file mode 100644 index bab4b3576b4..00000000000 --- a/htdocs/langs/ar_IQ/mailmanspip.lang +++ /dev/null @@ -1,27 +0,0 @@ -# Dolibarr language file - Source file is en_US - mailmanspip -MailmanSpipSetup=Mailman and SPIP module Setup -MailmanTitle=Mailman mailing list system -TestSubscribe=To test subscription to Mailman lists -TestUnSubscribe=To test unsubscribe from Mailman lists -MailmanCreationSuccess=Subscription test was executed successfully -MailmanDeletionSuccess=Unsubscription test was executed successfully -SynchroMailManEnabled=A Mailman update will be performed -SynchroSpipEnabled=A Spip update will be performed -DescADHERENT_MAILMAN_ADMINPW=Mailman administrator password -DescADHERENT_MAILMAN_URL=URL for Mailman subscriptions -DescADHERENT_MAILMAN_UNSUB_URL=URL for Mailman unsubscriptions -DescADHERENT_MAILMAN_LISTS=List(s) for automatic inscription of new members (separated by a comma) -SPIPTitle=SPIP Content Management System -DescADHERENT_SPIP_SERVEUR=SPIP Server -DescADHERENT_SPIP_DB=SPIP database name -DescADHERENT_SPIP_USER=SPIP database login -DescADHERENT_SPIP_PASS=SPIP database password -AddIntoSpip=Add into SPIP -AddIntoSpipConfirmation=Are you sure you want to add this member into SPIP? -AddIntoSpipError=Failed to add the user in SPIP -DeleteIntoSpip=Remove from SPIP -DeleteIntoSpipConfirmation=Are you sure you want to remove this member from SPIP? -DeleteIntoSpipError=Failed to suppress the user from SPIP -SPIPConnectionFailed=Failed to connect to SPIP -SuccessToAddToMailmanList=%s successfully added to mailman list %s or SPIP database -SuccessToRemoveToMailmanList=%s successfully removed from mailman list %s or SPIP database diff --git a/htdocs/langs/ar_IQ/mails.lang b/htdocs/langs/ar_IQ/mails.lang deleted file mode 100644 index 1c0dd638eeb..00000000000 --- a/htdocs/langs/ar_IQ/mails.lang +++ /dev/null @@ -1,179 +0,0 @@ -# Dolibarr language file - Source file is en_US - mails -Mailing=EMailing -EMailing=EMailing -EMailings=EMailings -AllEMailings=All eMailings -MailCard=EMailing card -MailRecipients=Recipients -MailRecipient=Recipient -MailTitle=Description -MailFrom=Sender -MailErrorsTo=Errors to -MailReply=Reply to -MailTo=Receiver(s) -MailToUsers=To user(s) -MailCC=Copy to -MailToCCUsers=Copy to users(s) -MailCCC=Cached copy to -MailTopic=Email subject -MailText=Message -MailFile=Attached files -MailMessage=Email body -SubjectNotIn=Not in Subject -BodyNotIn=Not in Body -ShowEMailing=Show emailing -ListOfEMailings=List of emailings -NewMailing=New emailing -EditMailing=Edit emailing -ResetMailing=Resend emailing -DeleteMailing=Delete emailing -DeleteAMailing=Delete an emailing -PreviewMailing=Preview emailing -CreateMailing=Create emailing -TestMailing=Test email -ValidMailing=Valid emailing -MailingStatusDraft=Draft -MailingStatusValidated=Validated -MailingStatusSent=Sent -MailingStatusSentPartialy=Sent partially -MailingStatusSentCompletely=Sent completely -MailingStatusError=Error -MailingStatusNotSent=Not sent -MailSuccessfulySent=Email (from %s to %s) successfully accepted for delivery -MailingSuccessfullyValidated=EMailing successfully validated -MailUnsubcribe=Unsubscribe -MailingStatusNotContact=Don't contact anymore -MailingStatusReadAndUnsubscribe=Read and unsubscribe -ErrorMailRecipientIsEmpty=Email recipient is empty -WarningNoEMailsAdded=No new Email to add to recipient's list. -ConfirmValidMailing=Are you sure you want to validate this emailing? -ConfirmResetMailing=Warning, by re-initializing emailing %s, you will allow the re-sending this email in a bulk mailing. Are you sure you want to do this? -ConfirmDeleteMailing=Are you sure you want to delete this emailing? -NbOfUniqueEMails=No. of unique emails -NbOfEMails=No. of EMails -TotalNbOfDistinctRecipients=Number of distinct recipients -NoTargetYet=No recipients defined yet (Go on tab 'Recipients') -NoRecipientEmail=No recipient email for %s -RemoveRecipient=Remove recipient -YouCanAddYourOwnPredefindedListHere=To create your email selector module, see htdocs/core/modules/mailings/README. -EMailTestSubstitutionReplacedByGenericValues=When using test mode, substitutions variables are replaced by generic values -MailingAddFile=Attach this file -NoAttachedFiles=No attached files -BadEMail=Bad value for Email -ConfirmCloneEMailing=Are you sure you want to clone this emailing? -CloneContent=Clone message -CloneReceivers=Cloner recipients -DateLastSend=Date of latest sending -DateSending=Date sending -SentTo=Sent to %s -MailingStatusRead=Read -YourMailUnsubcribeOK=The email %s is correctly unsubscribe from mailing list -ActivateCheckReadKey=Key used to encrypt URL used for "Read Receipt" and "Unsubscribe" feature -EMailSentToNRecipients=Email sent to %s recipients. -EMailSentForNElements=Email sent for %s elements. -XTargetsAdded=%s recipients added into target list -OnlyPDFattachmentSupported=If the PDF documents were already generated for the objects to send, they will be attached to email. If not, no email will be sent (also, note that only pdf documents are supported as attachments in mass sending in this version). -AllRecipientSelected=The recipients of the %s record selected (if their email is known). -GroupEmails=Group emails -OneEmailPerRecipient=One email per recipient (by default, one email per record selected) -WarningIfYouCheckOneRecipientPerEmail=Warning, if you check this box, it means only one email will be sent for several different record selected, so, if your message contains substitution variables that refers to data of a record, it becomes not possible to replace them. -ResultOfMailSending=Result of mass Email sending -NbSelected=Number selected -NbIgnored=Number ignored -NbSent=Number sent -SentXXXmessages=%s message(s) sent. -ConfirmUnvalidateEmailing=Are you sure you want to change email %s to draft status? -MailingModuleDescContactsWithThirdpartyFilter=Contact with customer filters -MailingModuleDescContactsByCompanyCategory=Contacts by third-party category -MailingModuleDescContactsByCategory=Contacts by categories -MailingModuleDescContactsByFunction=Contacts by position -MailingModuleDescEmailsFromFile=Emails from file -MailingModuleDescEmailsFromUser=Emails input by user -MailingModuleDescDolibarrUsers=Users with Emails -MailingModuleDescThirdPartiesByCategories=Third parties (by categories) -SendingFromWebInterfaceIsNotAllowed=Sending from web interface is not allowed. -EmailCollectorFilterDesc=All filters must match to have an email being collected - -# Libelle des modules de liste de destinataires mailing -LineInFile=Line %s in file -RecipientSelectionModules=Defined requests for recipient's selection -MailSelectedRecipients=Selected recipients -MailingArea=EMailings area -LastMailings=Latest %s emailings -TargetsStatistics=Targets statistics -NbOfCompaniesContacts=Unique contacts/addresses -MailNoChangePossible=Recipients for validated emailing can't be changed -SearchAMailing=Search mailing -SendMailing=Send emailing -SentBy=Sent by -MailingNeedCommand=Sending an emailing can be performed from command line. Ask your server administrator to launch the following command to send the emailing to all recipients: -MailingNeedCommand2=You can however send them online by adding parameter MAILING_LIMIT_SENDBYWEB with value of max number of emails you want to send by session. For this, go on Home - Setup - Other. -ConfirmSendingEmailing=If you want to send emailing directly from this screen, please confirm you are sure you want to send emailing now from your browser ? -LimitSendingEmailing=Note: Sending of emailings from web interface is done in several times for security and timeout reasons, %s recipients at a time for each sending session. -TargetsReset=Clear list -ToClearAllRecipientsClickHere=Click here to clear the recipient list for this emailing -ToAddRecipientsChooseHere=Add recipients by choosing from the lists -NbOfEMailingsReceived=Mass emailings received -NbOfEMailingsSend=Mass emailings sent -IdRecord=ID record -DeliveryReceipt=Delivery Ack. -YouCanUseCommaSeparatorForSeveralRecipients=You can use the comma separator to specify several recipients. -TagCheckMail=Track mail opening -TagUnsubscribe=Unsubscribe link -TagSignature=Signature of sending user -EMailRecipient=Recipient Email -TagMailtoEmail=Recipient Email (including html "mailto:" link) -NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. -# Module Notifications -Notifications=Notifications -NotificationsAuto=Notifications Auto. -NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company -ANotificationsWillBeSent=1 automatic notification will be sent by email -SomeNotificationsWillBeSent=%s automatic notifications will be sent by email -AddNewNotification=Subscribe to a new automatic email notification (target/event) -ListOfActiveNotifications=List of all active subscriptions (targets/events) for automatic email notification -ListOfNotificationsDone=List of all automatic email notifications sent -MailSendSetupIs=Configuration of email sending has been setup to '%s'. This mode can't be used to send mass emailing. -MailSendSetupIs2=You must first go, with an admin account, into menu %sHome - Setup - EMails%s to change parameter '%s' to use mode '%s'. With this mode, you can enter setup of the SMTP server provided by your Internet Service Provider and use Mass emailing feature. -MailSendSetupIs3=If you have any questions on how to setup your SMTP server, you can ask to %s. -YouCanAlsoUseSupervisorKeyword=You can also add the keyword __SUPERVISOREMAIL__ to have email being sent to the supervisor of user (works only if an email is defined for this supervisor) -NbOfTargetedContacts=Current number of targeted contact emails -UseFormatFileEmailToTarget=Imported file must have format email;name;firstname;other -UseFormatInputEmailToTarget=Enter a string with format email;name;firstname;other -MailAdvTargetRecipients=Recipients (advanced selection) -AdvTgtTitle=Fill input fields to preselect the third parties or contacts/addresses to target -AdvTgtSearchTextHelp=Use %% as wildcards. For example to find all item like jean, joe, jim, you can input j%%, you can also use ; as separator for value, and use ! for except this value. For example jean;joe;jim%%;!jimo;!jima%% will target all jean, joe, start with jim but not jimo and not everything that starts with jima -AdvTgtSearchIntHelp=Use interval to select int or float value -AdvTgtMinVal=Minimum value -AdvTgtMaxVal=Maximum value -AdvTgtSearchDtHelp=Use interval to select date value -AdvTgtStartDt=Start dt. -AdvTgtEndDt=End dt. -AdvTgtTypeOfIncudeHelp=Target Email of third party and email of contact of the third party, or just third-party email or just contact email -AdvTgtTypeOfIncude=Type of targeted email -AdvTgtContactHelp=Use only if you target contact into "Type of targeted email" -AddAll=Add all -RemoveAll=Remove all -ItemsCount=Item(s) -AdvTgtNameTemplate=Filter name -AdvTgtAddContact=Add emails according to criteria -AdvTgtLoadFilter=Load filter -AdvTgtDeleteFilter=Delete filter -AdvTgtSaveFilter=Save filter -AdvTgtCreateFilter=Create filter -AdvTgtOrCreateNewFilter=Name of new filter -NoContactWithCategoryFound=No category found linked to some contacts/addresses -NoContactLinkedToThirdpartieWithCategoryFound=No category found linked to some thirdparties -OutGoingEmailSetup=Outgoing emails -InGoingEmailSetup=Incoming emails -OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) -DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup -Information=Information -ContactsWithThirdpartyFilter=Contacts with third-party filter -Unanswered=Unanswered -Answered=Answered -IsNotAnAnswer=Is not answer (initial email) -IsAnAnswer=Is an answer of an initial email -RecordCreatedByEmailCollector=Record created by the Email Collector %s from email %s -DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing -DefaultStatusEmptyMandatory=Empty but mandatory diff --git a/htdocs/langs/ar_IQ/main.lang b/htdocs/langs/ar_IQ/main.lang index 6c1ef6aa659..2e691473326 100644 --- a/htdocs/langs/ar_IQ/main.lang +++ b/htdocs/langs/ar_IQ/main.lang @@ -1,9 +1,5 @@ # Dolibarr language file - Source file is en_US - main DIRECTION=ltr -# Note for Chinese: -# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader) -# stsongstdlight or cid0cs are for simplified Chinese -# To read Chinese pdf with Linux: sudo apt-get install poppler-data FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=. @@ -23,1129 +19,3 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -DatabaseConnection=Database connection -NoTemplateDefined=No template available for this email type -AvailableVariables=Available substitution variables -NoTranslation=No translation -Translation=Translation -CurrentTimeZone=TimeZone PHP (server) -EmptySearchString=Enter non empty search criterias -EnterADateCriteria=Enter a date criteria -NoRecordFound=No record found -NoRecordDeleted=No record deleted -NotEnoughDataYet=Not enough data -NoError=No error -Error=Error -Errors=Errors -ErrorFieldRequired=Field '%s' is required -ErrorFieldFormat=Field '%s' has a bad value -ErrorFileDoesNotExists=File %s does not exist -ErrorFailedToOpenFile=Failed to open file %s -ErrorCanNotCreateDir=Cannot create dir %s -ErrorCanNotReadDir=Cannot read dir %s -ErrorConstantNotDefined=Parameter %s not defined -ErrorUnknown=Unknown error -ErrorSQL=SQL Error -ErrorLogoFileNotFound=Logo file '%s' was not found -ErrorGoToGlobalSetup=Go to 'Company/Organization' setup to fix this -ErrorGoToModuleSetup=Go to Module setup to fix this -ErrorFailedToSendMail=Failed to send mail (sender=%s, receiver=%s) -ErrorFileNotUploaded=File was not uploaded. Check that size does not exceed maximum allowed, that free space is available on disk and that there is not already a file with same name in this directory. -ErrorInternalErrorDetected=Error detected -ErrorWrongHostParameter=Wrong host parameter -ErrorYourCountryIsNotDefined=Your country is not defined. Go to Home-Setup-Edit and post the form again. -ErrorRecordIsUsedByChild=Failed to delete this record. This record is used by at least one child record. -ErrorWrongValue=Wrong value -ErrorWrongValueForParameterX=Wrong value for parameter %s -ErrorNoRequestInError=No request in error -ErrorServiceUnavailableTryLater=Service not available at the moment. Try again later. -ErrorDuplicateField=Duplicate value in a unique field -ErrorSomeErrorWereFoundRollbackIsDone=Some errors were found. Changes have been rolled back. -ErrorConfigParameterNotDefined=Parameter %s is not defined in the Dolibarr config file conf.php. -ErrorCantLoadUserFromDolibarrDatabase=Failed to find user %s in Dolibarr database. -ErrorNoVATRateDefinedForSellerCountry=Error, no vat rates defined for country '%s'. -ErrorNoSocialContributionForSellerCountry=Error, no social/fiscal taxes type defined for country '%s'. -ErrorFailedToSaveFile=Error, failed to save file. -ErrorCannotAddThisParentWarehouse=You are trying to add a parent warehouse which is already a child of a existing warehouse -MaxNbOfRecordPerPage=Max. number of records per page -NotAuthorized=You are not authorized to do that. -SetDate=Set date -SelectDate=Select a date -SeeAlso=See also %s -SeeHere=See here -ClickHere=Click here -Here=Here -Apply=Apply -BackgroundColorByDefault=Default background color -FileRenamed=The file was successfully renamed -FileGenerated=The file was successfully generated -FileSaved=The file was successfully saved -FileUploaded=The file was successfully uploaded -FileTransferComplete=File(s) uploaded successfully -FilesDeleted=File(s) successfully deleted -FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. Click on "Attach file" for this. -NbOfEntries=No. of entries -GoToWikiHelpPage=Read online help (Internet access needed) -GoToHelpPage=Read help -DedicatedPageAvailable=There is a dedicated help page related to your current screen -HomePage=Home Page -RecordSaved=Record saved -RecordDeleted=Record deleted -RecordGenerated=Record generated -LevelOfFeature=Level of features -NotDefined=Not defined -DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr authentication mode is set to %s in configuration file conf.php.
    This means that the password database is external to Dolibarr, so changing this field may have no effect. -Administrator=Administrator -Undefined=Undefined -PasswordForgotten=Password forgotten? -NoAccount=No account? -SeeAbove=See above -HomeArea=Home -LastConnexion=Last login -PreviousConnexion=Previous login -PreviousValue=Previous value -ConnectedOnMultiCompany=Connected on environment -ConnectedSince=Connected since -AuthenticationMode=Authentication mode -RequestedUrl=Requested URL -DatabaseTypeManager=Database type manager -RequestLastAccessInError=Latest database access request error -ReturnCodeLastAccessInError=Return code for latest database access request error -InformationLastAccessInError=Information for latest database access request error -DolibarrHasDetectedError=Dolibarr has detected a technical error -YouCanSetOptionDolibarrMainProdToZero=You can read log file or set option $dolibarr_main_prod to '0' in your config file to get more information. -InformationToHelpDiagnose=This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to remove such notices) -MoreInformation=More information -TechnicalInformation=Technical information -TechnicalID=Technical ID -LineID=Line ID -NotePublic=Note (public) -NotePrivate=Note (private) -PrecisionUnitIsLimitedToXDecimals=Dolibarr was setup to limit precision of unit prices to %s decimals. -DoTest=Test -ToFilter=Filter -NoFilter=No filter -WarningYouHaveAtLeastOneTaskLate=Warning, you have at least one element that has exceeded the tolerance time. -yes=yes -Yes=Yes -no=no -No=No -All=All -Home=Home -Help=Help -OnlineHelp=Online help -PageWiki=Wiki page -MediaBrowser=Media browser -Always=Always -Never=Never -Under=under -Period=Period -PeriodEndDate=End date for period -SelectedPeriod=Selected period -PreviousPeriod=Previous period -Activate=Activate -Activated=Activated -Closed=Closed -Closed2=Closed -NotClosed=Not closed -Enabled=Enabled -Enable=Enable -Deprecated=Deprecated -Disable=Disable -Disabled=Disabled -Add=Add -AddLink=Add link -RemoveLink=Remove link -AddToDraft=Add to draft -Update=Update -Close=Close -CloseAs=Set status to -CloseBox=Remove widget from your dashboard -Confirm=Confirm -ConfirmSendCardByMail=Do you really want to send the content of this card by mail to %s? -Delete=Delete -Remove=Remove -Resiliate=Terminate -Cancel=Cancel -Modify=Modify -Edit=Edit -Validate=Validate -ValidateAndApprove=Validate and Approve -ToValidate=To validate -NotValidated=Not validated -Save=Save -SaveAs=Save As -SaveAndStay=Save and stay -SaveAndNew=Save and new -TestConnection=Test connection -ToClone=Clone -ConfirmCloneAsk=Are you sure you want to clone the object %s? -ConfirmClone=Choose the data you want to clone: -NoCloneOptionsSpecified=No data to clone defined. -Of=of -Go=Go -Run=Run -CopyOf=Copy of -Show=Show -Hide=Hide -ShowCardHere=Show card -Search=Search -SearchOf=Search -SearchMenuShortCut=Ctrl + shift + f -QuickAdd=Quick add -QuickAddMenuShortCut=Ctrl + shift + l -Valid=Valid -Approve=Approve -Disapprove=Disapprove -ReOpen=Re-Open -Upload=Upload -ToLink=Link -Select=Select -SelectAll=Select all -Choose=Choose -Resize=Resize -ResizeOrCrop=Resize or Crop -Recenter=Recenter -Author=Author -User=User -Users=Users -Group=Group -Groups=Groups -NoUserGroupDefined=No user group defined -Password=Password -PasswordRetype=Retype your password -NoteSomeFeaturesAreDisabled=Note that a lot of features/modules are disabled in this demonstration. -Name=Name -NameSlashCompany=Name / Company -Person=Person -Parameter=Parameter -Parameters=Parameters -Value=Value -PersonalValue=Personal value -NewObject=New %s -NewValue=New value -OldValue=Old value %s -CurrentValue=Current value -Code=Code -Type=Type -Language=Language -MultiLanguage=Multi-language -Note=Note -Title=Title -Label=Label -RefOrLabel=Ref. or label -Info=Log -Family=Family -Description=Description -Designation=Description -DescriptionOfLine=Description of line -DateOfLine=Date of line -DurationOfLine=Duration of line -Model=Doc template -DefaultModel=Default doc template -Action=Event -About=About -Number=Number -NumberByMonth=Total reports by month -AmountByMonth=Amount by month -Numero=Number -Limit=Limit -Limits=Limits -Logout=Logout -NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode %s -Connection=Login -Setup=Setup -Alert=Alert -MenuWarnings=Alerts -Previous=Previous -Next=Next -Cards=Cards -Card=Card -Now=Now -HourStart=Start hour -Deadline=Deadline -Date=Date -DateAndHour=Date and hour -DateToday=Today's date -DateReference=Reference date -DateStart=Start date -DateEnd=End date -DateCreation=Creation date -DateCreationShort=Creat. date -IPCreation=Creation IP -DateModification=Modification date -DateModificationShort=Modif. date -IPModification=Modification IP -DateLastModification=Latest modification date -DateValidation=Validation date -DateSigning=Signing date -DateClosing=Closing date -DateDue=Due date -DateValue=Value date -DateValueShort=Value date -DateOperation=Operation date -DateOperationShort=Oper. Date -DateLimit=Limit date -DateRequest=Request date -DateProcess=Process date -DateBuild=Report build date -DatePayment=Date of payment -DateApprove=Approving date -DateApprove2=Approving date (second approval) -RegistrationDate=Registration date -UserCreation=Creation user -UserModification=Modification user -UserValidation=Validation user -UserCreationShort=Creat. user -UserModificationShort=Modif. user -UserValidationShort=Valid. user -DurationYear=year -DurationMonth=month -DurationWeek=week -DurationDay=day -DurationYears=years -DurationMonths=months -DurationWeeks=weeks -DurationDays=days -Year=Year -Month=Month -Week=Week -WeekShort=Week -Day=Day -Hour=Hour -Minute=Minute -Second=Second -Years=Years -Months=Months -Days=Days -days=days -Hours=Hours -Minutes=Minutes -Seconds=Seconds -Weeks=Weeks -Today=Today -Yesterday=Yesterday -Tomorrow=Tomorrow -Morning=Morning -Afternoon=Afternoon -Quadri=Quadri -MonthOfDay=Month of the day -DaysOfWeek=Days of week -HourShort=H -MinuteShort=mn -Rate=Rate -CurrencyRate=Currency conversion rate -UseLocalTax=Include tax -Bytes=Bytes -KiloBytes=Kilobytes -MegaBytes=Megabytes -GigaBytes=Gigabytes -TeraBytes=Terabytes -UserAuthor=Ceated by -UserModif=Updated by -b=b. -Kb=Kb -Mb=Mb -Gb=Gb -Tb=Tb -Cut=Cut -Copy=Copy -Paste=Paste -Default=Default -DefaultValue=Default value -DefaultValues=Default values/filters/sorting -Price=Price -PriceCurrency=Price (currency) -UnitPrice=Unit price -UnitPriceHT=Unit price (excl.) -UnitPriceHTCurrency=Unit price (excl.) (currency) -UnitPriceTTC=Unit price -PriceU=U.P. -PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (net) (currency) -PriceUTTC=U.P. (inc. tax) -Amount=Amount -AmountInvoice=Invoice amount -AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (excl. tax) -AmountInvoicedTTC=Amount invoiced (inc. tax) -AmountPayment=Payment amount -AmountHTShort=Amount (excl.) -AmountTTCShort=Amount (inc. tax) -AmountHT=Amount (excl. tax) -AmountTTC=Amount (inc. tax) -AmountVAT=Amount tax -MulticurrencyAlreadyPaid=Already paid, original currency -MulticurrencyRemainderToPay=Remain to pay, original currency -MulticurrencyPaymentAmount=Payment amount, original currency -MulticurrencyAmountHT=Amount (excl. tax), original currency -MulticurrencyAmountTTC=Amount (inc. of tax), original currency -MulticurrencyAmountVAT=Amount tax, original currency -MulticurrencySubPrice=Amount sub price multi currency -AmountLT1=Amount tax 2 -AmountLT2=Amount tax 3 -AmountLT1ES=Amount RE -AmountLT2ES=Amount IRPF -AmountTotal=Total amount -AmountAverage=Average amount -PriceQtyMinHT=Price quantity min. (excl. tax) -PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) -PercentOfOriginalObject=Percent of original object -AmountOrPercent=Amount or percent -Percentage=Percentage -Total=Total -SubTotal=Subtotal -TotalHTShort=Total (excl.) -TotalHT100Short=Total 100%% (excl.) -TotalHTShortCurrency=Total (excl. in currency) -TotalTTCShort=Total (inc. tax) -TotalHT=Total (excl. tax) -TotalHTforthispage=Total (excl. tax) for this page -Totalforthispage=Total for this page -TotalTTC=Total (inc. tax) -TotalTTCToYourCredit=Total (inc. tax) to your credit -TotalVAT=Total tax -TotalVATIN=Total IGST -TotalLT1=Total tax 2 -TotalLT2=Total tax 3 -TotalLT1ES=Total RE -TotalLT2ES=Total IRPF -TotalLT1IN=Total CGST -TotalLT2IN=Total SGST -HT=Excl. tax -TTC=Inc. tax -INCVATONLY=Inc. VAT -INCT=Inc. all taxes -VAT=Sales tax -VATIN=IGST -VATs=Sales taxes -VATINs=IGST taxes -LT1=Sales tax 2 -LT1Type=Sales tax 2 type -LT2=Sales tax 3 -LT2Type=Sales tax 3 type -LT1ES=RE -LT2ES=IRPF -LT1IN=CGST -LT2IN=SGST -LT1GC=Additionnal cents -VATRate=Tax Rate -RateOfTaxN=Rate of tax %s -VATCode=Tax Rate code -VATNPR=Tax Rate NPR -DefaultTaxRate=Default tax rate -Average=Average -Sum=Sum -Delta=Delta -StatusToPay=To pay -RemainToPay=Remain to pay -Module=Module/Application -Modules=Modules/Applications -Option=Option -Filters=Filters -List=List -FullList=Full list -FullConversation=Full conversation -Statistics=Statistics -OtherStatistics=Other statistics -Status=Status -Favorite=Favorite -ShortInfo=Info. -Ref=Ref. -ExternalRef=Ref. extern -RefSupplier=Ref. vendor -RefPayment=Ref. payment -CommercialProposalsShort=Commercial proposals -Comment=Comment -Comments=Comments -ActionsToDo=Events to do -ActionsToDoShort=To do -ActionsDoneShort=Done -ActionNotApplicable=Not applicable -ActionRunningNotStarted=To start -ActionRunningShort=In progress -ActionDoneShort=Finished -ActionUncomplete=Incomplete -LatestLinkedEvents=Latest %s linked events -CompanyFoundation=Company/Organization -Accountant=Accountant -ContactsForCompany=Contacts for this third party -ContactsAddressesForCompany=Contacts/addresses for this third party -AddressesForCompany=Addresses for this third party -ActionsOnCompany=Events for this third party -ActionsOnContact=Events for this contact/address -ActionsOnContract=Events for this contract -ActionsOnMember=Events about this member -ActionsOnProduct=Events about this product -NActionsLate=%s late -ToDo=To do -Completed=Completed -Running=In progress -RequestAlreadyDone=Request already recorded -Filter=Filter -FilterOnInto=Search criteria '%s' into fields %s -RemoveFilter=Remove filter -ChartGenerated=Chart generated -ChartNotGenerated=Chart not generated -GeneratedOn=Build on %s -Generate=Generate -Duration=Duration -TotalDuration=Total duration -Summary=Summary -DolibarrStateBoard=Database Statistics -DolibarrWorkBoard=Open Items -NoOpenedElementToProcess=No open element to process -Available=Available -NotYetAvailable=Not yet available -NotAvailable=Not available -Categories=Tags/categories -Category=Tag/category -By=By -From=From -FromDate=From -FromLocation=From -to=to -To=to -ToDate=to -ToLocation=to -at=at -and=and -or=or -Other=Other -Others=Others -OtherInformations=Other information -Quantity=Quantity -Qty=Qty -ChangedBy=Changed by -ApprovedBy=Approved by -ApprovedBy2=Approved by (second approval) -Approved=Approved -Refused=Refused -ReCalculate=Recalculate -ResultKo=Failure -Reporting=Reporting -Reportings=Reporting -Draft=Draft -Drafts=Drafts -StatusInterInvoiced=Invoiced -Validated=Validated -ValidatedToProduce=Validated (To produce) -Opened=Open -OpenAll=Open (All) -ClosedAll=Closed (All) -New=New -Discount=Discount -Unknown=Unknown -General=General -Size=Size -OriginalSize=Original size -Received=Received -Paid=Paid -Topic=Subject -ByCompanies=By third parties -ByUsers=By user -Links=Links -Link=Link -Rejects=Rejects -Preview=Preview -NextStep=Next step -Datas=Data -None=None -NoneF=None -NoneOrSeveral=None or several -Late=Late -LateDesc=An item is defined as Delayed as per the system configuration in menu Home - Setup - Alerts. -NoItemLate=No late item -Photo=Picture -Photos=Pictures -AddPhoto=Add picture -DeletePicture=Picture delete -ConfirmDeletePicture=Confirm picture deletion? -Login=Login -LoginEmail=Login (email) -LoginOrEmail=Login or Email -CurrentLogin=Current login -EnterLoginDetail=Enter login details -January=January -February=February -March=March -April=April -May=May -June=June -July=July -August=August -September=September -October=October -November=November -December=December -Month01=January -Month02=February -Month03=March -Month04=April -Month05=May -Month06=June -Month07=July -Month08=August -Month09=September -Month10=October -Month11=November -Month12=December -MonthShort01=Jan -MonthShort02=Feb -MonthShort03=Mar -MonthShort04=Apr -MonthShort05=May -MonthShort06=Jun -MonthShort07=Jul -MonthShort08=Aug -MonthShort09=Sep -MonthShort10=Oct -MonthShort11=Nov -MonthShort12=Dec -MonthVeryShort01=J -MonthVeryShort02=F -MonthVeryShort03=M -MonthVeryShort04=A -MonthVeryShort05=M -MonthVeryShort06=J -MonthVeryShort07=J -MonthVeryShort08=A -MonthVeryShort09=S -MonthVeryShort10=O -MonthVeryShort11=N -MonthVeryShort12=D -AttachedFiles=Attached files and documents -JoinMainDoc=Join main document -DateFormatYYYYMM=YYYY-MM -DateFormatYYYYMMDD=YYYY-MM-DD -DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH:SS -ReportName=Report name -ReportPeriod=Report period -ReportDescription=Description -Report=Report -Keyword=Keyword -Origin=Origin -Legend=Legend -Fill=Fill -Reset=Reset -File=File -Files=Files -NotAllowed=Not allowed -ReadPermissionNotAllowed=Read permission not allowed -AmountInCurrency=Amount in %s currency -Example=Example -Examples=Examples -NoExample=No example -FindBug=Report a bug -NbOfThirdParties=Number of third parties -NbOfLines=Number of lines -NbOfObjects=Number of objects -NbOfObjectReferers=Number of related items -Referers=Related items -TotalQuantity=Total quantity -DateFromTo=From %s to %s -DateFrom=From %s -DateUntil=Until %s -Check=Check -Uncheck=Uncheck -Internal=Internal -External=External -Internals=Internal -Externals=External -Warning=Warning -Warnings=Warnings -BuildDoc=Build Doc -Entity=Environment -Entities=Entities -CustomerPreview=Customer preview -SupplierPreview=Vendor preview -ShowCustomerPreview=Show customer preview -ShowSupplierPreview=Show vendor preview -RefCustomer=Ref. customer -InternalRef=Internal ref. -Currency=Currency -InfoAdmin=Information for administrators -Undo=Undo -Redo=Redo -ExpandAll=Expand all -UndoExpandAll=Undo expand -SeeAll=See all -Reason=Reason -FeatureNotYetSupported=Feature not yet supported -CloseWindow=Close window -Response=Response -Priority=Priority -SendByMail=Send by email -MailSentBy=Email sent by -NotSent=Not sent -TextUsedInTheMessageBody=Email body -SendAcknowledgementByMail=Send confirmation email -SendMail=Send email -Email=Email -NoEMail=No email -AlreadyRead=Already read -NotRead=Unread -NoMobilePhone=No mobile phone -Owner=Owner -FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. -Refresh=Refresh -BackToList=Back to list -BackToTree=Back to tree -GoBack=Go back -CanBeModifiedIfOk=Can be modified if valid -CanBeModifiedIfKo=Can be modified if not valid -ValueIsValid=Value is valid -ValueIsNotValid=Value is not valid -RecordCreatedSuccessfully=Record created successfully -RecordModifiedSuccessfully=Record modified successfully -RecordsModified=%s record(s) modified -RecordsDeleted=%s record(s) deleted -RecordsGenerated=%s record(s) generated -AutomaticCode=Automatic code -FeatureDisabled=Feature disabled -MoveBox=Move widget -Offered=Offered -NotEnoughPermissions=You don't have permission for this action -SessionName=Session name -Method=Method -Receive=Receive -CompleteOrNoMoreReceptionExpected=Complete or nothing more expected -ExpectedValue=Expected Value -ExpectedQty=Expected Qty -PartialWoman=Partial -TotalWoman=Total -NeverReceived=Never received -Canceled=Canceled -YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu Setup - Dictionaries -YouCanChangeValuesForThisListFrom=You can change values for this list from menu %s -YouCanSetDefaultValueInModuleSetup=You can set the default value used when creating a new record in module setup -Color=Color -Documents=Linked files -Documents2=Documents -UploadDisabled=Upload disabled -MenuAccountancy=Accounting -MenuECM=Documents -MenuAWStats=AWStats -MenuMembers=Members -MenuAgendaGoogle=Google agenda -MenuTaxesAndSpecialExpenses=Taxes | Special expenses -ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb -ThisLimitIsDefinedInSetupAt=Dolibarr limit (Menu %s): %s Kb, PHP limit (Param %s): %s Kb -NoFileFound=No documents uploaded -CurrentUserLanguage=Current language -CurrentTheme=Current theme -CurrentMenuManager=Current menu manager -Browser=Browser -Layout=Layout -Screen=Screen -DisabledModules=Disabled modules -For=For -ForCustomer=For customer -Signature=Signature -DateOfSignature=Date of signature -HidePassword=Show command with password hidden -UnHidePassword=Show real command with clear password -Root=Root -RootOfMedias=Root of public medias (/medias) -Informations=Information -Page=Page -Notes=Notes -AddNewLine=Add new line -AddFile=Add file -FreeZone=Free-text product -FreeLineOfType=Free-text item, type: -CloneMainAttributes=Clone object with its main attributes -ReGeneratePDF=Re-generate PDF -PDFMerge=PDF Merge -Merge=Merge -DocumentModelStandardPDF=Standard PDF template -PrintContentArea=Show page to print main content area -MenuManager=Menu manager -WarningYouAreInMaintenanceMode=Warning, you are in maintenance mode: only login %s is allowed to use the application in this mode. -CoreErrorTitle=System error -CoreErrorMessage=Sorry, an error occurred. Contact your system administrator to check the logs or disable $dolibarr_main_prod=1 to get more information. -CreditCard=Credit card -ValidatePayment=Validate payment -CreditOrDebitCard=Credit or debit card -FieldsWithAreMandatory=Fields with %s are mandatory -FieldsWithIsForPublic=Fields with %s are shown in public list of members. If you don't want this, uncheck the "public" box. -AccordingToGeoIPDatabase=(according to GeoIP conversion) -Line=Line -NotSupported=Not supported -RequiredField=Required field -Result=Result -ToTest=Test -ValidateBefore=Item must be validated before using this feature -Visibility=Visibility -Totalizable=Totalizable -TotalizableDesc=This field is totalizable in list -Private=Private -Hidden=Hidden -Resources=Resources -Source=Source -Prefix=Prefix -Before=Before -After=After -IPAddress=IP address -Frequency=Frequency -IM=Instant messaging -NewAttribute=New attribute -AttributeCode=Attribute code -URLPhoto=URL of photo/logo -SetLinkToAnotherThirdParty=Link to another third party -LinkTo=Link to -LinkToProposal=Link to proposal -LinkToOrder=Link to order -LinkToInvoice=Link to invoice -LinkToTemplateInvoice=Link to template invoice -LinkToSupplierOrder=Link to purchase order -LinkToSupplierProposal=Link to vendor proposal -LinkToSupplierInvoice=Link to vendor invoice -LinkToContract=Link to contract -LinkToIntervention=Link to intervention -LinkToTicket=Link to ticket -CreateDraft=Create draft -SetToDraft=Back to draft -ClickToEdit=Click to edit -ClickToRefresh=Click to refresh -EditWithEditor=Edit with CKEditor -EditWithTextEditor=Edit with Text editor -EditHTMLSource=Edit HTML Source -ObjectDeleted=Object %s deleted -ByCountry=By country -ByTown=By town -ByDate=By date -ByMonthYear=By month/year -ByYear=By year -ByMonth=By month -ByDay=By day -BySalesRepresentative=By sales representative -LinkedToSpecificUsers=Linked to a particular user contact -NoResults=No results -AdminTools=Admin Tools -SystemTools=System tools -ModulesSystemTools=Modules tools -Test=Test -Element=Element -NoPhotoYet=No pictures available yet -Dashboard=Dashboard -MyDashboard=My Dashboard -Deductible=Deductible -from=from -toward=toward -Access=Access -SelectAction=Select action -SelectTargetUser=Select target user/employee -HelpCopyToClipboard=Use Ctrl+C to copy to clipboard -SaveUploadedFileWithMask=Save file on server with name "%s" (otherwise "%s") -OriginFileName=Original filename -SetDemandReason=Set source -SetBankAccount=Define Bank Account -AccountCurrency=Account currency -ViewPrivateNote=View notes -XMoreLines=%s line(s) hidden -ShowMoreLines=Show more/less lines -PublicUrl=Public URL -AddBox=Add box -SelectElementAndClick=Select an element and click on %s -PrintFile=Print File %s -ShowTransaction=Show entry on bank account -ShowIntervention=Show intervention -ShowContract=Show contract -GoIntoSetupToChangeLogo=Go to Home - Setup - Company to change logo or go to Home - Setup - Display to hide. -Deny=Deny -Denied=Denied -ListOf=List of %s -ListOfTemplates=List of templates -Gender=Gender -Genderman=Male -Genderwoman=Female -Genderother=Other -ViewList=List view -ViewGantt=Gantt view -ViewKanban=Kanban view -Mandatory=Mandatory -Hello=Hello -GoodBye=GoodBye -Sincerely=Sincerely -ConfirmDeleteObject=Are you sure you want to delete this object? -DeleteLine=Delete line -ConfirmDeleteLine=Are you sure you want to delete this line? -ErrorPDFTkOutputFileNotFound=Error: the file was not generated. Please check that the 'pdftk' command is installed in a directory included in the $PATH environment variable (linux/unix only) or contact your system administrator. -NoPDFAvailableForDocGenAmongChecked=No PDF were available for the document generation among checked record -TooManyRecordForMassAction=Too many records selected for mass action. The action is restricted to a list of %s records. -NoRecordSelected=No record selected -MassFilesArea=Area for files built by mass actions -ShowTempMassFilesArea=Show area of files built by mass actions -ConfirmMassDeletion=Bulk Delete confirmation -ConfirmMassDeletionQuestion=Are you sure you want to delete the %s selected record(s)? -RelatedObjects=Related Objects -ClassifyBilled=Classify billed -ClassifyUnbilled=Classify unbilled -Progress=Progress -ProgressShort=Progr. -FrontOffice=Front office -BackOffice=Back office -Submit=Submit -View=View -Export=Export -Exports=Exports -ExportFilteredList=Export filtered list -ExportList=Export list -ExportOptions=Export Options -IncludeDocsAlreadyExported=Include docs already exported -ExportOfPiecesAlreadyExportedIsEnable=Export of pieces already exported is enable -ExportOfPiecesAlreadyExportedIsDisable=Export of pieces already exported is disable -AllExportedMovementsWereRecordedAsExported=All exported movements were recorded as exported -NotAllExportedMovementsCouldBeRecordedAsExported=Not all exported movements could be recorded as exported -Miscellaneous=Miscellaneous -Calendar=Calendar -GroupBy=Group by... -ViewFlatList=View flat list -ViewAccountList=View ledger -ViewSubAccountList=View subaccount ledger -RemoveString=Remove string '%s' -SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at https://transifex.com/projects/p/dolibarr/ to add your improvements. -DirectDownloadLink=Public download link -PublicDownloadLinkDesc=Only the link is required to download the file -DirectDownloadInternalLink=Private download link -PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file -Download=Download -DownloadDocument=Download document -ActualizeCurrency=Update currency rate -Fiscalyear=Fiscal year -ModuleBuilder=Module and Application Builder -SetMultiCurrencyCode=Set currency -BulkActions=Bulk actions -ClickToShowHelp=Click to show tooltip help -WebSite=Website -WebSites=Websites -WebSiteAccounts=Website accounts -ExpenseReport=Expense report -ExpenseReports=Expense reports -HR=HR -HRAndBank=HR and Bank -AutomaticallyCalculated=Automatically calculated -TitleSetToDraft=Go back to draft -ConfirmSetToDraft=Are you sure you want to go back to Draft status? -ImportId=Import id -Events=Events -EMailTemplates=Email templates -FileNotShared=File not shared to external public -Project=Project -Projects=Projects -LeadOrProject=Lead | Project -LeadsOrProjects=Leads | Projects -Lead=Lead -Leads=Leads -ListOpenLeads=List open leads -ListOpenProjects=List open projects -NewLeadOrProject=New lead or project -Rights=Permissions -LineNb=Line no. -IncotermLabel=Incoterms -TabLetteringCustomer=Customer lettering -TabLetteringSupplier=Vendor lettering -Monday=Monday -Tuesday=Tuesday -Wednesday=Wednesday -Thursday=Thursday -Friday=Friday -Saturday=Saturday -Sunday=Sunday -MondayMin=Mo -TuesdayMin=Tu -WednesdayMin=We -ThursdayMin=Th -FridayMin=Fr -SaturdayMin=Sa -SundayMin=Su -Day1=Monday -Day2=Tuesday -Day3=Wednesday -Day4=Thursday -Day5=Friday -Day6=Saturday -Day0=Sunday -ShortMonday=M -ShortTuesday=T -ShortWednesday=W -ShortThursday=T -ShortFriday=F -ShortSaturday=S -ShortSunday=S -one=one -two=two -three=three -four=four -five=five -six=six -seven=seven -eight=eight -nine=nine -ten=ten -eleven=eleven -twelve=twelve -thirteen=thirdteen -fourteen=fourteen -fifteen=fifteen -sixteen=sixteen -seventeen=seventeen -eighteen=eighteen -nineteen=nineteen -twenty=twenty -thirty=thirty -forty=forty -fifty=fifty -sixty=sixty -seventy=seventy -eighty=eighty -ninety=ninety -hundred=hundred -thousand=thousand -million=million -billion=billion -trillion=trillion -quadrillion=quadrillion -SelectMailModel=Select an email template -SetRef=Set ref -Select2ResultFoundUseArrows=Some results found. Use arrows to select. -Select2NotFound=No result found -Select2Enter=Enter -Select2MoreCharacter=or more character -Select2MoreCharacters=or more characters -Select2MoreCharactersMore=Search syntax:
    | OR (a|b)
    * Any character (a*b)
    ^ Start with (^ab)
    $ End with (ab$)
    -Select2LoadingMoreResults=Loading more results... -Select2SearchInProgress=Search in progress... -SearchIntoThirdparties=Third parties -SearchIntoContacts=Contacts -SearchIntoMembers=Members -SearchIntoUsers=Users -SearchIntoProductsOrServices=Products or services -SearchIntoBatch=Lots / Serials -SearchIntoProjects=Projects -SearchIntoMO=Manufacturing Orders -SearchIntoTasks=Tasks -SearchIntoCustomerInvoices=Customer invoices -SearchIntoSupplierInvoices=Vendor invoices -SearchIntoCustomerOrders=Sales orders -SearchIntoSupplierOrders=Purchase orders -SearchIntoCustomerProposals=Commercial proposals -SearchIntoSupplierProposals=Vendor proposals -SearchIntoInterventions=Interventions -SearchIntoContracts=Contracts -SearchIntoCustomerShipments=Customer shipments -SearchIntoExpenseReports=Expense reports -SearchIntoLeaves=Leave -SearchIntoTickets=Tickets -SearchIntoCustomerPayments=Customer payments -SearchIntoVendorPayments=Vendor payments -SearchIntoMiscPayments=Miscellaneous payments -CommentLink=Comments -NbComments=Number of comments -CommentPage=Comments space -CommentAdded=Comment added -CommentDeleted=Comment deleted -Everybody=Everybody -PayedBy=Paid by -PayedTo=Paid to -Monthly=Monthly -Quarterly=Quarterly -Annual=Annual -Local=Local -Remote=Remote -LocalAndRemote=Local and Remote -KeyboardShortcut=Keyboard shortcut -AssignedTo=Assigned to -Deletedraft=Delete draft -ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared with a public link -SelectAThirdPartyFirst=Select a third party first... -YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode -Inventory=Inventory -AnalyticCode=Analytic code -TMenuMRP=MRP -ShowCompanyInfos=Show company infos -ShowMoreInfos=Show More Infos -NoFilesUploadedYet=Please upload a document first -SeePrivateNote=See private note -PaymentInformation=Payment information -ValidFrom=Valid from -ValidUntil=Valid until -NoRecordedUsers=No users -ToClose=To close -ToRefuse=To refuse -ToProcess=To process -ToApprove=To approve -GlobalOpenedElemView=Global view -NoArticlesFoundForTheKeyword=No article found for the keyword '%s' -NoArticlesFoundForTheCategory=No article found for the category -ToAcceptRefuse=To accept | refuse -ContactDefault_agenda=Event -ContactDefault_commande=Order -ContactDefault_contrat=Contract -ContactDefault_facture=Invoice -ContactDefault_fichinter=Intervention -ContactDefault_invoice_supplier=Supplier Invoice -ContactDefault_order_supplier=Purchase Order -ContactDefault_project=Project -ContactDefault_project_task=Task -ContactDefault_propal=Proposal -ContactDefault_supplier_proposal=Supplier Proposal -ContactDefault_ticket=Ticket -ContactAddedAutomatically=Contact added from contact thirdparty roles -More=More -ShowDetails=Show details -CustomReports=Custom reports -StatisticsOn=Statistics on -SelectYourGraphOptionsFirst=Select your graph options to build a graph -Measures=Measures -XAxis=X-Axis -YAxis=Y-Axis -StatusOfRefMustBe=Status of %s must be %s -DeleteFileHeader=Confirm file delete -DeleteFileText=Do you really want delete this file? -ShowOtherLanguages=Show other languages -SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for this language -NotUsedForThisCustomer=Not used for this customer -AmountMustBePositive=Amount must be positive -ByStatus=By status -InformationMessage=Information -Used=Used -ASAP=As Soon As Possible -CREATEInDolibarr=Record %s created -MODIFYInDolibarr=Record %s modified -DELETEInDolibarr=Record %s deleted -VALIDATEInDolibarr=Record %s validated -APPROVEDInDolibarr=Record %s approved -DefaultMailModel=Default Mail Model -PublicVendorName=Public name of vendor -DateOfBirth=Date of birth -SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has expired, so action has been canceled. Please try again. -UpToDate=Up-to-date -OutOfDate=Out-of-date -EventReminder=Event Reminder -UpdateForAllLines=Update for all lines -OnHold=On hold -Civility=Civility -AffectTag=Affect Tag -CreateExternalUser=Create external user -ConfirmAffectTag=Bulk Tag Affect -ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? -CategTypeNotFound=No tag type found for type of records -CopiedToClipboard=Copied to clipboard -InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. -ConfirmCancel=Are you sure you want to cancel -EmailMsgID=Email MsgID -SetToEnabled=Set to enabled -SetToDisabled=Set to disabled -ConfirmMassEnabling=mass enabling confirmation -ConfirmMassEnablingQuestion=Are you sure you want to enable the %s selected record(s)? -ConfirmMassDisabling=mass disabling confirmation -ConfirmMassDisablingQuestion=Are you sure you want to disable the %s selected record(s)? -RecordsEnabled=%s record(s) enabled -RecordsDisabled=%s record(s) disabled -RecordEnabled=Record enabled -RecordDisabled=Record disabled -Forthcoming=Forthcoming -Currently=Currently diff --git a/htdocs/langs/ar_IQ/margins.lang b/htdocs/langs/ar_IQ/margins.lang index ad5406409b4..ec02ad138e3 100644 --- a/htdocs/langs/ar_IQ/margins.lang +++ b/htdocs/langs/ar_IQ/margins.lang @@ -1,45 +1,2 @@ -# Dolibarr language file - Source file is en_US - marges - -Margin=Margin -Margins=Margins -TotalMargin=Total Margin -MarginOnProducts=Margin / Products -MarginOnServices=Margin / Services -MarginRate=Margin rate -MarkRate=Mark rate -DisplayMarginRates=Display margin rates -DisplayMarkRates=Display mark rates -InputPrice=Input price -margin=Profit margins management -margesSetup=Profit margins management setup -MarginDetails=Margin details -ProductMargins=Product margins -CustomerMargins=Customer margins -SalesRepresentativeMargins=Sales representative margins -ContactOfInvoice=Contact of invoice -UserMargins=User margins -ProductService=Product or Service -AllProducts=All products and services -ChooseProduct/Service=Choose product or service -ForceBuyingPriceIfNull=Force buying/cost price to selling price if not defined +# Dolibarr language file - Source file is en_US - margins ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). -MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts -UseDiscountAsProduct=As a product -UseDiscountAsService=As a service -UseDiscountOnTotal=On subtotal -MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Defines if a global discount is treated as a product, a service, or only on subtotal for margin calculation. -MARGIN_TYPE=Buying/Cost price suggested by default for margin calculation -MargeType1=Margin on Best vendor price -MargeType2=Margin on Weighted Average Price (WAP) -MargeType3=Margin on Cost Price -MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card
    * Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined
    * Margin on Cost price = Selling price - Cost price defined on product card or WAP if cost price not defined, or best vendor price if WAP not yet defined -CostPrice=Cost price -UnitCharges=Unit charges -Charges=Charges -AgentContactType=Commercial agent contact type -AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per contact/address. Note that reading statistics on a contact is not reliable since in most cases the contact may not be defined explicitely on the invoices. -rateMustBeNumeric=Rate must be a numeric value -markRateShouldBeLesserThan100=Mark rate should be lower than 100 -ShowMarginInfos=Show margin infos -CheckMargins=Margins detail -MarginPerSaleRepresentativeWarning=The report of margin per user use the link between third parties and sale representatives to calculate the margin of each sale representative. Because some thirdparties may not have any dedicated sale representative and some third parties may be linked to several, some amounts may not be included into this report (if there is no sale representative) and some may appear on different lines (for each sale representative). diff --git a/htdocs/langs/ar_IQ/members.lang b/htdocs/langs/ar_IQ/members.lang index d8b9c2f59f3..45f5a38babe 100644 --- a/htdocs/langs/ar_IQ/members.lang +++ b/htdocs/langs/ar_IQ/members.lang @@ -1,217 +1,25 @@ # Dolibarr language file - Source file is en_US - members -MembersArea=Members area -MemberCard=Member card -SubscriptionCard=Subscription card -Member=Member -Members=Members -ShowMember=Show member card -UserNotLinkedToMember=User not linked to a member -ThirdpartyNotLinkedToMember=Third party not linked to a member MembersTickets=Members Tickets -FundationMembers=Foundation members -ListOfValidatedPublicMembers=List of validated public members -ErrorThisMemberIsNotPublic=This member is not public -ErrorMemberIsAlreadyLinkedToThisThirdParty=Another member (name: %s, login: %s) is already linked to a third party %s. Remove this link first because a third party can't be linked to only a member (and vice versa). -ErrorUserPermissionAllowsToLinksToItselfOnly=For security reasons, you must be granted permissions to edit all users to be able to link a member to a user that is not yours. -SetLinkToUser=Link to a Dolibarr user -SetLinkToThirdParty=Link to a Dolibarr third party -MembersCards=Business cards for members -MembersList=List of members -MembersListToValid=List of draft members (to be validated) -MembersListValid=List of valid members -MembersListUpToDate=List of valid members with up-to-date subscription -MembersListNotUpToDate=List of valid members with out-of-date subscription -MembersListExcluded=List of excluded members -MembersListResiliated=List of terminated members -MembersListQualified=List of qualified members -MenuMembersToValidate=Draft members -MenuMembersValidated=Validated members -MenuMembersExcluded=Excluded members -MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive -MembersWithSubscriptionToReceiveShort=Subscription to receive DateSubscription=Subscription date DateEndSubscription=Subscription end date -EndSubscription=Subscription Ends SubscriptionId=Subscription id -WithoutSubscription=Without subscription -MemberId=Member id -NewMember=New member -MemberType=Member type -MemberTypeId=Member type id -MemberTypeLabel=Member type label -MembersTypes=Members types -MemberStatusDraft=Draft (needs to be validated) -MemberStatusDraftShort=Draft MemberStatusActive=Validated (waiting subscription) -MemberStatusActiveShort=Validated -MemberStatusActiveLate=Subscription expired -MemberStatusActiveLateShort=Expired -MemberStatusPaid=Subscription up to date -MemberStatusPaidShort=Up to date -MemberStatusExcluded=Excluded member -MemberStatusExcludedShort=Excluded -MemberStatusResiliated=Terminated member -MemberStatusResiliatedShort=Terminated -MembersStatusToValid=Draft members -MembersStatusExcluded=Excluded members -MembersStatusResiliated=Terminated members -MemberStatusNoSubscription=Validated (no subscription needed) -MemberStatusNoSubscriptionShort=Validated -SubscriptionNotNeeded=No subscription needed -NewCotisation=New contribution -PaymentSubscription=New contribution payment -SubscriptionEndDate=Subscription's end date -MembersTypeSetup=Members type setup -MemberTypeModified=Member type modified -DeleteAMemberType=Delete a member type -ConfirmDeleteMemberType=Are you sure you want to delete this member type? -MemberTypeDeleted=Member type deleted -MemberTypeCanNotBeDeleted=Member type can not be deleted NewSubscription=New subscription -NewSubscriptionDesc=This form allows you to record your subscription as a new member of the foundation. If you want to renew your subscription (if already a member), please contact foundation board instead by email %s. Subscription=Subscription Subscriptions=Subscriptions -SubscriptionLate=Late SubscriptionNotReceived=Subscription never received ListOfSubscriptions=List of subscriptions -SendCardByMail=Send card by email -AddMember=Create member -NoTypeDefinedGoToSetup=No member types defined. Go to menu "Members types" -NewMemberType=New member type -WelcomeEMail=Welcome email SubscriptionRequired=Subscription required -DeleteType=Delete -VoteAllowed=Vote allowed -Physical=Individual -Moral=Corporation -MorAndPhy=Corporation and Individual -Reenable=Re-Enable -ExcludeMember=Exclude a member -ConfirmExcludeMember=Are you sure you want to exclude this member ? -ResiliateMember=Terminate a member -ConfirmResiliateMember=Are you sure you want to terminate this member? -DeleteMember=Delete a member -ConfirmDeleteMember=Are you sure you want to delete this member (Deleting a member will delete all his subscriptions)? -DeleteSubscription=Delete a subscription -ConfirmDeleteSubscription=Are you sure you want to delete this subscription? -Filehtpasswd=htpasswd file -ValidateMember=Validate a member -ConfirmValidateMember=Are you sure you want to validate this member? -FollowingLinksArePublic=The following links are open pages not protected by any Dolibarr permission. They are not formatted pages, provided as example to show how to list members database. -PublicMemberList=Public member list -BlankSubscriptionForm=Public self-subscription form -BlankSubscriptionFormDesc=Dolibarr can provide you a public URL/website to allow external visitors to ask to subscribe to the foundation. If an online payment module is enabled, a payment form may also be automatically provided. -EnablePublicSubscriptionForm=Enable the public website with self-subscription form -ForceMemberType=Force the member type ExportDataset_member_1=Members and subscriptions -ImportDataset_member_1=Members -LastMembersModified=Latest %s modified members -LastSubscriptionsModified=Latest %s modified subscriptions -String=String -Text=Text -Int=Int -DateAndTime=Date and time -PublicMemberCard=Member public card -SubscriptionNotRecorded=Subscription not recorded AddSubscription=Create subscription ShowSubscription=Show subscription -# Label of email templates -SendingAnEMailToMember=Sending information email to member -SendingEmailOnAutoSubscription=Sending email on auto registration -SendingEmailOnMemberValidation=Sending email on new member validation -SendingEmailOnNewSubscription=Sending email on new subscription -SendingReminderForExpiredSubscription=Sending reminder for expired subscriptions -SendingEmailOnCancelation=Sending email on cancelation -SendingReminderActionComm=Sending reminder for agenda event -# Topic of email templates -YourMembershipRequestWasReceived=Your membership was received. -YourMembershipWasValidated=Your membership was validated -YourSubscriptionWasRecorded=Your new subscription was recorded -SubscriptionReminderEmail=Subscription reminder -YourMembershipWasCanceled=Your membership was canceled -CardContent=Content of your member card -# Text of email templates -ThisIsContentOfYourMembershipRequestWasReceived=We want to let you know that your membership request was received.

    -ThisIsContentOfYourMembershipWasValidated=We want to let you know that your membership was validated with the following information:

    -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded.

    -ThisIsContentOfSubscriptionReminderEmail=We want to let you know that your subscription is about to expire or has already expired (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). We hope you will renew it.

    -ThisIsContentOfYourCard=This is a summary of the information we have about you. Please contact us if anything is incorrect.

    -DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Subject of the notification email received in case of auto-inscription of a guest -DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Content of the notification email received in case of auto-inscription of a guest -DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Email template to use to send email to a member on member autosubscription -DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send email to a member on member validation -DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Email template to use to send email to a member on new subscription recording -DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Email template to use to send email reminder when subscription is about to expire -DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Email template to use to send email to a member on member cancelation -DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion -DescADHERENT_MAIL_FROM=Sender Email for automatic emails -DescADHERENT_ETIQUETTE_TYPE=Format of labels page -DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets -DescADHERENT_CARD_TYPE=Format of cards page -DescADHERENT_CARD_HEADER_TEXT=Text printed on top of member cards -DescADHERENT_CARD_TEXT=Text printed on member cards (align on left) -DescADHERENT_CARD_TEXT_RIGHT=Text printed on member cards (align on right) -DescADHERENT_CARD_FOOTER_TEXT=Text printed on bottom of member cards -ShowTypeCard=Show type '%s' -HTPasswordExport=htpassword file generation NoThirdPartyAssociatedToMember=No third party associated to this member -MembersAndSubscriptions= Members and Subscriptions -MoreActions=Complementary action on recording +MembersAndSubscriptions=Members and Subscriptions MoreActionsOnSubscription=Complementary action, suggested by default when recording a subscription -MoreActionBankDirect=Create a direct entry on bank account -MoreActionBankViaInvoice=Create an invoice, and a payment on bank account -MoreActionInvoiceOnly=Create an invoice with no payment -LinkToGeneratedPages=Generate visit cards -LinkToGeneratedPagesDesc=This screen allows you to generate PDF files with business cards for all your members or a particular member. -DocForAllMembersCards=Generate business cards for all members -DocForOneMemberCards=Generate business cards for a particular member -DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment -LastSubscriptionDate=Date of latest subscription payment -LastSubscriptionAmount=Amount of latest subscription -LastMemberType=Last Member type -MembersStatisticsByCountries=Members statistics by country -MembersStatisticsByState=Members statistics by state/province -MembersStatisticsByTown=Members statistics by town -MembersStatisticsByRegion=Members statistics by region -NbOfMembers=Total number of members -NbOfActiveMembers=Total number of current active members -NoValidatedMemberYet=No validated members found -MembersByCountryDesc=This screen shows you the statistics of members by countries. Graphs and charts depend on the availability of the Google online graph service as well as on the availability of a working internet connection. -MembersByStateDesc=This screen show you statistics of members by state/provinces/canton. -MembersByTownDesc=This screen show you statistics of members by town. -MembersByNature=This screen show you statistics of members by nature. -MembersByRegion=This screen show you statistics of members by region. -MembersStatisticsDesc=Choose statistics you want to read... -MenuMembersStats=Statistics -LastMemberDate=Latest membership date -LatestSubscriptionDate=Latest subscription date -MemberNature=Nature of the member -MembersNature=Nature of the members -Public=Information is public -NewMemberbyWeb=New member added. Awaiting approval -NewMemberForm=New member form -SubscriptionsStatistics=Subscriptions statistics NbOfSubscriptions=Number of subscriptions -AmountOfSubscriptions=Amount collected from subscriptions -TurnoverOrBudget=Turnover (for a company) or Budget (for a foundation) DefaultAmount=Default amount of subscription CanEditAmount=Visitor can choose/edit amount of its subscription -MEMBER_NEWFORM_PAYONLINE=Jump on integrated online payment page -ByProperties=By nature -MembersStatisticsByProperties=Members statistics by nature VATToUseForSubscriptions=VAT rate to use for subscriptions -NoVatOnSubscription=No VAT for subscriptions ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Product used for subscription line into invoice: %s -NameOrCompany=Name or company -SubscriptionRecorded=Subscription recorded -NoEmailSentToMember=No email sent to member -EmailSentToMember=Email sent to member at %s -SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subscription -SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5') -MembershipPaid=Membership paid for current period (until %s) -YouMayFindYourInvoiceInThisEmail=You may find your invoice attached to this email -XMembersClosed=%s member(s) closed -XExternalUserCreated=%s external user(s) created -ForceMemberNature=Force member nature (Individual or Corporation) diff --git a/htdocs/langs/ar_IQ/modulebuilder.lang b/htdocs/langs/ar_IQ/modulebuilder.lang deleted file mode 100644 index 23a098be2e5..00000000000 --- a/htdocs/langs/ar_IQ/modulebuilder.lang +++ /dev/null @@ -1,146 +0,0 @@ -# Dolibarr language file - Source file is en_US - loan -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 name of the module/application to create with no spaces. Use uppercase to separate words (For example: MyModule, EcommerceForShop, SyncWithMySystem...) -EnterNameOfObjectDesc=Enter 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. -ModuleBuilderDesc2=Path where modules are generated/edited (first directory for external modules defined into %s): %s -ModuleBuilderDesc3=Generated/editable modules found: %s -ModuleBuilderDesc4=A module is detected as 'editable' when the file %s exists in root of module directory -NewModule=New module -NewObjectInModulebuilder=New object -ModuleKey=Module key -ObjectKey=Object key -ModuleInitialized=Module initialized -FilesForObjectInitialized=Files for new object '%s' initialized -FilesForObjectUpdated=Files for object '%s' updated (.sql files and .class.php file) -ModuleBuilderDescdescription=Enter here all general information that describe your module. -ModuleBuilderDescspecifications=You can enter here a detailed description of the specifications of your module that is not already structured into other tabs. So you have within easy reach all the rules to develop. Also this text content will be included into the generated documentation (see last tab). You can use Markdown format, but it is recommended to use Asciidoc format (comparison between .md and .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown). -ModuleBuilderDescobjects=Define here the objects you want to manage with your module. A CRUD DAO class, SQL files, page to list record of objects, to create/edit/view a record and an API will be generated. -ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module. -ModuleBuilderDescpermissions=This tab is dedicated to define the new permissions you want to provide with your module. -ModuleBuilderDesctriggers=This is the view of triggers provided by your module. To include code executed when a triggered business event is launched, just edit this file. -ModuleBuilderDeschooks=This tab is dedicated to hooks. -ModuleBuilderDescwidgets=This tab is dedicated to manage/build widgets. -ModuleBuilderDescbuildpackage=You can generate here a "ready to distribute" package file (a normalized .zip file) of your module and a "ready to distribute" documentation file. Just click on button to build the package or documentation file. -EnterNameOfModuleToDeleteDesc=You can delete your module. WARNING: All coding files of module (generated or created manually) AND structured data and documentation will be deleted! -EnterNameOfObjectToDeleteDesc=You can delete an object. WARNING: All coding files (generated or created manually) related to object will be deleted! -DangerZone=Danger zone -BuildPackage=Build package -BuildPackageDesc=You can generate a zip package of your application so your are ready to distribute it on any Dolibarr. You can also distribute it or sell it on marketplace like DoliStore.com. -BuildDocumentation=Build documentation -ModuleIsNotActive=This module is not activated yet. Go to %s to make it live or click here -ModuleIsLive=This module has been activated. Any change may break a current live feature. -DescriptionLong=Long description -EditorName=Name of editor -EditorUrl=URL of editor -DescriptorFile=Descriptor file of module -ClassFile=File for PHP DAO CRUD class -ApiClassFile=File for PHP API class -PageForList=PHP page for list of record -PageForCreateEditView=PHP page to create/edit/view a record -PageForAgendaTab=PHP page for event tab -PageForDocumentTab=PHP page for document tab -PageForNoteTab=PHP page for note tab -PageForContactTab=PHP page for contact tab -PathToModulePackage=Path to zip of module/application package -PathToModuleDocumentation=Path to file of module/application documentation (%s) -SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed. -FileNotYetGenerated=File not yet generated -RegenerateClassAndSql=Force update of .class and .sql files -RegenerateMissingFiles=Generate missing files -SpecificationFile=File of documentation -LanguageFile=File for language -ObjectProperties=Object Properties -ConfirmDeleteProperty=Are you sure you want to delete the property %s? This will change code in PHP class but also remove column from table definition of object. -NotNull=Not NULL -NotNullDesc=1=Set database to NOT NULL. -1=Allow null values and force value to NULL if empty ('' or 0). -SearchAll=Used for 'search all' -DatabaseIndex=Database index -FileAlreadyExists=File %s already exists -TriggersFile=File for triggers code -HooksFile=File for hooks code -ArrayOfKeyValues=Array of key-val -ArrayOfKeyValuesDesc=Array of keys and values if field is a combo list with fixed values -WidgetFile=Widget file -CSSFile=CSS file -JSFile=Javascript file -ReadmeFile=Readme file -ChangeLog=ChangeLog file -TestClassFile=File for PHP Unit Test class -SqlFile=Sql file -PageForLib=File for the common PHP library -PageForObjLib=File for the PHP library dedicated to object -SqlFileExtraFields=Sql file for complementary attributes -SqlFileKey=Sql file for keys -SqlFileKeyExtraFields=Sql file for keys of complementary attributes -AnObjectAlreadyExistWithThisNameAndDiffCase=An object already exists with this name and a different case -UseAsciiDocFormat=You can use Markdown format, but it is recommended to use Asciidoc format (omparison between .md and .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) -IsAMeasure=Is a measure -DirScanned=Directory scanned -NoTrigger=No trigger -NoWidget=No widget -GoToApiExplorer=API explorer -ListOfMenusEntries=List of menu entries -ListOfDictionariesEntries=List of dictionaries entries -ListOfPermissionsDefined=List of defined permissions -SeeExamples=See examples here -EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION) -VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update).

    Using a negative value means field is not shown by default on list but can be selected for viewing).

    It can be an expression, for example:
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    ($user->rights->holiday->define_holiday ? 1 : 0) -DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.
    Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)

    For document :
    0 = not displayed
    1 = display
    2 = display only if not empty

    For document lines :
    0 = not displayed
    1 = displayed in a column
    3 = display in line description column after the description
    4 = display in description column after the description only if not empty -DisplayOnPdf=Display on PDF -IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0) -SearchAllDesc=Is the field used to make a search from the quick search tool? (Examples: 1 or 0) -SpecDefDesc=Enter here all documentation you want to provide with your module that is not already defined by other tabs. You can use .md or better, the rich .asciidoc syntax. -LanguageDefDesc=Enter in this files, all the key and the translation for each language file. -MenusDefDesc=Define here the menus provided by your module -DictionariesDefDesc=Define here the dictionaries provided by your module -PermissionsDefDesc=Define here the new permissions provided by your module -MenusDefDescTooltip=The menus provided by your module/application are defined into the array $this->menus into the module descriptor file. You can edit manually this file or use the embedded editor.

    Note: Once defined (and module re-activated), menus are also visible into the menu editor available to administrator users on %s. -DictionariesDefDescTooltip=The dictionaries provided by your module/application are defined into the array $this->dictionaries into the module descriptor file. You can edit manually this file or use the embedded editor.

    Note: Once defined (and module re-activated), dictionaries are also visible into the setup area to administrator users on %s. -PermissionsDefDescTooltip=The permissions provided by your module/application are defined into the array $this->rights into the module descriptor file. You can edit manually this file or use the embedded editor.

    Note: Once defined (and module re-activated), permissions are visible into the default permissions setup %s. -HooksDefDesc=Define in the module_parts['hooks'] property, in the module descriptor, the context of hooks you want to manage (list of contexts can be found by a search on 'initHooks(' in core code).
    Edit the hook file to add code of your hooked functions (hookable functions can be found by a search on 'executeHooks' in core code). -TriggerDefDesc=Define in the trigger file the code you want to execute for each business event executed. -SeeIDsInUse=See IDs in use in your installation -SeeReservedIDsRangeHere=See range of reserved IDs -ToolkitForDevelopers=Toolkit for Dolibarr developers -TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the native module builder wizard.
    Enable the module %s and use the wizard by clicking the on the top right menu.
    Warning: This is an advanced developer feature, do not experiment on your production site! -SeeTopRightMenu=See on the top right menu -AddLanguageFile=Add language file -YouCanUseTranslationKey=You can use here a key that is the translation key found into language file (see tab "Languages") -DropTableIfEmpty=(Destroy table if empty) -TableDoesNotExists=The table %s does not exists -TableDropped=Table %s deleted -InitStructureFromExistingTable=Build the structure array string of an existing table -UseAboutPage=Disable the about page -UseDocFolder=Disable the documentation folder -UseSpecificReadme=Use a specific ReadMe -ContentOfREADMECustomized=Note: The content of the README.md file has been replaced with the specific value defined into setup of ModuleBuilder. -RealPathOfModule=Real path of module -ContentCantBeEmpty=Content of file can't be empty -WidgetDesc=You can generate and edit here the widgets that will be embedded with your module. -CSSDesc=You can generate and edit here a file with personalized CSS embedded with your module. -JSDesc=You can generate and edit here a file with personalized Javascript embedded with your module. -CLIDesc=You can generate here some command line scripts you want to provide with your module. -CLIFile=CLI File -NoCLIFile=No CLI files -UseSpecificEditorName = Use a specific editor name -UseSpecificEditorURL = Use a specific editor URL -UseSpecificFamily = Use a specific family -UseSpecificAuthor = Use a specific author -UseSpecificVersion = Use a specific initial version -IncludeRefGeneration=The reference of object must be generated automatically -IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference -IncludeDocGeneration=I want to generate some documents from the object -IncludeDocGenerationHelp=If you check this, some code will be generated to add a "Generate document" box on the record. -ShowOnCombobox=Show value into combobox -KeyForTooltip=Key for tooltip -CSSClass=CSS for edit/create form -CSSViewClass=CSS for read form -CSSListClass=CSS for list -NotEditable=Not editable -ForeignKey=Foreign key -TypeOfFieldsHelp=Type of fields:
    varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example) -AsciiToHtmlConverter=Ascii to HTML converter -AsciiToPdfConverter=Ascii to PDF converter -TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. -ModuleBuilderNotAllowed=The module builder is available but not allowed to your user. -ImportExportProfiles=Import and export profiles diff --git a/htdocs/langs/ar_IQ/mrp.lang b/htdocs/langs/ar_IQ/mrp.lang deleted file mode 100644 index 5d226c0f77b..00000000000 --- a/htdocs/langs/ar_IQ/mrp.lang +++ /dev/null @@ -1,103 +0,0 @@ -Mrp=Manufacturing Orders -MOs=Manufacturing orders -ManufacturingOrder=Manufacturing Order -MRPDescription=Module to manage production and Manufacturing Orders (MO). -MRPArea=MRP Area -MrpSetupPage=Setup of module MRP -MenuBOM=Bills of material -LatestBOMModified=Latest %s Bills of materials modified -LatestMOModified=Latest %s Manufacturing Orders modified -Bom=Bills of Material -BillOfMaterials=Bill of Materials -BOMsSetup=Setup of module BOM -ListOfBOMs=List of bills of material - BOM -ListOfManufacturingOrders=List of Manufacturing Orders -NewBOM=New bill of materials -ProductBOMHelp=Product to create (or disassemble) with this BOM.
    Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list. -BOMsNumberingModules=BOM numbering templates -BOMsModelModule=BOM document templates -MOsNumberingModules=MO numbering templates -MOsModelModule=MO document templates -FreeLegalTextOnBOMs=Free text on document of BOM -WatermarkOnDraftBOMs=Watermark on draft BOM -FreeLegalTextOnMOs=Free text on document of MO -WatermarkOnDraftMOs=Watermark on draft MO -ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of materials %s ? -ConfirmCloneMo=Are you sure you want to clone the Manufacturing Order %s ? -ManufacturingEfficiency=Manufacturing efficiency -ConsumptionEfficiency=Consumption efficiency -ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the production -ValueOfMeansLossForProductProduced=Value of 0.95 means an average of 5%% of loss of produced product -DeleteBillOfMaterials=Delete Bill Of Materials -DeleteMo=Delete Manufacturing Order -ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Materials? -ConfirmDeleteMo=Are you sure you want to delete this Manufacturing Order? -MenuMRP=Manufacturing Orders -NewMO=New Manufacturing Order -QtyToProduce=Qty to produce -DateStartPlannedMo=Date start planned -DateEndPlannedMo=Date end planned -KeepEmptyForAsap=Empty means 'As Soon As Possible' -EstimatedDuration=Estimated duration -EstimatedDurationDesc=Estimated duration to manufacture (or disassemble) this product using this BOM -ConfirmValidateBom=Are you sure you want to validate the BOM with the reference %s (you will be able to use it to build new Manufacturing Orders) -ConfirmCloseBom=Are you sure you want to cancel this BOM (you won't be able to use it to build new Manufacturing Orders anymore) ? -ConfirmReopenBom=Are you sure you want to re-open this BOM (you will be able to use it to build new Manufacturing Orders) -StatusMOProduced=Produced -QtyFrozen=Frozen Qty -QuantityFrozen=Frozen Quantity -QuantityConsumedInvariable=When this flag is set, the quantity consumed is always the value defined and is not relative to the quantity produced. -DisableStockChange=Stock change disabled -DisableStockChangeHelp=When this flag is set, there is no stock change on this product, whatever is the quantity consumed -BomAndBomLines=Bills Of Material and lines -BOMLine=Line of BOM -WarehouseForProduction=Warehouse for production -CreateMO=Create MO -ToConsume=To consume -ToProduce=To produce -QtyAlreadyConsumed=Qty already consumed -QtyAlreadyProduced=Qty already produced -QtyRequiredIfNoLoss=Qty required if there is no loss (Manufacturing efficiency is 100%%) -ConsumeOrProduce=Consume or Produce -ConsumeAndProduceAll=Consume and Produce All -Manufactured=Manufactured -TheProductXIsAlreadyTheProductToProduce=The product to add is already the product to produce. -ForAQuantityOf=For a quantity to produce of %s -ForAQuantityToConsumeOf=For a quantity to disassemble of %s -ConfirmValidateMo=Are you sure you want to validate this Manufacturing Order? -ConfirmProductionDesc=By clicking on '%s', you will validate the consumption and/or production for the quantities set. This will also update the stock and record stock movements. -ProductionForRef=Production of %s -AutoCloseMO=Close automatically the Manufacturing Order if quantities to consume and to produce are reached -NoStockChangeOnServices=No stock change on services -ProductQtyToConsumeByMO=Product quantity still to consume by open MO -ProductQtyToProduceByMO=Product quantity still to produce by open MO -AddNewConsumeLines=Add new line to consume -ProductsToConsume=Products to consume -ProductsToProduce=Products to produce -UnitCost=Unit cost -TotalCost=Total cost -BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price) -GoOnTabProductionToProduceFirst=You must first have started the production to close a Manufacturing Order (See tab '%s'). But you can Cancel it. -ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO -Workstation=Workstation -Workstations=Workstations -WorkstationsDescription=Workstations management -WorkstationSetup = Workstations setup -WorkstationSetupPage = Workstations setup page -WorkstationList=Workstation list -WorkstationCreate=Add new workstation -ConfirmEnableWorkstation=Are you sure you want to enable workstation %s ? -EnableAWorkstation=Enable a workstation -ConfirmDisableWorkstation=Are you sure you want to disable workstation %s ? -DisableAWorkstation=Disable a workstation -DeleteWorkstation=Delete -NbOperatorsRequired=Number of operators required -THMOperatorEstimated=Estimated operator THM -THMMachineEstimated=Estimated machine THM -WorkstationType=Workstation type -Human=Human -Machine=Machine -HumanMachine=Human / Machine -WorkstationArea=Workstation area -Machines=Machines -THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item diff --git a/htdocs/langs/ar_IQ/multicurrency.lang b/htdocs/langs/ar_IQ/multicurrency.lang deleted file mode 100644 index 26313c6bfb9..00000000000 --- a/htdocs/langs/ar_IQ/multicurrency.lang +++ /dev/null @@ -1,38 +0,0 @@ -# Dolibarr language file - Source file is en_US - multicurrency -MultiCurrency=Multi currency -ErrorAddRateFail=Error in added rate -ErrorAddCurrencyFail=Error in added currency -ErrorDeleteCurrencyFail=Error delete fail -multicurrency_syncronize_error=Synchronization error: %s -MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Use the date of the document to find the currency rate, instead of using the latest known rate -multicurrency_useOriginTx=When an object is created from another, keep the original rate from the source object (otherwise use the latest known rate) -CurrencyLayerAccount=CurrencyLayer API -CurrencyLayerAccount_help_to_synchronize=You must create an account on website %s to use this functionality.
    Get your API key.
    If you use a free account, you can't change the source currency (USD by default).
    If your main currency is not USD, the application will automatically recalculate it.

    You are limited to 1000 synchronizations per month. -multicurrency_appId=API key -multicurrency_appCurrencySource=Source currency -multicurrency_alternateCurrencySource=Alternate source currency -CurrenciesUsed=Currencies used -CurrenciesUsed_help_to_add=Add the different currencies and rates you need to use on your proposals, orders etc. -rate=rate -MulticurrencyReceived=Received, original currency -MulticurrencyRemainderToTake=Remaining amount, original currency -MulticurrencyPaymentAmount=Payment amount, original currency -AmountToOthercurrency=Amount To (in currency of receiving account) -CurrencyRateSyncSucceed=Currency rate synchronization done successfuly -MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Use the currency of the document for online payments -TabTitleMulticurrencyRate=Rate list -ListCurrencyRate=List of exchange rates for the currency -CreateRate=Create a rate -FormCreateRate=Rate creation -FormUpdateRate=Rate modification -successRateCreate=Rate for currency %s has been added to the database -ConfirmDeleteLineRate=Are you sure you want to remove the %s rate for currency %s on %s date? -DeleteLineRate=Clear rate -successRateDelete=Rate deleted -errorRateDelete=Error when deleting the rate -successUpdateRate=Modification made -ErrorUpdateRate=Error when changing the rate -Codemulticurrency=currency code -UpdateRate=change the rate -CancelUpdate=cancel -NoEmptyRate=The rate field must not be empty diff --git a/htdocs/langs/ar_IQ/oauth.lang b/htdocs/langs/ar_IQ/oauth.lang deleted file mode 100644 index 075ff49a895..00000000000 --- a/htdocs/langs/ar_IQ/oauth.lang +++ /dev/null @@ -1,32 +0,0 @@ -# Dolibarr language file - Source file is en_US - oauth -ConfigOAuth=OAuth Configuration -OAuthServices=OAuth Services -ManualTokenGeneration=Manual token generation -TokenManager=Token Manager -IsTokenGenerated=Is token generated ? -NoAccessToken=No access token saved into local database -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 -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 -SeePreviousTab=See previous tab -OAuthIDSecret=OAuth ID and Secret -TOKEN_REFRESH=Token Refresh Present -TOKEN_EXPIRED=Token expired -TOKEN_EXPIRE_AT=Token expire at -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_STRIPE_TEST_NAME=OAuth Stripe Test -OAUTH_STRIPE_LIVE_NAME=OAuth Stripe Live diff --git a/htdocs/langs/ar_IQ/opensurvey.lang b/htdocs/langs/ar_IQ/opensurvey.lang deleted file mode 100644 index 7d26151fa16..00000000000 --- a/htdocs/langs/ar_IQ/opensurvey.lang +++ /dev/null @@ -1,61 +0,0 @@ -# Dolibarr language file - Source file is en_US - opensurvey -Survey=Poll -Surveys=Polls -OrganizeYourMeetingEasily=Organize your meetings and polls easily. First select the type of poll... -NewSurvey=New poll -OpenSurveyArea=Polls area -AddACommentForPoll=You can add a comment into poll... -AddComment=Add comment -CreatePoll=Create poll -PollTitle=Poll title -ToReceiveEMailForEachVote=Receive an email for each vote -TypeDate=Type date -TypeClassic=Type standard -OpenSurveyStep2=Select your dates among the free days (grey). The selected days are green. You can unselect a day previously selected by clicking again on it -RemoveAllDays=Remove all days -CopyHoursOfFirstDay=Copy hours of first day -RemoveAllHours=Remove all hours -SelectedDays=Selected days -TheBestChoice=The best choice currently is -TheBestChoices=The best choices currently are -with=with -OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line. -CommentsOfVoters=Comments of voters -ConfirmRemovalOfPoll=Are you sure you want to remove this poll (and all votes) -RemovePoll=Remove poll -UrlForSurvey=URL to communicate to get a direct access to poll -PollOnChoice=You are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll: -CreateSurveyDate=Create a date poll -CreateSurveyStandard=Create a standard poll -CheckBox=Simple checkbox -YesNoList=List (empty/yes/no) -PourContreList=List (empty/for/against) -AddNewColumn=Add new column -TitleChoice=Choice label -ExportSpreadsheet=Export result spreadsheet -ExpireDate=Limit date -NbOfSurveys=Number of polls -NbOfVoters=No. of voters -SurveyResults=Results -PollAdminDesc=You are allowed to change all vote lines of this poll with button "Edit". You can, as well, remove a column or a line with %s. You can also add a new column with %s. -5MoreChoices=5 more choices -Against=Against -YouAreInivitedToVote=You are invited to vote for this poll -VoteNameAlreadyExists=This name was already used for this poll -AddADate=Add a date -AddStartHour=Add start hour -AddEndHour=Add end hour -votes=vote(s) -NoCommentYet=No comments have been posted for this poll yet -CanComment=Voters can comment in the poll -CanSeeOthersVote=Voters can see other people's vote -SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format:
    - empty,
    - "8h", "8H" or "8:00" to give a meeting's start hour,
    - "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
    - "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. -BackToCurrentMonth=Back to current month -ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation -ErrorOpenSurveyOneChoice=Enter at least one choice -ErrorInsertingComment=There was an error while inserting your comment -MoreChoices=Enter more choices for the voters -SurveyExpiredInfo=The poll has been closed or voting delay has expired. -EmailSomeoneVoted=%s has filled a line.\nYou can find your poll at the link: \n%s -ShowSurvey=Show survey -UserMustBeSameThanUserUsedToVote=You must have voted and use the same user name that the one used to vote, to post a comment diff --git a/htdocs/langs/ar_IQ/orders.lang b/htdocs/langs/ar_IQ/orders.lang index 5dab5b99bf1..90fedaf49f7 100644 --- a/htdocs/langs/ar_IQ/orders.lang +++ b/htdocs/langs/ar_IQ/orders.lang @@ -1,193 +1,2 @@ # Dolibarr language file - Source file is en_US - orders -OrdersArea=Customers orders area -SuppliersOrdersArea=Purchase orders area -OrderCard=Order card -OrderId=Order Id -Order=Order -PdfOrderTitle=Order -Orders=Orders -OrderLine=Order line -OrderDate=Order date -OrderDateShort=Order date -OrderToProcess=Order to process -NewOrder=New order -NewSupplierOrderShort=New order -NewOrderSupplier=New Purchase Order -ToOrder=Make order -MakeOrder=Make order -SupplierOrder=Purchase order -SuppliersOrders=Purchase orders SaleOrderLines=Sale order lines -PurchaseOrderLines=Puchase order lines -SuppliersOrdersRunning=Current purchase orders -CustomerOrder=Sales Order -CustomersOrders=Sales Orders -CustomersOrdersRunning=Current sales orders -CustomersOrdersAndOrdersLines=Sales orders and order details -OrdersDeliveredToBill=Sales orders delivered to bill -OrdersToBill=Sales orders delivered -OrdersInProcess=Sales orders in process -OrdersToProcess=Sales orders to process -SuppliersOrdersToProcess=Purchase orders to process -SuppliersOrdersAwaitingReception=Purchase orders awaiting reception -AwaitingReception=Awaiting reception -StatusOrderCanceledShort=Canceled -StatusOrderDraftShort=Draft -StatusOrderValidatedShort=Validated -StatusOrderSentShort=In process -StatusOrderSent=Shipment in process -StatusOrderOnProcessShort=Ordered -StatusOrderProcessedShort=Processed -StatusOrderDelivered=Delivered -StatusOrderDeliveredShort=Delivered -StatusOrderToBillShort=Delivered -StatusOrderApprovedShort=Approved -StatusOrderRefusedShort=Refused -StatusOrderToProcessShort=To process -StatusOrderReceivedPartiallyShort=Partially received -StatusOrderReceivedAllShort=Products received -StatusOrderCanceled=Canceled -StatusOrderDraft=Draft (needs to be validated) -StatusOrderValidated=Validated -StatusOrderOnProcess=Ordered - Standby reception -StatusOrderOnProcessWithValidation=Ordered - Standby reception or validation -StatusOrderProcessed=Processed -StatusOrderToBill=Delivered -StatusOrderApproved=Approved -StatusOrderRefused=Refused -StatusOrderReceivedPartially=Partially received -StatusOrderReceivedAll=All products received -ShippingExist=A shipment exists -QtyOrdered=Qty ordered -ProductQtyInDraft=Product quantity into draft orders -ProductQtyInDraftOrWaitingApproved=Product quantity into draft or approved orders, not yet ordered -MenuOrdersToBill=Orders delivered -MenuOrdersToBill2=Billable orders -ShipProduct=Ship product -CreateOrder=Create Order -RefuseOrder=Refuse order -ApproveOrder=Approve order -Approve2Order=Approve order (second level) -ValidateOrder=Validate order -UnvalidateOrder=Unvalidate order -DeleteOrder=Delete order -CancelOrder=Cancel order -OrderReopened= Order %s re-open -AddOrder=Create order -AddSupplierOrderShort=Create order -AddPurchaseOrder=Create purchase order -AddToDraftOrders=Add to draft order -ShowOrder=Show order -OrdersOpened=Orders to process -NoDraftOrders=No draft orders -NoOrder=No order -NoSupplierOrder=No purchase order -LastOrders=Latest %s sales orders -LastCustomerOrders=Latest %s sales orders -LastSupplierOrders=Latest %s purchase orders -LastModifiedOrders=Latest %s modified orders -AllOrders=All orders -NbOfOrders=Number of orders -OrdersStatistics=Order's statistics -OrdersStatisticsSuppliers=Purchase order statistics -NumberOfOrdersByMonth=Number of orders by month -AmountOfOrdersByMonthHT=Amount of orders by month (excl. tax) -ListOfOrders=List of orders -CloseOrder=Close order -ConfirmCloseOrder=Are you sure you want to set this order to delivered? Once an order is delivered, it can be set to billed. -ConfirmDeleteOrder=Are you sure you want to delete this order? -ConfirmValidateOrder=Are you sure you want to validate this order under name %s? -ConfirmUnvalidateOrder=Are you sure you want to restore order %s to draft status? -ConfirmCancelOrder=Are you sure you want to cancel this order? -ConfirmMakeOrder=Are you sure you want to confirm you made this order on %s? -GenerateBill=Generate invoice -ClassifyShipped=Classify delivered -DraftOrders=Draft orders -DraftSuppliersOrders=Draft purchase orders -OnProcessOrders=In process orders -RefOrder=Ref. order -RefCustomerOrder=Ref. order for customer -RefOrderSupplier=Ref. order for vendor -RefOrderSupplierShort=Ref. order vendor -SendOrderByMail=Send order by mail -ActionsOnOrder=Events on order -NoArticleOfTypeProduct=No article of type 'product' so no shippable article for this order -OrderMode=Order method -AuthorRequest=Request author -UserWithApproveOrderGrant=Users granted with "approve orders" permission. -PaymentOrderRef=Payment of order %s -ConfirmCloneOrder=Are you sure you want to clone this order %s? -DispatchSupplierOrder=Receiving purchase order %s -FirstApprovalAlreadyDone=First approval already done -SecondApprovalAlreadyDone=Second approval already done -SupplierOrderReceivedInDolibarr=Purchase Order %s received %s -SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted -SupplierOrderClassifiedBilled=Purchase Order %s set billed -OtherOrders=Other orders -##### Types de contacts ##### -TypeContact_commande_internal_SALESREPFOLL=Representative following-up sales order -TypeContact_commande_internal_SHIPPING=Representative following-up shipping -TypeContact_commande_external_BILLING=Customer invoice contact -TypeContact_commande_external_SHIPPING=Customer shipping contact -TypeContact_commande_external_CUSTOMER=Customer contact following-up order -TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up purchase order -TypeContact_order_supplier_internal_SHIPPING=Representative following-up shipping -TypeContact_order_supplier_external_BILLING=Vendor invoice contact -TypeContact_order_supplier_external_SHIPPING=Vendor shipping contact -TypeContact_order_supplier_external_CUSTOMER=Vendor contact following-up order -Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constant COMMANDE_SUPPLIER_ADDON not defined -Error_COMMANDE_ADDON_NotDefined=Constant COMMANDE_ADDON not defined -Error_OrderNotChecked=No orders to invoice selected -# Order modes (how we receive order). Not the "why" are keys stored into dict.lang -OrderByMail=Mail -OrderByFax=Fax -OrderByEMail=Email -OrderByWWW=Online -OrderByPhone=Phone -# Documents models -PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) -PDFEratostheneDescription=A complete order model -PDFEdisonDescription=A simple order model -PDFProformaDescription=A complete Proforma invoice template -CreateInvoiceForThisCustomer=Bill orders -CreateInvoiceForThisSupplier=Bill orders -NoOrdersToInvoice=No orders billable -CloseProcessedOrdersAutomatically=Classify "Processed" all selected orders. -OrderCreation=Order creation -Ordered=Ordered -OrderCreated=Your orders have been created -OrderFail=An error happened during your orders creation -CreateOrders=Create orders -ToBillSeveralOrderSelectCustomer=To create an invoice for several orders, click first onto customer, then choose "%s". -OptionToSetOrderBilledNotEnabled=Option from module Workflow, to set order to 'Billed' automatically when invoice is validated, is not enabled, so you will have to set the status of orders to 'Billed' manually after the invoice has been generated. -IfValidateInvoiceIsNoOrderStayUnbilled=If invoice validation is 'No', the order will remain to status 'Unbilled' until the invoice is validated. -CloseReceivedSupplierOrdersAutomatically=Close order to status "%s" automatically if all products are received. -SetShippingMode=Set shipping mode -WithReceptionFinished=With reception finished -#### supplier orders status -StatusSupplierOrderCanceledShort=Canceled -StatusSupplierOrderDraftShort=Draft -StatusSupplierOrderValidatedShort=Validated -StatusSupplierOrderSentShort=In process -StatusSupplierOrderSent=Shipment in process -StatusSupplierOrderOnProcessShort=Ordered -StatusSupplierOrderProcessedShort=Processed -StatusSupplierOrderDelivered=Delivered -StatusSupplierOrderDeliveredShort=Delivered -StatusSupplierOrderToBillShort=Delivered -StatusSupplierOrderApprovedShort=Approved -StatusSupplierOrderRefusedShort=Refused -StatusSupplierOrderToProcessShort=To process -StatusSupplierOrderReceivedPartiallyShort=Partially received -StatusSupplierOrderReceivedAllShort=Products received -StatusSupplierOrderCanceled=Canceled -StatusSupplierOrderDraft=Draft (needs to be validated) -StatusSupplierOrderValidated=Validated -StatusSupplierOrderOnProcess=Ordered - Standby reception -StatusSupplierOrderOnProcessWithValidation=Ordered - Standby reception or validation -StatusSupplierOrderProcessed=Processed -StatusSupplierOrderToBill=Delivered -StatusSupplierOrderApproved=Approved -StatusSupplierOrderRefused=Refused -StatusSupplierOrderReceivedPartially=Partially received -StatusSupplierOrderReceivedAll=All products received diff --git a/htdocs/langs/ar_IQ/other.lang b/htdocs/langs/ar_IQ/other.lang deleted file mode 100644 index ea280968ef4..00000000000 --- a/htdocs/langs/ar_IQ/other.lang +++ /dev/null @@ -1,297 +0,0 @@ -# Dolibarr language file - Source file is en_US - other -SecurityCode=Security code -NumberingShort=N° -Tools=Tools -TMenuTools=Tools -ToolsDesc=All tools not included in other menu entries are grouped here.
    All the tools can be accessed via the left menu. -Birthday=Birthday -BirthdayAlertOn=birthday alert active -BirthdayAlertOff=birthday alert inactive -TransKey=Translation of the key TransKey -MonthOfInvoice=Month (number 1-12) of invoice date -TextMonthOfInvoice=Month (text) of invoice date -PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date -TextPreviousMonthOfInvoice=Previous month (text) of invoice date -NextMonthOfInvoice=Following month (number 1-12) of invoice date -TextNextMonthOfInvoice=Following month (text) of invoice date -PreviousMonth=Previous month -CurrentMonth=Current month -ZipFileGeneratedInto=Zip file generated into %s. -DocFileGeneratedInto=Doc file generated into %s. -JumpToLogin=Disconnected. Go to login page... -MessageForm=Message on online payment form -MessageOK=Message on the return page for a validated payment -MessageKO=Message on the return page for a canceled payment -ContentOfDirectoryIsNotEmpty=Content of this directory is not empty. -DeleteAlsoContentRecursively=Check to delete all content recursively -PoweredBy=Powered by -YearOfInvoice=Year of invoice date -PreviousYearOfInvoice=Previous year of invoice date -NextYearOfInvoice=Following year of invoice date -DateNextInvoiceBeforeGen=Date of next invoice (before generation) -DateNextInvoiceAfterGen=Date of next invoice (after generation) -GraphInBarsAreLimitedToNMeasures=Grapics are limited to %s measures in 'Bars' mode. The mode 'Lines' was automatically selected instead. -OnlyOneFieldForXAxisIsPossible=Only 1 field is currently possible as X-Axis. Only the first selected field has been selected. -AtLeastOneMeasureIsRequired=At least 1 field for measure is required -AtLeastOneXAxisIsRequired=At least 1 field for X-Axis is required -LatestBlogPosts=Latest Blog Posts -Notify_ORDER_VALIDATE=Sales order validated -Notify_ORDER_SENTBYMAIL=Sales order sent by mail -Notify_ORDER_SUPPLIER_SENTBYMAIL=Purchase order sent by email -Notify_ORDER_SUPPLIER_VALIDATE=Purchase order recorded -Notify_ORDER_SUPPLIER_APPROVE=Purchase order approved -Notify_ORDER_SUPPLIER_REFUSE=Purchase order refused -Notify_PROPAL_VALIDATE=Customer proposal validated -Notify_PROPAL_CLOSE_SIGNED=Customer proposal closed signed -Notify_PROPAL_CLOSE_REFUSED=Customer proposal closed refused -Notify_PROPAL_SENTBYMAIL=Commercial proposal sent by mail -Notify_WITHDRAW_TRANSMIT=Transmission withdrawal -Notify_WITHDRAW_CREDIT=Credit withdrawal -Notify_WITHDRAW_EMIT=Perform withdrawal -Notify_COMPANY_CREATE=Third party created -Notify_COMPANY_SENTBYMAIL=Mails sent from third party card -Notify_BILL_VALIDATE=Customer invoice validated -Notify_BILL_UNVALIDATE=Customer invoice unvalidated -Notify_BILL_PAYED=Customer invoice paid -Notify_BILL_CANCEL=Customer invoice canceled -Notify_BILL_SENTBYMAIL=Customer invoice sent by mail -Notify_BILL_SUPPLIER_VALIDATE=Vendor invoice validated -Notify_BILL_SUPPLIER_PAYED=Vendor invoice paid -Notify_BILL_SUPPLIER_SENTBYMAIL=Vendor invoice sent by mail -Notify_BILL_SUPPLIER_CANCELED=Vendor invoice cancelled -Notify_CONTRACT_VALIDATE=Contract validated -Notify_FICHINTER_VALIDATE=Intervention validated -Notify_FICHINTER_ADD_CONTACT=Added contact to Intervention -Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail -Notify_SHIPPING_VALIDATE=Shipping validated -Notify_SHIPPING_SENTBYMAIL=Shipping sent by mail -Notify_MEMBER_VALIDATE=Member validated -Notify_MEMBER_MODIFY=Member modified -Notify_MEMBER_SUBSCRIPTION=Member subscribed -Notify_MEMBER_RESILIATE=Member terminated -Notify_MEMBER_DELETE=Member deleted -Notify_PROJECT_CREATE=Project creation -Notify_TASK_CREATE=Task created -Notify_TASK_MODIFY=Task modified -Notify_TASK_DELETE=Task deleted -Notify_EXPENSE_REPORT_VALIDATE=Expense report validated (approval required) -Notify_EXPENSE_REPORT_APPROVE=Expense report approved -Notify_HOLIDAY_VALIDATE=Leave request validated (approval required) -Notify_HOLIDAY_APPROVE=Leave request approved -Notify_ACTION_CREATE=Added action to Agenda -SeeModuleSetup=See setup of module %s -NbOfAttachedFiles=Number of attached files/documents -TotalSizeOfAttachedFiles=Total size of attached files/documents -MaxSize=Maximum size -AttachANewFile=Attach a new file/document -LinkedObject=Linked object -NbOfActiveNotifications=Number of notifications (no. of recipient emails) -PredefinedMailTest=__(Hello)__\nThis is a test mail sent to __EMAIL__.\nThe lines are separated by a carriage return.\n\n__USER_SIGNATURE__ -PredefinedMailTestHtml=__(Hello)__
    This is a test mail sent to __EMAIL__ (the word test must be in bold).
    The lines are separated by a carriage return.

    __USER_SIGNATURE__ -PredefinedMailContentContract=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached \n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendInvoiceReminder=__(Hello)__\n\nWe would like to remind you that the invoice __REF__ seems to have not been paid. A copy of the invoice is attached as a reminder.\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendProposal=__(Hello)__\n\nPlease find commercial proposal __REF__ attached \n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendSupplierProposal=__(Hello)__\n\nPlease find price request __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendOrder=__(Hello)__\n\nPlease find order __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n -PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendActionComm=Event reminder "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__

    This is an automatic message, please do not reply. -DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. -ChooseYourDemoProfil=Choose the demo profile that best suits your needs... -ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) -DemoFundation=Manage members of a foundation -DemoFundation2=Manage members and bank account of a foundation -DemoCompanyServiceOnly=Company or freelance selling service only -DemoCompanyShopWithCashDesk=Manage a shop with a cash desk -DemoCompanyProductAndStocks=Shop selling products with Point Of Sales -DemoCompanyManufacturing=Company manufacturing products -DemoCompanyAll=Company with multiple activities (all main modules) -CreatedBy=Created by %s -ModifiedBy=Modified by %s -ValidatedBy=Validated by %s -SignedBy=Signed by %s -ClosedBy=Closed by %s -CreatedById=User id who created -ModifiedById=User id who made latest change -ValidatedById=User id who validated -CanceledById=User id who canceled -ClosedById=User id who closed -CreatedByLogin=User login who created -ModifiedByLogin=User login who made latest change -ValidatedByLogin=User login who validated -CanceledByLogin=User login who canceled -ClosedByLogin=User login who closed -FileWasRemoved=File %s was removed -DirWasRemoved=Directory %s was removed -FeatureNotYetAvailable=Feature not yet available in the current version -FeatureNotAvailableOnDevicesWithoutMouse=Feature not available on devices without mouse -FeaturesSupported=Supported features -Width=Width -Height=Height -Depth=Depth -Top=Top -Bottom=Bottom -Left=Left -Right=Right -CalculatedWeight=Calculated weight -CalculatedVolume=Calculated volume -Weight=Weight -WeightUnitton=ton -WeightUnitkg=kg -WeightUnitg=g -WeightUnitmg=mg -WeightUnitpound=pound -WeightUnitounce=ounce -Length=Length -LengthUnitm=m -LengthUnitdm=dm -LengthUnitcm=cm -LengthUnitmm=mm -Surface=Area -SurfaceUnitm2=m² -SurfaceUnitdm2=dm² -SurfaceUnitcm2=cm² -SurfaceUnitmm2=mm² -SurfaceUnitfoot2=ft² -SurfaceUnitinch2=in² -Volume=Volume -VolumeUnitm3=m³ -VolumeUnitdm3=dm³ (L) -VolumeUnitcm3=cm³ (ml) -VolumeUnitmm3=mm³ (µl) -VolumeUnitfoot3=ft³ -VolumeUnitinch3=in³ -VolumeUnitounce=ounce -VolumeUnitlitre=litre -VolumeUnitgallon=gallon -SizeUnitm=m -SizeUnitdm=dm -SizeUnitcm=cm -SizeUnitmm=mm -SizeUnitinch=inch -SizeUnitfoot=foot -SizeUnitpoint=point -BugTracker=Bug tracker -SendNewPasswordDesc=This form allows you to request a new password. It will be sent to your email address.
    Change will become effective once you click on the confirmation link in the email.
    Check your inbox. -BackToLoginPage=Back to login page -AuthenticationDoesNotAllowSendNewPassword=Authentication mode is %s.
    In this mode, Dolibarr can't know nor change your password.
    Contact your system administrator if you want to change your password. -EnableGDLibraryDesc=Install or enable GD library on your PHP installation to use this option. -ProfIdShortDesc=Prof Id %s is an information depending on third party country.
    For example, for country %s, it's code %s. -DolibarrDemo=Dolibarr ERP/CRM demo -StatsByNumberOfUnits=Statistics for sum of qty of products/services -StatsByNumberOfEntities=Statistics for number of referring entities (no. of invoices, or orders...) -NumberOfProposals=Number of proposals -NumberOfCustomerOrders=Number of sales orders -NumberOfCustomerInvoices=Number of customer invoices -NumberOfSupplierProposals=Number of vendor proposals -NumberOfSupplierOrders=Number of purchase orders -NumberOfSupplierInvoices=Number of vendor invoices -NumberOfContracts=Number of contracts -NumberOfMos=Number of manufacturing orders -NumberOfUnitsProposals=Number of units on proposals -NumberOfUnitsCustomerOrders=Number of units on sales orders -NumberOfUnitsCustomerInvoices=Number of units on customer invoices -NumberOfUnitsSupplierProposals=Number of units on vendor proposals -NumberOfUnitsSupplierOrders=Number of units on purchase orders -NumberOfUnitsSupplierInvoices=Number of units on vendor invoices -NumberOfUnitsContracts=Number of units on contracts -NumberOfUnitsMos=Number of units to produce in manufacturing orders -EMailTextInterventionAddedContact=A new intervention %s has been assigned to you. -EMailTextInterventionValidated=The intervention %s has been validated. -EMailTextInvoiceValidated=Invoice %s has been validated. -EMailTextInvoicePayed=Invoice %s has been paid. -EMailTextProposalValidated=Proposal %s has been validated. -EMailTextProposalClosedSigned=Proposal %s has been closed signed. -EMailTextOrderValidated=Order %s has been validated. -EMailTextOrderApproved=Order %s has been approved. -EMailTextOrderValidatedBy=Order %s has been recorded by %s. -EMailTextOrderApprovedBy=Order %s has been approved by %s. -EMailTextOrderRefused=Order %s has been refused. -EMailTextOrderRefusedBy=Order %s has been refused by %s. -EMailTextExpeditionValidated=Shipping %s has been validated. -EMailTextExpenseReportValidated=Expense report %s has been validated. -EMailTextExpenseReportApproved=Expense report %s has been approved. -EMailTextHolidayValidated=Leave request %s has been validated. -EMailTextHolidayApproved=Leave request %s has been approved. -EMailTextActionAdded=The action %s has been added to the Agenda. -ImportedWithSet=Importation data set -DolibarrNotification=Automatic notification -ResizeDesc=Enter new width OR new height. Ratio will be kept during resizing... -NewLength=New width -NewHeight=New height -NewSizeAfterCropping=New size after cropping -DefineNewAreaToPick=Define new area on image to pick (left click on image then drag until you reach the opposite corner) -CurrentInformationOnImage=This tool was designed to help you to resize or crop an image. This is the information on the current edited image -ImageEditor=Image editor -YouReceiveMailBecauseOfNotification=You receive this message because your email has been added to list of targets to be informed of particular events into %s software of %s. -YouReceiveMailBecauseOfNotification2=This event is the following: -ThisIsListOfModules=This is a list of modules preselected by this demo profile (only most common modules are visible in this demo). Edit this to have a more personalized demo and click on "Start". -UseAdvancedPerms=Use the advanced permissions of some modules -FileFormat=File format -SelectAColor=Choose a color -AddFiles=Add Files -StartUpload=Start upload -CancelUpload=Cancel upload -FileIsTooBig=Files is too big -PleaseBePatient=Please be patient... -NewPassword=New password -ResetPassword=Reset password -RequestToResetPasswordReceived=A request to change your password has been received. -NewKeyIs=This is your new keys to login -NewKeyWillBe=Your new key to login to software will be -ClickHereToGoTo=Click here to go to %s -YouMustClickToChange=You must however first click on the following link to validate this password change -ConfirmPasswordChange=Confirm password change -ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. -IfAmountHigherThan=If amount higher than %s -SourcesRepository=Repository for sources -Chart=Chart -PassEncoding=Password encoding -PermissionsAdd=Permissions added -PermissionsDelete=Permissions removed -YourPasswordMustHaveAtLeastXChars=Your password must have at least %s chars -YourPasswordHasBeenReset=Your password has been reset successfully -ApplicantIpAddress=IP address of applicant -SMSSentTo=SMS sent to %s -MissingIds=Missing ids -ThirdPartyCreatedByEmailCollector=Third party created by email collector from email MSGID %s -ContactCreatedByEmailCollector=Contact/address created by email collector from email MSGID %s -ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s -TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s -OpeningHoursFormatDesc=Use a - to separate opening and closing hours.
    Use a space to enter different ranges.
    Example: 8-12 14-18 -SuffixSessionName=Suffix for session name - -##### Export ##### -ExportsArea=Exports area -AvailableFormats=Available formats -LibraryUsed=Library used -LibraryVersion=Library version -ExportableDatas=Exportable data -NoExportableData=No exportable data (no modules with exportable data loaded, or missing permissions) -##### External sites ##### -WebsiteSetup=Setup of module website -WEBSITE_PAGEURL=URL of page -WEBSITE_TITLE=Title -WEBSITE_DESCRIPTION=Description -WEBSITE_IMAGE=Image -WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITE_KEY__ in the path if path depends on website name (for example: image/__WEBSITE_KEY__/stories/myimage.png). -WEBSITE_KEYWORDS=Keywords -LinesToImport=Lines to import - -MemoryUsage=Memory usage -RequestDuration=Duration of request -ProductsPerPopularity=Products/Services by popularity -PopuProp=Products/Services by popularity in Proposals -PopuCom=Products/Services by popularity in Orders -ProductStatistics=Products/Services Statistics -NbOfQtyInOrders=Qty in orders -SelectTheTypeOfObjectToAnalyze=Select an object to view its statistics... - -ConfirmBtnCommonContent = Are you sure you want to "%s" ? -ConfirmBtnCommonTitle = Confirm your action -CloseDialog = Close diff --git a/htdocs/langs/ar_IQ/partnership.lang b/htdocs/langs/ar_IQ/partnership.lang deleted file mode 100644 index 606c3a0df3b..00000000000 --- a/htdocs/langs/ar_IQ/partnership.lang +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright (C) 2021 NextGestion -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# -# Generic -# -ModulePartnershipName=Partnership management -PartnershipDescription=Module Partnership management -PartnershipDescriptionLong= Module Partnership management - -AddPartnership=Add partnership -CancelPartnershipForExpiredMembers=Partnership: Cancel partnership of members with expired subscriptions -PartnershipCheckBacklink=Partnership: Check referring backlink - -# -# Menu -# -NewPartnership=New Partnership -ListOfPartnerships=List of partnership - -# -# Admin page -# -PartnershipSetup=Partnership setup -PartnershipAbout=About Partnership -PartnershipAboutPage=Partnership about page -partnershipforthirdpartyormember=Partner status must be set on a 'thirdparty' or a 'member' -PARTNERSHIP_IS_MANAGED_FOR=Partnership managed for -PARTNERSHIP_BACKLINKS_TO_CHECK=Backlinks to check -PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL=Nb of days before cancelling status of a partnership when a subscription has expired -ReferingWebsiteCheck=Check of website referring -ReferingWebsiteCheckDesc=You can enable a feature to check that your partners has added a backlink to your website domains on their own website. - -# -# Object -# -DeletePartnership=Delete a partnership -PartnershipDedicatedToThisThirdParty=Partnership dedicated to this third party -PartnershipDedicatedToThisMember=Partnership dedicated to this member -DatePartnershipStart=Start date -DatePartnershipEnd=End date -ReasonDecline=Decline reason -ReasonDeclineOrCancel=Decline reason -PartnershipAlreadyExist=Partnership already exist -ManagePartnership=Manage partnership -BacklinkNotFoundOnPartnerWebsite=Backlink not found on partner website -ConfirmClosePartnershipAsk=Are you sure you want to cancel this partnership? -PartnershipType=Partnership type - -# -# Template Mail -# -SendingEmailOnPartnershipWillSoonBeCanceled=Partnership will soon be canceled -SendingEmailOnPartnershipRefused=Partnership refused -SendingEmailOnPartnershipAccepted=Partnership accepted -SendingEmailOnPartnershipCanceled=Partnership canceled - -YourPartnershipWillSoonBeCanceledTopic=Partnership will soon be canceled -YourPartnershipRefusedTopic=Partnership refused -YourPartnershipAcceptedTopic=Partnership accepted -YourPartnershipCanceledTopic=Partnership canceled - -YourPartnershipWillSoonBeCanceledContent=We inform you that your partnership will soon be canceled (Backlink not found) -YourPartnershipRefusedContent=We inform you that your partnership request has been refused. -YourPartnershipAcceptedContent=We inform you that your partnership request has been accepted. -YourPartnershipCanceledContent=We inform you that your partnership has been canceled. - -CountLastUrlCheckError=Number of errors for last URL check -LastCheckBacklink=Date of last URL check -ReasonDeclineOrCancel=Decline reason - -# -# Status -# -PartnershipDraft=Draft -PartnershipAccepted=Accepted -PartnershipRefused=Refused -PartnershipCanceled=Canceled -PartnershipManagedFor=Partners are diff --git a/htdocs/langs/ar_IQ/paybox.lang b/htdocs/langs/ar_IQ/paybox.lang deleted file mode 100644 index 6f320c03181..00000000000 --- a/htdocs/langs/ar_IQ/paybox.lang +++ /dev/null @@ -1,30 +0,0 @@ -# Dolibarr language file - Source file is en_US - paybox -PayBoxSetup=PayBox module setup -PayBoxDesc=This module offer pages to allow payment on Paybox by customers. This can be used for a free payment or for a payment on a particular Dolibarr object (invoice, order, ...) -FollowingUrlAreAvailableToMakePayments=Following URLs are available to offer a page to a customer to make a payment on Dolibarr objects -PaymentForm=Payment form -WelcomeOnPaymentPage=Welcome to our online payment service -ThisScreenAllowsYouToPay=This screen allow you to make an online payment to %s. -ThisIsInformationOnPayment=This is information on payment to do -ToComplete=To complete -YourEMail=Email to receive payment confirmation -Creditor=Creditor -PaymentCode=Payment code -PayBoxDoPayment=Pay with Paybox -YouWillBeRedirectedOnPayBox=You will be redirected on secured Paybox page to input you credit card information -Continue=Next -SetupPayBoxToHavePaymentCreatedAutomatically=Setup your Paybox with url %s to have payment created automatically when validated by Paybox. -YourPaymentHasBeenRecorded=This page confirms that your payment has been recorded. Thank you. -YourPaymentHasNotBeenRecorded=Your payment has NOT been recorded and the transaction has been canceled. Thank you. -AccountParameter=Account parameters -UsageParameter=Usage parameters -InformationToFindParameters=Help to find your %s account information -PAYBOX_CGI_URL_V2=Url of Paybox CGI module for payment -CSSUrlForPaymentForm=CSS style sheet url for payment form -NewPayboxPaymentReceived=New Paybox payment received -NewPayboxPaymentFailed=New Paybox payment tried but failed -PAYBOX_PAYONLINE_SENDEMAIL=Email notification after payment attempt (success or fail) -PAYBOX_PBX_SITE=Value for PBX SITE -PAYBOX_PBX_RANG=Value for PBX Rang -PAYBOX_PBX_IDENTIFIANT=Value for PBX ID -PAYBOX_HMAC_KEY=HMAC key diff --git a/htdocs/langs/ar_IQ/paypal.lang b/htdocs/langs/ar_IQ/paypal.lang deleted file mode 100644 index 5eb5f389445..00000000000 --- a/htdocs/langs/ar_IQ/paypal.lang +++ /dev/null @@ -1,36 +0,0 @@ -# Dolibarr language file - Source file is en_US - paypal -PaypalSetup=PayPal module setup -PaypalDesc=This module allows payment by customers via PayPal. This can be used for a ad-hoc payment or for a payment related to a Dolibarr object (invoice, order, ...) -PaypalOrCBDoPayment=Pay with PayPal (Card or PayPal) -PaypalDoPayment=Pay with PayPal -PAYPAL_API_SANDBOX=Mode test/sandbox -PAYPAL_API_USER=API username -PAYPAL_API_PASSWORD=API password -PAYPAL_API_SIGNATURE=API signature -PAYPAL_SSLVERSION=Curl SSL Version -PAYPAL_API_INTEGRAL_OR_PAYPALONLY=Offer "integral" payment (Credit card+PayPal) or "PayPal" only -PaypalModeIntegral=Integral -PaypalModeOnlyPaypal=PayPal only -ONLINE_PAYMENT_CSS_URL=Optional URL of CSS stylesheet on online payment page -ThisIsTransactionId=This is id of transaction: %s -PAYPAL_ADD_PAYMENT_URL=Include the PayPal payment url when you send a document by email -NewOnlinePaymentReceived=New online payment received -NewOnlinePaymentFailed=New online payment tried but failed -ONLINE_PAYMENT_SENDEMAIL=Email address for notifications after each payment attempt (for success and fail) -ReturnURLAfterPayment=Return URL after payment -ValidationOfOnlinePaymentFailed=Validation of online payment failed -PaymentSystemConfirmPaymentPageWasCalledButFailed=Payment confirmation page was called by payment system returned an error -SetExpressCheckoutAPICallFailed=SetExpressCheckout API call failed. -DoExpressCheckoutPaymentAPICallFailed=DoExpressCheckoutPayment API call failed. -DetailedErrorMessage=Detailed Error Message -ShortErrorMessage=Short Error Message -ErrorCode=Error Code -ErrorSeverityCode=Error Severity Code -OnlinePaymentSystem=Online payment system -PaypalLiveEnabled=PayPal "live" mode enabled (otherwise test/sandbox mode) -PaypalImportPayment=Import PayPal payments -PostActionAfterPayment=Post actions after payments -ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions. You must complete post actions manually if they are necessary. -ValidationOfPaymentFailed=Validation of payment has failed -CardOwner=Card holder -PayPalBalance=Paypal credit diff --git a/htdocs/langs/ar_IQ/printing.lang b/htdocs/langs/ar_IQ/printing.lang index 16494583550..55eee521013 100644 --- a/htdocs/langs/ar_IQ/printing.lang +++ b/htdocs/langs/ar_IQ/printing.lang @@ -5,50 +5,3 @@ PrintingSetup=Setup of Direct Printing System PrintingDesc=This module adds a Print button to various modules to allow documents to be printed directly to a printer without needing to open the document in another application. MenuDirectPrinting=Direct Printing jobs DirectPrint=Direct print -PrintingDriverDesc=Configuration variables for printing driver. -ListDrivers=List of drivers -PrintTestDesc=List of Printers. -FileWasSentToPrinter=File %s was sent to printer -ViaModule=via the module -NoActivePrintingModuleFound=No active driver to print document. Check setup of module %s. -PleaseSelectaDriverfromList=Please select a driver from list. -PleaseConfigureDriverfromList=Please configure the selected driver from list. -SetupDriver=Driver setup -TargetedPrinter=Targeted printer -UserConf=Setup per user -PRINTGCP_INFO=Google OAuth API setup -PRINTGCP_AUTHLINK=Authentication -PRINTGCP_TOKEN_ACCESS=Google Cloud Print OAuth Token -PrintGCPDesc=This driver allows sending documents directly to a printer using Google Cloud Print. -GCP_Name=Name -GCP_displayName=Display Name -GCP_Id=Printer Id -GCP_OwnerName=Owner Name -GCP_State=Printer State -GCP_connectionStatus=Online State -GCP_Type=Printer Type -PrintIPPDesc=This driver allows sending of documents directly to a printer. It requires a Linux system with CUPS installed. -PRINTIPP_HOST=Print server -PRINTIPP_PORT=Port -PRINTIPP_USER=Login -PRINTIPP_PASSWORD=Password -NoDefaultPrinterDefined=No default printer defined -DefaultPrinter=Default printer -Printer=Printer -IPP_Uri=Printer Uri -IPP_Name=Printer Name -IPP_State=Printer State -IPP_State_reason=State reason -IPP_State_reason1=State reason1 -IPP_BW=BW -IPP_Color=Color -IPP_Device=Device -IPP_Media=Printer media -IPP_Supported=Type of media -DirectPrintingJobsDesc=This page lists printing jobs found for available printers. -GoogleAuthNotConfigured=Google OAuth has not been setup. Enable module OAuth and set a Google ID/Secret. -GoogleAuthConfigured=Google OAuth credentials were found into setup of module OAuth. -PrintingDriverDescprintgcp=Configuration variables for printing driver Google Cloud Print. -PrintingDriverDescprintipp=Configuration variables for printing driver Cups. -PrintTestDescprintgcp=List of Printers for Google Cloud Print. -PrintTestDescprintipp=List of Printers for Cups. diff --git a/htdocs/langs/ar_IQ/productbatch.lang b/htdocs/langs/ar_IQ/productbatch.lang deleted file mode 100644 index 763af20c6b4..00000000000 --- a/htdocs/langs/ar_IQ/productbatch.lang +++ /dev/null @@ -1,43 +0,0 @@ -# ProductBATCH language file - Source file is en_US - ProductBATCH -ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot required) -ProductStatusOnSerial=Yes (unique serial number required) -ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Lot -ProductStatusOnSerialShort=Serial -ProductStatusNotOnBatchShort=No -Batch=Lot/Serial -atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number -batch_number=Lot/Serial number -BatchNumberShort=Lot/Serial -EatByDate=Eat-by date -SellByDate=Sell-by date -DetailBatchNumber=Lot/Serial details -printBatch=Lot/Serial: %s -printEatby=Eat-by: %s -printSellby=Sell-by: %s -printQty=Qty: %d -AddDispatchBatchLine=Add a line for Shelf Life dispatching -WhenProductBatchModuleOnOptionAreForced=When module Lot/Serial is on, automatic stock decrease is forced to 'Decrease real stocks on shipping validation' and automatic increase mode is forced to 'Increase real stocks on manual dispatching into warehouses' and can't be edited. Other options can be defined as you want. -ProductDoesNotUseBatchSerial=This product does not use lot/serial number -ProductLotSetup=Setup of module lot/serial -ShowCurrentStockOfLot=Show current stock for couple product/lot -ShowLogOfMovementIfLot=Show log of movements for couple product/lot -StockDetailPerBatch=Stock detail per lot -SerialNumberAlreadyInUse=Serial number %s is already used for product %s -TooManyQtyForSerialNumber=You can only have one product %s for serial number %s -ManageLotMask=Custom mask -CustomMasks=Option to define a different numbering mask for each product -BatchLotNumberingModules=Numbering rule for automatic generation of lot number -BatchSerialNumberingModules=Numbering rule for automatic generation of serial number (for products with property 1 unique lot/serial for each product) -QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned -LifeTime=Life span (in days) -EndOfLife=End of life -ManufacturingDate=Manufacturing date -DestructionDate=Destruction date -FirstUseDate=First use date -QCFrequency=Quality control frequency (in days) - -#Traceability - qc status -OutOfOrder=Out of order -InWorkingOrder=In working order diff --git a/htdocs/langs/ar_IQ/products.lang b/htdocs/langs/ar_IQ/products.lang deleted file mode 100644 index bf34efe3f79..00000000000 --- a/htdocs/langs/ar_IQ/products.lang +++ /dev/null @@ -1,401 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -ProductRef=Product ref. -ProductLabel=Product label -ProductLabelTranslated=Translated product label -ProductDescription=Product description -ProductDescriptionTranslated=Translated product description -ProductNoteTranslated=Translated product note -ProductServiceCard=Products/Services card -TMenuProducts=Products -TMenuServices=Services -Products=Products -Services=Services -Product=Product -Service=Service -ProductId=Product/service id -Create=Create -Reference=Reference -NewProduct=New product -NewService=New service -ProductVatMassChange=Global VAT Update -ProductVatMassChangeDesc=This tool updates the VAT rate defined on ALL products and services! -MassBarcodeInit=Mass barcode init -MassBarcodeInitDesc=This page can be used to initialize a barcode on objects that does not have barcode defined. Check before that setup of module barcode is complete. -ProductAccountancyBuyCode=Accounting code (purchase) -ProductAccountancyBuyIntraCode=Accounting code (purchase intra-community) -ProductAccountancyBuyExportCode=Accounting code (purchase import) -ProductAccountancySellCode=Accounting code (sale) -ProductAccountancySellIntraCode=Accounting code (sale intra-Community) -ProductAccountancySellExportCode=Accounting code (sale export) -ProductOrService=Product or Service -ProductsAndServices=Products and Services -ProductsOrServices=Products or Services -ProductsPipeServices=Products | Services -ProductsOnSale=Products for sale -ProductsOnPurchase=Products for purchase -ProductsOnSaleOnly=Products for sale only -ProductsOnPurchaseOnly=Products for purchase only -ProductsNotOnSell=Products not for sale and not for purchase -ProductsOnSellAndOnBuy=Products for sale and for purchase -ServicesOnSale=Services for sale -ServicesOnPurchase=Services for purchase -ServicesOnSaleOnly=Services for sale only -ServicesOnPurchaseOnly=Services for purchase only -ServicesNotOnSell=Services not for sale and not for purchase -ServicesOnSellAndOnBuy=Services for sale and for purchase -LastModifiedProductsAndServices=Latest %s products/services which were modified -LastRecordedProducts=Latest %s recorded products -LastRecordedServices=Latest %s recorded services -CardProduct0=Product -CardProduct1=Service -Stock=Stock -MenuStocks=Stocks -Stocks=Stocks and location (warehouse) of products -Movements=Movements -Sell=Sell -Buy=Purchase -OnSell=For sale -OnBuy=For purchase -NotOnSell=Not for sale -ProductStatusOnSell=For sale -ProductStatusNotOnSell=Not for sale -ProductStatusOnSellShort=For sale -ProductStatusNotOnSellShort=Not for sale -ProductStatusOnBuy=For purchase -ProductStatusNotOnBuy=Not for purchase -ProductStatusOnBuyShort=For purchase -ProductStatusNotOnBuyShort=Not for purchase -UpdateVAT=Update vat -UpdateDefaultPrice=Update default price -UpdateLevelPrices=Update prices for each level -AppliedPricesFrom=Applied from -SellingPrice=Selling price -SellingPriceHT=Selling price (excl. tax) -SellingPriceTTC=Selling price (inc. tax) -SellingMinPriceTTC=Minimum Selling price (inc. tax) -CostPriceDescription=This price field (excl. tax) can be used to capture the average amount this product costs to your company. It may be any price you calculate yourself, for example, from the average buying price plus average production and distribution cost. -CostPriceUsage=This value could be used for margin calculation. -SoldAmount=Sold amount -PurchasedAmount=Purchased amount -NewPrice=New price -MinPrice=Min. selling price -EditSellingPriceLabel=Edit selling price label -CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. -ContractStatusClosed=Closed -ErrorProductAlreadyExists=A product with reference %s already exists. -ErrorProductBadRefOrLabel=Wrong value for reference or label. -ErrorProductClone=There was a problem while trying to clone the product or service. -ErrorPriceCantBeLowerThanMinPrice=Error, price can't be lower than minimum price. -Suppliers=Vendors -SupplierRef=Vendor SKU -ShowProduct=Show product -ShowService=Show service -ProductsAndServicesArea=Product and Services area -ProductsArea=Product area -ServicesArea=Services area -ListOfStockMovements=List of stock movements -BuyingPrice=Buying price -PriceForEachProduct=Products with specific prices -SupplierCard=Vendor card -PriceRemoved=Price removed -BarCode=Barcode -BarcodeType=Barcode type -SetDefaultBarcodeType=Set barcode type -BarcodeValue=Barcode value -NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) -ServiceLimitedDuration=If product is a service with limited duration: -FillWithLastServiceDates=Fill with last service line dates -MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) -MultiPricesNumPrices=Number of prices -DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Enable Kits (set of several products) -VariantsAbility=Enable Variants (variations of products, for example color, size) -AssociatedProducts=Kits -AssociatedProductsNumber=Number of products composing this kit -ParentProductsNumber=Number of parent packaging product -ParentProducts=Parent products -IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any kit -KeywordFilter=Keyword filter -CategoryFilter=Category filter -ProductToAddSearch=Search product to add -NoMatchFound=No match found -ListOfProductsServices=List of products/services -ProductAssociationList=List of products/services that are component(s) of this kit -ProductParentList=List of kits with this product as a component -ErrorAssociationIsFatherOfThis=One of selected product is parent with current product -DeleteProduct=Delete a product/service -ConfirmDeleteProduct=Are you sure you want to delete this product/service? -ProductDeleted=Product/Service "%s" deleted from database. -ExportDataset_produit_1=Products -ExportDataset_service_1=Services -ImportDataset_produit_1=Products -ImportDataset_service_1=Services -DeleteProductLine=Delete product line -ConfirmDeleteProductLine=Are you sure you want to delete this product line? -ProductSpecial=Special -QtyMin=Min. purchase quantity -PriceQtyMin=Price quantity min. -PriceQtyMinCurrency=Price (currency) for this qty. (no discount) -VATRateForSupplierProduct=VAT Rate (for this vendor/product) -DiscountQtyMin=Discount for this qty. -NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product -NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product -PredefinedItem=Predefined item -PredefinedProductsToSell=Predefined Product -PredefinedServicesToSell=Predefined Service -PredefinedProductsAndServicesToSell=Predefined products/services to sell -PredefinedProductsToPurchase=Predefined product to purchase -PredefinedServicesToPurchase=Predefined services to purchase -PredefinedProductsAndServicesToPurchase=Predefined products/services to purchase -NotPredefinedProducts=Not predefined products/services -GenerateThumb=Generate thumb -ServiceNb=Service #%s -ListProductServiceByPopularity=List of products/services by popularity -ListProductByPopularity=List of products by popularity -ListServiceByPopularity=List of services by popularity -Finished=Manufactured product -RowMaterial=Raw Material -ConfirmCloneProduct=Are you sure you want to clone product or service %s? -CloneContentProduct=Clone all main information of the product/service -ClonePricesProduct=Clone prices -CloneCategoriesProduct=Clone linked tags/categories -CloneCompositionProduct=Clone virtual products/services -CloneCombinationsProduct=Clone the product variants -ProductIsUsed=This product is used -NewRefForClone=Ref. of new product/service -SellingPrices=Selling prices -BuyingPrices=Buying prices -CustomerPrices=Customer prices -SuppliersPrices=Vendor prices -SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs|Commodity|HS code -CountryOrigin=Country of origin -RegionStateOrigin=Region of origin -StateOrigin=State|Province of origin -Nature=Nature of product (raw/manufactured) -NatureOfProductShort=Nature of product -NatureOfProductDesc=Raw material or manufactured product -ShortLabel=Short label -Unit=Unit -p=u. -set=set -se=set -second=second -s=s -hour=hour -h=h -day=day -d=d -kilogram=kilogram -kg=Kg -gram=gram -g=g -meter=meter -m=m -lm=lm -m2=m² -m3=m³ -liter=liter -l=L -unitP=Piece -unitSET=Set -unitS=Second -unitH=Hour -unitD=Day -unitG=Gram -unitM=Meter -unitLM=Linear meter -unitM2=Square meter -unitM3=Cubic meter -unitL=Liter -unitT=ton -unitKG=kg -unitG=Gram -unitMG=mg -unitLB=pound -unitOZ=ounce -unitM=Meter -unitDM=dm -unitCM=cm -unitMM=mm -unitFT=ft -unitIN=in -unitM2=Square meter -unitDM2=dm² -unitCM2=cm² -unitMM2=mm² -unitFT2=ft² -unitIN2=in² -unitM3=Cubic meter -unitDM3=dm³ -unitCM3=cm³ -unitMM3=mm³ -unitFT3=ft³ -unitIN3=in³ -unitOZ3=ounce -unitgallon=gallon -ProductCodeModel=Product ref template -ServiceCodeModel=Service ref template -CurrentProductPrice=Current price -AlwaysUseNewPrice=Always use current price of product/service -AlwaysUseFixedPrice=Use the fixed price -PriceByQuantity=Different prices by quantity -DisablePriceByQty=Disable prices by quantity -PriceByQuantityRange=Quantity range -MultipriceRules=Automatic prices for segment -UseMultipriceRules=Use price segment rules (defined into product module setup) to auto calculate prices of all other segments according to first segment -PercentVariationOver=%% variation over %s -PercentDiscountOver=%% discount over %s -KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products -VariantRefExample=Examples: COL, SIZE -VariantLabelExample=Examples: Color, Size -### composition fabrication -Build=Produce -ProductsMultiPrice=Products and prices for each price segment -ProductsOrServiceMultiPrice=Customer prices (of products or services, multi-prices) -ProductSellByQuarterHT=Products turnover quarterly before tax -ServiceSellByQuarterHT=Services turnover quarterly before tax -Quarter1=1st. Quarter -Quarter2=2nd. Quarter -Quarter3=3rd. Quarter -Quarter4=4th. Quarter -BarCodePrintsheet=Print barcode -PageToGenerateBarCodeSheets=With this tool, you can print sheets of barcode stickers. Choose format of your sticker page, type of barcode and value of barcode, then click on button %s. -NumberOfStickers=Number of stickers to print on page -PrintsheetForOneBarCode=Print several stickers for one barcode -BuildPageToPrint=Generate page to print -FillBarCodeTypeAndValueManually=Fill barcode type and value manually. -FillBarCodeTypeAndValueFromProduct=Fill barcode type and value from barcode of a product. -FillBarCodeTypeAndValueFromThirdParty=Fill barcode type and value from barcode of a third party. -DefinitionOfBarCodeForProductNotComplete=Definition of type or value of barcode not complete for product %s. -DefinitionOfBarCodeForThirdpartyNotComplete=Definition of type or value of barcode non complete for third party %s. -BarCodeDataForProduct=Barcode information of product %s: -BarCodeDataForThirdparty=Barcode information of third party %s: -ResetBarcodeForAllRecords=Define barcode value for all record (this will also reset barcode value already defined with new values) -PriceByCustomer=Different prices for each customer -PriceCatalogue=A single sell price per product/service -PricingRule=Rules for selling prices -AddCustomerPrice=Add price by customer -ForceUpdateChildPriceSoc=Set same price on customer's subsidiaries -PriceByCustomerLog=Log of previous customer prices -MinimumPriceLimit=Minimum price can't be lower then %s -MinimumRecommendedPrice=Minimum recommended price is: %s -PriceExpressionEditor=Price expression editor -PriceExpressionSelected=Selected price expression -PriceExpressionEditorHelp1="price = 2 + 2" or "2 + 2" for setting the price. Use ; to separate expressions -PriceExpressionEditorHelp2=You can access ExtraFields with variables like #extrafield_myextrafieldkey# and global variables with #global_mycode# -PriceExpressionEditorHelp3=In both product/service and vendor prices there are these variables available:
    #tva_tx# #localtax1_tx# #localtax2_tx# #weight# #length# #surface# #price_min# -PriceExpressionEditorHelp4=In product/service price only: #supplier_min_price#
    In vendor prices only: #supplier_quantity# and #supplier_tva_tx# -PriceExpressionEditorHelp5=Available global values: -PriceMode=Price mode -PriceNumeric=Number -DefaultPrice=Default price -DefaultPriceLog=Log of previous default prices -ComposedProductIncDecStock=Increase/Decrease stock on parent change -ComposedProduct=Child products -MinSupplierPrice=Minimum buying price -MinCustomerPrice=Minimum selling price -NoDynamicPrice=No dynamic price -DynamicPriceConfiguration=Dynamic price configuration -DynamicPriceDesc=You may define mathematical formulae to calculate Customer or Vendor prices. Such formulas can use all mathematical operators, some constants and variables. You can define here the variables you wish to use. If the variable needs an automatic update, you may define the external URL to allow Dolibarr to update the value automatically. -AddVariable=Add Variable -AddUpdater=Add Updater -GlobalVariables=Global variables -VariableToUpdate=Variable to update -GlobalVariableUpdaters=External updaters for variables -GlobalVariableUpdaterType0=JSON data -GlobalVariableUpdaterHelp0=Parses JSON data from specified URL, VALUE specifies the location of relevant value, -GlobalVariableUpdaterHelpFormat0=Format for request {"URL": "http://example.com/urlofjson", "VALUE": "array1,array2,targetvalue"} -GlobalVariableUpdaterType1=WebService data -GlobalVariableUpdaterHelp1=Parses WebService data from specified URL, NS specifies the namespace, VALUE specifies the location of relevant value, DATA should contain the data to send and METHOD is the calling WS method -GlobalVariableUpdaterHelpFormat1=Format for request is {"URL": "http://example.com/urlofws", "VALUE": "array,targetvalue", "NS": "http://example.com/urlofns", "METHOD": "myWSMethod", "DATA": {"your": "data", "to": "send"}} -UpdateInterval=Update interval (minutes) -LastUpdated=Latest update -CorrectlyUpdated=Correctly updated -PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is -PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Include products/services with tag -DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer -WarningSelectOneDocument=Please select at least one document -DefaultUnitToShow=Unit -NbOfQtyInProposals=Qty in proposals -ClinkOnALinkOfColumn=Click on a link of column %s to get a detailed view... -ProductsOrServicesTranslations=Products/Services translations -TranslatedLabel=Translated label -TranslatedDescription=Translated description -TranslatedNote=Translated notes -ProductWeight=Weight for 1 product -ProductVolume=Volume for 1 product -WeightUnits=Weight unit -VolumeUnits=Volume unit -WidthUnits=Width unit -LengthUnits=Length unit -HeightUnits=Height unit -SurfaceUnits=Surface unit -SizeUnits=Size unit -DeleteProductBuyPrice=Delete buying price -ConfirmDeleteProductBuyPrice=Are you sure you want to delete this buying price? -SubProduct=Sub product -ProductSheet=Product sheet -ServiceSheet=Service sheet -PossibleValues=Possible values -GoOnMenuToCreateVairants=Go on menu %s - %s to prepare attribute variants (like colors, size, ...) -UseProductFournDesc=Add a feature to define the product description defined by the vendors (for each vendor reference) in addition to the description for customers -ProductSupplierDescription=Vendor description for the product -UseProductSupplierPackaging=Use packaging on supplier prices (recalculate quantities according to packaging set on supplier price when adding/updating line in supplier documents) -PackagingForThisProduct=Packaging -PackagingForThisProductDesc=On supplier order, you will automaticly order this quantity (or a multiple of this quantity). Cannot be less than minimum buying quantity -QtyRecalculatedWithPackaging=The quantity of the line were recalculated according to supplier packaging - -#Attributes -VariantAttributes=Variant attributes -ProductAttributes=Variant attributes for products -ProductAttributeName=Variant attribute %s -ProductAttribute=Variant attribute -ProductAttributeDeleteDialog=Are you sure you want to delete this attribute? All values will be deleted -ProductAttributeValueDeleteDialog=Are you sure you want to delete the value "%s" with reference "%s" of this attribute? -ProductCombinationDeleteDialog=Are you sure want to delete the variant of the product "%s"? -ProductCombinationAlreadyUsed=There was an error while deleting the variant. Please check it is not being used in any object -ProductCombinations=Variants -PropagateVariant=Propagate variants -HideProductCombinations=Hide products variant in the products selector -ProductCombination=Variant -NewProductCombination=New variant -EditProductCombination=Editing variant -NewProductCombinations=New variants -EditProductCombinations=Editing variants -SelectCombination=Select combination -ProductCombinationGenerator=Variants generator -Features=Features -PriceImpact=Price impact -ImpactOnPriceLevel=Impact on price level %s -ApplyToAllPriceImpactLevel= Apply to all levels -ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels -WeightImpact=Weight impact -NewProductAttribute=New attribute -NewProductAttributeValue=New attribute value -ErrorCreatingProductAttributeValue=There was an error while creating the attribute value. It could be because there is already an existing value with that reference -ProductCombinationGeneratorWarning=If you continue, before generating new variants, all previous ones will be DELETED. Already existing ones will be updated with the new values -TooMuchCombinationsWarning=Generating lots of variants may result in high CPU, memory usage and Dolibarr not able to create them. Enabling the option "%s" may help reduce memory usage. -DoNotRemovePreviousCombinations=Do not remove previous variants -UsePercentageVariations=Use percentage variations -PercentageVariation=Percentage variation -ErrorDeletingGeneratedProducts=There was an error while trying to delete existing product variants -NbOfDifferentValues=No. of different values -NbProducts=Number of products -ParentProduct=Parent product -HideChildProducts=Hide variant products -ShowChildProducts=Show variant products -NoEditVariants=Go to Parent product card and edit variants price impact in the variants tab -ConfirmCloneProductCombinations=Would you like to copy all the product variants to the other parent product with the given reference? -CloneDestinationReference=Destination product reference -ErrorCopyProductCombinations=There was an error while copying the product variants -ErrorDestinationProductNotFound=Destination product not found -ErrorProductCombinationNotFound=Product variant not found -ActionAvailableOnVariantProductOnly=Action only available on the variant of product -ProductsPricePerCustomer=Product prices per customers -ProductSupplierExtraFields=Additional Attributes (Supplier Prices) -DeleteLinkedProduct=Delete the child product linked to the combination -PMPValue=Weighted average price -PMPValueShort=WAP diff --git a/htdocs/langs/ar_IQ/projects.lang b/htdocs/langs/ar_IQ/projects.lang deleted file mode 100644 index 77fc9970303..00000000000 --- a/htdocs/langs/ar_IQ/projects.lang +++ /dev/null @@ -1,283 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -RefProject=Ref. project -ProjectRef=Project ref. -ProjectId=Project Id -ProjectLabel=Project label -ProjectsArea=Projects Area -ProjectStatus=Project status -SharedProject=Everybody -PrivateProject=Project contacts -ProjectsImContactFor=Projects for which I am explicitly a contact -AllAllowedProjects=All project I can read (mine + public) -AllProjects=All projects -MyProjectsDesc=This view is limited to the projects that you are a contact for -ProjectsPublicDesc=This view presents all projects you are allowed to read. -TasksOnProjectsPublicDesc=This view presents all tasks on projects you are allowed to read. -ProjectsPublicTaskDesc=This view presents all projects and tasks you are allowed to read. -ProjectsDesc=This view presents all projects (your user permissions grant you permission to view everything). -TasksOnProjectsDesc=This view presents all tasks on all projects (your user permissions grant you permission to view everything). -MyTasksDesc=This view is limited to the projects or tasks that you are a contact for -OnlyOpenedProject=Only open projects are visible (projects in draft or closed status are not visible). -ClosedProjectsAreHidden=Closed projects are not visible. -TasksPublicDesc=This view presents all projects and tasks you are allowed to read. -TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything). -AllTaskVisibleButEditIfYouAreAssigned=All tasks for qualified projects are visible, but you can enter time only for task assigned to selected user. Assign task if you need to enter time on it. -OnlyYourTaskAreVisible=Only tasks assigned to you are visible. If you need to enter time on a task and if the task is not visible here, then you need to assign the task to yourself. -ImportDatasetTasks=Tasks of projects -ProjectCategories=Project tags/categories -NewProject=New project -AddProject=Create project -DeleteAProject=Delete a project -DeleteATask=Delete a task -ConfirmDeleteAProject=Are you sure you want to delete this project? -ConfirmDeleteATask=Are you sure you want to delete this task? -OpenedProjects=Open projects -OpenedTasks=Open tasks -OpportunitiesStatusForOpenedProjects=Leads amount of open projects by status -OpportunitiesStatusForProjects=Leads amount of projects by status -ShowProject=Show project -ShowTask=Show task -SetProject=Set project -NoProject=No project defined or owned -NbOfProjects=Number of projects -NbOfTasks=Number of tasks -TimeSpent=Time spent -TimeSpentByYou=Time spent by you -TimeSpentByUser=Time spent by user -TimesSpent=Time spent -TaskId=Task ID -RefTask=Task ref. -LabelTask=Task label -TaskTimeSpent=Time spent on tasks -TaskTimeUser=User -TaskTimeNote=Note -TaskTimeDate=Date -TasksOnOpenedProject=Tasks on open projects -WorkloadNotDefined=Workload not defined -NewTimeSpent=Time spent -MyTimeSpent=My time spent -BillTime=Bill the time spent -BillTimeShort=Bill time -TimeToBill=Time not billed -TimeBilled=Time billed -Tasks=Tasks -Task=Task -TaskDateStart=Task start date -TaskDateEnd=Task end date -TaskDescription=Task description -NewTask=New task -AddTask=Create task -AddTimeSpent=Create time spent -AddHereTimeSpentForDay=Add here time spent for this day/task -AddHereTimeSpentForWeek=Add here time spent for this week/task -Activity=Activity -Activities=Tasks/activities -MyActivities=My tasks/activities -MyProjects=My projects -MyProjectsArea=My projects Area -DurationEffective=Effective duration -ProgressDeclared=Declared real progress -TaskProgressSummary=Task progress -CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption -ProgressCalculated=Progress on consumption -WhichIamLinkedTo=which I'm linked to -WhichIamLinkedToProject=which I'm linked to project -Time=Time -TimeConsumed=Consumed -ListOfTasks=List of tasks -GoToListOfTimeConsumed=Go to list of time consumed -GanttView=Gantt View -ListWarehouseAssociatedProject=List of warehouses associated to the project -ListProposalsAssociatedProject=List of the commercial proposals related to the project -ListOrdersAssociatedProject=List of sales orders related to the project -ListInvoicesAssociatedProject=List of customer invoices related to the project -ListPredefinedInvoicesAssociatedProject=List of customer template invoices related to the project -ListSupplierOrdersAssociatedProject=List of purchase orders related to the project -ListSupplierInvoicesAssociatedProject=List of vendor invoices related to the project -ListContractAssociatedProject=List of contracts related to the project -ListShippingAssociatedProject=List of shippings related to the project -ListFichinterAssociatedProject=List of interventions related to the project -ListExpenseReportsAssociatedProject=List of expense reports related to the project -ListDonationsAssociatedProject=List of donations related to the project -ListVariousPaymentsAssociatedProject=List of miscellaneous payments related to the project -ListSalariesAssociatedProject=List of payments of salaries related to the project -ListActionsAssociatedProject=List of events related to the project -ListMOAssociatedProject=List of manufacturing orders related to the project -ListTaskTimeUserProject=List of time consumed on tasks of project -ListTaskTimeForTask=List of time consumed on task -ActivityOnProjectToday=Activity on project today -ActivityOnProjectYesterday=Activity on project yesterday -ActivityOnProjectThisWeek=Activity on project this week -ActivityOnProjectThisMonth=Activity on project this month -ActivityOnProjectThisYear=Activity on project this year -ChildOfProjectTask=Child of project/task -ChildOfTask=Child of task -TaskHasChild=Task has child -NotOwnerOfProject=Not owner of this private project -AffectedTo=Allocated to -CantRemoveProject=This project can't be removed as it is referenced by some other objects (invoice, orders or other). See tab '%s'. -ValidateProject=Validate projet -ConfirmValidateProject=Are you sure you want to validate this project? -CloseAProject=Close project -ConfirmCloseAProject=Are you sure you want to close this project? -AlsoCloseAProject=Also close project (keep it open if you still need to follow production tasks on it) -ReOpenAProject=Open project -ConfirmReOpenAProject=Are you sure you want to re-open this project? -ProjectContact=Contacts of project -TaskContact=Task contacts -ActionsOnProject=Events on project -YouAreNotContactOfProject=You are not a contact of this private project -UserIsNotContactOfProject=User is not a contact of this private project -DeleteATimeSpent=Delete time spent -ConfirmDeleteATimeSpent=Are you sure you want to delete this time spent? -DoNotShowMyTasksOnly=See also tasks not assigned to me -ShowMyTasksOnly=View only tasks assigned to me -TaskRessourceLinks=Contacts of task -ProjectsDedicatedToThisThirdParty=Projects dedicated to this third party -NoTasks=No tasks for this project -LinkedToAnotherCompany=Linked to other third party -TaskIsNotAssignedToUser=Task not assigned to user. Use button '%s' to assign task now. -ErrorTimeSpentIsEmpty=Time spent is empty -TimeRecordingRestrictedToNMonthsBack=Time recording is restricted to %s months back -ThisWillAlsoRemoveTasks=This action will also delete all tasks of project (%s tasks at the moment) and all inputs of time spent. -IfNeedToUseOtherObjectKeepEmpty=If some objects (invoice, order, ...), belonging to another third party, must be linked to the project to create, keep this empty to have the project being multi third parties. -CloneTasks=Clone tasks -CloneContacts=Clone contacts -CloneNotes=Clone notes -CloneProjectFiles=Clone project joined files -CloneTaskFiles=Clone task(s) joined files (if task(s) cloned) -CloneMoveDate=Update project/tasks dates from now? -ConfirmCloneProject=Are you sure to clone this project? -ProjectReportDate=Change task dates according to new project start date -ErrorShiftTaskDate=Impossible to shift task date according to new project start date -ProjectsAndTasksLines=Projects and tasks -ProjectCreatedInDolibarr=Project %s created -ProjectValidatedInDolibarr=Project %s validated -ProjectModifiedInDolibarr=Project %s modified -TaskCreatedInDolibarr=Task %s created -TaskModifiedInDolibarr=Task %s modified -TaskDeletedInDolibarr=Task %s deleted -OpportunityStatus=Lead status -OpportunityStatusShort=Lead status -OpportunityProbability=Lead probability -OpportunityProbabilityShort=Lead probab. -OpportunityAmount=Lead amount -OpportunityAmountShort=Lead amount -OpportunityWeightedAmount=Opportunity weighted amount -OpportunityWeightedAmountShort=Opp. weighted amount -OpportunityAmountAverageShort=Average lead amount -OpportunityAmountWeigthedShort=Weighted lead amount -WonLostExcluded=Won/Lost excluded -##### Types de contacts ##### -TypeContact_project_internal_PROJECTLEADER=Project leader -TypeContact_project_external_PROJECTLEADER=Project leader -TypeContact_project_internal_PROJECTCONTRIBUTOR=Contributor -TypeContact_project_external_PROJECTCONTRIBUTOR=Contributor -TypeContact_project_task_internal_TASKEXECUTIVE=Task executive -TypeContact_project_task_external_TASKEXECUTIVE=Task executive -TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor -TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor -SelectElement=Select element -AddElement=Link to element -LinkToElementShort=Link to -# Documents models -DocumentModelBeluga=Project document template for linked objects overview -DocumentModelBaleine=Project document template for tasks -DocumentModelTimeSpent=Project report template for time spent -PlannedWorkload=Planned workload -PlannedWorkloadShort=Workload -ProjectReferers=Related items -ProjectMustBeValidatedFirst=Project must be validated first -FirstAddRessourceToAllocateTime=Assign a user resource as contact of project to allocate time -InputPerDay=Input per day -InputPerWeek=Input per week -InputPerMonth=Input per month -InputDetail=Input detail -TimeAlreadyRecorded=This is time spent already recorded for this task/day and user %s -ProjectsWithThisUserAsContact=Projects with this user as contact -TasksWithThisUserAsContact=Tasks assigned to this user -ResourceNotAssignedToProject=Not assigned to project -ResourceNotAssignedToTheTask=Not assigned to the task -NoUserAssignedToTheProject=No users assigned to this project -TimeSpentBy=Time spent by -TasksAssignedTo=Tasks assigned to -AssignTaskToMe=Assign task to myself -AssignTaskToUser=Assign task to %s -SelectTaskToAssign=Select task to assign... -AssignTask=Assign -ProjectOverview=Overview -ManageTasks=Use projects to follow tasks and/or report time spent (timesheets) -ManageOpportunitiesStatus=Use projects to follow leads/opportinuties -ProjectNbProjectByMonth=No. of created projects by month -ProjectNbTaskByMonth=No. of created tasks by month -ProjectOppAmountOfProjectsByMonth=Amount of leads by month -ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project|lead by lead status -ProjectsStatistics=Statistics on projects or leads -TasksStatistics=Statistics on tasks of projects or leads -TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. -IdTaskTime=Id task time -YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX -OpenedProjectsByThirdparties=Open projects by third parties -OnlyOpportunitiesShort=Only leads -OpenedOpportunitiesShort=Open leads -NotOpenedOpportunitiesShort=Not an open lead -NotAnOpportunityShort=Not a lead -OpportunityTotalAmount=Total amount of leads -OpportunityPonderatedAmount=Weighted amount of leads -OpportunityPonderatedAmountDesc=Leads amount weighted with probability -OppStatusPROSP=Prospection -OppStatusQUAL=Qualification -OppStatusPROPO=Proposal -OppStatusNEGO=Negociation -OppStatusPENDING=Pending -OppStatusWON=Won -OppStatusLOST=Lost -Budget=Budget -AllowToLinkFromOtherCompany=Allow to link project from other company

    Supported values:
    - Keep empty: Can link any project of the company (default)
    - "all": Can link any projects, even projects of other companies
    - A list of third-party ids separated by commas: can link all projects of these third partys (Example: 123,4795,53)
    -LatestProjects=Latest %s projects -LatestModifiedProjects=Latest %s modified projects -OtherFilteredTasks=Other filtered tasks -NoAssignedTasks=No assigned tasks found (assign project/tasks to the current user from the top select box to enter time on it) -ThirdPartyRequiredToGenerateInvoice=A third party must be defined on project to be able to invoice it. -ThirdPartyRequiredToGenerateInvoice=A third party must be defined on project to be able to invoice it. -ChooseANotYetAssignedTask=Choose a task not yet assigned to you -# Comments trans -AllowCommentOnTask=Allow user comments on tasks -AllowCommentOnProject=Allow user comments on projects -DontHavePermissionForCloseProject=You do not have permissions to close the project %s -DontHaveTheValidateStatus=The project %s must be open to be closed -RecordsClosed=%s project(s) closed -SendProjectRef=Information project %s -ModuleSalaryToDefineHourlyRateMustBeEnabled=Module 'Salaries' must be enabled to define employee hourly rate to have time spent valorized -NewTaskRefSuggested=Task ref already used, a new task ref is required -TimeSpentInvoiced=Time spent billed -TimeSpentForIntervention=Time spent -TimeSpentForInvoice=Time spent -OneLinePerUser=One line per user -ServiceToUseOnLines=Service to use on lines -InvoiceGeneratedFromTimeSpent=Invoice %s has been generated from time spent on project -InterventionGeneratedFromTimeSpent=Intervention %s has been generated from time spent on project -ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). Note: To generate invoice, go on tab 'Time spent' of the project and select lines to include. -ProjectFollowOpportunity=Follow opportunity -ProjectFollowTasks=Follow tasks or time spent -Usage=Usage -UsageOpportunity=Usage: Opportunity -UsageTasks=Usage: Tasks -UsageBillTimeShort=Usage: Bill time -InvoiceToUse=Draft invoice to use -InterToUse=Draft intervention to use -NewInvoice=New invoice -NewInter=New intervention -OneLinePerTask=One line per task -OneLinePerPeriod=One line per period -OneLinePerTimeSpentLine=One line for each time spent declaration -RefTaskParent=Ref. Parent Task -ProfitIsCalculatedWith=Profit is calculated using -AddPersonToTask=Add also to tasks -UsageOrganizeEvent=Usage: Event Organization -PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) -PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. -SelectLinesOfTimeSpentToInvoice=Select lines of time spent that are unbilled, then bulk action "Generate Invoice" to bill them diff --git a/htdocs/langs/ar_IQ/propal.lang b/htdocs/langs/ar_IQ/propal.lang deleted file mode 100644 index edbc08236d3..00000000000 --- a/htdocs/langs/ar_IQ/propal.lang +++ /dev/null @@ -1,92 +0,0 @@ -# Dolibarr language file - Source file is en_US - propal -Proposals=Commercial proposals -Proposal=Commercial proposal -ProposalShort=Proposal -ProposalsDraft=Draft commercial proposals -ProposalsOpened=Open commercial proposals -CommercialProposal=Commercial proposal -PdfCommercialProposalTitle=Commercial proposal -ProposalCard=Proposal card -NewProp=New commercial proposal -NewPropal=New proposal -Prospect=Prospect -DeleteProp=Delete commercial proposal -ValidateProp=Validate commercial proposal -AddProp=Create proposal -ConfirmDeleteProp=Are you sure you want to delete this commercial proposal? -ConfirmValidateProp=Are you sure you want to validate this commercial proposal under name %s? -LastPropals=Latest %s proposals -LastModifiedProposals=Latest %s modified proposals -AllPropals=All proposals -SearchAProposal=Search a proposal -NoProposal=No proposal -ProposalsStatistics=Commercial proposal's statistics -NumberOfProposalsByMonth=Number by month -AmountOfProposalsByMonthHT=Amount by month (excl. tax) -NbOfProposals=Number of commercial proposals -ShowPropal=Show proposal -PropalsDraft=Drafts -PropalsOpened=Open -PropalStatusDraft=Draft (needs to be validated) -PropalStatusValidated=Validated (proposal is open) -PropalStatusSigned=Signed (needs billing) -PropalStatusNotSigned=Not signed (closed) -PropalStatusBilled=Billed -PropalStatusDraftShort=Draft -PropalStatusValidatedShort=Validated (open) -PropalStatusClosedShort=Closed -PropalStatusSignedShort=Signed -PropalStatusNotSignedShort=Not signed -PropalStatusBilledShort=Billed -PropalsToClose=Commercial proposals to close -PropalsToBill=Signed commercial proposals to bill -ListOfProposals=List of commercial proposals -ActionsOnPropal=Events on proposal -RefProposal=Commercial proposal ref -SendPropalByMail=Send commercial proposal by mail -DatePropal=Date of proposal -DateEndPropal=Validity ending date -ValidityDuration=Validity duration -SetAcceptedRefused=Set accepted/refused -ErrorPropalNotFound=Propal %s not found -AddToDraftProposals=Add to draft proposal -NoDraftProposals=No draft proposals -CopyPropalFrom=Create commercial proposal by copying existing proposal -CreateEmptyPropal=Create empty commercial proposal or from list of products/services -DefaultProposalDurationValidity=Default commercial proposal validity duration (in days) -UseCustomerContactAsPropalRecipientIfExist=Use contact/address with type 'Contact following-up proposal' if defined instead of third party address as proposal recipient address -ConfirmClonePropal=Are you sure you want to clone the commercial proposal %s? -ConfirmReOpenProp=Are you sure you want to open back the commercial proposal %s? -ProposalsAndProposalsLines=Commercial proposal and lines -ProposalLine=Proposal line -ProposalLines=Proposal lines -AvailabilityPeriod=Availability delay -SetAvailability=Set availability delay -AfterOrder=after order -OtherProposals=Other proposals -##### Availability ##### -AvailabilityTypeAV_NOW=Immediate -AvailabilityTypeAV_1W=1 week -AvailabilityTypeAV_2W=2 weeks -AvailabilityTypeAV_3W=3 weeks -AvailabilityTypeAV_1M=1 month -##### Types de contacts ##### -TypeContact_propal_internal_SALESREPFOLL=Representative following-up proposal -TypeContact_propal_external_BILLING=Customer invoice contact -TypeContact_propal_external_CUSTOMER=Customer contact following-up proposal -TypeContact_propal_external_SHIPPING=Customer contact for delivery -# Document models -DocModelAzurDescription=A complete proposal model (old implementation of Cyan template) -DocModelCyanDescription=A complete proposal model -DefaultModelPropalCreate=Default model creation -DefaultModelPropalToBill=Default template when closing a business proposal (to be invoiced) -DefaultModelPropalClosed=Default template when closing a business proposal (unbilled) -ProposalCustomerSignature=Written acceptance, company stamp, date and signature -ProposalsStatisticsSuppliers=Vendor proposals statistics -CaseFollowedBy=Case followed by -SignedOnly=Signed only -IdProposal=Proposal ID -IdProduct=Product ID -PrParentLine=Proposal Parent Line -LineBuyPriceHT=Buy Price Amount net of tax for line - diff --git a/htdocs/langs/ar_IQ/receiptprinter.lang b/htdocs/langs/ar_IQ/receiptprinter.lang deleted file mode 100644 index 746d175e0c6..00000000000 --- a/htdocs/langs/ar_IQ/receiptprinter.lang +++ /dev/null @@ -1,82 +0,0 @@ -# Dolibarr language file - Source file is en_US - receiptprinter -ReceiptPrinterSetup=Setup of module ReceiptPrinter -PrinterAdded=Printer %s added -PrinterUpdated=Printer %s updated -PrinterDeleted=Printer %s deleted -TestSentToPrinter=Test Sent To Printer %s -ReceiptPrinter=Receipt printers -ReceiptPrinterDesc=Setup of receipt printers -ReceiptPrinterTemplateDesc=Setup of Templates -ReceiptPrinterTypeDesc=Description of Receipt Printer's type -ReceiptPrinterProfileDesc=Description of Receipt Printer's Profile -ListPrinters=List of Printers -SetupReceiptTemplate=Template Setup -CONNECTOR_DUMMY=Dummy Printer -CONNECTOR_NETWORK_PRINT=Network Printer -CONNECTOR_FILE_PRINT=Local Printer -CONNECTOR_WINDOWS_PRINT=Local Windows Printer -CONNECTOR_CUPS_PRINT=Cups Printer -CONNECTOR_DUMMY_HELP=Fake Printer for test, does nothing -CONNECTOR_NETWORK_PRINT_HELP=10.x.x.x:9100 -CONNECTOR_FILE_PRINT_HELP=/dev/usb/lp0, /dev/usb/lp1 -CONNECTOR_WINDOWS_PRINT_HELP=LPT1, COM1, smb://FooUser:secret@computername/workgroup/Receipt Printer -CONNECTOR_CUPS_PRINT_HELP=CUPS printer name, example: HPRT_TP805L -PROFILE_DEFAULT=Default Profile -PROFILE_SIMPLE=Simple Profile -PROFILE_EPOSTEP=Epos Tep Profile -PROFILE_P822D=P822D Profile -PROFILE_STAR=Star Profile -PROFILE_DEFAULT_HELP=Default Profile suitable for Epson printers -PROFILE_SIMPLE_HELP=Simple Profile No Graphics -PROFILE_EPOSTEP_HELP=Epos Tep Profile -PROFILE_P822D_HELP=P822D Profile No Graphics -PROFILE_STAR_HELP=Star Profile -DOL_LINE_FEED=Skip line -DOL_ALIGN_LEFT=Left align text -DOL_ALIGN_CENTER=Center text -DOL_ALIGN_RIGHT=Right align text -DOL_USE_FONT_A=Use font A of printer -DOL_USE_FONT_B=Use font B of printer -DOL_USE_FONT_C=Use font C of printer -DOL_PRINT_BARCODE=Print barcode -DOL_PRINT_BARCODE_CUSTOMER_ID=Print barcode customer id -DOL_CUT_PAPER_FULL=Cut ticket completely -DOL_CUT_PAPER_PARTIAL=Cut ticket partially -DOL_OPEN_DRAWER=Open cash drawer -DOL_ACTIVATE_BUZZER=Activate buzzer -DOL_PRINT_QRCODE=Print QR Code -DOL_PRINT_LOGO=Print logo of my company -DOL_PRINT_LOGO_OLD=Print logo of my company (old printers) -DOL_BOLD=Bold -DOL_BOLD_DISABLED=Disable bold -DOL_DOUBLE_HEIGHT=Double height size -DOL_DOUBLE_WIDTH=Double width size -DOL_DEFAULT_HEIGHT_WIDTH=Default height and width size -DOL_UNDERLINE=Enable underline -DOL_UNDERLINE_DISABLED=Disable underline -DOL_BEEP=Beep sound -DOL_PRINT_TEXT=Print text -DateInvoiceWithTime=Invoice date and time -YearInvoice=Invoice year -DOL_VALUE_MONTH_LETTERS=Invoice month in letters -DOL_VALUE_MONTH=Invoice month -DOL_VALUE_DAY=Invoice day -DOL_VALUE_DAY_LETTERS=Inovice day in letters -DOL_LINE_FEED_REVERSE=Line feed reverse -InvoiceID=Invoice ID -InvoiceRef=Invoice ref -DOL_PRINT_OBJECT_LINES=Invoice lines -DOL_VALUE_CUSTOMER_FIRSTNAME=Customer first name -DOL_VALUE_CUSTOMER_LASTNAME=Customer last name -DOL_VALUE_CUSTOMER_MAIL=Customer mail -DOL_VALUE_CUSTOMER_PHONE=Customer phone -DOL_VALUE_CUSTOMER_MOBILE=Customer mobile -DOL_VALUE_CUSTOMER_SKYPE=Customer Skype -DOL_VALUE_CUSTOMER_TAX_NUMBER=Customer tax number -DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Customer account balance -DOL_VALUE_MYSOC_NAME=Your company name -VendorLastname=Vendor last name -VendorFirstname=Vendor first name -VendorEmail=Vendor email -DOL_VALUE_CUSTOMER_POINTS=Customer points -DOL_VALUE_OBJECT_POINTS=Object points diff --git a/htdocs/langs/ar_IQ/receptions.lang b/htdocs/langs/ar_IQ/receptions.lang deleted file mode 100644 index 338602e722e..00000000000 --- a/htdocs/langs/ar_IQ/receptions.lang +++ /dev/null @@ -1,47 +0,0 @@ -# Dolibarr language file - Source file is en_US - receptions -ReceptionsSetup=Product Reception setup -RefReception=Ref. reception -Reception=Reception -Receptions=Receptions -AllReceptions=All Receptions -Reception=Reception -Receptions=Receptions -ShowReception=Show Receptions -ReceptionsArea=Receptions area -ListOfReceptions=List of receptions -ReceptionMethod=Reception method -LastReceptions=Latest %s receptions -StatisticsOfReceptions=Statistics for receptions -NbOfReceptions=Number of receptions -NumberOfReceptionsByMonth=Number of receptions by month -ReceptionCard=Reception card -NewReception=New reception -CreateReception=Create reception -QtyInOtherReceptions=Qty in other receptions -OtherReceptionsForSameOrder=Other receptions for this order -ReceptionsAndReceivingForSameOrder=Receptions and receipts for this order -ReceptionsToValidate=Receptions to validate -StatusReceptionCanceled=Canceled -StatusReceptionDraft=Draft -StatusReceptionValidated=Validated (products to ship or already shipped) -StatusReceptionProcessed=Processed -StatusReceptionDraftShort=Draft -StatusReceptionValidatedShort=Validated -StatusReceptionProcessedShort=Processed -ReceptionSheet=Reception sheet -ConfirmDeleteReception=Are you sure you want to delete this reception? -ConfirmValidateReception=Are you sure you want to validate this reception with reference %s? -ConfirmCancelReception=Are you sure you want to cancel this reception? -StatsOnReceptionsOnlyValidated=Statistics conducted on receptions only validated. Date used is date of validation of reception (planed delivery date is not always known). -SendReceptionByEMail=Send reception by email -SendReceptionRef=Submission of reception %s -ActionsOnReception=Events on reception -ReceptionCreationIsDoneFromOrder=For the moment, creation of a new reception is done from the order card. -ReceptionLine=Reception line -ProductQtyInReceptionAlreadySent=Product quantity from open sales order already sent -ProductQtyInSuppliersReceptionAlreadyRecevied=Product quantity from open supplier order already received -ValidateOrderFirstBeforeReception=You must first validate the order before being able to make receptions. -ReceptionsNumberingModules=Numbering module for receptions -ReceptionsReceiptModel=Document templates for receptions -NoMorePredefinedProductToDispatch=No more predefined products to dispatch -ReceptionExist=A reception exists diff --git a/htdocs/langs/ar_IQ/recruitment.lang b/htdocs/langs/ar_IQ/recruitment.lang deleted file mode 100644 index 6b0e8117254..00000000000 --- a/htdocs/langs/ar_IQ/recruitment.lang +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (C) 2020 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 -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# -# Generic -# - -# Module label 'ModuleRecruitmentName' -ModuleRecruitmentName = Recruitment -# Module description 'ModuleRecruitmentDesc' -ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions - -# -# Admin page -# -RecruitmentSetup = Recruitment setup -Settings = Settings -RecruitmentSetupPage = Enter here the setup of main options for the recruitment module -RecruitmentArea=Recruitement area -PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. -EnablePublicRecruitmentPages=Enable public pages of open jobs - -# -# About page -# -About = About -RecruitmentAbout = About Recruitment -RecruitmentAboutPage = Recruitment about page -NbOfEmployeesExpected=Expected nb of employees -JobLabel=Label of job position -WorkPlace=Work place -DateExpected=Expected date -FutureManager=Future manager -ResponsibleOfRecruitement=Responsible of recruitment -IfJobIsLocatedAtAPartner=If job is located at a partner place -PositionToBeFilled=Job position -PositionsToBeFilled=Job positions -ListOfPositionsToBeFilled=List of job positions -NewPositionToBeFilled=New job positions - -JobOfferToBeFilled=Job position to be filled -ThisIsInformationOnJobPosition=Information of the job position to be filled -ContactForRecruitment=Contact for recruitment -EmailRecruiter=Email recruiter -ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used -NewCandidature=New application -ListOfCandidatures=List of applications -RequestedRemuneration=Requested remuneration -ProposedRemuneration=Proposed remuneration -ContractProposed=Contract proposed -ContractSigned=Contract signed -ContractRefused=Contract refused -RecruitmentCandidature=Application -JobPositions=Job positions -RecruitmentCandidatures=Applications -InterviewToDo=Interview to do -AnswerCandidature=Application answer -YourCandidature=Your application -YourCandidatureAnswerMessage=Thanks you for your application.
    ... -JobClosedTextCandidateFound=The job position is closed. The position has been filled. -JobClosedTextCanceled=The job position is closed. -ExtrafieldsJobPosition=Complementary attributes (job positions) -ExtrafieldsApplication=Complementary attributes (job applications) -MakeOffer=Make an offer diff --git a/htdocs/langs/ar_IQ/resource.lang b/htdocs/langs/ar_IQ/resource.lang deleted file mode 100644 index e8574dc680f..00000000000 --- a/htdocs/langs/ar_IQ/resource.lang +++ /dev/null @@ -1,39 +0,0 @@ -# Dolibarr language file - Source file is en_US - resource -MenuResourceIndex=Resources -MenuResourceAdd=New resource -DeleteResource=Delete resource -ConfirmDeleteResourceElement=Confirm delete the resource for this element -NoResourceInDatabase=No resource in database. -NoResourceLinked=No resource linked -ActionsOnResource=Events about this resource -ResourcePageIndex=Resources list -ResourceSingular=Resource -ResourceCard=Resource card -AddResource=Create a resource -ResourceFormLabel_ref=Resource name -ResourceType=Resource type -ResourceFormLabel_description=Resource description - -ResourcesLinkedToElement=Resources linked to element - -ShowResource=Show resource - -ResourceElementPage=Element resources -ResourceCreatedWithSuccess=Resource successfully created -RessourceLineSuccessfullyDeleted=Resource line successfully deleted -RessourceLineSuccessfullyUpdated=Resource line successfully updated -ResourceLinkedWithSuccess=Resource linked with success - -ConfirmDeleteResource=Confirm to delete this resource -RessourceSuccessfullyDeleted=Resource successfully deleted -DictionaryResourceType=Type of resources - -SelectResource=Select resource - -IdResource=Id resource -AssetNumber=Serial number -ResourceTypeCode=Resource type code -ImportDataset_resource_1=Resources - -ErrorResourcesAlreadyInUse=Some resources are in use -ErrorResourceUseInEvent=%s used in %s event diff --git a/htdocs/langs/ar_IQ/salaries.lang b/htdocs/langs/ar_IQ/salaries.lang deleted file mode 100644 index 12905040b1a..00000000000 --- a/htdocs/langs/ar_IQ/salaries.lang +++ /dev/null @@ -1,24 +0,0 @@ -# Dolibarr language file - Source file is en_US - salaries -SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Accounting account used for user third parties -SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=The dedicated accounting account defined on user card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated user accounting account on user is not defined. -SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Accounting account by default for wage payments -CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT=By default, leave empty the option "Automatically create a total payment" when creating a Salary -Salary=Salary -Salaries=Salaries -NewSalary=New salary -NewSalaryPayment=New salary card -AddSalaryPayment=Add salary payment -SalaryPayment=Salary payment -SalariesPayments=Salaries payments -SalariesPaymentsOf=Salaries payments of %s -ShowSalaryPayment=Show salary payment -THM=Average hourly rate -TJM=Average daily rate -CurrentSalary=Current salary -THMDescription=This value may be used to calculate the cost of time consumed on a project entered by users if module project is used -TJMDescription=This value is currently for information only and is not used for any calculation -LastSalaries=Latest %s salaries -AllSalaries=All salaries -SalariesStatistics=Salary statistics -SalariesAndPayments=Salaries and payments -ConfirmDeleteSalaryPayment=Do you want to delete this salary payment ? diff --git a/htdocs/langs/ar_IQ/sendings.lang b/htdocs/langs/ar_IQ/sendings.lang index b94891d79c5..47082ac4ba4 100644 --- a/htdocs/langs/ar_IQ/sendings.lang +++ b/htdocs/langs/ar_IQ/sendings.lang @@ -1,76 +1,2 @@ # Dolibarr language file - Source file is en_US - sendings -RefSending=Ref. shipment -Sending=Shipment -Sendings=Shipments -AllSendings=All Shipments -Shipment=Shipment -Shipments=Shipments -ShowSending=Show Shipments -Receivings=Delivery Receipts -SendingsArea=Shipments area -ListOfSendings=List of shipments -SendingMethod=Shipping method -LastSendings=Latest %s shipments -StatisticsOfSendings=Statistics for shipments -NbOfSendings=Number of shipments -NumberOfShipmentsByMonth=Number of shipments by month -SendingCard=Shipment card -NewSending=New shipment -CreateShipment=Create shipment -QtyShipped=Qty shipped -QtyShippedShort=Qty ship. -QtyPreparedOrShipped=Qty prepared or shipped -QtyToShip=Qty to ship -QtyToReceive=Qty to receive -QtyReceived=Qty received -QtyInOtherShipments=Qty in other shipments -KeepToShip=Remain to ship -KeepToShipShort=Remain -OtherSendingsForSameOrder=Other shipments for this order -SendingsAndReceivingForSameOrder=Shipments and receipts for this order -SendingsToValidate=Shipments to validate -StatusSendingCanceled=Canceled -StatusSendingCanceledShort=Canceled -StatusSendingDraft=Draft -StatusSendingValidated=Validated (products to ship or already shipped) -StatusSendingProcessed=Processed -StatusSendingDraftShort=Draft -StatusSendingValidatedShort=Validated -StatusSendingProcessedShort=Processed -SendingSheet=Shipment sheet -ConfirmDeleteSending=Are you sure you want to delete this shipment? -ConfirmValidateSending=Are you sure you want to validate this shipment with reference %s? -ConfirmCancelSending=Are you sure you want to cancel this shipment? -DocumentModelMerou=Merou A5 model -WarningNoQtyLeftToSend=Warning, no products waiting to be shipped. -StatsOnShipmentsOnlyValidated=Statistics are only for validated shipments. Date used is the date of validation of shipment (planned delivery date is not always known) -DateDeliveryPlanned=Planned date of delivery -RefDeliveryReceipt=Ref delivery receipt -StatusReceipt=Status delivery receipt -DateReceived=Date delivery received -ClassifyReception=Classify reception -SendShippingByEMail=Send shipment by email -SendShippingRef=Submission of shipment %s -ActionsOnShipping=Events on shipment -LinkToTrackYourPackage=Link to track your package ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card. -ShipmentLine=Shipment line -ProductQtyInCustomersOrdersRunning=Product quantity from open sales orders -ProductQtyInSuppliersOrdersRunning=Product quantity from open purchase orders -ProductQtyInShipmentAlreadySent=Product quantity from open sales order already sent -ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from open purchase orders already received -NoProductToShipFoundIntoStock=No product to ship found in warehouse %s. Correct stock or go back to choose another warehouse. -WeightVolShort=Weight/Vol. -ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments. - -# Sending methods -# ModelDocument -DocumentModelTyphon=More complete document model for delivery receipts (logo...) -DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) -Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined -SumOfProductVolumes=Sum of product volumes -SumOfProductWeights=Sum of product weights - -# warehouse details -DetailWarehouseNumber= Warehouse details -DetailWarehouseFormat= W:%s (Qty: %d) diff --git a/htdocs/langs/ar_IQ/sms.lang b/htdocs/langs/ar_IQ/sms.lang deleted file mode 100644 index 055085eb16a..00000000000 --- a/htdocs/langs/ar_IQ/sms.lang +++ /dev/null @@ -1,51 +0,0 @@ -# Dolibarr language file - Source file is en_US - sms -Sms=Sms -SmsSetup=SMS setup -SmsDesc=This page allows you to define global options on SMS features -SmsCard=SMS Card -AllSms=All SMS campaigns -SmsTargets=Targets -SmsRecipients=Targets -SmsRecipient=Target -SmsTitle=Description -SmsFrom=Sender -SmsTo=Target -SmsTopic=Topic of SMS -SmsText=Message -SmsMessage=SMS Message -ShowSms=Show SMS -ListOfSms=List SMS campaigns -NewSms=New SMS campaign -EditSms=Edit SMS -ResetSms=New sending -DeleteSms=Delete SMS campaign -DeleteASms=Remove a SMS campaign -PreviewSms=Previuw SMS -PrepareSms=Prepare SMS -CreateSms=Create SMS -SmsResult=Result of SMS sending -TestSms=Test SMS -ValidSms=Validate SMS -ApproveSms=Approve SMS -SmsStatusDraft=Draft -SmsStatusValidated=Validated -SmsStatusApproved=Approved -SmsStatusSent=Sent -SmsStatusSentPartialy=Sent partially -SmsStatusSentCompletely=Sent completely -SmsStatusError=Error -SmsStatusNotSent=Not sent -SmsSuccessfulySent=SMS correctly sent (from %s to %s) -ErrorSmsRecipientIsEmpty=Number of target is empty -WarningNoSmsAdded=No new phone number to add to target list -ConfirmValidSms=Do you confirm validation of this campaign? -NbOfUniqueSms=No. of unique phone numbers -NbOfSms=No. of phone numbers -ThisIsATestMessage=This is a test message -SendSms=Send SMS -SmsInfoCharRemain=No. of remaining characters -SmsInfoNumero= (international format i.e.: +33899701761) -DelayBeforeSending=Delay before sending (minutes) -SmsNoPossibleSenderFound=No sender available. Check setup of your SMS provider. -SmsNoPossibleRecipientFound=No target available. Check setup of your SMS provider. -DisableStopIfSupported=Disable STOP message (if supported) diff --git a/htdocs/langs/ar_IQ/stocks.lang b/htdocs/langs/ar_IQ/stocks.lang index c1f0abc43a8..a95d0f1b7cd 100644 --- a/htdocs/langs/ar_IQ/stocks.lang +++ b/htdocs/langs/ar_IQ/stocks.lang @@ -1,263 +1,4 @@ # Dolibarr language file - Source file is en_US - stocks -WarehouseCard=Warehouse card -Warehouse=Warehouse -Warehouses=Warehouses -ParentWarehouse=Parent warehouse -NewWarehouse=New warehouse / Stock Location -WarehouseEdit=Modify warehouse -MenuNewWarehouse=New warehouse -WarehouseSource=Source warehouse -WarehouseSourceNotDefined=No warehouse defined, -AddWarehouse=Create warehouse -AddOne=Add one -DefaultWarehouse=Default warehouse -WarehouseTarget=Target warehouse ValidateSending=Delete sending CancelSending=Cancel sending DeleteSending=Delete sending -Stock=Stock -Stocks=Stocks -MissingStocks=Missing stocks -StockAtDate=Stocks at date -StockAtDateInPast=Date in the past -StockAtDateInFuture=Date in the future -StocksByLotSerial=Stocks by lot/serial -LotSerial=Lots/Serials -LotSerialList=List of lot/serials -Movements=Movements -ErrorWarehouseRefRequired=Warehouse reference name is required -ListOfWarehouses=List of warehouses -ListOfStockMovements=List of stock movements -ListOfInventories=List of inventories -MovementId=Movement ID -StockMovementForId=Movement ID %d -ListMouvementStockProject=List of stock movements associated to project -StocksArea=Warehouses area -AllWarehouses=All warehouses -IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock -IncludeAlsoDraftOrders=Include also draft orders -Location=Location -LocationSummary=Short name of location -NumberOfDifferentProducts=Number of unique products -NumberOfProducts=Total number of products -LastMovement=Latest movement -LastMovements=Latest movements -Units=Units -Unit=Unit -StockCorrection=Stock correction -CorrectStock=Correct stock -StockTransfer=Stock transfer -TransferStock=Transfer stock -MassStockTransferShort=Mass stock transfer -StockMovement=Stock movement -StockMovements=Stock movements -NumberOfUnit=Number of units -UnitPurchaseValue=Unit purchase price -StockTooLow=Stock too low -StockLowerThanLimit=Stock lower than alert limit (%s) -EnhancedValue=Value -EnhancedValueOfWarehouses=Warehouses value -UserWarehouseAutoCreate=Create a user warehouse automatically when creating a user -AllowAddLimitStockByWarehouse=Manage also value for minimum and desired stock per pairing (product-warehouse) in addition to the value for minimum and desired stock per product -RuleForWarehouse=Rule for warehouses -WarehouseAskWarehouseOnThirparty=Set a warehouse on Third-parties -WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals -WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders -UserDefaultWarehouse=Set a warehouse on Users -MainDefaultWarehouse=Default warehouse -MainDefaultWarehouseUser=Use a default warehouse for each user -MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. -IndependantSubProductStock=Product stock and subproduct stock are independent -QtyDispatched=Quantity dispatched -QtyDispatchedShort=Qty dispatched -QtyToDispatchShort=Qty to dispatch -OrderDispatch=Item receipts -RuleForStockManagementDecrease=Choose Rule for automatic stock decrease (manual decrease is always possible, even if an automatic decrease rule is activated) -RuleForStockManagementIncrease=Choose Rule for automatic stock increase (manual increase is always possible, even if an automatic increase rule is activated) -DeStockOnBill=Decrease real stocks on validation of customer invoice/credit note -DeStockOnValidateOrder=Decrease real stocks on validation of sales order -DeStockOnShipment=Decrease real stocks on shipping validation -DeStockOnShipmentOnClosing=Decrease real stocks when shipping is set to closed -ReStockOnBill=Increase real stocks on validation of vendor invoice/credit note -ReStockOnValidateOrder=Increase real stocks on purchase order approval -ReStockOnDispatchOrder=Increase real stocks on manual dispatching into warehouse, after purchase order receipt of goods -StockOnReception=Increase real stocks on validation of reception -StockOnReceptionOnClosing=Increase real stocks when reception is set to closed -OrderStatusNotReadyToDispatch=Order has not yet or no more a status that allows dispatching of products in stock warehouses. -StockDiffPhysicTeoric=Explanation for difference between physical and virtual stock -NoPredefinedProductToDispatch=No predefined products for this object. So no dispatching in stock is required. -DispatchVerb=Dispatch -StockLimitShort=Limit for alert -StockLimit=Stock limit for alert -StockLimitDesc=(empty) means no warning.
    0 can be used to trigger a warning as soon as the stock is empty. -PhysicalStock=Physical Stock -RealStock=Real Stock -RealStockDesc=Physical/real stock is the stock currently in the warehouses. -RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): -VirtualStock=Virtual stock -VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) -AtDate=At date -IdWarehouse=Id warehouse -DescWareHouse=Description warehouse -LieuWareHouse=Localisation warehouse -WarehousesAndProducts=Warehouses and products -WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average price -AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. -SellPriceMin=Selling Unit Price -EstimatedStockValueSellShort=Value for sell -EstimatedStockValueSell=Value for sell -EstimatedStockValueShort=Input stock value -EstimatedStockValue=Input stock value -DeleteAWarehouse=Delete a warehouse -ConfirmDeleteWarehouse=Are you sure you want to delete the warehouse %s? -PersonalStock=Personal stock %s -ThisWarehouseIsPersonalStock=This warehouse represents personal stock of %s %s -SelectWarehouseForStockDecrease=Choose warehouse to use for stock decrease -SelectWarehouseForStockIncrease=Choose warehouse to use for stock increase -NoStockAction=No stock action -DesiredStock=Desired Stock -DesiredStockDesc=This stock amount will be the value used to fill the stock by replenishment feature. -StockToBuy=To order -Replenishment=Replenishment -ReplenishmentOrders=Replenishment orders -VirtualDiffersFromPhysical=According to increase/decrease stock options, physical stock and virtual stock (physical stock + open orders) may differ -UseRealStockByDefault=Use real stock, instead of virtual stock, for replenishment feature -ReplenishmentCalculation=Amount to order will be (desired quantity - real stock) instead of (desired quantity - virtual stock) -UseVirtualStock=Use virtual stock -UsePhysicalStock=Use physical stock -CurentSelectionMode=Current selection mode -CurentlyUsingVirtualStock=Virtual stock -CurentlyUsingPhysicalStock=Physical stock -RuleForStockReplenishment=Rule for stocks replenishment -SelectProductWithNotNullQty=Select at least one product with a qty not null and a vendor -AlertOnly= Alerts only -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 -WarehouseForStockDecrease=The warehouse %s will be used for stock decrease -WarehouseForStockIncrease=The warehouse %s will be used for stock increase -ForThisWarehouse=For this warehouse -ReplenishmentStatusDesc=This is a list of all products with a stock lower than desired stock (or lower than alert value if checkbox "alert only" is checked). Using the checkbox, you can create purchase orders to fill the difference. -ReplenishmentStatusDescPerWarehouse=If you want a replenishment based on desired quantity defined per warehouse, you must add a filter on the warehouse. -ReplenishmentOrdersDesc=This is a list of all open purchase orders including predefined products. Only open orders with predefined products, so orders that may affect stocks, are visible here. -Replenishments=Replenishments -NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) -NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) -MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click on "%s". -RecordMovement=Record transfer -ReceivingForSameOrder=Receipts for this order -StockMovementRecorded=Stock movements recorded -RuleForStockAvailability=Rules on stock requirements -StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to invoice (check is done on current real stock when adding a line into invoice whatever the rule for automatic stock change) -StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) -StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) -MovementLabel=Label of movement -TypeMovement=Direction of movement -DateMovement=Date of movement -InventoryCode=Movement or inventory code -IsInPackage=Contained into package -WarehouseAllowNegativeTransfer=Stock can be negative -qtyToTranferIsNotEnough=You don't have enough stock from your source warehouse and your setup does not allow negative stocks. -qtyToTranferLotIsNotEnough=You don't have enough stock, for this lot number, from your source warehouse and your setup does not allow negative stocks (Qty for product '%s' with lot '%s' is %s in warehouse '%s'). -ShowWarehouse=Show warehouse -MovementCorrectStock=Stock correction for product %s -MovementTransferStock=Stock transfer of product %s into another warehouse -InventoryCodeShort=Inv./Mov. code -NoPendingReceptionOnSupplierOrder=No pending reception due to open purchase order -ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (%s) already exists but with different eatby or sellby date (found %s but you enter %s). -OpenAnyMovement=Open (all movement) -OpenInternal=Open (only internal movement) -UseDispatchStatus=Use a dispatch status (approve/refuse) for product lines on purchase order reception -OptionMULTIPRICESIsOn=Option "several prices per segment" is on. It means a product has several selling price so value for sell can't be calculated -ProductStockWarehouseCreated=Stock limit for alert and desired optimal stock correctly created -ProductStockWarehouseUpdated=Stock limit for alert and desired optimal stock correctly updated -ProductStockWarehouseDeleted=Stock limit for alert and desired optimal stock correctly deleted -AddNewProductStockWarehouse=Set new limit for alert and desired optimal stock -AddStockLocationLine=Decrease quantity then click to add another warehouse for this product -InventoryDate=Inventory date -NewInventory=New inventory -inventorySetup = Inventory Setup -inventoryCreatePermission=Create new inventory -inventoryReadPermission=View inventories -inventoryWritePermission=Update inventories -inventoryValidatePermission=Validate inventory -inventoryDeletePermission=Delete inventory -inventoryTitle=Inventory -inventoryListTitle=Inventories -inventoryListEmpty=No inventory in progress -inventoryCreateDelete=Create/Delete inventory -inventoryCreate=Create new -inventoryEdit=Edit -inventoryValidate=Validated -inventoryDraft=Running -inventorySelectWarehouse=Warehouse choice -inventoryConfirmCreate=Create -inventoryOfWarehouse=Inventory for warehouse: %s -inventoryErrorQtyAdd=Error: one quantity is less than zero -inventoryMvtStock=By inventory -inventoryWarningProductAlreadyExists=This product is already into list -SelectCategory=Category filter -SelectFournisseur=Vendor filter -inventoryOnDate=Inventory -INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT=Stock movements will have the date of inventory (instead of the date of inventory validation) -inventoryChangePMPPermission=Allow to change PMP value for a product -ColumnNewPMP=New unit PMP -OnlyProdsInStock=Do not add product without stock -TheoricalQty=Theorique qty -TheoricalValue=Theorique qty -LastPA=Last BP -CurrentPA=Curent BP -RecordedQty=Recorded Qty -RealQty=Real Qty -RealValue=Real Value -RegulatedQty=Regulated Qty -AddInventoryProduct=Add product to inventory -AddProduct=Add -ApplyPMP=Apply PMP -FlushInventory=Flush inventory -ConfirmFlushInventory=Do you confirm this action? -InventoryFlushed=Inventory flushed -ExitEditMode=Exit edition -inventoryDeleteLine=Delete line -RegulateStock=Regulate Stock -ListInventory=List -StockSupportServices=Stock management supports Services -StockSupportServicesDesc=By default, you can stock only products of type "product". You may also stock a product of type "service" if both module Services and this option are enabled. -ReceiveProducts=Receive items -StockIncreaseAfterCorrectTransfer=Increase by correction/transfer -StockDecreaseAfterCorrectTransfer=Decrease by correction/transfer -StockIncrease=Stock increase -StockDecrease=Stock decrease -InventoryForASpecificWarehouse=Inventory for a specific warehouse -InventoryForASpecificProduct=Inventory for a specific product -StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to use -ForceTo=Force to -AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (Warning: This may decrease dramatically performances) -StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past -StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future -CurrentStock=Current stock -InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Fill real qty by scaning -UpdateByScaningProductBarcode=Update by scan (product barcode) -UpdateByScaningLot=Update by scan (lot|serial barcode) -DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. -ImportFromCSV=Import CSV list of movement -ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... -SelectAStockMovementFileToImport=select a stock movement file to import -InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):
    Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number
    CSV character separator must be "%s" -LabelOfInventoryMovemement=Inventory %s -ReOpen=Reopen -ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock to the real qty you entered into the inventory. -ObjectNotFound=%s not found -MakeMovementsAndClose=Generate movements and close -AutofillWithExpected=Fill real quantity with expected quantity -ShowAllBatchByDefault=By default, show batch details on product "stock" tab -CollapseBatchDetailHelp=You can set batch detail default display in stocks module configuration -FieldCannotBeNegative=Field "%s" cannot be negative -ErrorWrongBarcodemode=Unknown Barcode mode -ProductDoesNotExist=Product does not exist -ErrorSameBatchNumber=Same batch number found in inventory list -ProductBatchDoesNotExist=Product with batch/serial does not exist -ProductBarcodeDoesNotExist=Product with barcode does not exist diff --git a/htdocs/langs/ar_IQ/stripe.lang b/htdocs/langs/ar_IQ/stripe.lang deleted file mode 100644 index a536ffd81e7..00000000000 --- a/htdocs/langs/ar_IQ/stripe.lang +++ /dev/null @@ -1,71 +0,0 @@ -# Dolibarr language file - Source file is en_US - stripe -StripeSetup=Stripe module setup -StripeDesc=Offer customers a Stripe online payment page for payments with credit/cebit cards via Stripe. This can be used to allow your customers to make ad-hoc payments or for payments related to a particular Dolibarr object (invoice, order, ...) -StripeOrCBDoPayment=Pay with credit card or Stripe -FollowingUrlAreAvailableToMakePayments=Following URLs are available to offer a page to a customer to make a payment on Dolibarr objects -PaymentForm=Payment form -WelcomeOnPaymentPage=Welcome to our online payment service -ThisScreenAllowsYouToPay=This screen allow you to make an online payment to %s. -ThisIsInformationOnPayment=This is information on payment to do -ToComplete=To complete -YourEMail=Email to receive payment confirmation -STRIPE_PAYONLINE_SENDEMAIL=Email notification after a payment attempt (success or fail) -Creditor=Creditor -PaymentCode=Payment code -StripeDoPayment=Pay with Stripe -YouWillBeRedirectedOnStripe=You will be redirected on secured Stripe page to input you credit card information -Continue=Next -ToOfferALinkForOnlinePayment=URL for %s payment -ToOfferALinkForOnlinePaymentOnOrder=URL to offer a %s online payment page for a sales order -ToOfferALinkForOnlinePaymentOnInvoice=URL to offer a %s online payment page for a customer invoice -ToOfferALinkForOnlinePaymentOnContractLine=URL to offer a %s online payment page for a contract line -ToOfferALinkForOnlinePaymentOnFreeAmount=URL to offer a %s online payment page of any amount with no existing object -ToOfferALinkForOnlinePaymentOnMemberSubscription=URL to offer a %s online payment page for a member subscription -ToOfferALinkForOnlinePaymentOnDonation=URL to offer a %s online payment page for payment of a donation -YouCanAddTagOnUrl=You can also add url parameter &tag=value to any of those URL (mandatory only for payment not linked to an object) to add your own payment comment tag.
    For the URL of payments with no existing object, you may also add the parameter &noidempotency=1 so the same link with same tag can be used several times (some payment mode may limit the payment to 1 for each different link without this parameter) -SetupStripeToHavePaymentCreatedAutomatically=Setup your Stripe with url %s to have payment created automatically when validated by Stripe. -AccountParameter=Account parameters -UsageParameter=Usage parameters -InformationToFindParameters=Help to find your %s account information -STRIPE_CGI_URL_V2=Url of Stripe CGI module for payment -CSSUrlForPaymentForm=CSS style sheet url for payment form -NewStripePaymentReceived=New Stripe payment received -NewStripePaymentFailed=New Stripe payment tried but failed -FailedToChargeCard=Failed to charge card -STRIPE_TEST_SECRET_KEY=Secret test key -STRIPE_TEST_PUBLISHABLE_KEY=Publishable test key -STRIPE_TEST_WEBHOOK_KEY=Webhook test key -STRIPE_LIVE_SECRET_KEY=Secret live key -STRIPE_LIVE_PUBLISHABLE_KEY=Publishable live key -STRIPE_LIVE_WEBHOOK_KEY=Webhook live key -ONLINE_PAYMENT_WAREHOUSE=Stock to use for stock decrease when online payment is done
    (TODO When option to decrease stock is done on an action on invoice and the online payment generate itself the invoice ?) -StripeLiveEnabled=Stripe live enabled (otherwise test/sandbox mode) -StripeImportPayment=Import Stripe payments -ExampleOfTestCreditCard=Example of credit card for test: %s => valid, %s => error CVC, %s => expired, %s => charge fails -StripeGateways=Stripe gateways -OAUTH_STRIPE_TEST_ID=Stripe Connect Client ID (ca_...) -OAUTH_STRIPE_LIVE_ID=Stripe Connect Client ID (ca_...) -BankAccountForBankTransfer=Bank account for fund payouts -StripeAccount=Stripe account -StripeChargeList=List of Stripe charges -StripeTransactionList=List of Stripe transactions -StripeCustomerId=Stripe customer id -StripePaymentModes=Stripe payment modes -LocalID=Local ID -StripeID=Stripe ID -NameOnCard=Name on card -CardNumber=Card Number -ExpiryDate=Expiry Date -CVN=CVN -DeleteACard=Delete Card -ConfirmDeleteCard=Are you sure you want to delete this Credit or Debit card? -CreateCustomerOnStripe=Create customer on Stripe -CreateCardOnStripe=Create card on Stripe -ShowInStripe=Show in Stripe -StripeUserAccountForActions=User account to use for email notification of some Stripe events (Stripe payouts) -StripePayoutList=List of Stripe payouts -ToOfferALinkForTestWebhook=Link to setup Stripe WebHook to call the IPN (test mode) -ToOfferALinkForLiveWebhook=Link to setup Stripe WebHook to call the IPN (live mode) -PaymentWillBeRecordedForNextPeriod=Payment will be recorded for the next period. -ClickHereToTryAgain=Click here to try again... -CreationOfPaymentModeMustBeDoneFromStripeInterface=Due to Strong Customer Authentication rules, creation of a card must be done from Stripe backoffice. You can click here to switch on Stripe customer record: %s diff --git a/htdocs/langs/ar_IQ/supplier_proposal.lang b/htdocs/langs/ar_IQ/supplier_proposal.lang deleted file mode 100644 index a68319fb2df..00000000000 --- a/htdocs/langs/ar_IQ/supplier_proposal.lang +++ /dev/null @@ -1,58 +0,0 @@ -# Dolibarr language file - Source file is en_US - supplier_proposal -SupplierProposal=Vendor commercial proposals -supplier_proposalDESC=Manage price requests to suppliers -SupplierProposalNew=New price request -CommRequest=Price request -CommRequests=Price requests -SearchRequest=Find a request -DraftRequests=Draft requests -SupplierProposalsDraft=Draft vendor proposals -LastModifiedRequests=Latest %s modified price requests -RequestsOpened=Open price requests -SupplierProposalArea=Vendor proposals area -SupplierProposalShort=Vendor proposal -SupplierProposals=Vendor proposals -SupplierProposalsShort=Vendor proposals -AskPrice=Price request -NewAskPrice=New price request -ShowSupplierProposal=Show price request -AddSupplierProposal=Create a price request -SupplierProposalRefFourn=Vendor ref -SupplierProposalDate=Delivery date -SupplierProposalRefFournNotice=Before closing to "Accepted", think to grasp suppliers references. -ConfirmValidateAsk=Are you sure you want to validate this price request under name %s? -DeleteAsk=Delete request -ValidateAsk=Validate request -SupplierProposalStatusDraft=Draft (needs to be validated) -SupplierProposalStatusValidated=Validated (request is open) -SupplierProposalStatusClosed=Closed -SupplierProposalStatusSigned=Accepted -SupplierProposalStatusNotSigned=Refused -SupplierProposalStatusDraftShort=Draft -SupplierProposalStatusValidatedShort=Validated -SupplierProposalStatusClosedShort=Closed -SupplierProposalStatusSignedShort=Accepted -SupplierProposalStatusNotSignedShort=Refused -CopyAskFrom=Create a price request by copying an existing request -CreateEmptyAsk=Create blank request -ConfirmCloneAsk=Are you sure you want to clone the price request %s? -ConfirmReOpenAsk=Are you sure you want to open back the price request %s? -SendAskByMail=Send price request by mail -SendAskRef=Sending the price request %s -SupplierProposalCard=Request card -ConfirmDeleteAsk=Are you sure you want to delete this price request %s? -ActionsOnSupplierProposal=Events on price request -DocModelAuroreDescription=A complete request model (logo...) -CommercialAsk=Price request -DefaultModelSupplierProposalCreate=Default model creation -DefaultModelSupplierProposalToBill=Default template when closing a price request (accepted) -DefaultModelSupplierProposalClosed=Default template when closing a price request (refused) -ListOfSupplierProposals=List of vendor proposal requests -ListSupplierProposalsAssociatedProject=List of vendor proposals associated with project -SupplierProposalsToClose=Vendor proposals to close -SupplierProposalsToProcess=Vendor proposals to process -LastSupplierProposals=Latest %s price requests -AllPriceRequests=All requests -TypeContact_supplier_proposal_external_SHIPPING=Vendor contact for delivery -TypeContact_supplier_proposal_external_BILLING=Vendor contact for billing -TypeContact_supplier_proposal_external_SERVICE=Representative following-up proposal diff --git a/htdocs/langs/ar_IQ/suppliers.lang b/htdocs/langs/ar_IQ/suppliers.lang deleted file mode 100644 index ca9ee174d29..00000000000 --- a/htdocs/langs/ar_IQ/suppliers.lang +++ /dev/null @@ -1,49 +0,0 @@ -# Dolibarr language file - Source file is en_US - vendors -Suppliers=Vendors -SuppliersInvoice=Vendor invoice -SupplierInvoices=Vendor invoices -ShowSupplierInvoice=Show Vendor Invoice -NewSupplier=New vendor -History=History -ListOfSuppliers=List of vendors -ShowSupplier=Show vendor -OrderDate=Order date -BuyingPriceMin=Best buying price -BuyingPriceMinShort=Best buying price -TotalBuyingPriceMinShort=Total of subproducts buying prices -TotalSellingPriceMinShort=Total of subproducts selling prices -SomeSubProductHaveNoPrices=Some sub-products have no price defined -AddSupplierPrice=Add buying price -ChangeSupplierPrice=Change buying price -SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s -NoRecordedSuppliers=No vendor recorded -SupplierPayment=Vendor payment -SuppliersArea=Vendor area -RefSupplierShort=Ref. vendor -Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices and invoice details -ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order details -ApproveThisOrder=Approve this order -ConfirmApproveThisOrder=Are you sure you want to approve order %s? -DenyingThisOrder=Deny this order -ConfirmDenyingThisOrder=Are you sure you want to deny this order %s? -ConfirmCancelThisOrder=Are you sure you want to cancel this order %s? -AddSupplierOrder=Create Purchase Order -AddSupplierInvoice=Create vendor invoice -ListOfSupplierProductForSupplier=List of products and prices for vendor %s -SentToSuppliers=Sent to vendors -ListOfSupplierOrders=List of purchase orders -MenuOrdersSupplierToBill=Purchase orders to invoice -NbDaysToDelivery=Delivery delay (days) -DescNbDaysToDelivery=The longest delivery delay of the products from this order -SupplierReputation=Vendor reputation -ReferenceReputation=Reference reputation -DoNotOrderThisProductToThisSupplier=Do not order -NotTheGoodQualitySupplier=Low quality -ReputationForThisProduct=Reputation -BuyerName=Buyer name -AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All references of vendor -BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/ar_IQ/ticket.lang b/htdocs/langs/ar_IQ/ticket.lang deleted file mode 100644 index 5615415ef28..00000000000 --- a/htdocs/langs/ar_IQ/ticket.lang +++ /dev/null @@ -1,321 +0,0 @@ -# en_US lang file for module ticket -# Copyright (C) 2013 Jean-François FERRY -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# -# Generic -# - -Module56000Name=Tickets -Module56000Desc=Ticket system for issue or request management - -Permission56001=See tickets -Permission56002=Modify tickets -Permission56003=Delete tickets -Permission56004=Manage tickets -Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on) - -TicketDictType=Ticket - Types -TicketDictCategory=Ticket - Groupes -TicketDictSeverity=Ticket - Severities -TicketDictResolution=Ticket - Resolution - -TicketTypeShortCOM=Commercial question -TicketTypeShortHELP=Request for functionnal help -TicketTypeShortISSUE=Issue or bug -TicketTypeShortPROBLEM=Problem -TicketTypeShortREQUEST=Change or enhancement request -TicketTypeShortPROJET=Project -TicketTypeShortOTHER=Other - -TicketSeverityShortLOW=Low -TicketSeverityShortNORMAL=Normal -TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical, Blocking - -ErrorBadEmailAddress=Field '%s' incorrect -MenuTicketMyAssign=My tickets -MenuTicketMyAssignNonClosed=My open tickets -MenuListNonClosed=Open tickets - -TypeContact_ticket_internal_CONTRIBUTOR=Contributor -TypeContact_ticket_internal_SUPPORTTEC=Assigned user -TypeContact_ticket_external_SUPPORTCLI=Customer contact / incident tracking -TypeContact_ticket_external_CONTRIBUTOR=External contributor - -OriginEmail=Reporter Email -Notify_TICKET_SENTBYMAIL=Send ticket message by email - -# Status -Read=Read -Assigned=Assigned -InProgress=In progress -NeedMoreInformation=Waiting for reporter feedback -NeedMoreInformationShort=Waiting for feedback -Answered=Answered -Waiting=Waiting -SolvedClosed=Solved -Deleted=Deleted - -# Dict -Type=Type -Severity=Severity -TicketGroupIsPublic=Group is public -TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface - -# Email templates -MailToSendTicketMessage=To send email from ticket message - -# -# Admin page -# -TicketSetup=Ticket module setup -TicketSettings=Settings -TicketSetupPage= -TicketPublicAccess=A public interface requiring no identification is available at the following url -TicketSetupDictionaries=The type of ticket, severity and analytic codes are configurable from dictionaries -TicketParamModule=Module variable setup -TicketParamMail=Email setup -TicketEmailNotificationFrom=Notification email from -TicketEmailNotificationFromHelp=Used into ticket message answer by example -TicketEmailNotificationTo=Notifications email to -TicketEmailNotificationToHelp=Send email notifications to this address. -TicketNewEmailBodyLabel=Text message sent after creating a ticket -TicketNewEmailBodyHelp=The text specified here will be inserted into the email confirming the creation of a new ticket from the public interface. Information on the consultation of the ticket are automatically added. -TicketParamPublicInterface=Public interface setup -TicketsEmailMustExist=Require an existing email address to create a ticket -TicketsEmailMustExistHelp=In the public interface, the email address should already be filled in the database to create a new ticket. -PublicInterface=Public interface -TicketUrlPublicInterfaceLabelAdmin=Alternative URL for public interface -TicketUrlPublicInterfaceHelpAdmin=It is possible to define an alias to the web server and thus make available the public interface with another URL (the server must act as a proxy on this new URL) -TicketPublicInterfaceTextHomeLabelAdmin=Welcome text of the public interface -TicketPublicInterfaceTextHome=You can create a support ticket or view existing from its identifier tracking ticket. -TicketPublicInterfaceTextHomeHelpAdmin=The text defined here will appear on the home page of the public interface. -TicketPublicInterfaceTopicLabelAdmin=Interface title -TicketPublicInterfaceTopicHelp=This text will appear as the title of the public interface. -TicketPublicInterfaceTextHelpMessageLabelAdmin=Help text to the message entry -TicketPublicInterfaceTextHelpMessageHelpAdmin=This text will appear above the message input area of the user. -ExtraFieldsTicket=Extra attributes -TicketCkEditorEmailNotActivated=HTML editor is not activated. Please put FCKEDITOR_ENABLE_MAIL content to 1 to get it. -TicketsDisableEmail=Do not send emails for ticket creation or message recording -TicketsDisableEmailHelp=By default, emails are sent when new tickets or messages created. Enable this option to disable *all* email notifications -TicketsLogEnableEmail=Enable log by email -TicketsLogEnableEmailHelp=At each change, an email will be sent **to each contact** associated with the ticket. -TicketParams=Params -TicketsShowModuleLogo=Display the logo of the module in the public interface -TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface -TicketsShowCompanyLogo=Display the logo of the company in the public interface -TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") -TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) -TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. -TicketsActivatePublicInterface=Activate public interface -TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create tickets. -TicketsAutoAssignTicket=Automatically assign the user who created the ticket -TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. -TicketNumberingModules=Tickets numbering module -TicketsModelModule=Document templates for tickets -TicketNotifyTiersAtCreation=Notify third party at creation -TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket -TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) -TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update) -TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. -# -# Index & list page -# -TicketsIndex=Tickets area -TicketList=List of tickets -TicketAssignedToMeInfos=This page display ticket list created by or assigned to current user -NoTicketsFound=No ticket found -NoUnreadTicketsFound=No unread ticket found -TicketViewAllTickets=View all tickets -TicketViewNonClosedOnly=View only open tickets -TicketStatByStatus=Tickets by status -OrderByDateAsc=Sort by ascending date -OrderByDateDesc=Sort by descending date -ShowAsConversation=Show as conversation list -MessageListViewType=Show as table list - -# -# Ticket card -# -Ticket=Ticket -TicketCard=Ticket card -CreateTicket=Create ticket -EditTicket=Edit ticket -TicketsManagement=Tickets Management -CreatedBy=Created by -NewTicket=New Ticket -SubjectAnswerToTicket=Ticket answer -TicketTypeRequest=Request type -TicketCategory=Ticket categorization -SeeTicket=See ticket -TicketMarkedAsRead=Ticket has been marked as read -TicketReadOn=Read on -TicketCloseOn=Closing date -MarkAsRead=Mark ticket as read -TicketHistory=Ticket history -AssignUser=Assign to user -TicketAssigned=Ticket is now assigned -TicketChangeType=Change type -TicketChangeCategory=Change analytic code -TicketChangeSeverity=Change severity -TicketAddMessage=Add a message -AddMessage=Add a message -MessageSuccessfullyAdded=Ticket added -TicketMessageSuccessfullyAdded=Message successfully added -TicketMessagesList=Message list -NoMsgForThisTicket=No message for this ticket -Properties=Classification -LatestNewTickets=Latest %s newest tickets (not read) -TicketSeverity=Severity -ShowTicket=See ticket -RelatedTickets=Related tickets -TicketAddIntervention=Create intervention -CloseTicket=Close|Solve ticket -AbandonTicket=Abandon ticket -CloseATicket=Close|Solve a ticket -ConfirmCloseAticket=Confirm ticket closing -ConfirmAbandonTicket=Do you confirm the closing of the ticket to status 'Abandonned' -ConfirmDeleteTicket=Please confirm ticket deleting -TicketDeletedSuccess=Ticket deleted with success -TicketMarkedAsClosed=Ticket marked as closed -TicketDurationAuto=Calculated duration -TicketDurationAutoInfos=Duration calculated automatically from intervention related -TicketUpdated=Ticket updated -SendMessageByEmail=Send message by email -TicketNewMessage=New message -ErrorMailRecipientIsEmptyForSendTicketMessage=Recipient is empty. No email send -TicketGoIntoContactTab=Please go into "Contacts" tab to select them -TicketMessageMailIntro=Introduction -TicketMessageMailIntroHelp=This text is added only at the beginning of the email and will not be saved. -TicketMessageMailIntroLabelAdmin=Introduction to the message when sending email -TicketMessageMailIntroText=Hello,
    A new response was sent on a ticket that you contact. Here is the message:
    -TicketMessageMailIntroHelpAdmin=This text will be inserted before the text of the response to a ticket. -TicketMessageMailSignature=Signature -TicketMessageMailSignatureHelp=This text is added only at the end of the email and will not be saved. -TicketMessageMailSignatureText=

    Sincerely,

    --

    -TicketMessageMailSignatureLabelAdmin=Signature of response email -TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message. -TicketMessageHelp=Only this text will be saved in the message list on ticket card. -TicketMessageSubstitutionReplacedByGenericValues=Substitutions variables are replaced by generic values. -TimeElapsedSince=Time elapsed since -TicketTimeToRead=Time elapsed before read -TicketTimeElapsedBeforeSince=Time elapsed before / since -TicketContacts=Contacts ticket -TicketDocumentsLinked=Documents linked to ticket -ConfirmReOpenTicket=Confirm reopen this ticket ? -TicketMessageMailIntroAutoNewPublicMessage=A new message was posted on the ticket with the subject %s: -TicketAssignedToYou=Ticket assigned -TicketAssignedEmailBody=You have been assigned the ticket #%s by %s -MarkMessageAsPrivate=Mark message as private -TicketMessagePrivateHelp=This message will not display to external users -TicketEmailOriginIssuer=Issuer at origin of the tickets -InitialMessage=Initial Message -LinkToAContract=Link to a contract -TicketPleaseSelectAContract=Select a contract -UnableToCreateInterIfNoSocid=Can not create an intervention when no third party is defined -TicketMailExchanges=Mail exchanges -TicketInitialMessageModified=Initial message modified -TicketMessageSuccesfullyUpdated=Message successfully updated -TicketChangeStatus=Change status -TicketConfirmChangeStatus=Confirm the status change: %s ? -TicketLogStatusChanged=Status changed: %s to %s -TicketNotNotifyTiersAtCreate=Not notify company at create -Unread=Unread -TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -ErrorTicketRefRequired=Ticket reference name is required - -# -# Logs -# -TicketLogMesgReadBy=Ticket %s read by %s -NoLogForThisTicket=No log for this ticket yet -TicketLogAssignedTo=Ticket %s assigned to %s -TicketLogPropertyChanged=Ticket %s modified: classification from %s to %s -TicketLogClosedBy=Ticket %s closed by %s -TicketLogReopen=Ticket %s re-open - -# -# Public pages -# -TicketSystem=Ticket system -ShowListTicketWithTrackId=Display ticket list from track ID -ShowTicketWithTrackId=Display ticket from track ID -TicketPublicDesc=You can create a support ticket or check from an existing ID. -YourTicketSuccessfullySaved=Ticket has been successfully saved! -MesgInfosPublicTicketCreatedWithTrackId=A new ticket has been created with ID %s and Ref %s. -PleaseRememberThisId=Please keep the tracking number that we might ask you later. -TicketNewEmailSubject=Ticket creation confirmation - Ref %s (public ticket ID %s) -TicketNewEmailSubjectCustomer=New support ticket -TicketNewEmailBody=This is an automatic email to confirm you have registered a new ticket. -TicketNewEmailBodyCustomer=This is an automatic email to confirm a new ticket has just been created into your account. -TicketNewEmailBodyInfosTicket=Information for monitoring the ticket -TicketNewEmailBodyInfosTrackId=Ticket tracking number: %s -TicketNewEmailBodyInfosTrackUrl=You can view the progress of the ticket by clicking the link above. -TicketNewEmailBodyInfosTrackUrlCustomer=You can view the progress of the ticket in the specific interface by clicking the following link -TicketEmailPleaseDoNotReplyToThisEmail=Please do not reply directly to this email! Use the link to reply into the interface. -TicketPublicInfoCreateTicket=This form allows you to record a support ticket in our management system. -TicketPublicPleaseBeAccuratelyDescribe=Please accurately describe the problem. Provide the most information possible to allow us to correctly identify your request. -TicketPublicMsgViewLogIn=Please enter ticket tracking ID -TicketTrackId=Public Tracking ID -OneOfTicketTrackId=One of your tracking ID -ErrorTicketNotFound=Ticket with tracking ID %s not found! -Subject=Subject -ViewTicket=View ticket -ViewMyTicketList=View my ticket list -ErrorEmailMustExistToCreateTicket=Error: email address not found in our database -TicketNewEmailSubjectAdmin=New ticket created - Ref %s (public ticket ID %s) -TicketNewEmailBodyAdmin=

    Ticket has just been created with ID #%s, see information:

    -SeeThisTicketIntomanagementInterface=See ticket in management interface -TicketPublicInterfaceForbidden=The public interface for the tickets was not enabled -ErrorEmailOrTrackingInvalid=Bad value for tracking ID or email -OldUser=Old user -NewUser=New user -NumberOfTicketsByMonth=Number of tickets per month -NbOfTickets=Number of tickets -# notifications -TicketNotificationEmailSubject=Ticket %s updated -TicketNotificationEmailBody=This is an automatic message to notify you that ticket %s has just been updated -TicketNotificationRecipient=Notification recipient -TicketNotificationLogMessage=Log message -TicketNotificationEmailBodyInfosTrackUrlinternal=View ticket into interface -TicketNotificationNumberEmailSent=Notification email sent: %s - -ActionsOnTicket=Events on ticket - -# -# Boxes -# -BoxLastTicket=Latest created tickets -BoxLastTicketDescription=Latest %s created tickets -BoxLastTicketContent= -BoxLastTicketNoRecordedTickets=No recent unread tickets -BoxLastModifiedTicket=Latest modified tickets -BoxLastModifiedTicketDescription=Latest %s modified tickets -BoxLastModifiedTicketContent= -BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets -BoxTicketType=Distribution of open tickets by type -BoxTicketSeverity=Number of open tickets by severity -BoxNoTicketSeverity=No tickets opened -BoxTicketLastXDays=Number of new tickets by days the last %s days -BoxTicketLastXDayswidget = Number of new tickets by days the last X days -BoxNoTicketLastXDays=No new tickets the last %s days -BoxNumberOfTicketByDay=Number of new tickets by day -BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets -TicketCreatedToday=Ticket created today -TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/ar_IQ/trips.lang b/htdocs/langs/ar_IQ/trips.lang deleted file mode 100644 index c9a6c792077..00000000000 --- a/htdocs/langs/ar_IQ/trips.lang +++ /dev/null @@ -1,150 +0,0 @@ -# Dolibarr language file - Source file is en_US - trips -ShowExpenseReport=Show expense report -Trips=Expense reports -TripsAndExpenses=Expenses reports -TripsAndExpensesStatistics=Expense reports statistics -TripCard=Expense report card -AddTrip=Create expense report -ListOfTrips=List of expense reports -ListOfFees=List of fees -TypeFees=Types of fees -ShowTrip=Show expense report -NewTrip=New expense report -LastExpenseReports=Latest %s expense reports -AllExpenseReports=All expense reports -CompanyVisited=Company/organization visited -FeesKilometersOrAmout=Amount or kilometers -DeleteTrip=Delete expense report -ConfirmDeleteTrip=Are you sure you want to delete this expense report? -ListTripsAndExpenses=List of expense reports -ListToApprove=Waiting for approval -ExpensesArea=Expense reports area -ClassifyRefunded=Classify 'Refunded' -ExpenseReportWaitingForApproval=A new expense report has been submitted for approval -ExpenseReportWaitingForApprovalMessage=A new expense report has been submitted and is waiting for approval.
    - User: %s
    - Period: %s
    Click here to validate: %s -ExpenseReportWaitingForReApproval=An expense report has been submitted for re-approval -ExpenseReportWaitingForReApprovalMessage=An expense report has been submitted and is waiting for re-approval.
    The %s, you refused to approve the expense report for this reason: %s.
    A new version has been proposed and waiting for your approval.
    - User: %s
    - Period: %s
    Click here to validate: %s -ExpenseReportApproved=An expense report was approved -ExpenseReportApprovedMessage=The expense report %s was approved.
    - User: %s
    - Approved by: %s
    Click here to show the expense report: %s -ExpenseReportRefused=An expense report was refused -ExpenseReportRefusedMessage=The expense report %s was refused.
    - User: %s
    - Refused by: %s
    - Motive for refusal: %s
    Click here to show the expense report: %s -ExpenseReportCanceled=An expense report was canceled -ExpenseReportCanceledMessage=The expense report %s was canceled.
    - User: %s
    - Canceled by: %s
    - Motive for cancellation: %s
    Click here to show the expense report: %s -ExpenseReportPaid=An expense report was paid -ExpenseReportPaidMessage=The expense report %s was paid.
    - User: %s
    - Paid by: %s
    Click here to show the expense report: %s -TripId=Id expense report -AnyOtherInThisListCanValidate=Person to be informed for validating the request. -TripSociete=Information company -TripNDF=Informations expense report -PDFStandardExpenseReports=Standard template to generate a PDF document for expense report -ExpenseReportLine=Expense report line -TF_OTHER=Other -TF_TRIP=Transportation -TF_LUNCH=Lunch -TF_METRO=Metro -TF_TRAIN=Train -TF_BUS=Bus -TF_CAR=Car -TF_PEAGE=Toll -TF_ESSENCE=Fuel -TF_HOTEL=Hotel -TF_TAXI=Taxi -EX_KME=Mileage costs -EX_FUE=Fuel CV -EX_HOT=Hotel -EX_PAR=Parking CV -EX_TOL=Toll CV -EX_TAX=Various Taxes -EX_IND=Indemnity transportation subscription -EX_SUM=Maintenance supply -EX_SUO=Office supplies -EX_CAR=Car rental -EX_DOC=Documentation -EX_CUR=Customers receiving -EX_OTR=Other receiving -EX_POS=Postage -EX_CAM=CV maintenance and repair -EX_EMM=Employees meal -EX_GUM=Guests meal -EX_BRE=Breakfast -EX_FUE_VP=Fuel PV -EX_TOL_VP=Toll PV -EX_PAR_VP=Parking PV -EX_CAM_VP=PV maintenance and repair -DefaultCategoryCar=Default transportation mode -DefaultRangeNumber=Default range number -UploadANewFileNow=Upload a new document now -Error_EXPENSEREPORT_ADDON_NotDefined=Error, the rule for expense report numbering ref was not defined into setup of module 'Expense Report' -ErrorDoubleDeclaration=You have declared another expense report into a similar date range. -AucuneLigne=There is no expense report declared yet -ModePaiement=Payment mode -VALIDATOR=User responsible for approval -VALIDOR=Approved by -AUTHOR=Recorded by -AUTHORPAIEMENT=Paid by -REFUSEUR=Denied by -CANCEL_USER=Deleted by -MOTIF_REFUS=Reason -MOTIF_CANCEL=Reason -DATE_REFUS=Deny date -DATE_SAVE=Validation date -DATE_CANCEL=Cancelation date -DATE_PAIEMENT=Payment date -ExpenseReportRef=Ref. expense report -ValidateAndSubmit=Validate and submit for approval -ValidatedWaitingApproval=Validated (waiting for approval) -NOT_AUTHOR=You are not the author of this expense report. Operation cancelled. -ConfirmRefuseTrip=Are you sure you want to deny this expense report? -ValideTrip=Approve expense report -ConfirmValideTrip=Are you sure you want to approve this expense report? -PaidTrip=Pay an expense report -ConfirmPaidTrip=Are you sure you want to change status of this expense report to "Paid"? -ConfirmCancelTrip=Are you sure you want to cancel this expense report? -BrouillonnerTrip=Move back expense report to status "Draft" -ConfirmBrouillonnerTrip=Are you sure you want to move this expense report to status "Draft"? -SaveTrip=Validate expense report -ConfirmSaveTrip=Are you sure you want to validate this expense report? -NoTripsToExportCSV=No expense report to export for this period. -ExpenseReportPayment=Expense report payment -ExpenseReportsToApprove=Expense reports to approve -ExpenseReportsToPay=Expense reports to pay -ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ? -ExpenseReportsIk=Configuration of mileage charges -ExpenseReportsRules=Expense report rules -ExpenseReportIkDesc=You can modify the calculation of kilometers expense by category and range who they are previously defined. d is the distance in kilometers -ExpenseReportRulesDesc=You can create or update any rules of calculation. This part will be used when user will create a new expense report -expenseReportOffset=Offset -expenseReportCoef=Coefficient -expenseReportTotalForFive=Example with d = 5 -expenseReportRangeFromTo=from %d to %d -expenseReportRangeMoreThan=more than %d -expenseReportCoefUndefined=(value not defined) -expenseReportCatDisabled=Category disabled - see the c_exp_tax_cat dictionary -expenseReportRangeDisabled=Range disabled - see the c_exp_tax_range dictionay -expenseReportPrintExample=offset + (d x coef) = %s -ExpenseReportApplyTo=Apply to -ExpenseReportDomain=Domain to apply -ExpenseReportLimitOn=Limit on -ExpenseReportDateStart=Date start -ExpenseReportDateEnd=Date end -ExpenseReportLimitAmount=Limite amount -ExpenseReportRestrictive=Restrictive -AllExpenseReport=All type of expense report -OnExpense=Expense line -ExpenseReportRuleSave=Expense report rule saved -ExpenseReportRuleErrorOnSave=Error: %s -RangeNum=Range %d -ExpenseReportConstraintViolationError=Constraint violation id [%s]: %s is superior to %s %s -byEX_DAY=by day (limitation to %s) -byEX_MON=by month (limitation to %s) -byEX_YEA=by year (limitation to %s) -byEX_EXP=by line (limitation to %s) -ExpenseReportConstraintViolationWarning=Constraint violation id [%s]: %s is superior to %s %s -nolimitbyEX_DAY=by day (no limitation) -nolimitbyEX_MON=by month (no limitation) -nolimitbyEX_YEA=by year (no limitation) -nolimitbyEX_EXP=by line (no limitation) -CarCategory=Vehicle category -ExpenseRangeOffset=Offset amount: %s -RangeIk=Mileage range -AttachTheNewLineToTheDocument=Attach the line to an uploaded document diff --git a/htdocs/langs/ar_IQ/users.lang b/htdocs/langs/ar_IQ/users.lang index 6aeaf128838..fd9215f98df 100644 --- a/htdocs/langs/ar_IQ/users.lang +++ b/htdocs/langs/ar_IQ/users.lang @@ -1,126 +1,3 @@ # Dolibarr language file - Source file is en_US - users -HRMArea=HRM area -UserCard=User card -GroupCard=Group card -Permission=Permission -Permissions=Permissions -EditPassword=Edit password -SendNewPassword=Regenerate and send password -SendNewPasswordLink=Send link to reset password -ReinitPassword=Regenerate password -PasswordChangedTo=Password changed to: %s -SubjectNewPassword=Your new password for %s -GroupRights=Group permissions -UserRights=User permissions -Credentials=Credentials -UserGUISetup=User Display Setup -DisableUser=Disable -DisableAUser=Disable a user -DeleteUser=Delete -DeleteAUser=Delete a user -EnableAUser=Enable a user -DeleteGroup=Delete -DeleteAGroup=Delete a group -ConfirmDisableUser=Are you sure you want to disable user %s? -ConfirmDeleteUser=Are you sure you want to delete user %s? -ConfirmDeleteGroup=Are you sure you want to delete group %s? -ConfirmEnableUser=Are you sure you want to enable user %s? -ConfirmReinitPassword=Are you sure you want to generate a new password for user %s? -ConfirmSendNewPassword=Are you sure you want to generate and send new password for user %s? -NewUser=New user -CreateUser=Create user -LoginNotDefined=Login is not defined. -NameNotDefined=Name is not defined. -ListOfUsers=List of users -SuperAdministrator=Super Administrator -SuperAdministratorDesc=Global administrator -AdministratorDesc=Administrator -DefaultRights=Default Permissions -DefaultRightsDesc=Define here the default permissions that are automatically granted to a new user (to modify permissions for existing users, go to the user card). -DolibarrUsers=Dolibarr users -LastName=Last name -FirstName=First name -ListOfGroups=List of groups -NewGroup=New group -CreateGroup=Create group -RemoveFromGroup=Remove from group -PasswordChangedAndSentTo=Password changed and sent to %s. -PasswordChangeRequest=Request to change password for %s -PasswordChangeRequestSent=Request to change password for %s sent to %s. -IfLoginExistPasswordRequestSent=If this login is a valid account, an email to reset password has been sent. -IfEmailExistPasswordRequestSent=If this email is a valid account, an email to reset password has been sent. -ConfirmPasswordReset=Confirm password reset -MenuUsersAndGroups=Users & Groups -LastGroupsCreated=Latest %s groups created -LastUsersCreated=Latest %s users created -ShowGroup=Show group -ShowUser=Show user -NonAffectedUsers=Non assigned users -UserModified=User modified successfully -PhotoFile=Photo file -ListOfUsersInGroup=List of users in this group -ListOfGroupsForUser=List of groups for this user -LinkToCompanyContact=Link to third party / contact -LinkedToDolibarrMember=Link to member LinkedToDolibarrUser=Link to Dolibarr user LinkedToDolibarrThirdParty=Link to Dolibarr third party -CreateDolibarrLogin=Create a user -CreateDolibarrThirdParty=Create a third party -LoginAccountDisableInDolibarr=Account disabled in Dolibarr. -UsePersonalValue=Use personal value -InternalUser=Internal user -ExportDataset_user_1=Users and their properties -DomainUser=Domain user %s -Reactivate=Reactivate -CreateInternalUserDesc=This form allows you to create an internal user in your company/organization. To create an external user (customer, vendor etc. ..), use the button 'Create Dolibarr User' from that third-party's contact card. -InternalExternalDesc=An internal user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).
    An external user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).

    In both cases, you must grant permissions on the features that the user need. -PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. -Inherited=Inherited -UserWillBe=Created user will be -UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) -UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) -IdPhoneCaller=Id phone caller -NewUserCreated=User %s created -NewUserPassword=Password change for %s -NewPasswordValidated=Your new password have been validated and must be used now to login. -EventUserModified=User %s modified -UserDisabled=User %s disabled -UserEnabled=User %s activated -UserDeleted=User %s removed -NewGroupCreated=Group %s created -GroupModified=Group %s modified -GroupDeleted=Group %s removed -ConfirmCreateContact=Are you sure you want to create a Dolibarr account for this contact? -ConfirmCreateLogin=Are you sure you want to create a Dolibarr account for this member? -ConfirmCreateThirdParty=Are you sure you want to create a third party for this member? -LoginToCreate=Login to create -NameToCreate=Name of third party to create -YourRole=Your roles -YourQuotaOfUsersIsReached=Your quota of active users is reached ! -NbOfUsers=Number of users -NbOfPermissions=Number of permissions -DontDowngradeSuperAdmin=Only a superadmin can downgrade a superadmin -HierarchicalResponsible=Supervisor -HierarchicView=Hierarchical view -UseTypeFieldToChange=Use field Type to change -OpenIDURL=OpenID URL -LoginUsingOpenID=Use OpenID to login -WeeklyHours=Hours worked (per week) -ExpectedWorkedHours=Expected hours worked per week -ColorUser=Color of the user -DisabledInMonoUserMode=Disabled in maintenance mode -UserAccountancyCode=User accounting code -UserLogoff=User logout -UserLogged=User logged -DateOfEmployment=Employment date -DateEmployment=Employment -DateEmploymentstart=Employment Start Date -DateEmploymentEnd=Employment End Date -RangeOfLoginValidity=Access validity date range -CantDisableYourself=You can't disable your own user record -ForceUserExpenseValidator=Force expense report validator -ForceUserHolidayValidator=Force leave request validator -ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. -UserPersonalEmail=Personal email -UserPersonalMobile=Personal mobile phone -WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/ar_IQ/website.lang b/htdocs/langs/ar_IQ/website.lang deleted file mode 100644 index dc2ec2c0b3d..00000000000 --- a/htdocs/langs/ar_IQ/website.lang +++ /dev/null @@ -1,147 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -Shortname=Code -WebsiteSetupDesc=Create here the websites you wish to use. Then go into menu Websites to edit them. -DeleteWebsite=Delete website -ConfirmDeleteWebsite=Are you sure you want to delete this web site? All its pages and content will also be removed. The files uploaded (like into the medias directory, the ECM module, ...) will remain. -WEBSITE_TYPE_CONTAINER=Type of page/container -WEBSITE_PAGE_EXAMPLE=Web page to use as example -WEBSITE_PAGENAME=Page name/alias -WEBSITE_ALIASALT=Alternative page names/aliases -WEBSITE_ALIASALTDesc=Use here list of other name/aliases so the page can also be accessed using this other names/aliases (for example the old name after renaming the alias to keep backlink on old link/name working). Syntax is:
    alternativename1, alternativename2, ... -WEBSITE_CSS_URL=URL of external CSS file -WEBSITE_CSS_INLINE=CSS file content (common to all pages) -WEBSITE_JS_INLINE=Javascript file content (common to all pages) -WEBSITE_HTML_HEADER=Addition at bottom of HTML Header (common to all pages) -WEBSITE_ROBOT=Robot file (robots.txt) -WEBSITE_HTACCESS=Website .htaccess file -WEBSITE_MANIFEST_JSON=Website manifest.json file -WEBSITE_README=README.md file -WEBSITE_KEYWORDSDesc=Use a comma to separate values -EnterHereLicenseInformation=Enter here meta data or license information to fille a README.md file. if you distribute your website as a template, the file will be included into the temptate package. -HtmlHeaderPage=HTML header (specific to this page only) -PageNameAliasHelp=Name or alias of the page.
    This alias is also used to forge a SEO URL when website is ran from a Virtual host of a Web server (like Apacke, Nginx, ...). Use the button "%s" to edit this alias. -EditTheWebSiteForACommonHeader=Note: If you want to define a personalized header for all pages, edit the header on the site level instead of on the page/container. -MediaFiles=Media library -EditCss=Edit website properties -EditMenu=Edit menu -EditMedias=Edit medias -EditPageMeta=Edit page/container properties -EditInLine=Edit inline -AddWebsite=Add website -Webpage=Web page/container -AddPage=Add page/container -PageContainer=Page -PreviewOfSiteNotYetAvailable=The preview of your website %s is not yet available. You must first 'Import a full website template' or just 'Add a page/container'. -RequestedPageHasNoContentYet=Requested page with id %s has no content yet, or cache file .tpl.php was removed. Edit content of the page to solve this. -SiteDeleted=Web site '%s' deleted -PageContent=Page/Contenair -PageDeleted=Page/Contenair '%s' of website %s deleted -PageAdded=Page/Contenair '%s' added -ViewSiteInNewTab=View site in new tab -ViewPageInNewTab=View page in new tab -SetAsHomePage=Set as Home page -RealURL=Real URL -ViewWebsiteInProduction=View web site using home URLs -SetHereVirtualHost=Use with Apache/NGinx/...
    Create on your web server (Apache, Nginx, ...) a dedicated Virtual Host with PHP enabled and a Root directory on
    %s -ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: -YouCanAlsoTestWithPHPS=Use with PHP embedded server
    On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running
    php -S 0.0.0.0:8080 -t %s -YouCanAlsoDeployToAnotherWHP=Run your web site with another Dolibarr Hosting provider
    If you don't have a web server like Apache or NGinx available on internet, you can export and import your web site onto another Dolibarr instance provided by another Dolibarr hosting provider that provide full integration with the Website module. You can find a list of some Dolibarr hosting providers on https://saas.dolibarr.org -CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has %s permissions on files into
    %s -ReadPerm=Read -WritePerm=Write -TestDeployOnWeb=Test/deploy on web -PreviewSiteServedByWebServer=Preview %s in a new tab.

    The %s will be served by an external web server (like Apache, Nginx, IIS). You must install and setup this server before to point to directory:
    %s
    URL served by external server:
    %s -PreviewSiteServedByDolibarr=Preview %s in a new tab.

    The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.
    The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.
    URL served by Dolibarr:
    %s

    To use your own external web server to serve this web site, create a virtual host on your web server that points on directory
    %s
    then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". -VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined -NoPageYet=No pages yet -YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template -SyntaxHelp=Help on specific syntax tips -YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" button in editor. -YouCanEditHtmlSource=
    You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.

    You can also include content of another Page/Container with the following syntax:
    <?php includeContainer('alias_of_container_to_include'); ?>

    You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
    <?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

    To add a link to another page, use the syntax:
    <a href="alias_of_page_to_link_to.php">mylink<a>

    To include a link to download a file stored into the documents directory, use the document.php wrapper:
    Example, for a file into documents/ecm (need to be logged), syntax is:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    For a file into documents/medias (open directory for public access), syntax is:
    <a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
    For a file shared with a share link (open access using the sharing hash key of file), syntax is:
    <a href="/document.php?hashp=publicsharekeyoffile">

    To include an image stored into the documents directory, use the viewimage.php wrapper:
    Example, for an image into documents/medias (open directory for public access), syntax is:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
    -#YouCanEditHtmlSource2=
    To include a image shared publicaly, use the viewimage.php wrapper:
    Example with a shared key 123456789, syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSource2=For an image shared with a share link (open access using the sharing hash key of file), syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSourceMore=
    More examples of HTML or dynamic code available on the wiki documentation
    . -ClonePage=Clone page/container -CloneSite=Clone site -SiteAdded=Website added -ConfirmClonePage=Please enter code/alias of new page and if it is a translation of the cloned page. -PageIsANewTranslation=The new page is a translation of the current page ? -LanguageMustNotBeSameThanClonedPage=You clone a page as a translation. The language of the new page must be different than language of source page. -ParentPageId=Parent page ID -WebsiteId=Website ID -CreateByFetchingExternalPage=Create page/container by fetching page from external URL... -OrEnterPageInfoManually=Or create page from scratch or from a page template... -FetchAndCreate=Fetch and Create -ExportSite=Export website -ImportSite=Import website template -IDOfPage=Id of page -Banner=Banner -BlogPost=Blog post -WebsiteAccount=Website account -WebsiteAccounts=Website accounts -AddWebsiteAccount=Create web site account -BackToListForThirdParty=Back to list for the third-party -DisableSiteFirst=Disable website first -MyContainerTitle=My web site title -AnotherContainer=This is how to include content of another page/container (you may have an error here if you enable dynamic code because the embedded subcontainer may not exists) -SorryWebsiteIsCurrentlyOffLine=Sorry, this website is currently off line. Please comme back later... -WEBSITE_USE_WEBSITE_ACCOUNTS=Enable the web site account table -WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Enable the table to store web site accounts (login/pass) for each website / third party -YouMustDefineTheHomePage=You must first define the default Home page -OnlyEditionOfSourceForGrabbedContentFuture=Warning: Creating a web page by importing an external web page is reserved for experienced users. Depending on the complexity of source page, the result of importation may differ from the original. Also if the source page uses common CSS styles or conflicting javascript, it may break the look or features of the Website editor when working on this page. This method is a quicker way to create a page but it is recommended to create your new page from scratch or from a suggested page template.
    Note also that the inline editor may not works correclty when used on a grabbed external page. -OnlyEditionOfSourceForGrabbedContent=Only edition of HTML source is possible when content was grabbed from an external site -GrabImagesInto=Grab also images found into css and page. -ImagesShouldBeSavedInto=Images should be saved into directory -WebsiteRootOfImages=Root directory for website images -SubdirOfPage=Sub-directory dedicated to page -AliasPageAlreadyExists=Alias page %s already exists -CorporateHomePage=Corporate Home page -EmptyPage=Empty page -ExternalURLMustStartWithHttp=External URL must start with http:// or https:// -ZipOfWebsitePackageToImport=Upload the Zip file of the website template package -ZipOfWebsitePackageToLoad=or Choose an available embedded website template package -ShowSubcontainers=Show dynamic content -InternalURLOfPage=Internal URL of page -ThisPageIsTranslationOf=This page/container is a translation of -ThisPageHasTranslationPages=This page/container has translation -NoWebSiteCreateOneFirst=No website has been created yet. Create one first. -GoTo=Go to -DynamicPHPCodeContainsAForbiddenInstruction=You add dynamic PHP code that contains the PHP instruction '%s' that is forbidden by default as dynamic content (see hidden options WEBSITE_PHP_ALLOW_xxx to increase list of allowed commands). -NotAllowedToAddDynamicContent=You don't have permission to add or edit PHP dynamic content in websites. Ask permission or just keep code into php tags unmodified. -ReplaceWebsiteContent=Search or Replace website content -DeleteAlsoJs=Delete also all javascript files specific to this website? -DeleteAlsoMedias=Delete also all medias files specific to this website? -MyWebsitePages=My website pages -SearchReplaceInto=Search | Replace into -ReplaceString=New string -CSSContentTooltipHelp=Enter here CSS content. To avoid any conflict with the CSS of the application, be sure to prepend all declaration with the .bodywebsite class. For example:

    #mycssselector, input.myclass:hover { ... }
    must be
    .bodywebsite #mycssselector, .bodywebsite input.myclass:hover { ... }

    Note: If you have a large file without this prefix, you can use 'lessc' to convert it to append the .bodywebsite prefix everywhere. -LinkAndScriptsHereAreNotLoadedInEditor=Warning: This content is output only when site is accessed from a server. It is not used in Edit mode so if you need to load javascript files also in edit mode, just add your tag 'script src=...' into the page. -Dynamiccontent=Sample of a page with dynamic content -ImportSite=Import website template -EditInLineOnOff=Mode 'Edit inline' is %s -ShowSubContainersOnOff=Mode to execute 'dynamic content' is %s -GlobalCSSorJS=Global CSS/JS/Header file of web site -BackToHomePage=Back to home page... -TranslationLinks=Translation links -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) -UseTextBetween5And70Chars=For good SEO practices, use a text between 5 and 70 characters -MainLanguage=Main language -OtherLanguages=Other languages -UseManifest=Provide a manifest.json file -PublicAuthorAlias=Public author alias -AvailableLanguagesAreDefinedIntoWebsiteProperties=Available languages are defined into website properties -ReplacementDoneInXPages=Replacement done in %s pages or containers -RSSFeed=RSS Feed -RSSFeedDesc=You can get a RSS feed of latest articles with type 'blogpost' using this URL -PagesRegenerated=%s page(s)/container(s) regenerated -RegenerateWebsiteContent=Regenerate web site cache files -AllowedInFrames=Allowed in Frames -DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. -GenerateSitemaps=Generate website sitemap file -ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... -ConfirmSitemapsCreation=Confirm sitemap generation -SitemapGenerated=Sitemap file %s generated -ImportFavicon=Favicon -ErrorFaviconType=Favicon must be png -ErrorFaviconSize=Favicon must be sized 16x16, 32x32 or 64x64 -FaviconTooltip=Upload an image which needs to be a png (16x16, 32x32 or 64x64) diff --git a/htdocs/langs/ar_IQ/withdrawals.lang b/htdocs/langs/ar_IQ/withdrawals.lang deleted file mode 100644 index a3773a427a1..00000000000 --- a/htdocs/langs/ar_IQ/withdrawals.lang +++ /dev/null @@ -1,152 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -CustomersStandingOrdersArea=Payments by Direct debit orders -SuppliersStandingOrdersArea=Payments by Credit transfer -StandingOrdersPayment=Direct debit payment orders -StandingOrderPayment=Direct debit payment order -NewStandingOrder=New direct debit order -NewPaymentByBankTransfer=New payment by credit transfer -StandingOrderToProcess=To process -PaymentByBankTransferReceipts=Credit transfer orders -PaymentByBankTransferLines=Credit transfer order lines -WithdrawalsReceipts=Direct debit orders -WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer orders -BankTransferReceipt=Credit transfer order -LatestBankTransferReceipts=Latest %s credit transfer orders -LastWithdrawalReceipts=Latest %s direct debit files -WithdrawalsLine=Direct debit order line -CreditTransferLine=Credit transfer line -WithdrawalsLines=Direct debit order lines -CreditTransferLines=Credit transfer lines -RequestStandingOrderToTreat=Requests for direct debit payment order to process -RequestStandingOrderTreated=Requests for direct debit payment order processed -RequestPaymentsByBankTransferToTreat=Requests for credit transfer to process -RequestPaymentsByBankTransferTreated=Requests for credit transfer processed -NotPossibleForThisStatusOfWithdrawReceiptORLine=Not yet possible. Withdraw status must be set to 'credited' before declaring reject on specific lines. -NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order -NbOfInvoiceToWithdrawWithInfo=No. of customer invoice with direct debit payment orders having defined bank account information -NbOfInvoiceToPayByBankTransfer=No. of qualified supplier invoices waiting for a payment by credit transfer -SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer -InvoiceWaitingWithdraw=Invoice waiting for direct debit -InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer -AmountToWithdraw=Amount to withdraw -NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. -NoSupplierInvoiceToWithdraw=No supplier invoice with open 'Direct credit requests' is waiting. Go on tab '%s' on invoice card to make a request. -ResponsibleUser=User Responsible -WithdrawalsSetup=Direct debit payment setup -CreditTransferSetup=Credit transfer setup -WithdrawStatistics=Direct debit payment statistics -CreditTransferStatistics=Credit transfer statistics -Rejects=Rejects -LastWithdrawalReceipt=Latest %s direct debit receipts -MakeWithdrawRequest=Make a direct debit payment request -MakeBankTransferOrder=Make a credit transfer request -WithdrawRequestsDone=%s direct debit payment requests recorded -BankTransferRequestsDone=%s credit transfer requests recorded -ThirdPartyBankCode=Third-party bank code -NoInvoiceCouldBeWithdrawed=No invoice debited successfully. Check that invoices are on companies with a valid IBAN and that IBAN has a UMR (Unique Mandate Reference) with mode %s. -WithdrawalCantBeCreditedTwice=This withdrawal receipt is already marked as credited; this can't be done twice, as this would potentially create duplicate payments and bank entries. -ClassCredited=Classify credited -ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account? -TransData=Transmission date -TransMetod=Transmission method -Send=Send -Lines=Lines -StandingOrderReject=Issue a rejection -WithdrawsRefused=Direct debit refused -WithdrawalRefused=Withdrawal refused -CreditTransfersRefused=Credit transfers refused -WithdrawalRefusedConfirm=Are you sure you want to enter a withdrawal rejection for society -RefusedData=Date of rejection -RefusedReason=Reason for rejection -RefusedInvoicing=Billing the rejection -NoInvoiceRefused=Do not charge the rejection -InvoiceRefused=Invoice refused (Charge the rejection to customer) -StatusDebitCredit=Status debit/credit -StatusWaiting=Waiting -StatusTrans=Sent -StatusDebited=Debited -StatusCredited=Credited -StatusPaid=Paid -StatusRefused=Refused -StatusMotif0=Unspecified -StatusMotif1=Insufficient funds -StatusMotif2=Request contested -StatusMotif3=No direct debit payment order -StatusMotif4=Sales Order -StatusMotif5=RIB unusable -StatusMotif6=Account without balance -StatusMotif7=Judicial Decision -StatusMotif8=Other reason -CreateForSepaFRST=Create direct debit file (SEPA FRST) -CreateForSepaRCUR=Create direct debit file (SEPA RCUR) -CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create file for credit transfer -CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) -CreateGuichet=Only office -CreateBanque=Only bank -OrderWaiting=Waiting for treatment -NotifyTransmision=Record file transmission of order -NotifyCredit=Record credit of order -NumeroNationalEmetter=National Transmitter Number -WithBankUsingRIB=For bank accounts using RIB -WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT -BankToReceiveWithdraw=Receiving Bank Account -BankToPayCreditTransfer=Bank Account used as source of payments -CreditDate=Credit on -WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) -ShowWithdraw=Show Direct Debit Order -IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Debit order file -CreditTransferFile=Credit transfer file -SetToStatusSent=Set to status "File Sent" -ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null -StatisticsByLineStatus=Statistics by status of lines -RUM=UMR -DateRUM=Mandate signature date -RUMLong=Unique Mandate Reference -RUMWillBeGenerated=If empty, a UMR (Unique Mandate Reference) will be generated once the bank account information is saved. -WithdrawMode=Direct debit mode (FRST or RECUR) -WithdrawRequestAmount=Amount of Direct debit request: -BankTransferAmount=Amount of Credit Transfer request: -WithdrawRequestErrorNilAmount=Unable to create direct debit request for empty amount. -SepaMandate=SEPA Direct Debit Mandate -SepaMandateShort=SEPA Mandate -PleaseReturnMandate=Please return this mandate form by email to %s or by mail to -SEPALegalText=By signing this mandate form, you authorize (A) %s to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from %s. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited. Your rights regarding the above mandate are explained in a statement that you can obtain from your bank. -CreditorIdentifier=Creditor Identifier -CreditorName=Creditor Name -SEPAFillForm=(B) Please complete all the fields marked * -SEPAFormYourName=Your name -SEPAFormYourBAN=Your Bank Account Name (IBAN) -SEPAFormYourBIC=Your Bank Identifier Code (BIC) -SEPAFrstOrRecur=Type of payment -ModeRECUR=Recurring payment -ModeFRST=One-off payment -PleaseCheckOne=Please check one only -CreditTransferOrderCreated=Credit transfer order %s created -DirectDebitOrderCreated=Direct debit order %s created -AmountRequested=Amount requested -SEPARCUR=SEPA CUR -SEPAFRST=SEPA FRST -ExecutionDate=Execution date -CreateForSepa=Create direct debit file -ICS=Creditor Identifier - ICS -END_TO_END="EndToEndId" SEPA XML tag - Unique id assigned per transaction -USTRD="Unstructured" SEPA XML tag -ADDDAYS=Add days to Execution Date -NoDefaultIBANFound=No default IBAN found for this third party -### Notifications -InfoCreditSubject=Payment of direct debit payment order %s by the bank -InfoCreditMessage=The direct debit payment order %s has been paid by the bank
    Data of payment: %s -InfoTransSubject=Transmission of direct debit payment order %s to bank -InfoTransMessage=The direct debit payment order %s has been sent to bank by %s %s.

    -InfoTransData=Amount: %s
    Method: %s
    Date: %s -InfoRejectSubject=Direct debit payment order refused -InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s -ModeWarning=Option for real mode was not set, we stop after this simulation -ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. -ErrorICSmissing=Missing ICS in Bank account %s -TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/ar_IQ/workflow.lang b/htdocs/langs/ar_IQ/workflow.lang deleted file mode 100644 index adfe7f69609..00000000000 --- a/htdocs/langs/ar_IQ/workflow.lang +++ /dev/null @@ -1,26 +0,0 @@ -# Dolibarr language file - Source file is en_US - workflow -WorkflowSetup=Workflow module setup -WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. -ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. -# Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) -descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) -# Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED=Classify linked source sales order as shipped when a shipment is closed (and if the quantity shipped by all shipments is the same as in the order to update) -# Autoclassify purchase order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated -# Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed -AutomaticCreation=Automatic creation -AutomaticClassification=Automatic classification -# Autoclassify shipment -descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/ar_IQ/zapier.lang b/htdocs/langs/ar_IQ/zapier.lang deleted file mode 100644 index b4cc4ccba4a..00000000000 --- a/htdocs/langs/ar_IQ/zapier.lang +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2019 Frédéric FRANCE -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -ModuleZapierForDolibarrName = Zapier for Dolibarr -ModuleZapierForDolibarrDesc = Zapier for Dolibarr module -ZapierForDolibarrSetup=Setup of Zapier for Dolibarr -ZapierDescription=Interface with Zapier -ZapierAbout=About the module Zapier -ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on this wiki page. diff --git a/htdocs/langs/de_AT/admin.lang b/htdocs/langs/de_AT/admin.lang index 4d4d8fa6c0e..47bcbdba9a3 100644 --- a/htdocs/langs/de_AT/admin.lang +++ b/htdocs/langs/de_AT/admin.lang @@ -44,7 +44,6 @@ DetailPosition=Nummer sortieren, um die Menüposition zu definieren NotConfigured=Modul / Anwendung nicht konfiguriert OtherOptions=Andere Optionen OtherSetup=Andere Einstellungen -ClientTZ=Client-Zeitzone (Benutzer) ClientHour=Client-Zeit (Benutzer) DaylingSavingTime=Sommerzeit Language_en_US_es_MX_etc=Sprache (de_AT, en_UK, ...) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index def603e653e..d9099f567fa 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -279,6 +279,7 @@ SpaceX=Space X SpaceY=Space Y FontSize=Font size Content=Content +ContentForLines=Content to display for each product or service (from variable __LINES__ of Content) NoticePeriod=Notice period NewByMonth=New by month Emails=Emails @@ -499,7 +500,7 @@ WarningPHPMailB=- Some Email Service Providers (like Yahoo) do not allow you to WarningPHPMailC=- Using the SMTP server of your own Email Service Provider to send emails is also interesting so all emails sent from application will also be saved into your "Sent" directory of your mailbox. WarningPHPMailD=Also, it is therefore recommended to change the sending method of e-mails to the value "SMTP". If you really want to keep the default "PHP" method to send emails, just ignore this warning, or remove it by setting the MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP constant to 1 in Home - Setup - Other. WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (very rare), this is the IP address of the mail user agent (MUA) for your ERP CRM application: %s. -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask you domain name registar), you must add the following IPs in the SPF record of the DNS of your domain: %s. +WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs in the SPF record of the DNS of your domain: %s. ClickToShowDescription=Click to show description DependsOn=This module needs the module(s) RequiredBy=This module is required by module(s) @@ -1698,6 +1699,8 @@ MailingDelay=Seconds to wait after sending next message NotificationSetup=Email Notification module setup NotificationEMailFrom=Sender email (From) for emails sent by the Notifications module FixedEmailTarget=Recipient +NotificationDisableConfirmMessageFix=Disable notification info in confirm message for fix notification +NotificationDisableConfirmMessageUser=Disable notification info in confirm message for user notification ##### Sendings ##### SendingsSetup=Shipping module setup SendingsReceiptModel=Sending receipt model @@ -2004,7 +2007,8 @@ MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF -MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal line +MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add column for picture on proposal lines +MAIN_DOCUMENTS_WITH_PICTURE_WIDTH=Width of the column if a picture is added on lines MAIN_PDF_NO_SENDER_FRAME=Hide borders on sender address frame MAIN_PDF_NO_RECIPENT_FRAME=Hide borders on recipent address frame MAIN_PDF_HIDE_CUSTOMER_CODE=Hide customer code @@ -2128,6 +2132,7 @@ EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax PDF_SHOW_PROJECT=Show project on document ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF. +PDF_USE_A=Gererate PDF documents with format PDF/A instead of defaut format PDF FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book. RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard JumpToBoxes=Jump to Setup -> Widgets @@ -2194,3 +2199,4 @@ LanguageAndPresentation=Language and presentation SkinAndColors=Skin and colors IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sales tax IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sales tax +PDF_USE_1A=Generate PDF with PDF/A-1b format diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index a0b7942d446..6c770163f29 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -182,3 +182,4 @@ BankColorizeMovementName2=Background color for credit movement IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. +AlreadyOneBankAccount=Already one bank account defined diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index d2715e59459..933d23b9e5c 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -192,6 +192,7 @@ ConfirmClassifyPaidPartiallyReasonDiscount=Remaining unpaid (%s %s) is a ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I accept to lose the VAT on this discount. ConfirmClassifyPaidPartiallyReasonDiscountVat=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I recover the VAT on this discount without a credit note. ConfirmClassifyPaidPartiallyReasonBadCustomer=Bad customer +ConfirmClassifyPaidPartiallyReasonBankCharge=Deduction by bank (intermediary bank fees) ConfirmClassifyPaidPartiallyReasonProductReturned=Products partially returned ConfirmClassifyPaidPartiallyReasonOther=Amount abandoned for other reason ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=This choice is possible if your invoice has been provided with suitable comments. (Example «Only the tax corresponding to the price that has been actually paid gives rights to deduction») @@ -199,6 +200,7 @@ ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=In some countries, this choice ConfirmClassifyPaidPartiallyReasonAvoirDesc=Use this choice if all other does not suit ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=A bad customer is a customer that refuses to pay his debt. ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=This choice is used when payment is not complete because some of products were returned +ConfirmClassifyPaidPartiallyReasonBankChargeDesc=The unpaid amount is intermediary bank fees, deducted directly from the correct amount paid by the Customer. ConfirmClassifyPaidPartiallyReasonOtherDesc=Use this choice if all others are not suitable, for example in following situation:
    - payment not complete because some products were shipped back
    - amount claimed too important because a discount was forgotten
    In all cases, amount over-claimed must be corrected in accountancy system by creating a credit note. ConfirmClassifyAbandonReasonOther=Other ConfirmClassifyAbandonReasonOtherDesc=This choice will be used in all other cases. For example because you plan to create a replacing invoice. @@ -249,6 +251,7 @@ EscompteOffered=Discount offered (payment before term) EscompteOfferedShort=Discount SendBillRef=Submission of invoice %s SendReminderBillRef=Submission of invoice %s (reminder) +SendPaymentReceipt=Submission of payment receipt %s NoDraftBills=No draft invoices NoOtherDraftBills=No other draft invoices NoDraftInvoices=No draft invoices diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 8c91d842485..88415022bde 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -162,4 +162,5 @@ RegistrationAndPaymentWereAlreadyRecorder=A registration and a payment were alre EmailAttendee=Attendee email EmailCompanyForInvoice=Company email (for invoice, if different of attendee email) ErrorSeveralCompaniesWithEmailContactUs=Several companies with this email has been found so we can't validate automaticaly your registration. Please contact us at %s for a manual validation -ErrorSeveralCompaniesWithNameContactUs=Several companies with this name has been found so we can't validate automaticaly your registration. Please contact us at %s for a manual validation \ No newline at end of file +ErrorSeveralCompaniesWithNameContactUs=Several companies with this name has been found so we can't validate automaticaly your registration. Please contact us at %s for a manual validation +NoPublicActionsAllowedForThisEvent=No public actions are open to public for this event \ No newline at end of file diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang index d486fef0f5c..91811ebf667 100644 --- a/htdocs/langs/en_US/languages.lang +++ b/htdocs/langs/en_US/languages.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - languages Language_am_ET=Ethiopian Language_ar_AR=Arabic +Language_ar_DZ=Arabic (Algeria) Language_ar_EG=Arabic (Egypt) Language_ar_MA=Arabic (Moroco) Language_ar_SA=Arabic diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 033f86b63aa..22fe0696363 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -60,6 +60,7 @@ EMailTestSubstitutionReplacedByGenericValues=When using test mode, substitutions MailingAddFile=Attach this file NoAttachedFiles=No attached files BadEMail=Bad value for Email +EMailNotDefined=Email not defined ConfirmCloneEMailing=Are you sure you want to clone this emailing? CloneContent=Clone message CloneReceivers=Cloner recipients diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 6004482cb29..492a20bae77 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1157,4 +1157,5 @@ RecordsApproved=%s Record(s) approved Properties=Properties hasBeenValidated=%s has been validated ClientTZ=Client Time Zone (user) -NotClosedYet=Not yet closed \ No newline at end of file +NotClosedYet=Not yet closed +ClearSignature=Signature reset \ No newline at end of file diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 10e81316ee4..3f1aac53340 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -104,4 +104,6 @@ HumanMachine=Human / Machine WorkstationArea=Workstation area Machines=Machines THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item +BOM=Bill Of Materials +CollapseBOMHelp=You can define the default display of the details of the nomenclature in the configuration of the BOM module MOAndLines=Manufacturing Orders and lines diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index ea280968ef4..9bc68dc3678 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -35,6 +35,9 @@ OnlyOneFieldForXAxisIsPossible=Only 1 field is currently possible as X-Axis. Onl AtLeastOneMeasureIsRequired=At least 1 field for measure is required AtLeastOneXAxisIsRequired=At least 1 field for X-Axis is required LatestBlogPosts=Latest Blog Posts +notiftouser=To users +notiftofixedemail=To fixed mail +notiftouserandtofixedemail=To user and fixed mail Notify_ORDER_VALIDATE=Sales order validated Notify_ORDER_SENTBYMAIL=Sales order sent by mail Notify_ORDER_SUPPLIER_SENTBYMAIL=Purchase order sent by email diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 19349fb35a8..205a28980a8 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -316,7 +316,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Include products/services with tag +IncludingProductWithTag=Including products/services with the tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 6531a74840d..0b713a2197b 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -283,3 +283,4 @@ PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. SelectLinesOfTimeSpentToInvoice=Select lines of time spent that are unbilled, then bulk action "Generate Invoice" to bill them ProjectTasksWithoutTimeSpent=Project tasks without time spent +FormForNewLeadDesc=Thanks to fill the following form to contact us. You can also send us an email directly to %s. \ No newline at end of file diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index edbc08236d3..7141c1d38ae 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -89,4 +89,11 @@ IdProposal=Proposal ID IdProduct=Product ID PrParentLine=Proposal Parent Line LineBuyPriceHT=Buy Price Amount net of tax for line - +SignPropal=Sign proposal +RefusePropal=Refuse proposal +Sign=Sign +PropalAlreadyRefused=Proposal already refused +PropalAlreadySigned=Proposal already signed +PropalSigned=Proposal signed +PropalRefused=Proposal refused +ConfirmRefusePropal=Are you sure you want to refuse this commercial proposal? diff --git a/htdocs/langs/en_US/trips.lang b/htdocs/langs/en_US/trips.lang index c9a6c792077..9210ede360c 100644 --- a/htdocs/langs/en_US/trips.lang +++ b/htdocs/langs/en_US/trips.lang @@ -112,7 +112,7 @@ ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ? ExpenseReportsIk=Configuration of mileage charges ExpenseReportsRules=Expense report rules ExpenseReportIkDesc=You can modify the calculation of kilometers expense by category and range who they are previously defined. d is the distance in kilometers -ExpenseReportRulesDesc=You can create or update any rules of calculation. This part will be used when user will create a new expense report +ExpenseReportRulesDesc=You can define max amount rules for expense reports. These rules will be applied when a new expense is added to an expense report expenseReportOffset=Offset expenseReportCoef=Coefficient expenseReportTotalForFive=Example with d = 5 @@ -127,19 +127,19 @@ ExpenseReportDomain=Domain to apply ExpenseReportLimitOn=Limit on ExpenseReportDateStart=Date start ExpenseReportDateEnd=Date end -ExpenseReportLimitAmount=Limite amount -ExpenseReportRestrictive=Restrictive +ExpenseReportLimitAmount=Max amount +ExpenseReportRestrictive=Exceeding forbidden AllExpenseReport=All type of expense report OnExpense=Expense line ExpenseReportRuleSave=Expense report rule saved ExpenseReportRuleErrorOnSave=Error: %s RangeNum=Range %d -ExpenseReportConstraintViolationError=Constraint violation id [%s]: %s is superior to %s %s +ExpenseReportConstraintViolationError=Max amount exceeded (rule %s): %s is higher than %s (Exceeding forbidden) byEX_DAY=by day (limitation to %s) byEX_MON=by month (limitation to %s) byEX_YEA=by year (limitation to %s) byEX_EXP=by line (limitation to %s) -ExpenseReportConstraintViolationWarning=Constraint violation id [%s]: %s is superior to %s %s +ExpenseReportConstraintViolationWarning=Max amount exceeded (rule %s): %s is higher than %s (Exceeding authorized) nolimitbyEX_DAY=by day (no limitation) nolimitbyEX_MON=by month (no limitation) nolimitbyEX_YEA=by year (no limitation) diff --git a/htdocs/langs/es_AR/admin.lang b/htdocs/langs/es_AR/admin.lang index b210f358131..f9e77952b89 100644 --- a/htdocs/langs/es_AR/admin.lang +++ b/htdocs/langs/es_AR/admin.lang @@ -91,7 +91,6 @@ Destination=Destino IdModule=ID de módulo IdPermissions=ID de permisos LanguageBrowserParameter=Parámetro %s -ClientTZ=Zona horaria del cliente (usuario) ClientHour=Tiempo del cliente (usuario) OSTZ=Zona horaria del SO del servidor PHPTZ=Zona horaria del servidor PHP diff --git a/htdocs/langs/es_CL/admin.lang b/htdocs/langs/es_CL/admin.lang index be394b057d4..138d8a4b455 100644 --- a/htdocs/langs/es_CL/admin.lang +++ b/htdocs/langs/es_CL/admin.lang @@ -95,7 +95,6 @@ Destination=Destino IdModule=ID del módulo IdPermissions=ID de permisos LanguageBrowserParameter=Parámetro %s -ClientTZ=Zona horaria del cliente (usuario) ClientHour=Hora del cliente (usuario) OSTZ=Zona horaria del servidor OS PHPTZ=Servidor PHP Zona horaria diff --git a/htdocs/langs/es_CO/admin.lang b/htdocs/langs/es_CO/admin.lang index e6e2e7de2cd..84170023e1e 100644 --- a/htdocs/langs/es_CO/admin.lang +++ b/htdocs/langs/es_CO/admin.lang @@ -100,7 +100,6 @@ Destination=Destino IdModule=ID de módulo IdPermissions=ID de permisos LanguageBrowserParameter=Parámetro %s -ClientTZ=Zona Horaria del Cliente (usuario) ClientHour=Hora del Cliente (usuario) OSTZ=Zona Horaria del SO del Servidor PHPTZ=Zona Hora del servidor PHP diff --git a/htdocs/langs/es_EC/admin.lang b/htdocs/langs/es_EC/admin.lang index 1f7f805b2ab..1a42f9095b6 100644 --- a/htdocs/langs/es_EC/admin.lang +++ b/htdocs/langs/es_EC/admin.lang @@ -90,7 +90,6 @@ Destination=Destino IdModule=Módulo de Identificación IdPermissions=ID de permisos LanguageBrowserParameter=Parámetros %s -ClientTZ=Zona horaria del cliente ClientHour=Hora del cliente OSTZ=Zona horaria del servidor PHPTZ=Zona horaria del servidor PHP diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 9298219c73f..016b303e18b 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -280,6 +280,7 @@ SpaceX=Área X SpaceY=Área Y FontSize=Tamaño de fuente Content=Contenido +ContentForLines=Contenido a mostrar por cada línea de producto o servicio (de la variable __LINES__ definida en Contenido) NoticePeriod=Plazo de aviso NewByMonth=Nuevo por mes Emails=E-Mails diff --git a/htdocs/langs/es_ES/bills.lang b/htdocs/langs/es_ES/bills.lang index a2b687a3b3a..dc312787fb3 100644 --- a/htdocs/langs/es_ES/bills.lang +++ b/htdocs/langs/es_ES/bills.lang @@ -244,6 +244,7 @@ EscompteOffered=Descuento (Pronto pago) EscompteOfferedShort=Descuento SendBillRef=Envío de la factura %s SendReminderBillRef=Envío de la factura %s (recordatorio) +SendPaymentReceipt=Envío del recibo de pago %s NoDraftBills=Ninguna factura borrador NoOtherDraftBills=Ninguna otra factura borrador NoDraftInvoices=Sin facturas borrador diff --git a/htdocs/langs/es_MX/admin.lang b/htdocs/langs/es_MX/admin.lang index 46c04d6b049..61a78207c66 100644 --- a/htdocs/langs/es_MX/admin.lang +++ b/htdocs/langs/es_MX/admin.lang @@ -86,7 +86,6 @@ IdModule=ID del módulo IdPermissions=ID de permisos LanguageBrowserParameter=Parámetro %s LocalisationDolibarrParameters=Parametros de localización -ClientTZ=Zona Horaria cliente (usuario) OSTZ=Servidor OS Zona Horaria PHPTZ=Servidor PHP Zona Horaria DaylingSavingTime=Hora de verano diff --git a/htdocs/langs/es_MX/eventorganization.lang b/htdocs/langs/es_MX/eventorganization.lang index bcb01e7daa4..49279d946ab 100644 --- a/htdocs/langs/es_MX/eventorganization.lang +++ b/htdocs/langs/es_MX/eventorganization.lang @@ -3,7 +3,6 @@ ModuleEventOrganizationName =Organización de Eventos EventOrganizationDescription =Organización de Eventos a través el Módulo de Proyectos EventOrganizationDescriptionLong=Administrar organización de evento para conferencias, participantes, presentador, y participantes, con página de suscripción pública EventOrganizationConferenceOrBoothMenuLeft =Conferencia o Puesto -EventOrganizationSetup =Configuración de Organización de Evento EventOrganizationSetupPage =Página de organización de evento EVENTORGANIZATION_TASK_LABEL =Etiqueta de tareas para crear automáticamente cuando el proyecto sea validado EVENTORGANIZATION_TASK_LABELTooltip =Cuando validas un evento organizado, algunas tareas pueden ser creadas automáticamente en el proyecto

    Por ejemplo:
    diff --git a/htdocs/langs/fr_FR/accountancy.lang b/htdocs/langs/fr_FR/accountancy.lang index 069e7bba7a9..a92660eb872 100644 --- a/htdocs/langs/fr_FR/accountancy.lang +++ b/htdocs/langs/fr_FR/accountancy.lang @@ -37,8 +37,8 @@ OtherInfo=Autre information DeleteCptCategory=Supprimer le code comptable du groupe ConfirmDeleteCptCategory=Êtes-vous sur de vouloir supprimer ce compte comptable du groupe comptable ? JournalizationInLedgerStatus=Statut de journalisation -AlreadyInGeneralLedger=Déjà transféré en comptabilité -NotYetInGeneralLedger=Pas encore transféré en comptabilité +AlreadyInGeneralLedger=Already transferred to accounting journals and ledger +NotYetInGeneralLedger=Not yet transferred to accouting journals and ledger GroupIsEmptyCheckSetup=Le groupe est vide. Vérifier la configuration du groupe personnalisé DetailByAccount=Afficher le détail par compte AccountWithNonZeroValues=Comptes avec des valeurs non nulles @@ -246,9 +246,9 @@ DescThirdPartyReport=Consultez ici la liste des tiers clients et fournisseurs et ListAccounts=Liste des comptes comptables UnknownAccountForThirdparty=Compte de tiers inconnu. %s sera utilisé UnknownAccountForThirdpartyBlocking=Compte de tiers inconnu. Erreur bloquante. -ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Subledger account not defined or third party or user unknown. We will use %s +ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Compte auxiliaire non défini ou tiers ou utilisateur inconnu. Nous utiliserons %s ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Tiers inconnu et code comptable auxiliaire non défini sur le paiement. Nous conserverons la valeur du compte auxiliaire vide. -ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Subledger account not defined or third party or user unknown. Blocking error. +ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Compte auxiliaire non défini ou tiers ou utilisateur inconnu. Erreur blocante. UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Compte tiers inconnu et compte d'attente non défini. Erreur blocante. PaymentsNotLinkedToProduct=Paiement non lié à un produit / service OpeningBalance=Solde d'ouverture @@ -298,7 +298,7 @@ NoNewRecordSaved=Plus d'enregistrements à journaliser ListOfProductsWithoutAccountingAccount=Liste des produits non liés à un compte comptable ChangeBinding=Changer les liens Accounted=En comptabilité -NotYetAccounted=Pas encore comptabilisé en comptabilité +NotYetAccounted=Not yet transferred to accounting ShowTutorial=Afficher le tutoriel NotReconciled=Non rapproché WarningRecordWithoutSubledgerAreExcluded=Attention : toutes les opérations sans compte auxiliaire défini sont filtrées et exclues de cet écran @@ -329,8 +329,8 @@ ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Désactiver la liaison et le transfert e ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Désactiver la liaison et le transfert en comptabilité des notes de frais (les notes de frais ne seront pas prises en compte en comptabilité). ## Export -NotifiedExportDate=Date d'exportation notifiée (la modification des enregistrements ne sera pas possible) -NotifiedValidationDate=Validation des enregistrements (la modification ou la suppression des enregistrements ne sera pas possible) +NotifiedExportDate=Flag exported lines as exported (modification of the lines will not be possible) +NotifiedValidationDate=Validate the exported entries (modification or deletion of the lines will not be possible) ConfirmExportFile=Confirmation de la génération du fichier d'export comptable ? ExportDraftJournal=Exporter le journal brouillon Modelcsv=Modèle d'export @@ -339,11 +339,11 @@ Modelcsv_normal=Export standard Modelcsv_CEGID=Export vers CEGID Expert comptabilité Modelcsv_COALA=Export vers Sage Coala Modelcsv_bob50=Export vers Sage BOB 50 -Modelcsv_ciel=Export for Sage50, Ciel Compta or Compta Evo. (Format XIMPORT) +Modelcsv_ciel=Export vers Sage50, Ciel Compta ou Compta Evo. (Format XIMPORT) Modelcsv_quadratus=Export vers Quadratus QuadraCompta Modelcsv_ebp=Export vers EBP Modelcsv_cogilog=Export vers Cogilog -Modelcsv_agiris=Export vers Agiris +Modelcsv_agiris=Export for Agiris Isacompta Modelcsv_LDCompta=Export pour LD Compta (v9) (Test) Modelcsv_LDCompta10=Export pour LD Compta (v10 et supérieure) Modelcsv_openconcerto=Export pour OpenConcerto (Test) @@ -351,9 +351,10 @@ Modelcsv_configurable=Export configurable Modelcsv_FEC=Export FEC Modelcsv_FEC2=Export FEC (avec dates enregistrement et document inversées) Modelcsv_Sage50_Swiss=Export pour Sage 50 Suisse -Modelcsv_winfic=Export pour Winfic - eWinfic - WinSis Compta +Modelcsv_winfic=Export for Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export vers Gestinum (v3) -Modelcsv_Gestinumv5Export Pour Gestinum (V5) +Modelcsv_Gestinumv5=Export for Gestinum (v5) +Modelcsv_charlemagne=Export for Aplim Charlemagne ChartofaccountsId=Id plan comptable ## Tools - Init accounting account on product / service diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 9579e51920d..01498f3fce1 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -75,7 +75,7 @@ Dictionary=Dictionnaires ErrorReservedTypeSystemSystemAuto=Erreur, les valeurs 'system' et 'systemauto' sont réservées. Vous pouvez utiliser la valeur 'user' pour ajouter vos propres enregistrements ErrorCodeCantContainZero=Erreur, le code ne peut contenir la valeur 0 DisableJavascript=Désactiver les fonctions Javascript et Ajax -DisableJavascriptNote=Remarque: à des fins de test ou de débogage. Pour une optimisation pour les personnes malvoyantes ou les navigateurs texte, il vaut mieux utiliser la configuration sur le profil utilisateur +DisableJavascriptNote=Note: For test or debug purpose only. For optimization for blind person or text browsers, you may prefer to use the setup on the profile of user UseSearchToSelectCompanyTooltip=Si vous avez un nombre important de tiers (>100 000), vous pourrez améliorer les performances en positionnant la constante COMPANY_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limité au début des chaines. UseSearchToSelectContactTooltip=Si vous avez un nombre important de contacts (>100 000), vous pourrez améliorer les performances en positionnant la constante CONTACT_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limité au début des chaines. DelaiedFullListToSelectCompany=Attendre que vous ayez appuyé sur une touche avant de charger le contenu de la liste déroulante des tiers.
    Cela peut augmenter les performances si vous avez un grand nombre de tiers, mais cela est moins convivial. @@ -133,7 +133,6 @@ IdModule=ID Module IdPermissions=ID Permissions LanguageBrowserParameter=Variable %s LocalisationDolibarrParameters=Paramètres de localisation -ClientTZ=Fuseau horaire client (utilisateur) ClientHour=Heure client (utilisateur) OSTZ=Fuseau horaire OS PHPTZ=Fuseau horaire serveur PHP @@ -161,7 +160,7 @@ Purge=Purger PurgeAreaDesc=Cette page vous permet d'effacer tous les fichiers construits ou stockés par Dolibarr (fichiers temporaires ou tous les fichiers du répertoire %s). L'utilisation de cette fonction n'est pas nécessaire. Elle est fournie pour les utilisateurs qui hébergent Dolibarr chez un hébergeur qui n'offre pas les permissions de supprimer les fichiers sauvegardés par le serveur Web. PurgeDeleteLogFile=Effacer les fichiers de traces de debug, incluant %s défini dans le module 'Journaux et traces' (pas de risque de perte de données) PurgeDeleteTemporaryFiles=Supprimer tous les fichiers journaux et temporaires (aucun risque de perte de données). Le paramètre peut être "tempfilesold", "logfiles" ou les deux "tempfilesold + logfiles". Remarque : la suppression des fichiers temporaires est effectuée uniquement si le répertoire temporaire qui le contient a été créé il y a plus de 24 heures. -PurgeDeleteTemporaryFilesShort=Effacer les fichiers de log et fichiers temporaires +PurgeDeleteTemporaryFilesShort=Delete log and temporary files (no risk of losing data) PurgeDeleteAllFilesInDocumentsDir=Effacer tous les fichiers du répertoire %s.
    Les fichiers temporaires mais aussi les fichiers «dumps» de sauvegarde de base de données, les fichiers joints aux éléments (tiers, factures, ...) ou fichiers stockés dans le module GED seront irrémédiablement effacés. PurgeRunNow=Lancer la purge maintenant PurgeNothingToDelete=Aucun dossier ou fichier à supprimer. @@ -189,7 +188,7 @@ Compression=Compression CommandsToDisableForeignKeysForImport=Commande pour désactiver les clés étrangères à l'importation CommandsToDisableForeignKeysForImportWarning=Requis si vous voulez être en mesure de restaurer votre « dump » SQL plus tard ExportCompatibility=Compatibilité du fichier d'exportation généré -ExportUseMySQLQuickParameter=Utiliser le paramètre --quick +ExportUseMySQLQuickParameter=Utiliser le paramètre --quick ExportUseMySQLQuickParameterHelp=Le paramètre '--quick' aide à réduire la consommation de RAM pour les longues listes MySqlExportParameters=Paramètres de l'exportation MySQL PostgreSqlExportParameters= Paramètres de l'exportation PostgreSQL @@ -210,8 +209,8 @@ FeatureDisabledInDemo=Fonction désactivée dans la démo FeatureAvailableOnlyOnStable=Fonction disponible uniquement sur les versions officielles stables BoxesDesc=Les widgets sont des composants montrant des informations que vous pouvez ajouter à vos pages pour les personnaliser. Vous pouvez choisir de les afficher ou non en sélectionnant la page cible et en cliquant sur "Activer" ou "Désactiver". OnlyActiveElementsAreShown=Seuls les éléments en rapport avec un module actif sont présentés. -ModulesDesc=Les modules Dolibarr définissent quelles fonctionnalités sont disponibles dans le logiciel. Certains modules / applications nécessitent, après activation, d'accorder des autorisations aux utilisateurs. Cliquez sur le bouton activé/désactivé %s pour activer un module/application. -ModulesDesc2=Cliquez sur l'icône roue dentelée %s pour configurer le module/l'application. +ModulesDesc=Les modules/applications définissent quelles fonctionnalités sont disponibles dans le logiciel. Certains modules nécessitent d'accorder des permissions aux utilisateurs après leur activation. Cliquez sur le bouton Activer/Désactiver %s de chaque module pour activer ou désactiver un module/application. +ModulesDesc2=Cliquez sur l'icône de roue dentelée %s pour configurer le module/l'application. ModulesMarketPlaceDesc=D'autres modules/extensions sont disponibles en téléchargement sur des sites externes sur Internet... ModulesDeployDesc=Si les permissions de votre système de fichier le permettent , vous pouvez utiliser cet outil pour déployer un module externe. Le module sera alors visible dans l'onglet %s. ModulesMarketPlaces=Rechercher un module/application externe @@ -336,7 +335,7 @@ MenuHandlers=Gestionnaires de menu MenuAdmin=Édition menu DoNotUseInProduction=Ne pas utiliser en production ThisIsProcessToFollow=Procédure de mise à jour: -ThisIsAlternativeProcessToFollow=Voici une procédure de configuration alternative +ThisIsAlternativeProcessToFollow=Voici une procédure de configuration alternative StepNb=Étape %s FindPackageFromWebSite=Rechercher le paquet qui répond à votre besoin (par exemple sur le site web %s). DownloadPackageFromWebSite=Télécharger le package (par exemple depuis le site web officiel %s) @@ -375,8 +374,8 @@ UMask=Masque des nouveaux fichiers sous Unix/Linux/BSD/Mac. UMaskExplanation=Ce paramètre permet de définir les droits des fichiers créés sur le serveur par Dolibarr (lors d'envois par exemple).
    Ce doit être la valeur octale (par exemple 0666 signifie lecture/écriture pour tous).
    Ce paramètre n'a aucun effet sur un serveur Windows. SeeWikiForAllTeam=Voir le wiki pour le détail de tous les contributeurs et leur organisation UseACacheDelay= Délai de mise en cache de l'export en secondes (0 ou vide pour aucun cache) -DisableLinkToHelpCenter=Cacher le lien «Besoin d'aide ou d'assistance» sur la page de connexion -DisableLinkToHelp=Cacher le lien vers l'aide en ligne %s +DisableLinkToHelpCenter=Cacher le lien «Besoin d'aide ou assistance» sur la page de connexion +DisableLinkToHelp=Cacher le lien vers l'aide en ligne "%s" AddCRIfTooLong=Il n'y a pas de coupure de ligne automatique, aussi si votre texte est trop long sur les documents, il faudra ajouter vous même des retours chariot dans la zone de saisie du texte ConfirmPurge=Êtes-vous sûr de vouloir réaliser cette purge ?
    Ceci effacera définitivement tous vos fichiers (espace GED, pièces jointes, etc...). MinLength=Longueur minimale @@ -498,7 +497,7 @@ WarningPHPMail=AVERTISSEMENT: la configuration pour envoyer des e-mails à parti WarningPHPMailA= - L'utilisation des serveurs de prestataires de messagerie augmente le niveau confiance des e-mails, cela augmente donc les chances de délivrabilité en n'étant pas considéré comme spam. WarningPHPMailB=- Certains fournisseurs de services de messagerie (comme Yahoo) ne vous permettent pas d'envoyer un e-mail à partir d'un autre serveur que leur propre serveur. Votre configuration actuelle utilise le serveur de l'application pour envoyer des e-mails et non le serveur de votre fournisseur de messagerie, donc certains destinataires (ceux compatibles avec le protocole DMARC restrictif), demanderont à votre fournisseur de messagerie si ils peuvent accepter votre message et ce fournisseur de messagerie (comme Yahoo) peut répondre «non» parce que le serveur d'envoi n'est pas le leur, aussi une partie de vos e-mails envoyés peuvent ne pas être acceptés pour la livraison (faites également attention au quota d'envoi de votre fournisseur de messagerie). WarningPHPMailC=- Utiliser le serveur SMTP de votre propre fournisseur de services de messagerie pour envoyer des e-mails est également intéressant afin que tous les e-mails envoyés depuis l'application soient également enregistrés dans votre répertoire "Envoyés" de votre boîte aux lettres. -WarningPHPMailD=Aussi, il est donc recommandé de modifier la méthode d'envoi des e-mails sur la valeur "SMTP". Si vous voulez vraiment conserver la méthode par défaut "PHP", alors vous pouvez ignorer cette alerte ou la supprimer en activant à 1 la constante MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP dans Accueil - Configuration - Divers +WarningPHPMailD=Also, it is therefore recommended to change the sending method of e-mails to the value "SMTP". If you really want to keep the default "PHP" method to send emails, just ignore this warning, or remove it by setting the MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP constant to 1 in Home - Setup - Other. WarningPHPMail2=Si votre fournisseur de messagerie SMTP a besoin de restreindre le client de messagerie à certaines adresses IP (très rare), voici l'adresse IP du mail user agent (MUA) de votre application CRM ERP : %s . WarningPHPMailSPF=Si le nom de domaine de votre adresse e-mail d'expéditeur est protégé par un enregistrement SPF (demandez à votre fournisseur de nom de domaine), vous devez inclure les adresses IP suivantes dans l'enregistrement SPF du DNS de votre domaine: %s . ClickToShowDescription=Cliquer pour afficher la description @@ -517,6 +516,9 @@ Field=Champ ProductDocumentTemplates=Modèle de document pour la fiche produit FreeLegalTextOnExpenseReports=Mention complémentaire sur les notes de frais WatermarkOnDraftExpenseReports=Filigrane sur les notes de frais +ProjectIsRequiredOnExpenseReports=The project is mandatory for entering an expense report +PrefillExpenseReportDatesWithCurrentMonth=Pre-fill start and end dates of new expense report with start and end dates of the current month +ForceExpenseReportsLineAmountsIncludingTaxesOnly=Force the entry of expense report amounts always in amount with taxes AttachMainDocByDefault=Définissez cette valeur sur 1 si vous souhaitez joindre le document principal au courrier électronique par défaut (si applicable) FilesAttachedToEmail=Joindre le fichier SendEmailsReminders=Envoyer des rappels agenda par e-mails @@ -566,7 +568,7 @@ Module53Desc=Gestion des services Module54Name=Contrats/Abonnements Module54Desc=Gestion des contrats (services ou abonnements récurrents) Module55Name=Codes-barres -Module55Desc=Code-barre ou QR Code +Module55Desc=Gestion de Code-barre ou QR Code Module56Name=Paiement par virement bancaire Module56Desc=Gestion des paiements de fournisseurs par virement bancaire. Est incluse la génération des fichiers SEPA pour les pays européens. Module57Name=Règlement par Prélèvement @@ -898,6 +900,11 @@ Permission1002=Créer/modifier entrepôts Permission1003=Supprimer entrepôts Permission1004=Consulter les mouvements de stocks Permission1005=Créer/modifier les mouvements de stocks +Permission1011=Voir les inventaires +Permission1012=Créer un nouvel inventaire +Permission1014=Valider l'inventaire +Permission1015=Autoriser à changer la valeur PMP d'un produit +Permission1016=Supprimer l'inventaire Permission1101=Lire les bons de réception Permission1102=Créer/modifier les bons de réception Permission1104=Valider les bons de réception @@ -1035,7 +1042,7 @@ DictionaryFees=Note de frais - Types de lignes de notes de frais DictionarySendingMethods=Méthodes d'expédition DictionaryStaff=Effectifs DictionaryAvailability=Délai de livraison -DictionaryOrderMethods=Méthodes de commandes +DictionaryOrderMethods=Order methods DictionarySource=Origines des propales/commandes DictionaryAccountancyCategory=Groupes personalisés pour les rapports DictionaryAccountancysystem=Modèles de plan comptable @@ -1168,7 +1175,8 @@ DoNotSuggestPaymentMode=Ne pas suggérer NoActiveBankAccountDefined=Aucun compte bancaire actif défini OwnerOfBankAccount=Propriétaire du compte %s BankModuleNotActive=Module comptes bancaires non activé -ShowBugTrackLink=Définir le lien "%s" (vide pour ne pas afficher ce lien, 'github' pour le lien vers le projet Dolibarr ou définir directement une url 'https:/...') +ShowBugTrackLink=Afficher le lien "%s" +ShowBugTrackLinkDesc=Keep empty to not display this link, use value 'github' for the link to the Dolibarr project or define directly an url 'https://...' Alerts=Alertes DelaysOfToleranceBeforeWarning=Délais avant affichage de l'avertissement alerte retard DelaysOfToleranceDesc=Cet écran permet de définir les délais de tolérance après lesquels une alerte sera signalée à l'écran par le pictogramme %s sur chaque élément en retard. @@ -1193,9 +1201,9 @@ SetupDescription2=Les deux étapes obligatoires sont les deux premières entrée SetupDescription3=%s -> %s

    Paramètres basiques pour personnaliser le comportement par défaut du logiciel (comportement lié au pays par exemple). SetupDescription4= %s -> %s

    Ce logiciel est un ensemble de plusieurs modules/applications. Les fonctionnalités en rapport avec vos besoins doivent être activées et configurées. Les entrées menus seront ajoutées avec l'activation de ces modules. SetupDescription5=Les autres entrées de configuration gèrent des paramètres facultatifs. -SetupDescriptionLink=%s - %s -SetupDescription3b=Basic parameters used to customize the default behavior of your application (e.g for country-related features). -SetupDescription4b=This software is a suite of many modules/applications. The modules related to your needs must be enabled and configured. Menu entries will appears with the activation of these modules. +SetupDescriptionLink= %s - %s +SetupDescription3b=Paramètres de base utilisés pour personnaliser le comportement par défaut de votre application (par exemple pour les fonctionnalités liées au pays). +SetupDescription4b=Ce logiciel est une suite de nombreux modules/applications. Les modules liés à vos besoins doivent être activés et configurés. Les entrées de menu apparaîtront avec l'activation de ces modules. AuditedSecurityEvents=Événements de sécurité audités NoSecurityEventsAreAduited=Aucun événement de sécurité n'est audité. Vous pouvez les activer à partir du menu %s Audit=Événements de sécurité @@ -1218,7 +1226,7 @@ SystemAreaForAdminOnly=Cet espace n'est accessible qu'aux utilisateurs de type a CompanyFundationDesc=Modifiez les informations de votre société/organisation. Cliquez sur le bouton "%s" en bas de page pour sauvegarder. AccountantDesc=Si vous avez un comptable externe, vous pouvez saisir ici ses informations. AccountantFileNumber=Code comptable -DisplayDesc=Vous pouvez choisir ici tous les paramètres liés à l'apparence de Dolibarr +DisplayDesc=Les paramètres affectant l'apparence et la présentation de l'application peuvent être modifiés ici. AvailableModules=Modules/applications disponibles ToActivateModule=Pour activer des modules, aller dans l'espace Configuration (Accueil->Configuration->Modules). SessionTimeOut=Délai expiration des sessions @@ -1270,7 +1278,7 @@ SimpleNumRefNoDateModelDesc=Renvoie le numéro de référence au format %s-nnnn ShowProfIdInAddress=Afficher l'identifiant professionnel dans les adresses ShowVATIntaInAddress=Masquer le numéro de TVA intracommunautaire TranslationUncomplete=Traduction partielle -MAIN_DISABLE_METEO=Désactiver la vue météo +MAIN_DISABLE_METEO=Désactiver la vignette météo MeteoStdMod=Mode standard MeteoStdModEnabled=Mode standard activé MeteoPercentageMod=Mode pourcentage @@ -1341,7 +1349,7 @@ BrowserIsKO=Vous utilisez le navigateur %s. Ce navigateur est déconseillé pour PHPModuleLoaded=Le composant PHP %s est chargé PreloadOPCode=Le code OP préchargé est utilisé AddRefInList=Afficher les références client/fournisseur dans les listes (listes déroulantes ou à autocomplétion) et les libellés des liens clicables.
    Les tiers apparaîtront alors sous la forme "CC12345 - SC45678 - La big company coorp", au lieu de "La big company coorp". -AddVatInList=Afficher le numéro de TVA client/fournisseur dans les listes (listes déroulantes ou à autocomplétion). +AddVatInList=Display Customer/Vendor VAT number. info list (select list or combobox). AddAdressInList=Affiche les informations sur l’adresse du client/fournisseur (liste de sélection ou liste déroulante)
    Les tiers apparaîtront avec le format de nom suivant: "The Big Company corp. - 21, rue du saut 123456 Big town - USA" au lieu de "The Big Company corp". AddEmailPhoneTownInContactList=Afficher l'adresse e-mail du contact (ou les téléphones si non définis) et la ville
    Les contacts apparaîtront avec un nom au format "Dupond Durand - dupond.durand@email.com - Paris" ou "Dupond Durand - 06 07 59 65 66 - Paris" au lieu de "Dupond Durand". AskForPreferredShippingMethod=Demander la méthode d'expédition préférée pour les Tiers @@ -1352,7 +1360,7 @@ NumberingModules=Modèles de numérotation DocumentModules=Modèles de documents ##### Module password generation PasswordGenerationStandard=Renvoie un mot de passe généré selon l'algorythme interne de Dolibarr :%s caractères contenant chiffres et minuscules -PasswordGenerationNone=Ne pas suggérer un mot de passe généré. Le mot de passe doit être entré manuellement. +PasswordGenerationNone=Ne pas suggérer un mot de passe généré. Le mot de passe doit être entré manuellement. PasswordGenerationPerso=Renvoie un mot de passe en fonction d'une configuration personnalisée. SetupPerso=Selon votre configuration PasswordPatternDesc=Description du masque du mot de passe @@ -1373,7 +1381,7 @@ AccountCodeManager=Options pour la génération automatique de codes comptable c NotificationsDesc=Les notifications activent l'envoi d'e-mails automatiques pour certains événements de Dolibarr. L'envoi de ces e-mails automatiques peut-être défini : NotificationsDescUser=* par utilisateur, pour chaque utilisateur NotificationsDescContact=* par contacts de tiers (clients ou fournisseur), pour chaque contact -NotificationsDescGlobal=* ou en définissant des emails cibles fixes sur la page de configuration du module. +NotificationsDescGlobal=* ou en définissant des adresses e-mail globales dans la page de configuration du module. ModelModules=Modèle de documents DocumentModelOdt=Génération depuis des modèles OpenDocument (Fichier .ODT ou .ODS LibreOffice, KOffice, TextEdit…) WatermarkOnDraft=Filigrane sur les documents brouillons @@ -1428,7 +1436,7 @@ OrdersNumberingModules=Modèles de numérotation des commandes OrdersModelModule=Modèles de document des commandes FreeLegalTextOnOrders=Mention complémentaire sur les commandes WatermarkOnDraftOrders=Filigrane sur les brouillons de commandes (aucun si vide) -ShippableOrderIconInList=Ajouter une icône dans la liste des commandes qui indique si la commande est expédiable. +ShippableOrderIconInList=Ajouter une icône dans la liste des commandes qui indique si la commande est expédiable. BANK_ASK_PAYMENT_BANK_DURING_ORDER=Demander le compte bancaire cible durant la commande ##### Interventions ##### InterventionsSetup=Configuration du module Interventions @@ -1473,10 +1481,10 @@ LDAPSynchronizeMembersTypes=Types d'adhérents de l'annuaire LDAP de l'associati LDAPPrimaryServer=Serveur primaire LDAPSecondaryServer=Serveur secondaire LDAPServerPort=Port du serveur -LDAPServerPortExample=Port par défaut : 389 +LDAPServerPortExample=Standard or StartTLS: 389, LDAPs: 636 LDAPServerProtocolVersion=Version du protocole LDAPServerUseTLS=Utiliser TLS -LDAPServerUseTLSExample=Votre serveur utilise le TLS +LDAPServerUseTLSExample=Your LDAP server use StartTLS LDAPServerDn=DN du serveur LDAPAdminDn=DN de l'administrateur LDAPAdminDnExample=Direction complète (exemple : cn = admin, dc = exemple, dc = com ou cn = Adminitrateur, cn = utilisateurs, dc = exemple, dc = com pour active directory) @@ -1618,7 +1626,7 @@ TestNotPossibleWithCurrentBrowsers=Une détection automatique n'est pas possible DefaultValuesDesc=Vous pouvez définir/forcer ici la valeur par défaut que vous voulez obtenir lorsque vous créez un nouvel enregistrement, et/ou les filtres par défaut ou ordre de tri des listes. DefaultCreateForm=Valeurs par défaut (sur les formulaires de création) DefaultSearchFilters=Filtres de recherche par défaut -DefaultSortOrder=Ordre de tri par défaut +DefaultSortOrder=Ordre de tri par défaut DefaultFocus=Champs par défaut ayant le focus DefaultMandatory=Champs de formulaire obligatoires ##### Products ##### @@ -1626,8 +1634,7 @@ ProductSetup=Configuration du module Produits ServiceSetup=Configuration du module Services ProductServiceSetup=Configuration des modules Produits et Services NumberOfProductShowInSelect=Nombre maximum de produits dans les listes déroulantes (0=aucune limite) -ViewProductDescInFormAbility=Afficher les descriptions de produits dans les formulaires (sinon, comme info-bulle contextuelle) -DoNotAddProductDescAtAddLines=Ne pas ajouter la description du produit (saisie sur sa fiche) à l'ajout d'un produit +ViewProductDescInFormAbility=Display product descriptions in lines of items (otherwise show description in a tooltip popup) OnProductSelectAddProductDesc=Comment utiliser la description des produits lors de l'ajout d'un produit en tant que ligne d'un document AutoFillFormFieldBeforeSubmit=Remplir automatiquement le champ description avec la description du produit DoNotAutofillButAutoConcat=Ne pas remplir automatiquement le champ de saisie avec la description du produit. La description du produit sera concaténée automatiquement avec la description saisie. @@ -1706,8 +1713,10 @@ FreeLegalTextOnDeliveryReceipts=Mention complémentaire sur les bons de récepti ##### FCKeditor ##### AdvancedEditor=Editeur avancé ActivateFCKeditor=Activer l'éditeur avancé pour : -FCKeditorForCompany=Création/édition WYSIWIG de la description et note des éléments (autre que produits/services) -FCKeditorForProduct=Création/édition WYSIWIG de la description et note des produits/services +FCKeditorForNotePublic=WYSIWIG creation/edition of the field public notes of elements +FCKeditorForNotePrivate=WYSIWIG creation/edition of the field private notes of elements +FCKeditorForCompany=WYSIWIG creation/edition of the field description of elements (except products/services) +FCKeditorForProduct=WYSIWIG creation/edition of the field description of products/services FCKeditorForProductDetails=Création/édition WYSIWYG des lignes de détails produits sur tous les éléments (commandes, propales, factures, etc...). Attention: L'utilisation pour ce cas est fortement déconseillée car peut créer des problèmes dans la gestion de caractères et mise en page des fichiers PDF générés. FCKeditorForMailing= Création/édition WYSIWIG des emailings (Outils->Emailings) FCKeditorForUserSignature=Création/édition WYSIWIG de la signature des utilisateurs @@ -1786,7 +1795,7 @@ ClickToDialSetup=Configuration du module Click To Dial ClickToDialUrlDesc=URL appelée quand un clic sur l'icône téléphone est fait. Dans l'URL, vous pouvez utiliser les tags
    __PHONETO__ qui sera remplacée par le numéro de téléphone de la personne à appeler
    __PHONEFROM__ qui sera remplacée par le numéro de l'appelant (vous)
    __LOGIN__ qui sera remplacée par l'identifiant d'accès de l'utilisateur à l'application d'appel (à définir sur la fiche utilisateur) et
    __PASS__ qui sera remplacée par le mot de passe d'accès de l'utilisateur à l'application d'appel (également à définir sur la fiche utilisateur). ClickToDialDesc=Ce module permet de rendre les numéros de téléphone cliquables lorsque vous utilisez l'application sur un ordinateur de bureau. Un clic sur cette icône composera le numéro de téléphone. Cela peut être utilisé pour commencer une conversation avec un soft phone sur votre bureau ou lorsque vous utilisez un système basé sur le protocole SIP par exemple. Note: Sur un smartphone, les numéros de téléphones sont toujours clicables. ClickToDialUseTelLink=Utiliser un lien "tel:" sur les numéros de téléphone -ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface, installed on the same computer as the browser, and called when you click on a link starting with "tel:" in your browser. If you need a link that start with "sip:" or a full server solution (no need of local software installation), you must set this to "No" and fill the next field. +ClickToDialUseTelLinkDesc=Utilisez cette méthode si vos utilisateurs disposent d'un softphone ou d'une interface logicielle, installés sur le même ordinateur que le navigateur, et appelés lorsque vous cliquez sur un lien commençant par "tel:" dans votre navigateur. Si vous avez besoin d'un lien commençant par "sip:" ou d'une solution via un serveur (pas besoin d'installation de logiciel local), vous devez définir ce champ sur "Non" et remplir le champ suivant. ##### Point Of Sale (CashDesk) ##### CashDesk=Point de Vente CashDeskSetup=Configuration du module Point de vente/caisse enregistreuse @@ -1833,7 +1842,7 @@ ChequeReceiptsNumberingModule=Module de numérotation des bordereaux de remises MultiCompanySetup=Configuration du module Multi-société ##### Suppliers ##### SuppliersSetup=Configuration du module Fournisseurs -SuppliersCommandModel=Modèle de commande fournisseur complet +SuppliersCommandModel=Modèle de commande fournisseur complet SuppliersCommandModelMuscadet=Modèle de commande fournisseur complet (ancienne implémentation du modèle Cornas) SuppliersInvoiceModel=Modèle de facture fournisseur complet SuppliersInvoiceNumberingModel=Modèles de numérotation des factures fournisseur @@ -1868,7 +1877,7 @@ NbMajMin=Nombre minimal de caractères majuscules NbNumMin=Nombre minimal de caractères numériques NbSpeMin=Nombre minimal de caractères spéciaux NbIteConsecutive=Nombre maximal de répétition des mêmes caractères -NoAmbiCaracAutoGeneration=Ne pas utiliser des caractères ambigus ("1","l","i","|","0","O") pour la génération automatique +NoAmbiCaracAutoGeneration=Ne pas utiliser des caractères ambigus ("1","l","i","|","0","O") pour la génération automatique SalariesSetup=Configuration du module salaires SortOrder=Ordre de tri Format=Format @@ -1888,7 +1897,7 @@ GoOntoContactCardToAddMore=Rendez-vous sur l'onglet "Notifications" d'un tiers p Threshold=Seuil BackupDumpWizard=Assistant pour créer le fichier dump de la base de données BackupZipWizard=Assistant pour générer l'archive du répertoire documents -SomethingMakeInstallFromWebNotPossible=L'installation de module externe est impossible depuis l'interface web pour la raison suivante : +SomethingMakeInstallFromWebNotPossible=L'installation de module externe est impossible depuis l'interface web pour la raison suivante : SomethingMakeInstallFromWebNotPossible2=Pour cette raison, le processus de mise à jour décrit ici est une processus manuel que seul un utilisateur ayant des droits privilégiés peut réaliser. InstallModuleFromWebHasBeenDisabledByFile=L'installation de module externe depuis l'application a été désactivé par l'administrator. Vous devez lui demander de supprimer le fichier %s pour permettre cette fonctionnalité. ConfFileMustContainCustom=Installer ou créer un module externe à partir de l'application nécessite de sauvegarder les fichiers du module dans le répertoire %s. Pour que ce répertoire soit reconnu par Dolibarr, vous devez paramétrer le fichier de configuration conf/conf.php en ajoutant les 2 lignes suivantes :
    $dolibarr_main_url_root_alt='/custom'
    $dolibarr_main_document_root_alt='%s/custom'; @@ -1920,7 +1929,7 @@ SellTaxRate=Taux de TVA RecuperableOnly=Oui pour une TVA "Non Perçue mais Récupérable" dédiée à certains pays comme la France. Gardez la valeur à "Non" dans tous les autres cas. UrlTrackingDesc=Si le fournisseur ou le service de transport offrent une page ou un site Web pour vérifier l'état de l'expédition, vous pouvez l'entrer ici. Vous pouvez utiliser la clé {TRACKID} dans les paramètres d'URL afin que le système la remplace par la valeur du numéro de suivi entré sur la fiche d'expédition. OpportunityPercent=Lorsque vous créez une opportunité, vous pouvez ďéfinir un montant estimatif de projet/affaire. Selon le statut de l'opportunité, ce montant peut être multiplié par ce taux pour évaluer le montant probable que vos opportunités sont susceptibles de générer. La valeur est un pourcentage (entre 0 et 100). -TemplateForElement=Cet enregistrement modèle est dédié à quel élément +TemplateForElement=This mail template is related to what type of object? An email template is available only when using the "Send Email" button from the related object. TypeOfTemplate=Type de modèle TemplateIsVisibleByOwnerOnly=Le modèle est visible par le propriétaire seulement VisibleEverywhere=Visible partout @@ -1996,8 +2005,12 @@ MAIN_PDF_MARGIN_TOP=Marge haute sur les PDF MAIN_PDF_MARGIN_BOTTOM=Marge bas sur les PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Hauteur du logo sur les PDFs MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Ajouter une image à la ligne de proposition -PROPOSAL_PDF_HIDE_PAYMENTTERM=Hide payments conditions -PROPOSAL_PDF_HIDE_PAYMENTMODE=Hide payment mode +MAIN_PDF_NO_SENDER_FRAME=Masquer les bordures dans le cadre de l'adresse de l'expéditeur +MAIN_PDF_NO_RECIPENT_FRAME=Masquer les bordures dans le cadre de l'adresse du destinataire +MAIN_PDF_HIDE_CUSTOMER_CODE=Masquer le code client +MAIN_PDF_HIDE_SENDER_NAME=Masquer l'expéditeur/le nom de l'entreprise dans le bloc d'adresse +PROPOSAL_PDF_HIDE_PAYMENTTERM=Masquer les conditions de paiement +PROPOSAL_PDF_HIDE_PAYMENTMODE=Masquer le mode de paiement MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Ajouter une signature électronique au PDF NothingToSetup=Aucune configuration particulière n'est requise pour ce module. SetToYesIfGroupIsComputationOfOtherGroups=Réglez ceci sur Oui si ce groupe est un calcul d'autres groupes @@ -2137,7 +2150,7 @@ AskThisIDToYourBank=Contacter votre établissement bancaire pour obtenir ce code AdvancedModeOnly=Autorisation disponible en mode Autorisations avancées uniquement ConfFileIsReadableOrWritableByAnyUsers=Le fichier conf est lisible ou inscriptible par tous les utilisateurs. Donnez l'autorisation à l'utilisateur et au groupe du serveur Web uniquement. MailToSendEventOrganization=Organisation d'événements -MailToPartnership=Partnership +MailToPartnership=Partenariat AGENDA_EVENT_DEFAULT_STATUS=État de l’événement par défaut lors de la création d’un événement à partir du formulaire YouShouldDisablePHPFunctions=Vous devriez désactiver les fonctions PHP IfCLINotRequiredYouShouldDisablePHPFunctions=Sauf si vous avez besoin de lancer des commandes système, vous devriez désactiver les fonctions PHP @@ -2146,7 +2159,7 @@ NoWritableFilesFoundIntoRootDir=Aucun fichier ou répertoire des programmes cour RecommendedValueIs=Recommandé : %s Recommended=Recommandé NotRecommended=Non recommandé -ARestrictedPath=Un chemin restreint +ARestrictedPath=Some restricted path CheckForModuleUpdate=Vérifier les mises à jour des modules externes CheckForModuleUpdateHelp=Cette action se connecte aux éditeurs des modules externes pour vérifier si une nouvelle version est disponible. ModuleUpdateAvailable=Une mise à jour est disponible @@ -2158,5 +2171,27 @@ DatabasePasswordObfuscated=Le mot de passe de la base de données est masqué da DatabasePasswordNotObfuscated=Le mot de passe de la base de données n'est PAS masqué dans le fichier de configuration APIsAreNotEnabled=Les modules API ne sont pas activés YouShouldSetThisToOff=Vous devriez mettre ceci à 0 ou off -InstallAndUpgradeLockedBy=Install and upgrades are locked by the file %s -OldImplementation=Old implementation +InstallAndUpgradeLockedBy=L'installation et les mises à jour sont verrouillées par le fichier %s +OldImplementation=Ancienne implémentation +PDF_SHOW_LINK_TO_ONLINE_PAYMENT=Si certains modules de paiement en ligne sont activés (Paypal, Stripe, ...), ajouter un lien sur le PDF pour effectuer le paiement en ligne +DashboardDisableGlobal=Disable globally all the thumbs of open objects +BoxstatsDisableGlobal=Disable totally box statistics +DashboardDisableBlocks=Thumbs of open objects (to process or late) on main dashboard +DashboardDisableBlockAgenda=Disable the thumb for agenda +DashboardDisableBlockProject=Disable the thumb for projects +DashboardDisableBlockCustomer=Disable the thumb for customers +DashboardDisableBlockSupplier=Disable the thumb for suppliers +DashboardDisableBlockContract=Disable the thumb for contracts +DashboardDisableBlockTicket=Disable the thumb for tickets +DashboardDisableBlockBank=Disable the thumb for banks +DashboardDisableBlockAdherent=Disable the thumb for memberships +DashboardDisableBlockExpenseReport=Disable the thumb for expense reports +DashboardDisableBlockHoliday=Disable the thumb for leaves +EnabledCondition=Condition to have field enabled (if not enabled, visibility will always be off) +IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sale tax +IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sale tax +LanguageAndPresentation=Language and presentation +SkinAndColors=Skin and colors +IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sale tax +IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sale tax +PDF_USE_1A=Generate PDF with PDF/A-1b format diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index 33faad30cdf..496059137fe 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -64,6 +64,7 @@ ShipmentClassifyClosedInDolibarr=Expédition %s classée payée ShipmentUnClassifyCloseddInDolibarr=Expédition %s réouverte ShipmentBackToDraftInDolibarr=Expédition %s remise au statut brouillon ShipmentDeletedInDolibarr=Expédition %s supprimée +ShipmentCanceledInDolibarr=Shipment %s canceled ReceptionValidatedInDolibarr=Réception %s validée OrderCreatedInDolibarr=Commande %s créée OrderValidatedInDolibarr=Commande %s validée @@ -170,4 +171,4 @@ ReminderType=Type de rappel AddReminder=Créer une notification de rappel automatique pour cet événement ErrorReminderActionCommCreation=Erreur lors de la création de la notification de rappel pour cet événement BrowserPush=Notification par Popup navigateur -ActiveByDefault=Activation par défaut +ActiveByDefault=Activé par défaut diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 1a825e09792..f8735a8e417 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -60,7 +60,7 @@ SupplierBill=Facture fournisseur SupplierBills=Factures fournisseur Payment=Règlement PaymentBack=Remboursement -CustomerInvoicePaymentBack=Rembourser +CustomerInvoicePaymentBack=Remboursement Payments=Règlements PaymentsBack=Remboursements paymentInInvoiceCurrency=Dans la devise des factures @@ -234,12 +234,17 @@ AlreadyPaidBack=Déjà remboursé AlreadyPaidNoCreditNotesNoDeposits=Déjà réglé (hors avoirs et acomptes) Abandoned=Abandonné RemainderToPay=Reste à payer +RemainderToPayMulticurrency=Reste impayé, devise d'origine RemainderToTake=Montant restant à percevoir +RemainderToTakeMulticurrency=Montant restant à encaisser, devise d'origine RemainderToPayBack=Montant restant à rembourser +RemainderToPayBackMulticurrency=Montant restant à rembourser, devise d'origine Rest=Créance AmountExpected=Montant réclamé ExcessReceived=Trop perçu +ExcessReceivedMulticurrency=Excédent reçu, devise d'origine ExcessPaid=Excédent payé +ExcessPaidMulticurrency=Excédent payé, devise d'origine EscompteOffered=Escompte (règl. avt échéance) EscompteOfferedShort=Escompte SendBillRef=Envoi de la facture %s @@ -260,6 +265,7 @@ DateInvoice=Date facturation DatePointOfTax=Date elligibilitée taxe NoInvoice=Aucune facture NoOpenInvoice=Pas de facture ouverte +NbOfOpenInvoices=Number of open invoices ClassifyBill=Classer la facture SupplierBillsToPay=Factures fournisseurs impayées CustomerBillsUnpaid=Factures clients impayées @@ -570,7 +576,7 @@ ToCreateARecurringInvoiceGene=Pour générer de futures factures régulièrement ToCreateARecurringInvoiceGeneAuto=Si vous avez besoin que de telles factures soient générées automatiquement, demandez à votre administrateur d'activer et configurer le module %s. Notez que les deux méthodes de générations de factures (manuelles et automatiques) peuvent être utilisées en cohabitation sans risque de création de doublon. DeleteRepeatableInvoice=Supprimer facture modèle ConfirmDeleteRepeatableInvoice=Est-ce votre sûr de vouloir supprimer la facture modèle ? -CreateOneBillByThird=Créer une facture par tiers (sinon, une facture par commande) +CreateOneBillByThird=Créer une facture par tiers (sinon, une facture par objet sélectionné) BillCreated=%s facture(s) générée(s) BillXCreated=Facture %s générée StatusOfGeneratedDocuments=Statut de génération du document @@ -591,3 +597,5 @@ SituationTotalRayToRest=Reste à payer HT PDFSituationTitle=Situation n°%d SituationTotalProgress=Avancement total %d %% SearchUnpaidInvoicesWithDueDate=Rechercher les factures impayées avec date d'échéance = %s +NoPaymentAvailable=Aucun paiement disponible pour %s +PaymentRegisteredAndInvoiceSetToPaid=Paiement enregistré et facture %s passée à payée diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index 45679973a66..254d9c766cf 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -42,7 +42,7 @@ AddTable=Ajouter une table Place=Emplacement TakeposConnectorNecesary='Connecteur TakePOS' requis OrderPrinters=Ajoute un bouton qui permet d'envoyer une commande sans paiement sur certaines imprimantes spécifiques (par exemple pour envoyer une commande en cuisine) -NotAvailableWithBrowserPrinter=Non disponible lorsque l'imprimante pour reçu est définie sur navigateur: +NotAvailableWithBrowserPrinter=Non disponible lorsque l'imprimante pour reçu est définie sur navigateur SearchProduct=Rechercher un produit Receipt=Reçu Header=Entête @@ -128,7 +128,8 @@ PrintPaymentMethodOnReceipts=Imprimer le mode de paiement sur les tickets | reç WeighingScale=échelle de poids ShowPriceHT = Afficher la colonne du prix HT (à l'écran) ShowPriceHTOnReceipt = Afficher la colonne avec le prix hors taxes (sur le ticket de caisse) -CustomerDisplay=Customer display -PrintWithoutDetailsButton=Ajouter un bouton "Imprimer sans détail" -PrintWithoutDetailsLabelDefault=Libellé de la ligne par défaut sur l'impression sans détail -PrintWithoutDetails=Imprimer sans détail +CustomerDisplay=Affichage client +SplitSale=Fractionner la vente +PrintWithoutDetailsButton=Add "Print without details" button +PrintWithoutDetailsLabelDefault=Line label by default on printing without details +PrintWithoutDetails=Print without details diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang index 20bfb122c75..3789fd970a1 100644 --- a/htdocs/langs/fr_FR/categories.lang +++ b/htdocs/langs/fr_FR/categories.lang @@ -17,7 +17,6 @@ ContactsCategoriesArea=Espace tags/catégories de contacts AccountsCategoriesArea=Espace des tags/categories de comptes bancaires ProjectsCategoriesArea=Espace des tags/catégories des projets UsersCategoriesArea=Espace des tags/catégories des utilisateurs -TicketsCategoriesArea=Espace tags/catégories des tickets SubCats=Sous-catégories CatList=Liste des tags/catégories CatListAll=Liste de toutes les catégories (de tous types) @@ -90,12 +89,18 @@ CategorieRecursiv=Lier automatiquement avec le(a) tag/catégorie parent(e) CategorieRecursivHelp=Si l'option est activé, quand un produit est ajouté dans une sous-catégorie, le produit sera ajouté aussi dans la catégorie parente. AddProductServiceIntoCategory=Ajouter le produit/service suivant AddCustomerIntoCategory=Assigner cette catégorie au client -AddSupplierIntoCategory=Assigner cette catégorie au fournisseur +AddMemberIntoCategory=Assigner cette catégorie au membre +AddContactIntoCategory=Assigner cette catégorie au contact +AddUserIntoCategory=Assigner cette catégorie à l'utilisateur +AddProjectIntoCategory=Assigner cette catégorie au projet +AddAccountIntoCategory=Assigner cette catégorie au compte AddTicketIntoCategory=Assigner cette catégorie au ticket +AddSupplierIntoCategory=Assigner cette catégorie au fournisseur ShowCategory=Afficher tag/catégorie ByDefaultInList=Par défaut dans la liste ChooseCategory=Choisissez une catégorie StocksCategoriesArea=Catégories d’entrepôt ActionCommCategoriesArea=Catégories d’événements WebsitePagesCategoriesArea=Catégories des pages-conteneurs +KnowledgemanagementsCategoriesArea=KM article Categories UseOrOperatorForCategories=Utiliser l'opérateur 'ou' pour les catégories diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index 4628673fd9e..280069f5cf9 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -142,7 +142,7 @@ PayVAT=Payer une déclaration de TVA PaySalary=Payer un salaire ConfirmPaySocialContribution=Voulez-vous vraiment classer cette taxe sociale ou fiscale comme payée? ConfirmPayVAT=Voulez-vous vraiment classer cette déclaration de TVA comme payée ? -ConfirmPaySalary=Voulez-vous vraiment classer ce salaire comme payée ? +ConfirmPaySalary=Voulez-vous vraiment classer ce salaire comme payé ? DeleteSocialContribution=Effacer une charge fiscale ou sociale DeleteVAT=Supprimer une déclaration de TVA DeleteSalary=Supprimer un salaire @@ -191,9 +191,9 @@ LT2ReportByCustomersES=Rapport par client des IRPF VATReport=Rapport TVA VATReportByPeriods=Rapport de TVA par période VATReportByMonth=Rapport de TVA par mois -VATReportByRates=Rapport TVA par taux -VATReportByThirdParties=Rapport TVA par Tiers -VATReportByCustomers=Rapport par client +VATReportByRates=Rapport de TVA par taux +VATReportByThirdParties=Rapport de TVA par tiers +VATReportByCustomers=Rapport de TVA par client VATReportByCustomersInInputOutputMode=Rapport par client des TVA collectées et payées VATReportByQuartersInInputOutputMode=Rapport par taux des TVA collectées et payées VATReportShowByRateDetails=Afficher les détails de ce taux @@ -204,9 +204,9 @@ LT2ReportByQuartersES=Rapport par taux de IRPF SeeVATReportInInputOutputMode=Cliquer sur %sTVA encaissement%s pour mode de calcul standard SeeVATReportInDueDebtMode=Cliquer sur %sTVA sur débit%s pour mode de calcul avec option sur les débits RulesVATInServices=- Pour les services, le rapport inclut les TVA des règlements effectivement reçus ou émis en se basant sur la date du règlement. -RulesVATInProducts=- Pour les biens matériels, il inclut les TVA des factures en se basant sur la date de facture. +RulesVATInProducts=- Pour les biens matériels, il inclut les TVA des règlements effectivement reçus ou émis en se basant sur la date du règlement. RulesVATDueServices=- Pour les services, le rapport inclut les TVA des factures dues, payées ou non en se basant sur la date de facture. -RulesVATDueProducts=- Pour les biens matériels, il inclut les TVA des factures en se basant sur la date de facture. +RulesVATDueProducts=- Pour les biens matériels, il inclut les TVA des factures dues, payées ou non en se basant sur la date de facture. OptionVatInfoModuleComptabilite=Remarque : Pour les biens matériels, il faudrait utiliser la date de livraison pour être plus juste. ThisIsAnEstimatedValue=Il s'agit d'un aperçu, basé sur les événements métiers et non sur la table du grand livre final, de sorte que les résultats finaux peuvent différer de ces valeurs d'aperçu. PercentOfInvoice=%%/facture @@ -286,9 +286,12 @@ ReportPurchaseTurnover=Chiffre d'affaires d'achat facturé ReportPurchaseTurnoverCollected=Chiffre d'affaires d'achat encaissé IncludeVarpaysInResults = Inclure les paiements divers dans les rapports IncludeLoansInResults = Inclure les prêts dans les rapports -InvoiceLate30Days = Factures en retard > 30 jours -InvoiceLate15Days = Factures en retard > 15 jours -InvoiceLateMinus15Days = Factures en retard -InvoiceNotLate = A recevoir < 15 jours -InvoiceNotLate15Days = A recevoir dans 15 jours -InvoiceNotLate30Days = A recevoir dans 30 jours +InvoiceLate30Days = Factures en retard (plus de 30 jours) +InvoiceLate15Days = Factures en retard (entre 15 et 30 jours) +InvoiceLateMinus15Days = Factures en retard (de moins de 15 jours) +InvoiceNotLate = A recevoir (d'ici 15 jours) +InvoiceNotLate15Days = A recevoir (dans 15 à 30 jours) +InvoiceNotLate30Days = A recevoir (dans plus de 30 jours) +InvoiceToPay=A payer (dans moins de 15 jours) +InvoiceToPay15Days=A payer (d'ici 15 à 30 jours) +InvoiceToPay30Days=A payer (dans plus de 30 jours) diff --git a/htdocs/langs/fr_FR/ecm.lang b/htdocs/langs/fr_FR/ecm.lang index c5867cbc7ed..e54f1852bf4 100644 --- a/htdocs/langs/fr_FR/ecm.lang +++ b/htdocs/langs/fr_FR/ecm.lang @@ -45,5 +45,5 @@ GenerateImgWebp=Dupliquer toutes les images avec une autre version au format .we ConfirmGenerateImgWebp=Si vous confirmez, vous générerez une image au format .webp pour toutes les images actuellement dans ce dossier (les sous-dossiers ne sont pas inclus)... ConfirmImgWebpCreation=Confirmer la duplication de toutes les images SucessConvertImgWebp=Images dupliquées avec succès -ECMDirName=Nom du dossier -ECMParentDirectory=Dossier parent +ECMDirName=Dir name +ECMParentDirectory=Parent directory diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 32090a13126..ec95b85ed9d 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -83,7 +83,7 @@ ErrorCantSaveADoneUserWithZeroPercentage=Impossible de sauver une action à l'é ErrorRefAlreadyExists=Le référence %s existe déjà. ErrorPleaseTypeBankTransactionReportName=Choisissez le nom du relevé bancaire sur lequel la ligne est rapportées (Format AAAAMM ou AAAAMMJJ) ErrorRecordHasChildren=Impossible de supprimer l'enregistrement car il possède des enregistrements fils. -ErrorRecordHasAtLeastOneChildOfType=L'objet %s a au moins un enfant de type %s +ErrorRecordHasAtLeastOneChildOfType=Object %s has at least one child of type %s ErrorRecordIsUsedCantDelete=Ne peut effacer l'enregistrement. Ce dernier est déjà utilisé ou inclut dans un autre élément. ErrorModuleRequireJavascript=Le javascript ne doit pas être désactivé pour que cette fonctionnalité soit utilisable. Pour activer/désactiver l'utilisation de javascript, allez dans le menu Accueil->Configuration->Affichage. ErrorPasswordsMustMatch=Les 2 mots de passe saisis doivent correspondre @@ -265,6 +265,12 @@ ErrorAPercentIsRequired=Erreur, le pourcentage doit être indiqué correctement. ErrorYouMustFirstSetupYourChartOfAccount=Vous devez d’abord configurer votre plan comptable. ErrorFailedToFindEmailTemplate=Aucun gabarit trouvé avec le code %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durée non définie sur le service. Pas moyen de calculer le prix horaire. +ErrorActionCommPropertyUserowneridNotDefined=Le propriétaire de l'utilisateur est requis +ErrorActionCommBadType=Le type d'événement sélectionné (id: %n, code: %s) n'existe pas dans le dictionnaire des types d'événement +CheckVersionFail=Échec de la vérification de version +ErrorWrongFileName=Le nom du fichier ne peut pas contenir __SOMETHING__ +ErrorNotInDictionaryPaymentConditions=Pas dans le dictionnaire des conditions de paiement, veuillez modifier. +ErrorIsNotADraft=%s is not a draft # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Votre paramètre PHP upload_max_filesize (%s) est supérieur au paramètre PHP post_max_size (%s). Ceci n'est pas une configuration cohérente. @@ -298,8 +304,24 @@ WarningTheHiddenOptionIsOn=Attention, l'option cachée %s est activée WarningCreateSubAccounts=Attention, vous ne pouvez pas créer directement un compte auxiliaire, vous devez créer un tiers ou un utilisateur et leur attribuer un code comptable pour les retrouver dans cette liste WarningAvailableOnlyForHTTPSServers=Disponible uniquement si une connexion sécurisée HTTPS est utilisée WarningModuleXDisabledSoYouMayMissEventHere=Le module %s n’a pas été activé. Par conséquent, il se peut que vous manquiez beaucoup d’événements ici. -ErrorActionCommPropertyUserowneridNotDefined=Le propriétaire de l'utilisateur est requis -ErrorActionCommBadType=Le type d'événement sélectionné (id: %n, code: %s) n'existe pas dans le dictionnaire des types d'événement -CheckVersionFail=Échec de la vérification de version -ErrorWrongFileName=Le nom du fichier ne peut pas contenir __SOMETHING__ -ErrorNotInDictionaryPaymentConditions=Pas dans le dictionnaire des conditions de paiement, veuillez modifier. +WarningPaypalPaymentNotCompatibleWithStrict=La valeur 'Strict' fait que les fonctionnalités de paiement en ligne ne fonctionnent pas correctement. Utilisez plutôt 'Lax'. + +# Validate +RequireValidValue = Valeur non valide +RequireAtLeastXString = Requires at least %s character(s) +RequireXStringMax = Requires %s character(s) max +RequireAtLeastXDigits = Requires at least %s digit(s) +RequireXDigitsMax = Requires %s digit(s) max +RequireValidEmail = L'adresse email n'est pas valide +RequireMaxLength = La longueur doit être inférieure à %s caractères +RequireMinLength = La longueur doit être supérieure à %s caractère(s) +RequireValidUrl = Une URL valide est requise +RequireValidDate = Date valide requise +RequireANotEmptyValue = Est requis +RequireValidDuration = Une durée valide est requise +RequireValidExistingElement = Une valeur existante est requise +RequireValidBool = Un booléen valide est requis +BadSetupOfField = Erreur mauvaise configuration du champ +BadSetupOfFieldClassNotFoundForValidation = Erreur mauvaise configuration du champ : Classe introuvable pour validation +BadSetupOfFieldFileNotFound = Erreur mauvaise configuration du champ : Fichier introuvable pour l'inclusion +BadSetupOfFieldFetchNotCallable = Erreur mauvaise configuration du champ : Fetch non appelable sur la classe diff --git a/htdocs/langs/fr_FR/eventorganization.lang b/htdocs/langs/fr_FR/eventorganization.lang index fa7a9b694df..0efbbf3229e 100644 --- a/htdocs/langs/fr_FR/eventorganization.lang +++ b/htdocs/langs/fr_FR/eventorganization.lang @@ -19,18 +19,22 @@ # ModuleEventOrganizationName = Organisation d'événements EventOrganizationDescription = Organisation de l’événement par le biais du module projet -EventOrganizationDescriptionLong= Gérer l’organisation d'événements pour les conférences, les participants et les conférenciers, avec une page d'inscription publique +EventOrganizationDescriptionLong= Manage the organization of an event (show, conferences, attendees or speakers, with public pages for suggestion, vote or registration) # # Menu # EventOrganizationMenuLeft = Événements organisés EventOrganizationConferenceOrBoothMenuLeft = Conférence ou stand +PaymentEvent=Payment of event + # # Admin page # -EventOrganizationSetup = Configuration de l’organisation de l’événement -Settings = Paramètres +NewRegistration=Registration +EventOrganizationSetup=Configuration de l’organisation de l’événement +EventOrganization=Event organization +Settings=Paramètres EventOrganizationSetupPage = Page de configuration de l’organisation de l’événement EVENTORGANIZATION_TASK_LABEL = Libellé des tâches à créer automatiquement lors de la validation du projet EVENTORGANIZATION_TASK_LABELTooltip = Lorsque vous validez un événement organisé, certaines tâches peuvent être automatiquement créées dans le projet

    Par exemple :
    Envoyer un appel de conférence
    Envoyer un appel pour le stand
    Recevoir un appel de conférences
    Recevoir un appel de stand
    Ouvrir les inscriptions aux événements pour les participants
    Envoyer un rappel de l’événement aux conférenciers
    Envoyer un rappel de l’événement à l’animateur du stand
    Envoyer un rappel de l’événement aux participants @@ -38,8 +42,8 @@ EVENTORGANIZATION_CATEG_THIRDPARTY_CONF = Catégorie à ajouter à des tiers aut EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH = Catégorie à ajouter à des tiers automatiquement créée lorsque quelqu’un suggère un stand EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF = Modèle de courriel à envoyer après avoir reçu une suggestion de conférence. EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH = Modèle de courriel à envoyer après avoir reçu une suggestion d'un stand. -EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH = Modèle de courriel à envoyer après paiement d'une inscription à un stand. -EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT = Modèle de courriel à envoyer après paiement d'une inscription à un événement. +EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH = Template of email to send after a registration to a booth has been paid. +EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT = Template of email to send after a registration to an event has been paid. EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER = Modèle de courriel pour action de masse aux participants EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES = Modèle de courriel pour action de masse aux intervenants EVENTORGANIZATION_FILTERATTENDEES_CAT = Filtrer la liste de sélection des tiers dans la fiche/le formulaire de création des participants avec/selon la catégorie @@ -49,11 +53,11 @@ EVENTORGANIZATION_FILTERATTENDEES_TYPE = Filtrer la liste de sélection des tier # Object # EventOrganizationConfOrBooth= Conférence ou stand -ManageOrganizeEvent = Gestion d'organisation d'événements +ManageOrganizeEvent = Manage the organization of an event ConferenceOrBooth = Conférence ou stand ConferenceOrBoothTab = Conférence ou stand -AmountOfSubscriptionPaid = Montant de l'inscription payée -DateSubscription = Date de l'inscription +AmountPaid = Amount paid +DateOfRegistration = Date of registration ConferenceOrBoothAttendee = Participant à la conférence ou au stand # @@ -63,25 +67,26 @@ YourOrganizationEventConfRequestWasReceived = Votre demande de conférence a ét YourOrganizationEventBoothRequestWasReceived = Votre demande de stand a été transmise EventOrganizationEmailAskConf = Demande de conférence EventOrganizationEmailAskBooth = Demande de stand -EventOrganizationEmailSubsBooth = Inscription au stand -EventOrganizationEmailSubsEvent = Inscription à un événement +EventOrganizationEmailBoothPayment = Payment of your booth +EventOrganizationEmailRegistrationPayment = Registration for an event EventOrganizationMassEmailAttendees = Communication aux participants EventOrganizationMassEmailSpeakers = Communication aux conférenciers # # Event # -AllowUnknownPeopleSuggestConf=Autoriser des personnes inconnues à suggérer des conférences -AllowUnknownPeopleSuggestConfHelp=Autoriser des personnes inconnues à suggérer des conférences -AllowUnknownPeopleSuggestBooth=Autoriser des personnes inconnues à suggérer un stand -AllowUnknownPeopleSuggestBoothHelp=Autoriser des personnes inconnues à suggérer un stand +AllowUnknownPeopleSuggestConf=Allow people to suggest conferences +AllowUnknownPeopleSuggestConfHelp=Allow unknown people to suggest a conference they want to do +AllowUnknownPeopleSuggestBooth=Allow people to apply for a booth +AllowUnknownPeopleSuggestBoothHelp=Allow unknown people to apply for a booth PriceOfRegistration=Prix de l'inscription -PriceOfRegistrationHelp=Prix de l'inscription +PriceOfRegistrationHelp=Price to pay to register or participate in the event PriceOfBooth=Prix d’inscription pour un stand PriceOfBoothHelp=Prix d’inscription pour un stand EventOrganizationICSLink=Lien ICS des événements ConferenceOrBoothInformation=Renseignements sur la conférence ou le stand -Attendees = Participants +Attendees=Participants +ListOfAttendeesOfEvent=List of attendees of the event project DownloadICSLink = Télécharger le lien ICS EVENTORGANIZATION_SECUREKEY = Clé sécurisée pour le lien d’inscription public à une conférence SERVICE_BOOTH_LOCATION = Service utilisé pour la ligne de facture concernant l'emplacement d'un stand @@ -100,27 +105,41 @@ EvntOrgCancelled = Annulé # Public page # SuggestForm = Page de suggestions -RegisterPage = Page pour conférences ou stands -EvntOrgRegistrationHelpMessage = Ici, vous pouvez voter pour un événement, ou suggérer une nouvelle conférence ou un nouveau stand pour le projet -EvntOrgRegistrationConfHelpMessage = Ici, vous pouvez suggérer une nouvelle conférence pour le projet -EvntOrgRegistrationBoothHelpMessage = Ici, vous pouvez suggérer un nouveau stand pour le projet +SuggestOrVoteForConfOrBooth = Page de suggestion ou de vote +EvntOrgRegistrationHelpMessage = Here, you can vote for a conference or suggest a new one for the event. You can also apply to have a booth during the event. +EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference to animate during the event. +EvntOrgRegistrationBoothHelpMessage = Here, you can apply to have a booth during the event. ListOfSuggestedConferences = Liste des conférences suggérées ListOfSuggestedBooths = Liste des stands suggérés +ListOfConferencesOrBooths=List of conferences or booths of event project SuggestConference = Proposer une nouvelle conférence SuggestBooth = Proposer un stand ViewAndVote = Voir et voter pour les événements suggérés -PublicAttendeeSubscriptionPage = Lien d’inscription public à une conférence +PublicAttendeeSubscriptionGlobalPage = Lien public pour l'inscription à l'événement +PublicAttendeeSubscriptionPage = Lien d’inscription public à un événement MissingOrBadSecureKey = La clé de sécurité est invalide ou manquante -EvntOrgWelcomeMessage = Ce formulaire vous permet de vous inscrire en tant que nouveau participant à la conférence : '%s' +EvntOrgWelcomeMessage = This form allows you to register as a new participant to the event : %s EvntOrgDuration = Cette conférence commence le %s et se termine le %s. ConferenceAttendeeFee = Frais de participation à la conférence pour l'événement : '%s' se produisant du %s au %s. BoothLocationFee = Frais de participation à l'événement : '%s' se produisant du %s au %s. EventType = Type événement LabelOfBooth=Libellé du stand LabelOfconference=Libellé de la conférence -ConferenceIsNotConfirmed=Inscription non disponible, la conférence n'est pas encore confirmée -DateMustBeBeforeThan=%s must be before %s -DateMustBeAfterThan=%s must be after %s +ConferenceIsNotConfirmed=Registration not available, conference is not confirmed yet +DateMustBeBeforeThan=%s doit être avant %s +DateMustBeAfterThan=%s doit être après %s + +NewSubscription=Registration +OrganizationEventConfRequestWasReceived=Your suggestion for a conference has been received +OrganizationEventBoothRequestWasReceived=Your request for a booth has been received +OrganizationEventPaymentOfBoothWasReceived=Your payment for your booth has been recorded +OrganizationEventPaymentOfRegistrationWasReceived=Your payment for your event registration has been recorded +OrganizationEventBulkMailToAttendees=This is a remind about your participation in the event as an attendee +OrganizationEventBulkMailToSpeakers=This is a reminder on your participation in the event as a speaker +OrganizationEventLinkToThirdParty=Link to third party (customer, supplier or partner) + +NewSuggestionOfBooth=Application for a booth +NewSuggestionOfConference=Application for a conference # # Vote page @@ -133,17 +152,14 @@ VoteOk = Votre vote a été accepté. AlreadyVoted = Vous avez déjà voté pour cet événement. VoteError = Une erreur s'est produite lors du vote, veuillez réessayer. -# -# SubscriptionOk page -# -SubscriptionOk = Votre inscription à cette conférence a été validée -# -# Subscription validation mail -# -ConfAttendeeSubscriptionConfirmation = Confirmation de votre inscription à une conférence -# -# Payment page -# +SubscriptionOk = Your registration has been validated +ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to an event Attendee = Participant PaymentConferenceAttendee = Paiement de participation à la conférence PaymentBoothLocation = Paiement de l'emplacement du stand +DeleteConferenceOrBoothAttendee=Remove attendee +RegistrationAndPaymentWereAlreadyRecorder=A registration and a payment were already recorded for the email %s +EmailAttendee=Attendee email +EmailCompanyForInvoice=Company email (for invoice, if different of attendee email) +ErrorSeveralCompaniesWithEmailContactUs=Several companies with this email has been found so we can't validate automaticaly your registration. Please contact us at %s for a manual validation +ErrorSeveralCompaniesWithNameContactUs=Several companies with this name has been found so we can't validate automaticaly your registration. Please contact us at %s for a manual validation diff --git a/htdocs/langs/fr_FR/hrm.lang b/htdocs/langs/fr_FR/hrm.lang index 6da0d3f633e..647ff720bf9 100644 --- a/htdocs/langs/fr_FR/hrm.lang +++ b/htdocs/langs/fr_FR/hrm.lang @@ -1,15 +1,4 @@ -# Dolibarr language file - fr_FR - hrm - - -# -# Generic -# - -# Module label 'ModuleHrmName' -ModuleHrmName = GRH -# Module description 'ModuleHrmDesc' -ModuleHrmDesc = GRH description - +# Dolibarr language file - en_US - hrm # Admin @@ -30,74 +19,74 @@ Employees=Salariés Employee=Salarié NewEmployee=Nouveau salarié ListOfEmployees=List des salariés -HrmSetup = Configuration GPEC -HrmSetupPage = Page de configuration du module GPEC -HRM_MAXRANK=Note maximale pour une compétence -HRM_DEFAULT_SKILL_DESCRIPTION=Description par défaut d'une note lors de la création d'une nouvelle compétence -HrmAbout = A propos du module GPEC +HrmSetup = Hrm setup +HrmSetupPage = Hrm setup page +HRM_MAXRANK=Maximum rank for a skill +HRM_DEFAULT_SKILL_DESCRIPTION=Default description of ranks when skill is created +HrmAbout = About Hrm traduction_note=Translate -deplacement=Déplacement -DateEval=Date évaluation -JobCard=Fiche métier -Job=Métier -Jobs=Métiers -NewSkill=Nouvelle compétence -SkillType=Type de compétence -Skilldets=Liste des notes pour cette compétence +deplacement=Shift +DateEval=Evaluation date +JobCard=Job card +Job=Travail planifié +Jobs=Jobs +NewSkill=New Skill +SkillType=Skill type +Skilldets=List of ranks for this skill Skilldet=Skill level -rank=Note -ErrNoSkillSelected=Aucune compétence sélectionnée -ErrSkillAlreadyAdded=Cette compétence est déjà dans la liste -SkillHasNoLines=Cette compétence n'a pas de notes -skill=Compétence -Skills=Compétences -SkillCard=Fiche compétence -EmployeeSkillsUpdated=Les compétences du salarié ont été mises à jour (voir l'onglet "compétences" de la fiche du salarié) +rank=Rank +ErrNoSkillSelected=No skill selected +ErrSkillAlreadyAdded=This skill is already in the list +SkillHasNoLines=This skill has no lines +skill=Skill +Skills=Skills +SkillCard=Skill card +EmployeeSkillsUpdated=Employee skills have been updated (see "Skills" tab of employee card) Eval=Evaluation Evals=Evaluations -NewEval=Nouvelle evaluation -ValidateEvaluation=Valider évaluation -ConfirmValidateEvaluation=Etes vous sûr(e) de vouloir valider cette évaluation sous la référence %s? -EvaluationCard=Fiche évaluation -RequiredRank=Note requise pour ce métier -EmployeeRank=Note employé pour cette compétence -PositionCard=Fiche poste -EmployeesInThisPosition=Salariés occupant ce poste -Position=Poste -Positions=Postes -group1ToCompare=Groupe utilisateurs à analyser -group2ToCompare=Second groupe utilisateurs pour comparaison -OrJobToCompare=Comparer avec les compétences exigées pour un métier -difference=Différence -CompetenceAcquiredByOneOrMore=Compétence acquise par au moins un salarié mais non requise par le second élément de comparaison -MaxlevelGreaterThan=Niveau maximal supérieur au niveau requis -MaxLevelEqualTo=Niveau maximal égal au niveau requis -MaxLevelLowerThan=Niveau maximal inférieur au niveau requis -MaxlevelGreaterThanShort=Niveau salarié supérieur au niveau requis -MaxLevelEqualToShort=Niveau salarié égal au niveau requis -MaxLevelLowerThanShort= Niveau salarié inférieur au niveau requis -SkillNotAcquired=Compétence non acquise par tous les utilisateur et requise par le second élément de comparaison +NewEval=New evaluation +ValidateEvaluation=Validate evaluation +ConfirmValidateEvaluation=Are you sure you want to validate this evaluation with reference %s? +EvaluationCard=Evaluation card +RequiredRank=Required rank for this job +EmployeeRank=Employee rank for this skill +Position=Position +Positions=Positions +PositionCard=Position card +EmployeesInThisPosition=Employees in this position +group1ToCompare=Usergroup to analyze +group2ToCompare=Second usergroup for comparison +OrJobToCompare=Compare to job skills requirements +difference=Difference +CompetenceAcquiredByOneOrMore=Competence acquired by one or more users but not requested by the second comparator +MaxlevelGreaterThan=Max level greater than the one requested +MaxLevelEqualTo=Max level equal to that demand +MaxLevelLowerThan=Max level lower than that demand +MaxlevelGreaterThanShort=Employee level greater than the one requested +MaxLevelEqualToShort=Employee level equals to that demand +MaxLevelLowerThanShort=Employee level lower than that demand +SkillNotAcquired=Skill not acquired by all users and requested by the second comparator legend=Légende -TypeSkill=Type de compétence -AddSkill=Ajouter des compétences à ce métier -RequiredSkills=Compétences requises pour ce métier -UserRank=Note utilisateur -SkillList=Liste des compétences -SaveRank=Enregistrer notes -knowHow=Savoir faire -HowToBe=Savoir être -knowledge=Savoir -AbandonmentComment=Commentaire abandon -DateLastEval=Date dernière évaluation -NoEval=Aucune évaluation effectuée pour ce salarié -HowManyUserWithThisMaxNote=Nombre d'utilisateurs ayant cette note -HighestRank=Note la plus haute -SkillComparison=Comparaison des compétences -ReadSkillJobPosition=Lire les compétences / métiers / postes -CreateUpdateSkillJobPosition=Créer / mettre à jour les compétences / métiers / postes -DeleteSkillJobPosition=Supprimer les compétences / métiers / postes -ReadEval=Lire les évaluations -CreateUpdateEval=Créer / mettre à jour les évaluations -ValidateEval=Valider les évaluations -DeleteEval=Supprimer les évaluations -SeeComparisonMenu=Accéder au menu de comparaison des compétences +TypeSkill=Skill type +AddSkill=Add skills to job +RequiredSkills=Required skills for this job +UserRank=User Rank +SkillList=Skill list +SaveRank=Save rank +knowHow=Know how +HowToBe=How to be +knowledge=Knowledge +AbandonmentComment=Abandonment comment +DateLastEval=Date last evaluation +NoEval=No evaluation done for this employee +HowManyUserWithThisMaxNote=Number of users with this rank +HighestRank=Highest rank +SkillComparison=Skill comparison +ReadSkillJobPosition=Read skills / jobs / positions +CreateUpdateSkillJobPosition=Create / update skills / jobs / positions +DeleteSkillJobPosition=Delete skills / jobs / positions +ReadEval=Read evaluations +CreateUpdateEval=Create / update evaluations +ValidateEval=Validate evaluations +DeleteEval=Delete evaluations +SeeComparisonMenu=Access skills comparison menu diff --git a/htdocs/langs/fr_FR/languages.lang b/htdocs/langs/fr_FR/languages.lang index bee596ccf44..46214457660 100644 --- a/htdocs/langs/fr_FR/languages.lang +++ b/htdocs/langs/fr_FR/languages.lang @@ -2,10 +2,11 @@ Language_am_ET=Ethiopien Language_ar_AR=Arabe Language_ar_EG=Arabe (Egypte) -Language_ar_MA=Arabic (Moroco) +Language_ar_MA=Arabe (Maroc) Language_ar_SA=Arabe Language_ar_TN=Arabe (Tunisie) Language_ar_IQ=Arabe (Irak) +Language_as_IN=Assamese Language_az_AZ=Azerbaïdjanais Language_bn_BD=Bengalais Language_bn_IN=Bengali (Inde) @@ -72,6 +73,7 @@ Language_it_IT=Italien Language_it_CH=Italien (Suisse) Language_ja_JP=Japonais Language_ka_GE=Géorgien +Language_kk_KZ=Kazakh Language_km_KH=Khmer Language_kn_IN=Kannada Language_ko_KR=Corée @@ -92,6 +94,7 @@ Language_ro_MD=Roumain (Moldavie) Language_ro_RO=Roumain Language_ru_RU=Russe Language_ru_UA=Russe (Ukraine) +Language_tg_TJ=Tajik Language_tr_TR=Turque Language_sl_SI=Slovène Language_sv_SV=Suédois diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 9aecafe3f34..da62020916d 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -246,7 +246,7 @@ DefaultModel=Modèle de document par défaut Action=Action About=À propos Number=Nombre -NumberByMonth=Nombre total des signalements par mois +NumberByMonth=Nombre total par mois AmountByMonth=Montant par mois Numero=Numéro Limit=Limite @@ -804,6 +804,7 @@ LinkToSupplierInvoice=Lier à une facture fournisseur LinkToContract=Lier à un contrat LinkToIntervention=Lier à une intervention LinkToTicket=Lien vers le ticket +LinkToMo=Link to Mo CreateDraft=Créer brouillon SetToDraft=Retour en brouillon ClickToEdit=Cliquer ici pour éditer @@ -924,7 +925,7 @@ WebSiteAccounts=Comptes de site web ExpenseReport=Note de frais ExpenseReports=Notes de frais HR=HR -HRAndBank=Salarié +HRAndBank=RH et banque AutomaticallyCalculated=Calculé automatiquement TitleSetToDraft=Retour à l'état de brouillon ConfirmSetToDraft=Etes vous sûr de vouloir revenir à l'état Brouillon ? @@ -1137,17 +1138,23 @@ CopiedToClipboard=Copié dans le presse-papier InformationOnLinkToContract=Ce montant n’est que le total de toutes les lignes du contrat. Aucune notion de temps n’est prise en considération. ConfirmCancel=Êtes-vous sûr de vous annuler EmailMsgID=E-mail MsgID -SetToEnabled=Activer -SetToDisabled=Désactiver -ConfirmMassEnabling=Confirmation d'activation en masse -ConfirmMassEnablingQuestion=Êtes-vous sur de vouloir activer les %s enregistrement(s) sélectionné(s) ? -ConfirmMassDisabling=Confirmation de desactivation en masse -ConfirmMassDisablingQuestion=Êtes-vous sur de vouloir desactiver les %s enregistrement(s) sélectionné(s) ? +SetToEnabled=Définir sur activé +SetToDisabled=Définir sur désactivé +ConfirmMassEnabling=confirmation d'activation en masse +ConfirmMassEnablingQuestion=Êtes-vous sûr de vouloir activer les %s enregistrement(s) sélectionné(s) ? +ConfirmMassDisabling=confirmation de désactivation en masse +ConfirmMassDisablingQuestion=Êtes-vous sûr de vouloir désactiver les %s enregistrement(s) sélectionné(s) ? RecordsEnabled=%s enregistrement(s) activé(s) RecordsDisabled=%s enregistrement(s) désactivé(s) RecordEnabled=Enregistrement activé RecordDisabled=Enregistrement désactivé -ConfirmMassLeaveApprovalQuestion=Êtes-vous sur de vouloir approuver les %s enregistrement(s) sélectionné(s) ? -ConfirmMassLeaveApproval=Confirmation d'approbation de congé en masse +Forthcoming=À venir +Currently=Actuellement +ConfirmMassLeaveApprovalQuestion=Êtes-vous sûr de vouloir approuver le(s) %s enregistrement(s) sélectionné(s) ? +ConfirmMassLeaveApproval=Confirmation de l'approbation en masse des congés RecordAproved=Enregistrement approuvé RecordsApproved=%s enregistrement(s) approuvé(s) +Properties=Properties +hasBeenValidated=%s has been validated +ClientTZ=Fuseau horaire client (utilisateur) +NotClosedYet=Not yet closed diff --git a/htdocs/langs/fr_FR/margins.lang b/htdocs/langs/fr_FR/margins.lang index fabd7851aad..dd1247311ff 100644 --- a/htdocs/langs/fr_FR/margins.lang +++ b/htdocs/langs/fr_FR/margins.lang @@ -22,7 +22,7 @@ ProductService=Produit ou Service AllProducts=Tous les produits et services ChooseProduct/Service=Choisissez le produit ou le service ForceBuyingPriceIfNull=Forcer le prix d'achat au prix de vente si non renseigné -ForceBuyingPriceIfNullDetails=Si le prix d'achat/revient n'est pas défini quand on ajouter une nouvelle ligne, et que cette option est "ON", la marge sera de 0 sur la nouvelle ligne (le prix d'achat/revient = prix de vente). Si l'option est à "OFF" (recommandé), la marge sera égale à la valeur suggérée par défaut (et peut être 100% si aucune valeur par défaut n'est trouvé). +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0%% on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100%% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Méthode de gestion des remises globales UseDiscountAsProduct=Comme un produit UseDiscountAsService=Comme un service diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 2e1498e4507..b848c156383 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -7,7 +7,7 @@ Members=Adhérents ShowMember=Afficher fiche adhérent UserNotLinkedToMember=Utilisateur non lié à un adhérent ThirdpartyNotLinkedToMember=Tiers non lié à un adhérent -MembersTickets=Étiquettes d'adhérents +MembersTickets=Étiquettes d'adresses adhérents FundationMembers=Membres de l'association ListOfValidatedPublicMembers=Liste des adhérents publics validés ErrorThisMemberIsNotPublic=Cet adhérent n'est pas public @@ -19,8 +19,8 @@ MembersCards=Carte de visite pour les adhérents MembersList=Liste des adhérents MembersListToValid=Liste des adhérents brouillons (à valider) MembersListValid=Liste des adhérents valides -MembersListUpToDate=Liste des adhérents validés avec une adhésion à jour -MembersListNotUpToDate=Liste des adhérents validés avec une adhésion expirée +MembersListUpToDate=Liste des adhérents validés avec une cotisation à jour +MembersListNotUpToDate=Liste des adhérents validés avec une cotisation expirée MembersListExcluded=Liste des adhérents exclus MembersListResiliated=Liste des adhérents résiliés MembersListQualified=Liste des adhérents qualifiés @@ -32,7 +32,7 @@ MembersWithSubscriptionToReceive=Adhérents avec cotisation à recevoir MembersWithSubscriptionToReceiveShort=Cotisations à recevoir DateSubscription=Date adhésion DateEndSubscription=Date fin adhésion -EndSubscription=La cotisation arrive à échéance +EndSubscription=Fin adhésion SubscriptionId=Id adhésion WithoutSubscription=Sans adhésion MemberId=Id adhérent @@ -45,7 +45,7 @@ MemberStatusDraft=Brouillon (à valider) MemberStatusDraftShort=Brouillon MemberStatusActive=Validé (attente cotisation) MemberStatusActiveShort=Validé -MemberStatusActiveLate=Adhésion/cotisation expirée +MemberStatusActiveLate=Adhésion / cotisation expirée MemberStatusActiveLateShort=Expiré MemberStatusPaid=Adhésions à jour MemberStatusPaidShort=A jour @@ -68,7 +68,7 @@ DeleteAMemberType=Supprimer un type d'adhérent ConfirmDeleteMemberType=Êtes-vous sur de vouloir supprimer ce type d' adhérent ? MemberTypeDeleted=Type d'adhérent supprimé MemberTypeCanNotBeDeleted=Ce type d'adhérent ne peut pas être supprimé -NewSubscription=Nouvelle adhésion +NewSubscription=Nouvelle cotisation NewSubscriptionDesc=Ce formulaire permet de vous inscrire comme nouvel adhérent de l'association. Pour un renouvellement (si vous êtes déjà adhérent), contactez plutôt l'association par email %s. Subscription=Adhésion / cotisation Subscriptions=Adhésions / cotisations @@ -88,11 +88,12 @@ Moral=Personne morale MorAndPhy=Personnes morales et physiques Reenable=Réactiver ExcludeMember=Exclure un adhérent +Exclude=Exclure ConfirmExcludeMember=Êtes-vous sûr de vouloir exclure cet adhérent ? ResiliateMember=Résilier un adhérent ConfirmResiliateMember=Êtes-vous sûr de vouloir résilier cet adhérent ? DeleteMember=Effacer un membre -ConfirmDeleteMember=Êtes-vous sûr de vouloir effacer ce membre (Effacer un membre efface aussi toutes ses cotisations) ? +ConfirmDeleteMember=Êtes-vous sûr de vouloir supprimer ce membre (Supprimer un membre supprime aussi toutes ses cotisations) ? DeleteSubscription=Effacer une adhésion ConfirmDeleteSubscription=Êtes-vous sûr de vouloir effacer cette adhésion ? Filehtpasswd=Fichier htpasswd @@ -104,7 +105,7 @@ BlankSubscriptionForm=Formulaire d'auto-inscription publique BlankSubscriptionFormDesc=Dolibarr peut vous fournir un URL/site web public afin de permettre aux visiteurs externes de faire une demande d'inscription à la fondation. Si un module de paiement est actif, un formulaire de paiement sera également fourni automatiquement. EnablePublicSubscriptionForm=Activer le formulaire public d'auto-inscription ForceMemberType=Forcer le type d'adhérent -ExportDataset_member_1=Adhérents et adhésions +ExportDataset_member_1=Adhérents et cotisations ImportDataset_member_1=Adhérents LastMembersModified=Les %s derniers adhérents modifiés LastSubscriptionsModified=Les %s dernières adhésions modifiées @@ -139,7 +140,7 @@ ThisIsContentOfSubscriptionReminderEmail=Nous voulons vous informer que votre ad ThisIsContentOfYourCard=Ceci est un rappel des informations que nous avons vous concernant. N'hésitez pas à nous contacter en cas d'erreur.

    DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Sujet de l'email reçu en cas d'auto-inscription d'un invité DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Email reçu en cas d'auto-inscription d'un invité -DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Modèle Email à utiliser pour envoyer un email à un adhérent sur auto-adhésion de l'adhérent +DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Modèle Email à utiliser pour envoyer un email à un adhérent sur auto-inscription de l'adhérent DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Modèle d'email à utiliser pour envoyer un email à un membre sur la validation d'un membre DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Modèle d'email électronique à utiliser pour envoyer un courrier électronique à un membre lors de l'enregistrement d'une nouvelle cotisation DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Modèle d'email électronique à utiliser pour envoyer un rappel par courrier électronique lorsque l'adhésion est sur le point d'expirer @@ -156,7 +157,7 @@ DescADHERENT_CARD_FOOTER_TEXT=Texte imprimé sur le bas des cartes d'adhérent ShowTypeCard=Voir type '%s' HTPasswordExport=Génération fichier htpassword NoThirdPartyAssociatedToMember=Pas de tiers associé à cet adhérent -MembersAndSubscriptions= Adhérents et Adhésions +MembersAndSubscriptions=Adhérents et Cotisations MoreActions=Action complémentaire à l'enregistrement MoreActionsOnSubscription=Action complémentaire proposée par défaut à l'enregistrement de l'adhésion MoreActionBankDirect=Création une écriture directe sur le compte bancaire ou caisse @@ -168,7 +169,7 @@ DocForAllMembersCards=Génération de cartes pour tous les adhérents DocForOneMemberCards=Génération de cartes pour un adhérent particulier DocForLabels=Génération d'étiquettes d'adresses SubscriptionPayment=Paiement cotisation -LastSubscriptionDate=Date de dernière adhésion +LastSubscriptionDate=Date de la dernière cotisation LastSubscriptionAmount=Montant dernière adhésion LastMemberType=Dernier type d'adhérent MembersStatisticsByCountries=Statistiques des membres par pays @@ -186,7 +187,7 @@ MembersByRegion=Cet écran vous montre les statistiques sur les adhérents par r MembersStatisticsDesc=Choisissez les statistiques que vous désirez consulter... MenuMembersStats=Statistiques LastMemberDate=Date dernière adhésion -LatestSubscriptionDate=Date de dernière adhésion +LatestSubscriptionDate=Date de dernière cotisation MemberNature=Nature de l'adhérent MembersNature=Nature des adhérents Public=Informations publiques @@ -194,15 +195,15 @@ NewMemberbyWeb=Nouvel adhérent ajouté. En attente de validation NewMemberForm=Nouvel Adhérent form SubscriptionsStatistics=Statistiques sur les cotisations NbOfSubscriptions=Nombre de cotisations -AmountOfSubscriptions=Montant de cotisations +AmountOfSubscriptions=Montant des cotisations TurnoverOrBudget=Chiffre affaire (pour société) ou Budget (asso ou collectivité) DefaultAmount=Montant par défaut de la cotisation -CanEditAmount=Le visiteur peut modifier/choisir le montant de sa cotisation +CanEditAmount=Le visiteur peut modifier / choisir le montant de sa cotisation MEMBER_NEWFORM_PAYONLINE=Rediriger sur la page intégrée de paiement en ligne ByProperties=Par nature MembersStatisticsByProperties=Statistiques des adhérents par nature -VATToUseForSubscriptions=Taux de TVA pour les adhésions -NoVatOnSubscription=Pas de TVA sur les adhésions +VATToUseForSubscriptions=Taux de TVA pour les cotisations +NoVatOnSubscription=Pas de TVA pour les cotisations ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Produit/Service utilisé pour la ligne de cotisation dans la facture: %s NameOrCompany=Nom ou société SubscriptionRecorded=Adhésion enregistré @@ -215,3 +216,5 @@ YouMayFindYourInvoiceInThisEmail=Vous pouvez trouver votre facture jointe à cet XMembersClosed=%s adhérent(s) résilié(s) XExternalUserCreated=%s utilisateur(s) externe(s) créé(s) ForceMemberNature=Forcer la nature de l'adhérent (personne physique ou morale) +CreateDolibarrLoginDesc=La création d'un login utilisateur pour les membres leur permet de se connecter à l'application. En fonction des autorisations accordées, ils pourront par exemple consulter ou modifier eux-mêmes leur dossier. +CreateDolibarrThirdPartyDesc=Un tiers est l'entité juridique qui sera utilisée sur la facture si vous décidez de générer une facture pour chaque cotisation. Vous pourrez le créer plus tard au cours du processus d'enregistrement de la cotisation. diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang index a0ab429a70c..5a89a594cc3 100644 --- a/htdocs/langs/fr_FR/mrp.lang +++ b/htdocs/langs/fr_FR/mrp.lang @@ -9,6 +9,7 @@ LatestBOMModified=Le %s dernières BOMs modifiées LatestMOModified=Les %s derniers Ordres de Fabrication modifiés Bom=Nomenclatures produits (BOM) BillOfMaterials=Nomenclature BOM +BillOfMaterialsLines=Lignes de nomenclature BOMsSetup=Configuration du module BOM ListOfBOMs=Liste des BOMs ListOfManufacturingOrders=Liste des Ordres de Fabrication @@ -55,6 +56,7 @@ WarehouseForProduction=Entrepôt pour la fabrication CreateMO=Créer OF ToConsume=A consommer ToProduce=Produire +ToObtain=A obtenir QtyAlreadyConsumed=Qté déjà consommée QtyAlreadyProduced=Qté déjà produite QtyRequiredIfNoLoss=Quantité requise s'il n'y a pas de perte (l'efficacité de fabrication est de 100%%) @@ -102,3 +104,6 @@ HumanMachine=Humain/machine WorkstationArea=Espace Poste de travail Machines=Machines THMEstimatedHelp=Ce taux permet de définir un coût prévisionnel de l'article +MOAndLines=Ordres de fabrication et lignes +BOM=Nomenclature +CollapseBOMHelp=Vous pouvez définir l'affichage par défaut du détail des nomenclature dans la configuration du module "Nomenclature Produits" diff --git a/htdocs/langs/fr_FR/opensurvey.lang b/htdocs/langs/fr_FR/opensurvey.lang index 35a9031583f..d9538d4c3e5 100644 --- a/htdocs/langs/fr_FR/opensurvey.lang +++ b/htdocs/langs/fr_FR/opensurvey.lang @@ -48,6 +48,8 @@ AddEndHour=Ajouter heure de fin votes=vote(s) NoCommentYet=Pas de commentaires laissés pour le moment sur ce sondage CanComment=Les votants peuvent poster des commentaires +YourVoteIsPrivate=This poll is private, nobody can see your vote. +YourVoteIsPublic=This poll is public, anybody with the link can see your vote. CanSeeOthersVote=Les votants peuvent voir les votes des autres SelectDayDesc=Pour chaque jour, vous pouvez choisir, ou pas, les heures au format suivant :
    - laisser vide,
    - "8h", "8H" ou "8:00" pour définir uniquement une heure de début,
    - "8-11", "8h-11h", "8H-11H" ou "8:00-11:00" pour définir une heure de début et de fin,
    - "8h15-11h15", "8H15-11H15" ou "8:15-11:15" pour définir une heure de début et fin avec précision sur les minutes. BackToCurrentMonth=Retour au mois en cours diff --git a/htdocs/langs/fr_FR/printing.lang b/htdocs/langs/fr_FR/printing.lang index 62cad4af2c5..49ac6d2292d 100644 --- a/htdocs/langs/fr_FR/printing.lang +++ b/htdocs/langs/fr_FR/printing.lang @@ -1,10 +1,10 @@ # Dolibarr language file - Source file is en_US - printing -Module64000Name=Impressions Directe -Module64000Desc=Activer le système d'impression Directe -PrintingSetup=Réglages du module Impression Directe -PrintingDesc=Ce module ajoute un bouton Imprimer afin d'envoyer directement les documents à une imprimante (sans ouvrir le document dans une application). -MenuDirectPrinting=Travaux d'impressions directe -DirectPrint=Impressions Directe +Module64000Name=One click Printing +Module64000Desc=Enable One click Printing System +PrintingSetup=Setup of One click Printing System +PrintingDesc=This module adds a Print button to various modules to allow documents to be printed directly to a printer with no need to open the document into another application. +MenuDirectPrinting=One click Printing jobs +DirectPrint=One click Print PrintingDriverDesc=Paramètres de configuration pour le driver d'impression ListDrivers=Liste des drivers PrintTestDesc=Liste des imprimantes @@ -50,5 +50,5 @@ GoogleAuthNotConfigured=Configuration Google OAuth non terminé. Activer le modu GoogleAuthConfigured=Identifiants Google OAuth trouvé dans la configuration du module OAuth. PrintingDriverDescprintgcp=Paramètres de configuration des drivers Google Cloud Print pour les impressions. PrintingDriverDescprintipp=Variables de configuration pour le pilotes d'impression Cups. -PrintTestDescprintgcp=List des imprimantes Google Cloud Print. +PrintTestDescprintgcp=Liste des imprimantes Google Cloud Print. PrintTestDescprintipp=Liste des imprimantes pour Cups. diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang index 193ecb503e1..ccd5e43d3d7 100644 --- a/htdocs/langs/fr_FR/productbatch.lang +++ b/htdocs/langs/fr_FR/productbatch.lang @@ -27,9 +27,9 @@ StockDetailPerBatch=Stock détaillé par lot SerialNumberAlreadyInUse=Le numéro de série %s est déjà utilisé pour le produit %s TooManyQtyForSerialNumber=Vous ne pouvez avoir qu'un seul produit %s pour le numéro de série %s ManageLotMask=Masque personnalisé -CustomMasks=Option to define a different numbering mask for each product -BatchLotNumberingModules=Numbering rule for automatic generation of lot number -BatchSerialNumberingModules=Numbering rule for automatic generation of serial number (for products with property 1 unique lot/serial for each product) +CustomMasks=Option pour définir un masque de numérotation différent pour chaque produit +BatchLotNumberingModules=Règle de numérotation pour la génération automatique de numéro de lot +BatchSerialNumberingModules=Règle de numérotation pour la génération automatique de numéro de série (pour les produits avec propriété 1 lot/série unique pour chaque produit) QtyToAddAfterBarcodeScan=Quantité à ajouter pour chaque code à barres/lot/série scanné LifeTime=Durée de vie (en jours) EndOfLife=Fin d'utilisation @@ -37,7 +37,8 @@ ManufacturingDate=Date de fabrication DestructionDate=Date de destruction FirstUseDate=Date de première mise en service QCFrequency=Fréquence du contrôle qualité (en jours) - +ShowAllLots=Show all lots +HideLots=Hide lots #Traceability - qc status OutOfOrder=Hors d'usage InWorkingOrder=En état de marche diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 24e5c062cc7..be7b4a2726e 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -75,6 +75,7 @@ SellingPriceTTC=Prix de vente TTC SellingMinPriceTTC=Prix de vente min. (TTC) CostPriceDescription=Ce champ de prix (hors taxes) peut être utilisé pour saisir le montant moyen que ce produit coûte à votre société. Il peut s'agir de n'importe quel prix que vous calculez vous-même, par exemple à partir du prix d'achat moyen plus le coût moyen de production et de distribution. CostPriceUsage=Cette valeur peut être utilisée dans le calcul des marges. +ManufacturingPrice=Manufacturing price SoldAmount=Solde PurchasedAmount=Montant des achats NewPrice=Nouveau prix @@ -397,10 +398,13 @@ ActionAvailableOnVariantProductOnly=Action disponible uniquement sur la variante ProductsPricePerCustomer=Prix produit par clients ProductSupplierExtraFields=Attributs supplémentaires (Prix fournisseur) DeleteLinkedProduct=Supprimer le produit enfant lié à la combinaison +AmountUsedToUpdateWAP=Amount to use to update the Weighted Average Price PMPValue=Prix moyen pondéré (PMP) PMPValueShort=PMP -Rank=Rang -mandatoryperiod=Périodes obligatoires -mandatoryPeriodNeedTobeSet=Attention périodes non saisies et obligatoires -mandatoryPeriodNeedTobeSetMsgValidate=Un service nécessite une période de début et de fin -mandatoryHelper=Message à l'utilisateur sur la necessité de saisir une date de début et une date de fin sur un service lors de la création/validation de facture, proposition commerciale , commande client.
    Cette action n'est pas bloquante dans le processus de validation +mandatoryperiod=Mandatory periods +mandatoryPeriodNeedTobeSet=Attention periods not entered and mandatory +mandatoryPeriodNeedTobeSetMsgValidate=A service requires a start and end period +mandatoryHelper=Message to the user on the need to enter a start date and an end date on a service when creating / validating an invoice, commercial proposal, sales order.
    This action is not blocking in the process of confirmation +DefaultBOM=Nomenclature par défaut +DefaultBOMDesc=La nomenclature par défaut qu'il est recommandé d'utiliser pour fabriquer ce produit. Ce champ ne peut être défini que si la nature du produit est '%s'. +Rank=Rank diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 9a7f3c189bc..53e1e80a0e8 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -274,6 +274,7 @@ NewInter=Nouvelle intervention OneLinePerTask=Une ligne par tâche OneLinePerPeriod=Une ligne par période OneLinePerTimeSpentLine=Une ligne pour chaque déclaration de temps passé +AddDetailDateAndDuration=Avec date et durée dans la description de la ligne RefTaskParent=Réf. Tâche parent ProfitIsCalculatedWith=Le bénéfice est calculé sur la base de AddPersonToTask=Ajouter également aux tâches @@ -281,3 +282,4 @@ UsageOrganizeEvent=Utilisation: Organisation d'événements PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classer le projet comme étant clos lorsque toutes ses tâches sont terminées (progression 100%%) PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Remarque : les projets existants avec toutes les tâches terminées à 100 %% ne seront pas affectés : vous devrez les fermer manuellement. Cette option n’affecte que les projets ouverts. SelectLinesOfTimeSpentToInvoice=Sélectionnez les lignes de temps consacré non facturées, puis l'action groupée "Générer la facture" pour les facturer +ProjectTasksWithoutTimeSpent=Project tasks without time spent diff --git a/htdocs/langs/fr_FR/propal.lang b/htdocs/langs/fr_FR/propal.lang index b019b275e6e..3728eba94d3 100644 --- a/htdocs/langs/fr_FR/propal.lang +++ b/htdocs/langs/fr_FR/propal.lang @@ -33,7 +33,7 @@ PropalStatusSigned=Signée (à facturer) PropalStatusNotSigned=Non signée (fermée) PropalStatusBilled=Facturée PropalStatusDraftShort=Brouillon -PropalStatusValidatedShort=Validé (ouvert) +PropalStatusValidatedShort=Ouvert PropalStatusClosedShort=Fermée PropalStatusSignedShort=Signée PropalStatusNotSignedShort=Non signée @@ -89,4 +89,11 @@ IdProposal=ID de la proposition commerciale IdProduct=ID produit PrParentLine=Ligne parent de proposition LineBuyPriceHT=Prix d'achat HT de la ligne - +SignPropal=Signer la proposition commerciale +RefusePropal=Refuser la proposition commerciale +Sign=Signer +PropalAlreadyRefused=Proposition commerciale déjà refusée +PropalAlreadySigned=Proposition commerciale déjà signée +PropalSigned=Proposition commerciale signée +PropalRefused=Proposition commerciale refusée +ConfirmRefusePropal=Êtes-vous sûr de vouloir refuser cette proposition commerciale ? diff --git a/htdocs/langs/fr_FR/receptions.lang b/htdocs/langs/fr_FR/receptions.lang index 5d01e6a75bd..afdb38558ae 100644 --- a/htdocs/langs/fr_FR/receptions.lang +++ b/htdocs/langs/fr_FR/receptions.lang @@ -36,7 +36,7 @@ StatsOnReceptionsOnlyValidated=Statistiques effectuées sur les réceptionss val SendReceptionByEMail=Envoyer la réception par email SendReceptionRef=Envoi du bordereau de réception %s ActionsOnReception=Événements sur la réception -ReceptionCreationIsDoneFromOrder=Pour le moment, la création d'une nouvelle réception se fait depuis la fiche commande. +ReceptionCreationIsDoneFromOrder=Pour le moment, la création d'une nouvelle réception se fait depuis la fiche commande fournisseur. ReceptionLine=Ligne de réception ProductQtyInReceptionAlreadySent=Quantité de produit en commande ouverte déjà expédiée ProductQtyInSuppliersReceptionAlreadyRecevied=Quantité de produit déjà reçu en commandes fournisseur ouvertes @@ -45,4 +45,4 @@ ReceptionsNumberingModules=Module de numérotation pour les réceptions ReceptionsReceiptModel=Modèles de document pour les réceptions NoMorePredefinedProductToDispatch=Plus de produits prédéfinis à expédier ReceptionExist=Une réception existe -ByingPrice=Prix d'achat +ByingPrice=Bying price diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index 1fc01004248..9244b3db53d 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -14,7 +14,7 @@ DefaultWarehouse=Entrepôt par défaut WarehouseTarget=Entrepôt destination ValidateSending=Valider expédition CancelSending=Annuler expédition -DeleteSending=Supprimer expédition +DeleteSending=Supprimer l'expédition Stock=Stock Stocks=Stocks MissingStocks=Stocks manquants @@ -37,7 +37,7 @@ AllWarehouses=Tous les entrepôts IncludeEmptyDesiredStock=Inclure aussi les stocks négatifs quand le stock désiré optimal n'est pas défini IncludeAlsoDraftOrders=Inclure également les commandes brouillons Location=Lieu -LocationSummary=Nom court du lieu +LocationSummary=Nom court de l'emplacement NumberOfDifferentProducts=Nombre de produits uniques NumberOfProducts=Nombre total de produits LastMovement=Dernier mouvement @@ -62,7 +62,7 @@ AllowAddLimitStockByWarehouse=Gérez également les valeurs des stocks minimums RuleForWarehouse=Règle pour les entrepôts WarehouseAskWarehouseOnThirparty=Définir un entrepôt sur les tiers WarehouseAskWarehouseDuringPropal=Définir un entrepôt sur les propositions commerciales -WarehouseAskWarehouseDuringOrder=Définir un entrepôt sur les commandes +WarehouseAskWarehouseDuringOrder=Définir un entrepôt sur les commandes clients UserDefaultWarehouse=Définir un entrepôt sur les utilisateurs MainDefaultWarehouse=Entrepôt par défaut MainDefaultWarehouseUser=Utiliser un entrepôt par défaut pour chaque utilisateur @@ -75,9 +75,9 @@ OrderDispatch=Réceptions RuleForStockManagementDecrease=Règle de gestion des décrémentations automatiques de stock (la décrémentation manuelle est toujours possible, même si une décrémentation automatique est activée) RuleForStockManagementIncrease=Règle de gestion des incrémentations de stock (l'incrémentation manuelle est toujours possible, même si une incrémentation automatique est activée) DeStockOnBill=Décrémenter les stocks physiques sur validation des factures/avoirs clients -DeStockOnValidateOrder=Décrémenterr les stocks physiques sur validation des commandes clients +DeStockOnValidateOrder=Décrémenter les stocks physiques sur validation des commandes clients DeStockOnShipment=Décrémenter les stocks physiques sur validation des expéditions -DeStockOnShipmentOnClosing=Décrémente les stocks physiques au classement "clôturée" de l'expédition +DeStockOnShipmentOnClosing=Décrémenter les stocks physiques au classement "clôturée" de l'expédition ReStockOnBill=Incrémenter les stocks physiques sur validation des factures/avoirs fournisseurs ReStockOnValidateOrder=Incrémenter les stocks physiques sur approbation des commandes fournisseurs ReStockOnDispatchOrder=Incrémenter les stocks physiques sur ventilation manuelle dans les entrepôts, après réception de la marchandise @@ -256,8 +256,10 @@ AutofillWithExpected=Remplir la quantité réelle avec la quantité prévue ShowAllBatchByDefault=Par défaut, afficher les détails des lots sur l'onglet "stock" du produit CollapseBatchDetailHelp=Vous pouvez définir l'affichage par défaut des détails du lot dans la configuration du module de stocks FieldCannotBeNegative=Le champ "%s" ne peut pas être négatif -ErrorWrongBarcodemode=Unknown Barcode mode -ProductDoesNotExist=Product does not exist -ErrorSameBatchNumber=Same batch number found in inventory list -ProductBatchDoesNotExist=Product with batch/serial does not exist -ProductBarcodeDoesNotExist=Product with barcode does not exist +ErrorWrongBarcodemode=Mode code-barres inconnu +ProductDoesNotExist=Le produit n'existe pas +ErrorSameBatchNumber=Même numéro de lot trouvé dans la liste d'inventaire +ProductBatchDoesNotExist=Le produit avec ce lot/série n'existe pas +ProductBarcodeDoesNotExist=Le produit avec ce code-barres n'existe pas +WarehouseId=ID entrepôt +WarehouseRef=Réf entrepôt diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang index 5bc4ef364bd..04dbafe507f 100644 --- a/htdocs/langs/fr_FR/ticket.lang +++ b/htdocs/langs/fr_FR/ticket.lang @@ -68,7 +68,7 @@ NeedMoreInformation=Attente retour demandeur NeedMoreInformationShort=En attente de retour Answered=Répondu Waiting=En attente -SolvedClosed=Solved +SolvedClosed=Résolu Deleted=Supprimé # Dict @@ -182,17 +182,17 @@ MessageSuccessfullyAdded=Ticket créé TicketMessageSuccessfullyAdded=Message ajouté avec succès TicketMessagesList=Liste des messages NoMsgForThisTicket=Pas de message pour ce ticket -Properties=Classification +TicketProperties=Classification LatestNewTickets=Les %s derniers tickets (non lus) TicketSeverity=Sévérité ShowTicket=Voir le ticket RelatedTickets=Tickets liés TicketAddIntervention=Créer intervention -CloseTicket=Close|Solve ticket -AbandonTicket=Abandon ticket -CloseATicket=Close|Solve a ticket +CloseTicket=Fermer|Résoudre ticket +AbandonTicket=Abandonner le ticket +CloseATicket=Fermer|Résoudre un ticket ConfirmCloseAticket=Confirmer la fermeture du ticket -ConfirmAbandonTicket=Do you confirm the closing of the ticket to status 'Abandonned' +ConfirmAbandonTicket=Confirmez-vous la fermeture du ticket au statut 'Abandonné' ConfirmDeleteTicket=Confirmez la suppression du ticket TicketDeletedSuccess=Ticket supprimé avec succès TicketMarkedAsClosed=Ticket indiqué fermé @@ -321,4 +321,4 @@ BoxNumberOfTicketByDay=Nombre de nouveaux tickets par jour BoxNewTicketVSClose=Nombre de nouveaux tickets aujourd’hui par rapport aux tickets fermés aujourd’hui TicketCreatedToday=Ticket créé aujourd'hui TicketClosedToday=Ticket fermé aujourd'hui -KMFoundForTicketGroup=Nous avons trouvé des sujets et des FAQ susceptibles de répondre à votre question, merci de les vérifier avant de soumettre le ticket +KMFoundForTicketGroup=We found topics and FAQs that may answers your question, thanks to check them before submitting the ticket diff --git a/htdocs/langs/nl_BE/admin.lang b/htdocs/langs/nl_BE/admin.lang index f083382f5cb..8484cbcff71 100644 --- a/htdocs/langs/nl_BE/admin.lang +++ b/htdocs/langs/nl_BE/admin.lang @@ -48,7 +48,6 @@ NotConfigured=Module/Applicatie is niet geconfigureerd OtherSetup=Overige instellingen CurrentValueSeparatorThousand=Duizend scheidingsteken LocalisationDolibarrParameters=Lokalisatieparameters -ClientTZ=Tijdzone van de klant (gebruiker) ClientHour=Tijd bij de klant (gebruiker) PHPTZ=Tijdzone binnen de PHP server DaylingSavingTime=Zomertijd (gebruiker) diff --git a/htdocs/langs/pt_BR/admin.lang b/htdocs/langs/pt_BR/admin.lang index 8efa423b8f0..5278c86bced 100644 --- a/htdocs/langs/pt_BR/admin.lang +++ b/htdocs/langs/pt_BR/admin.lang @@ -107,7 +107,6 @@ CurrentValueSeparatorThousand=Separador de milhar IdModule=Módulo ID IdPermissions=Permissão ID LanguageBrowserParameter=Parâmetro de Linguagem %s -ClientTZ=Fuso Horário do cliente (usuário) ClientHour=Horário do Cliente (usuário) OSTZ=Fuso Horário do OS do Servidor PHPTZ=Fuso Horário do servidor PHP @@ -1196,7 +1195,6 @@ ServiceSetup=Configurações do módulo de serviços ProductServiceSetup=Configurações dos módulos de produtos e serviços NumberOfProductShowInSelect=Número máximo de produtos para mostrar em listas de seleção de combinação (0 = sem limite) ViewProductDescInFormAbility=Exibir descrições de produtos em formulários (mostrados de outra forma em um pop-up de dicas de ferramentas) -DoNotAddProductDescAtAddLines=Não adicionar descrição do produto (do cartão do produto) no envio, adicione linhas nos formulários OnProductSelectAddProductDesc=Como usar a descrição dos produtos ao adicionar um produto como uma linha de um documento AutoFillFormFieldBeforeSubmit=Preencher automaticamente o campo de entrada da descrição com a descrição do produto DoNotAutofillButAutoConcat=Não preencha automaticamente o campo de entrada com a descrição do produto. A descrição do produto será concatenada com a descrição inserida automaticamente. diff --git a/htdocs/langs/pt_BR/eventorganization.lang b/htdocs/langs/pt_BR/eventorganization.lang index 1046596e57e..ad883105022 100644 --- a/htdocs/langs/pt_BR/eventorganization.lang +++ b/htdocs/langs/pt_BR/eventorganization.lang @@ -2,6 +2,5 @@ ModuleEventOrganizationName =Organização do Evento EventOrganizationDescription =Organização do Evento atraves do modulo Projetos EventOrganizationMenuLeft =Eventos organizados -EventOrganizationSetup =Configuracao de Organização do Evento EventOrganizationSetupPage =Organização do Eventos pagina de configuracao EvntOrgDraft =Minuta diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index a15f6c926a6..a5c420726e6 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -621,7 +621,6 @@ if ($id > 0) { print ''; print '
    '; - print '
    '; /* * Payments @@ -693,7 +692,6 @@ if ($id > 0) { dol_print_error($db); } - print '
    '; print '
    '; print ''; diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 0ec7786fc20..ec9ce00b7e9 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -517,17 +517,17 @@ class Loan extends CommonObject unset($this->labelStatus); // Force to reset the array of status label, because label can change depending on parameters if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; - $this->labelStatus[self::STATUS_UNPAID] = $langs->trans('Unpaid'); - $this->labelStatus[self::STATUS_PAID] = $langs->trans('Paid'); - $this->labelStatus[self::STATUS_STARTED] = $langs->trans("BillStatusStarted"); + $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('Unpaid'); + $this->labelStatus[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Paid'); + $this->labelStatus[self::STATUS_STARTED] = $langs->transnoentitiesnoconv("BillStatusStarted"); if ($status == 0 && $alreadypaid > 0) { - $this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); } - $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('Unpaid'); - $this->labelStatusShort[self::STATUS_PAID] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_STARTED] = $langs->trans("BillStatusStarted"); + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('Unpaid'); + $this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_STARTED] = $langs->transnoentitiesnoconv("BillStatusStarted"); if ($status == 0 && $alreadypaid > 0) { - $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); } } diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 2d6bfef3079..a151615bd35 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -71,6 +71,8 @@ if ($id > 0) { $upload_dir = $conf->loan->dir_output.'/'.dol_sanitizeFileName($object->ref); $modulepart = 'loan'; +$permissiontoadd = $user->rights->loan->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php + /* * Actions diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 09f3f85b7e4..c1f3231c737 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -72,7 +72,7 @@ function realCharForNumericEntities($matches) return chr((int) $newstringnumentity); } - return '&#'.$matches[1]; // Value will be unchanged because regex was /&#( )/ + return '&#'.$matches[1]; // Value will be unchanged because regex was /&#( )/ } /** @@ -94,7 +94,7 @@ function testSqlAndScriptInject($val, $type) do { $oldval = $val; $val = html_entity_decode($val, ENT_QUOTES | ENT_HTML5); - $val = preg_replace_callback('/&#(x?[0-9][0-9a-f]+)/i', 'realCharForNumericEntities', $val); // Sometimes we have entities without the ; at end so html_entity_decode does not work but entities is still interpreted by browser. + $val = preg_replace_callback('/&#(x?[0-9][0-9a-f]+)/i', 'realCharForNumericEntities', $val); // Sometimes we have entities without the ; at end so html_entity_decode does not work but entities is still interpreted by browser. } while ($oldval != $val); //print "after decoding $val\n"; @@ -454,7 +454,7 @@ if (!defined('NOTOKENRENEWAL') && !defined('NOSESSION')) { // Save in $_SESSION['newtoken'] what will be next token. Into forms, we will add param token = $_SESSION['newtoken'] $token = dol_hash(uniqid(mt_rand(), false), 'md5'); // Generates a hash of a random number. We don't need a secured hash, just a changing random value. $_SESSION['newtoken'] = $token; - dol_syslog("NEW TOKEN generated by : " . $_SERVER['PHP_SELF'], LOG_DEBUG); + dol_syslog("NEW TOKEN generated by : ".$_SERVER['PHP_SELF'], LOG_DEBUG); } } } @@ -494,20 +494,20 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt( // If token is not provided or empty, error (we are in case it is mandatory) if (!GETPOST('token', 'alpha') || GETPOST('token', 'alpha') == 'notrequired') { if (GETPOST('uploadform', 'int')) { - dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused. File size too large."); + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused. File size too large."); $langs->loadLangs(array("errors", "install")); print $langs->trans("ErrorFileSizeTooLarge").' '; print $langs->trans("ErrorGoBackAndCorrectParameters"); die; } else { if (defined('CSRFCHECK_WITH_TOKEN')) { - dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (CSRFCHECK_WITH_TOKEN protection) in main.inc.php. Token not provided.", LOG_WARNING); + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (CSRFCHECK_WITH_TOKEN protection) in main.inc.php. Token not provided.", LOG_WARNING); print "Access to a page that needs a token (constant CSRFCHECK_WITH_TOKEN is defined) is refused by CSRF protection in main.inc.php. Token not provided.\n"; } else { - dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (POST method or GET with a sensible value for 'action' parameter) in main.inc.php. Token not provided.", LOG_WARNING); + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (POST method or GET with a sensible value for 'action' parameter) in main.inc.php. Token not provided.", LOG_WARNING); print "Access to this page this way (POST method or GET with a sensible value for 'action' parameter) is refused by CSRF protection in main.inc.php. Token not provided.\n"; print "If you access your server behind a proxy using url rewriting and the parameter is provided by caller, you might check that all HTTP header are propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file or MAIN_SECURITY_CSRF_WITH_TOKEN to 0"; - if (! empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN)) { + if (!empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN)) { print " instead of ".$conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN; } print " into setup).\n"; @@ -520,7 +520,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt( $sessiontokenforthisurl = (empty($_SESSION['token']) ? '' : $_SESSION['token']); // TODO Get the sessiontokenforthisurl into the array of session token if (GETPOSTISSET('token') && GETPOST('token') != 'notrequired' && GETPOST('token', 'alpha') != $sessiontokenforthisurl) { - dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (invalid token), so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING); + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (invalid token), so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING); //print 'Unset POST by CSRF protection in main.inc.php.'; // Do not output anything because this create problems when using the BACK button on browsers. setEventMessages('SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry', null, 'warnings'); //if ($conf->global->MAIN_FEATURES_LEVEL >= 1) setEventMessages('Unset POST and GET params by CSRF protection in main.inc.php (Token provided was not generated by the previous page).'."
    \n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings'); @@ -785,7 +785,7 @@ if (!defined('NOLOGIN')) { // End test login / passwords if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success. // No data to test login, so we show the login page. - dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit", LOG_INFO); + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit", LOG_INFO); if (defined('NOREDIRECTBYMAINTOLOGIN')) { return 'ERROR_NOT_LOGGED'; } else { @@ -1176,7 +1176,7 @@ if (!defined('NOLOGIN')) { $user->getrights(); } -dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').(defined('NOTOKENRENEWAL') ? ' NOTOKENRENEWAL='.constant('NOTOKENRENEWAL') : ''), LOG_NOTICE); +dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').(defined('NOTOKENRENEWAL') ? ' NOTOKENRENEWAL='.constant('NOTOKENRENEWAL') : ''), LOG_NOTICE); //Another call for easy debugg //dol_syslog("Access to ".$_SERVER["PHP_SELF"].' '.$_SERVER["HTTP_REFERER"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST)); @@ -1437,7 +1437,9 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; // Do not index print ''."\n"; // Scale for mobile device print ''."\n"; - + if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { + print ''."\n"; + } // Favicon $favicon = DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png'; if (!empty($mysoc->logo_squarred_mini)) { @@ -1793,7 +1795,6 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead global $hookmanager, $menumanager; $searchform = ''; - $bookmarks = ''; // Instantiate hooks for external modules $hookmanager->initHooks(array('toprightmenu')); @@ -1818,12 +1819,12 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead print "\n".''."\n"; - print '
    '; // dol_invisible_topmenu differs from dol_hide_topmenu: dol_invisible_topmenu means we output menu but we make it invisible. + print '
    '; // dol_invisible_topmenu differs from dol_hide_topmenu: dol_invisible_topmenu means we output menu but we make it invisible. // Show menu entries print '
    '."\n"; $menumanager->atarget = $target; - $menumanager->showmenu('top', array('searchform'=>$searchform, 'bookmarks'=>$bookmarks)); // This contains a \n + $menumanager->showmenu('top', array('searchform'=>$searchform)); // This contains a \n print "
    \n"; // Define link to login card @@ -1888,7 +1889,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead } // Link to print main content area - if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $conf->browser->layout != 'phone') { + if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $qs = dol_escape_htmltag($_SERVER["QUERY_STRING"]); if (isset($_POST) && is_array($_POST)) { @@ -2002,7 +2003,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead print "
    \n"; // end div class="login_block" - print '
    '; + print ''; print '
    '; print "\n\n"; @@ -2279,7 +2280,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_company') .'
    '. $langs->trans("ThirdParty") .'
    + '. img_picto('', 'object_company').'
    '.$langs->trans("ThirdParty").'
    '; } @@ -2290,7 +2291,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_contact') .'
    '. $langs->trans("Contact") .'
    + '. img_picto('', 'object_contact').'
    '.$langs->trans("Contact").'
    '; } @@ -2301,7 +2302,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_propal') .'
    '. $langs->trans("Proposal") .'
    + '. img_picto('', 'object_propal').'
    '.$langs->trans("Proposal").'
    '; } @@ -2312,7 +2313,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_order') .'
    '. $langs->trans("Order") .'
    + '. img_picto('', 'object_order').'
    '.$langs->trans("Order").'
    '; } @@ -2323,7 +2324,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_bill') .'
    '. $langs->trans("Bill") .'
    + '. img_picto('', 'object_bill').'
    '.$langs->trans("Bill").'
    '; } @@ -2334,7 +2335,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_contract') .'
    '. $langs->trans("Contract") .'
    + '. img_picto('', 'object_contract').'
    '.$langs->trans("Contract").'
    '; } @@ -2345,7 +2346,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_propal') .'
    '. $langs->trans("AskPrice") .'
    + '. img_picto('', 'object_propal').'
    '.$langs->trans("AskPrice").'
    '; } @@ -2356,7 +2357,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_order') .'
    '. $langs->trans("SupplierOrder") .'
    + '. img_picto('', 'object_order').'
    '.$langs->trans("SupplierOrder").'
    '; } @@ -2367,7 +2368,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_bill') .'
    '. $langs->trans("SupplierBill") .'
    + '. img_picto('', 'object_bill').'
    '.$langs->trans("SupplierBill").'
    '; } @@ -2378,7 +2379,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_product') .'
    '. $langs->trans("Product") .'
    + '. img_picto('', 'object_product').'
    '.$langs->trans("Product").'
    '; } @@ -2389,7 +2390,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_service') .'
    '. $langs->trans("Service") .'
    + '. img_picto('', 'object_service').'
    '.$langs->trans("Service").'
    '; } @@ -2400,7 +2401,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_trip') .'
    '. $langs->trans("ExpenseReport") .'
    + '. img_picto('', 'object_trip').'
    '.$langs->trans("ExpenseReport").'
    '; } @@ -2411,7 +2412,7 @@ function top_menu_quickadd()
    - '. img_picto('', 'object_holiday') .'
    '. $langs->trans("Holidays") .'
    + '. img_picto('', 'object_holiday').'
    '.$langs->trans("Holidays").'
    '; } @@ -2710,7 +2711,6 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ global $hookmanager, $menumanager; $searchform = ''; - $bookmarks = ''; if (!empty($menu_array_before)) { dol_syslog("Deprecated parameter menu_array_before was used when calling main::left_menu function. Menu entries of module should now be defined into module descriptor and not provided when calling left_menu.", LOG_WARNING); @@ -2781,7 +2781,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ // Show left menu with other forms $menumanager->menu_array = $menu_array_before; $menumanager->menu_array_after = $menu_array_after; - $menumanager->showmenu('left', array('searchform'=>$searchform, 'bookmarks'=>$bookmarks)); // output menu_array and menu found in database + $menumanager->showmenu('left', array('searchform'=>$searchform)); // output menu_array and menu found in database // Dolibarr version + help + bug report link print "\n"; @@ -2856,12 +2856,12 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ $bugbaseurl .= urlencode("[*Short description*]\n"); $bugbaseurl .= urlencode("\n"); $bugbaseurl .= urlencode("## Environment\n"); - $bugbaseurl .= urlencode("- **Version**: " . DOL_VERSION . "\n"); - $bugbaseurl .= urlencode("- **OS**: " . php_uname('s') . "\n"); - $bugbaseurl .= urlencode("- **Web server**: " . $_SERVER["SERVER_SOFTWARE"] . "\n"); - $bugbaseurl .= urlencode("- **PHP**: " . php_sapi_name() . ' ' . phpversion() . "\n"); - $bugbaseurl .= urlencode("- **Database**: " . $db::LABEL . ' ' . $db->getVersion() . "\n"); - $bugbaseurl .= urlencode("- **URL(s)**: " . $_SERVER["REQUEST_URI"] . "\n"); + $bugbaseurl .= urlencode("- **Version**: ".DOL_VERSION."\n"); + $bugbaseurl .= urlencode("- **OS**: ".php_uname('s')."\n"); + $bugbaseurl .= urlencode("- **Web server**: ".$_SERVER["SERVER_SOFTWARE"]."\n"); + $bugbaseurl .= urlencode("- **PHP**: ".php_sapi_name().' '.phpversion()."\n"); + $bugbaseurl .= urlencode("- **Database**: ".$db::LABEL.' '.$db->getVersion()."\n"); + $bugbaseurl .= urlencode("- **URL(s)**: ".$_SERVER["REQUEST_URI"]."\n"); $bugbaseurl .= urlencode("\n"); $bugbaseurl .= urlencode("## Expected and actual behavior\n"); $bugbaseurl .= urlencode("[*Verbose description*]\n"); @@ -3223,6 +3223,7 @@ if (!function_exists("llxFooter")) { if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || $forceping) { //print ''; $hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id); + if (empty($conf->global->MAIN_FIRST_PING_OK_DATE) || (!empty($conf->file->instance_unique_id) && ($hash_unique_id != $conf->global->MAIN_FIRST_PING_OK_ID) && ($conf->global->MAIN_FIRST_PING_OK_ID != 'disabled')) || $forceping) { @@ -3231,7 +3232,7 @@ if (!function_exists("llxFooter")) { print "\n\n"; } elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]) || $forceping) { // Cookie is set when we uncheck the checkbox in the installation wizard. // MAIN_LAST_PING_KO_DATE - // Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent + // Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent (this month) if (!empty($conf->global->MAIN_LAST_PING_KO_DATE) && substr($conf->global->MAIN_LAST_PING_KO_DATE, 0, 6) == dol_print_date(dol_now(), '%Y%m') && !$forceping) { print "\n\n"; } else { diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index 6861f67db0d..7fe151b93f7 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -229,14 +229,14 @@ if (!empty($TSelectedCats)) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=d.fk_product'; } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; if ($socid > 0) { $sql .= ' AND s.rowid = '.((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " AND f.fk_statut NOT IN (".$db->sanitize(implode(', ', $invoice_status_except_list)).")"; diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index 3b14f1db808..062462be267 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -139,7 +139,7 @@ if ($id > 0 || !empty($ref)) { $sql = "SELECT s.nom as name, s.rowid as socid, s.code_client,"; $sql .= " f.rowid as facid, f.ref, f.total_ht,"; $sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " sc.fk_soc, sc.fk_user,"; } $sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive @@ -149,7 +149,7 @@ if ($id > 0 || !empty($ref)) { $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture as f"; $sql .= ", ".MAIN_DB_PREFIX."facturedet as d"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; @@ -157,7 +157,7 @@ if ($id > 0 || !empty($ref)) { $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND d.fk_facture = f.rowid"; $sql .= " AND d.fk_product = ".((int) $object->id); - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if (!empty($socid)) { @@ -170,7 +170,7 @@ if ($id > 0 || !empty($ref)) { $sql .= " AND d.buy_price_ht <> 0"; } $sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut, f.type"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user"; } $sql .= $db->order($sortfield, $sortorder); diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index ea0af722885..cab90270d64 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -1295,21 +1295,33 @@ if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) && $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); } + } - if (!$error) { - $addfieldentry = array( - 'name'=>GETPOST('propname', 'aZ09'), 'label'=>GETPOST('proplabel', 'alpha'), 'type'=>GETPOST('proptype', 'alpha'), - 'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'restricthtml'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}' - 'visible'=>GETPOST('propvisible', 'int'), 'enabled'=>GETPOST('propenabled', 'int'), - 'position'=>GETPOST('propposition', 'int'), 'notnull'=>GETPOST('propnotnull', 'int'), 'index'=>GETPOST('propindex', 'int'), 'searchall'=>GETPOST('propsearchall', 'int'), - 'isameasure'=>GETPOST('propisameasure', 'int'), 'comment'=>GETPOST('propcomment', 'alpha'), 'help'=>GETPOST('prophelp', 'alpha'), - 'css'=>GETPOST('propcss', 'aZ09'), 'cssview'=>GETPOST('propcssview', 'aZ09'), 'csslist'=>GETPOST('propcsslist', 'aZ09'), - 'validate' => GETPOST('propvalidate', 'int') - ); + if (!$error) { + $addfieldentry = array( + 'name'=>GETPOST('propname', 'aZ09'), + 'label'=>GETPOST('proplabel', 'alpha'), + 'type'=>GETPOST('proptype', 'alpha'), + 'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'restricthtml'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}' + 'visible'=>GETPOST('propvisible', 'int'), + 'enabled'=>GETPOST('propenabled', 'int'), + 'position'=>GETPOST('propposition', 'int'), + 'notnull'=>GETPOST('propnotnull', 'int'), + 'index'=>GETPOST('propindex', 'int'), + 'searchall'=>GETPOST('propsearchall', 'int'), + 'isameasure'=>GETPOST('propisameasure', 'int'), + 'comment'=>GETPOST('propcomment', 'alpha'), + 'help'=>GETPOST('prophelp', 'alpha'), + 'css'=>GETPOST('propcss', 'aZ09'), + 'cssview'=>GETPOST('propcssview', 'aZ09'), + 'csslist'=>GETPOST('propcsslist', 'aZ09'), + 'default'=>GETPOST('propdefault', 'restricthtml'), + 'noteditable'=>intval(GETPOST('propnoteditable', 'int')), + 'validate' => GETPOST('propvalidate', 'int') + ); - if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) { - $addfieldentry['arrayofkeyval'] = json_decode($addfieldentry['arrayofkeyval'], true); - } + if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) { + $addfieldentry['arrayofkeyval'] = json_decode($addfieldentry['arrayofkeyval'], true); } } @@ -1530,7 +1542,8 @@ if ($dirins && $action == 'generatepackage') { if (!dol_is_dir($dirofmodule)) { dol_mkdir($dirofmodule); } - $result = dol_compress_dir($dir, $outputfilezip, 'zip', '', $modulelowercase); + // Note: We exclude /bin/ to not include the already generated zip + $result = dol_compress_dir($dir, $outputfilezip, 'zip', '/\/bin\//', $modulelowercase); } else { $result = -1; } @@ -1833,9 +1846,11 @@ if (is_array($listofmodules) && count($listofmodules) > 0) { $linktoenabledisable .= '   '.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').''; } } else { - $linktoenabledisable .= ''; - $linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', 'style="padding-right: 8px"', false, 0, 0, '', 'classfortooltip', 1); - $linktoenabledisable .= "\n"; + if (!empty($moduleobj)) { + $linktoenabledisable .= ''; + $linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', 'style="padding-right: 8px"', false, 0, 0, '', 'classfortooltip', 1); + $linktoenabledisable .= "\n"; + } } // Loop to show tab of each module @@ -2804,7 +2819,7 @@ if ($module == 'initmodule') { print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -3577,7 +3592,7 @@ if ($module == 'initmodule') { print ''; } } else { - print ' '.$langs->trans("CLIFile").' : '.$langs->trans("FileNotYetGenerated");''; + print ' '.$langs->trans("CLIFile").' : '.$langs->trans("FileNotYetGenerated"); ''; print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print ''; } diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index ad1774b149e..8e316d014d5 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -83,7 +83,7 @@ class MyObject extends CommonObject * 'index' if we want an index in database. * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...). * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. - * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8). + * 'isameasure' must be set to 1 or 2 if field can be used for measure. Field type must be summable like integer or double(24,8). Use 1 in most cases, or 2 if you don't want to see the column total into list (for example for percentage) * 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'cssview'=>'wordbreak', 'csslist'=>'tdoverflowmax200' * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record @@ -883,12 +883,12 @@ class MyObject extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule@mymodule"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status'.$status; diff --git a/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php b/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php index 3c6442bd454..2f0ecd06774 100644 --- a/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php +++ b/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php @@ -22,7 +22,7 @@ if (empty($conf) || !is_object($conf)) { } -print "\n"; +print "\n"; global $user; diff --git a/htdocs/modulebuilder/template/mymoduleindex.php b/htdocs/modulebuilder/template/mymoduleindex.php index c0c98d88e8f..15f3d83ac54 100644 --- a/htdocs/modulebuilder/template/mymoduleindex.php +++ b/htdocs/modulebuilder/template/mymoduleindex.php @@ -173,7 +173,7 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read) END MODULEBUILDER DRAFT MYOBJECT */ -print '
    '; +print '
    '; $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; @@ -234,7 +234,7 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read) } */ -print '
    '; +print ''; // End of page llxFooter(); diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index f790f433e8c..43c57ca1f94 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -558,7 +558,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -571,7 +571,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } //Select mail models is same action as presend diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 59a3a1e72b0..ac4f6be13b8 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -662,7 +662,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/mrp/class/api_mos.class.php b/htdocs/mrp/class/api_mos.class.php index 92351184ebe..86d4758b45f 100644 --- a/htdocs/mrp/class/api_mos.class.php +++ b/htdocs/mrp/class/api_mos.class.php @@ -491,7 +491,8 @@ class Mos extends DolibarrApi if (!$error && $line->fk_warehouse > 0) { // Record stock movement $id_product_batch = 0; - $stockmove->origin = $this->mo; + $stockmove->origin_type = 'mo'; + $stockmove->origin_id = $this->mo->id; if ($qtytoprocess >= 0) { $idstockmove = $stockmove->livraison(DolibarrApiAccess::$user, $line->fk_product, $line->fk_warehouse, $qtytoprocess, 0, $labelmovement, dol_now(), '', '', $tmpproduct->status_batch, $id_product_batch, $codemovement); } else { @@ -550,7 +551,8 @@ class Mos extends DolibarrApi if (!$error && $line->fk_warehouse > 0) { // Record stock movement $id_product_batch = 0; - $stockmove->origin = $this->mo; + $stockmove->origin_type = 'mo'; + $stockmove->origin_id = $this->mo->id; if ($qtytoprocess >= 0) { $idstockmove = $stockmove->livraison(DolibarrApiAccess::$user, $line->fk_product, $line->fk_warehouse, $qtytoprocess, 0, $labelmovement, dol_now(), '', '', $tmpproduct->status_batch, $id_product_batch, $codemovement); } else { diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index a7ed52687df..cdad4e71968 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -625,6 +625,7 @@ class Mo extends CommonObject public function updateProduction(User $user, $notrigger = true) { $error = 0; + $role = ""; if ($this->status != self::STATUS_DRAFT) { $this->error = 'BadStatus'; diff --git a/htdocs/mrp/index.php b/htdocs/mrp/index.php index cbb7b5da305..c4480f76ed0 100644 --- a/htdocs/mrp/index.php +++ b/htdocs/mrp/index.php @@ -147,7 +147,7 @@ if ($conf->use_javascript_ajax) { print '
    '; -print '
    '; +print '
    '; /* * Last modified BOM @@ -245,7 +245,7 @@ if ($resql) { dol_print_error($db); } -print '
    '; +print ''; $parameters = array( //'type' => $type, diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 136952662cc..b2c3de8f101 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -688,7 +688,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -701,7 +701,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element, $socid, 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } //Select mail models is same action as presend diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php index 7e297206b3d..c81ed1f995e 100644 --- a/htdocs/mrp/mo_document.php +++ b/htdocs/mrp/mo_document.php @@ -83,12 +83,14 @@ if ($id > 0 || !empty($ref)) { $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'mrp', $object->id, 'mrp_mo', '', 'fk_soc', 'rowid', $isdraft); +$permissiontoadd = $user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php + /* * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php /* diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index 7c5c91c0511..e5648cad5f7 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -567,7 +567,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php index 12b9ade3f2a..6fb173c4295 100644 --- a/htdocs/mrp/mo_note.php +++ b/htdocs/mrp/mo_note.php @@ -60,7 +60,7 @@ if ($id > 0 || !empty($ref)) { $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'mrp', $object->id, 'mrp_mo', '', 'fk_soc', 'rowid', $isdraft); -$permissionnote = $user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php +$permissionnote = $user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 533e81f80a2..d7cc53cdc8b 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -284,7 +284,9 @@ if (empty($reshook)) { if (!$error && GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i) > 0) { // Record stock movement $id_product_batch = 0; - $stockmove->origin = $object; + $stockmove->origin_type = $object->element; + $stockmove->origin_id = $object->id; + $idstockmove = $stockmove->reception($user, $line->fk_product, GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i), $qtytoprocess, $pricetoprocess, $labelmovement, '', '', GETPOST('batchtoproduce-'.$line->id.'-'.$i), dol_now(), $id_product_batch, $codemovement); if ($idstockmove < 0) { $error++; @@ -975,7 +977,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($tmpproduct->status_batch) { $preselected = (GETPOSTISSET('batch-'.$line->id.'-'.$i) ? GETPOST('batch-'.$line->id.'-'.$i) : ''); print ''; - print $formproduct->selectLot('batch-'.$line->id.'-'.$i, 0, $line->fk_product, '', ''); + print $formproduct->selectLotDataList('batch-'.$line->id.'-'.$i, 0, $line->fk_product, '', ''); } print ''; } diff --git a/htdocs/mrp/tpl/linkedobjectblock.tpl.php b/htdocs/mrp/tpl/linkedobjectblock.tpl.php index ac3a6bafc07..5dbe583fd21 100644 --- a/htdocs/mrp/tpl/linkedobjectblock.tpl.php +++ b/htdocs/mrp/tpl/linkedobjectblock.tpl.php @@ -24,7 +24,7 @@ if (empty($conf) || !is_object($conf)) { exit; } -print "\n"; +print "\n"; global $user, $db; global $noMoreLinkedObjectBlockAfter; diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php index 73eab7773bd..0dc9f7ce63a 100644 --- a/htdocs/multicurrency/class/multicurrency.class.php +++ b/htdocs/multicurrency/class/multicurrency.class.php @@ -643,13 +643,12 @@ class MultiCurrency extends CommonObject include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; - $urlendpoint = 'http://apilayer.net/api/live?access_key='.$key; - //$urlendpoint.='&format=1'; - $urlendpoint .= (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? '' : '&source='.$conf->global->MULTICURRENCY_APP_SOURCE); + $urlendpoint = 'http://api.currencylayer.com/live?access_key='.$key; + $urlendpoint .= '&source=' . (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? 'USD' : $conf->global->MULTICURRENCY_APP_SOURCE); dol_syslog("Call url endpoint ".$urlendpoint); - $resget = getURLContent($urlendpoint, 'GET', '', 1, array(), array('http', 'https'), 1); + $resget = getURLContent($urlendpoint); if ($resget['content']) { $response = $resget['content']; diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index d0be7666a95..36a6af12750 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -479,7 +479,7 @@ if ($resql) { // var_dump($obj); print ' '; print '' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . ''; - print ' '; + print ' '; print ''; print ''; diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 19aff377c65..773571b7b1c 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -229,7 +229,7 @@ print ''; // Type $type = ($object->format == "A") ? 'classic' : 'date'; -print ''; @@ -323,7 +323,7 @@ if ($object->fk_user_creat > 0) { print ''; // Link -print ''; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index e35abff84bb..5888ddf3ec8 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -652,12 +652,12 @@ class Opensurveysondage extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Opened'); - $this->labelStatus[self::STATUS_CLOSED] = $langs->trans('Closed'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Opened'); - $this->labelStatusShort[self::STATUS_CLOSED] = $langs->trans('Closed'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Opened'); + $this->labelStatus[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('Closed'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Opened'); + $this->labelStatusShort[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('Closed'); } $statusType = 'status'.$status; diff --git a/htdocs/opensurvey/css/style.css b/htdocs/opensurvey/css/style.css index 409b64dddf5..e7f0d279a14 100644 --- a/htdocs/opensurvey/css/style.css +++ b/htdocs/opensurvey/css/style.css @@ -342,6 +342,13 @@ div.cadre table.resultats { td.nom { min-width: 160px; } +@media only screen and (max-width: 767px) +{ + td.nom { + min-width: 100px; + } +} + td.vide { min-width: 60px; } diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 3dc42def482..b05abe3fd40 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -107,7 +107,8 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); $permissiontoread = $user->rights->opensurvey->read; $permissiontoadd = $user->rights->opensurvey->write; -$permissiontodelete = $user->rights->opensurvey->delete; +// permission delete doesn't exists +$permissiontodelete = $user->rights->opensurvey->write; /* diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index d03cbca69c5..e37f9bf3de5 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -531,7 +531,7 @@ if ($object->fk_user_creat) { print ''; // Link -print ''; @@ -669,7 +664,7 @@ $nbcolonnes = substr_count($object->sujet, ',') + 1; print ''."\n"; print ''; -print '
    '."\n"; +print '
    '."\n"; // Start to show survey result print '
    '.$langs->trans("Type").''; +print '
    '.$langs->trans("Type").''; print img_picto('', dol_buildpath('/opensurvey/img/'.($type == 'classic' ? 'chart-32.png' : 'calendar-32.png'), 1), 'width="16"', 1); print ' '.$langs->trans($type == 'classic' ? "TypeClassic" : "TypeDate").'
    '.img_picto('', 'globe').' '.$langs->trans("UrlForSurvey", '').''; +print '
    '.$langs->trans("UrlForSurvey", '').''; // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); @@ -331,9 +331,9 @@ $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 $url = $urlwithroot.'/public/opensurvey/studs.php?sondage='.$object->id_sondage; -print ''; +print ''; if ($action != 'edit') { - print ajax_autoselect("opensurveyurl", $url); + print ajax_autoselect("opensurveyurl", $url, 'image'); } print '
    '.img_picto('', 'globe').' '.$langs->trans("UrlForSurvey", '').''; +print '
    '.$langs->trans("UrlForSurvey", '').''; // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); @@ -539,15 +539,10 @@ $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 $url = $urlwithouturlroot.dol_buildpath('/public/opensurvey/studs.php', 1).'?sondage='.$object->id_sondage; -$urllink = ''; +$urllink = ''; print $urllink; if ($action != 'edit') { - print ''; - print ' '.$langs->trans("Link").''; + print ajax_autoselect("opensurveyurl", $url, 'image'); } print '
    '."\n"; @@ -1041,7 +1036,7 @@ if (empty($testligneamodifier)) { print ''."\n"; print ''."\n"; print ''."\n"; for ($i = 0; $i < $nbcolonnes; $i++) { diff --git a/htdocs/partnership/admin/website.php b/htdocs/partnership/admin/website.php new file mode 100644 index 00000000000..96ebb4ba6e9 --- /dev/null +++ b/htdocs/partnership/admin/website.php @@ -0,0 +1,258 @@ + + * Copyright (C) 2006-2015 Laurent Destailleur + * Copyright (C) 2006-2012 Regis Houssin + * Copyright (C) 2011 Juanjo Menent + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/partnership/admin/website.php + * \ingroup partnership + * \brief File of main public page for partnership module + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/partnership/lib/partnership.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("admin", "partnership")); + +$action = GETPOST('action', 'aZ09'); + +if (!$user->admin) { + accessforbidden(); +} + +$error = 0; + + +/* + * Actions + */ + +if ($action == 'setPARTNERSHIP_ENABLE_PUBLIC') { + if (GETPOST('value')) { + dolibarr_set_const($db, 'PARTNERSHIP_ENABLE_PUBLIC', 1, 'chaine', 0, '', $conf->entity); + } else { + dolibarr_set_const($db, 'PARTNERSHIP_ENABLE_PUBLIC', 0, 'chaine', 0, '', $conf->entity); + } +} + +if ($action == 'update') { + $public = GETPOST('PARTNERSHIP_ENABLE_PUBLIC'); + + $res = dolibarr_set_const($db, "PARTNERSHIP_ENABLE_PUBLIC", $public, 'chaine', 0, '', $conf->entity); + + if (!($res > 0)) { + $error++; + } + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + + +/* + * View + */ + +$form = new Form($db); + +//$help_url = 'EN:Module_Partnership|FR:Module_Adhérents|ES:Módulo_Miembros'; +llxHeader('', $langs->trans("PartnershipsSetup"), $help_url); + + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("PartnershipsSetup"), $linkback, 'title_setup'); + +$head = partnershipAdminPrepareHead(); + + + +print ''; +print ''; +print ''; + +print dol_get_fiche_head($head, 'website', $langs->trans("Partnerships"), -1, 'user'); + +if ($conf->use_javascript_ajax) { + print "\n".''."\n"; +} + + +print ''.$langs->trans("BlankSubscriptionFormDesc").'

    '; + +$param = ''; + +$enabledisablehtml = $langs->trans("EnablePublicSubscriptionForm").' '; +if (empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) { + // Button off, click to enable + $enabledisablehtml .= ''; + $enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off'); + $enabledisablehtml .= ''; +} else { + // Button on, click to disable + $enabledisablehtml .= ''; + $enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on'); + $enabledisablehtml .= ''; +} +print $enabledisablehtml; +print ''; + + +print '
    '; + +if (!empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) { + print '
    '; + + print '
    '; + print '
    '."\n"; - print ''."\n"; + print ''."\n"; print '
    '; + + print ''; + print ''; + print ''; + print "\n"; + + // Force Type + $adht = new AdherentType($db); + print '\n"; + + // Force nature of member (mor/phy) + $morphys["phy"] = $langs->trans("Physical"); + $morphys["mor"] = $langs->trans("Moral"); + print '\n"; + + // Amount + print '\n"; + + // Can edit + print '\n"; + + // Jump to an online payment page + print '\n"; + + print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '; + print $langs->trans("ForceMemberType"); + print ''; + $listofval = array(); + $listofval += $adht->liste_array(1); + $forcetype = empty($conf->global->PARTNERSHIP_NEWFORM_FORCETYPE) ? -1 : $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE; + print $form->selectarray("PARTNERSHIP_NEWFORM_FORCETYPE", $listofval, $forcetype, count($listofval) > 1 ? 1 : 0); + print "
    '; + print $langs->trans("ForceMemberNature"); + print ''; + $forcenature = empty($conf->global->PARTNERSHIP_NEWFORM_FORCEMORPHY) ? 0 : $conf->global->PARTNERSHIP_NEWFORM_FORCEMORPHY; + print $form->selectarray("PARTNERSHIP_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1); + print "
    '; + print $langs->trans("DefaultAmount"); + print ''; + print ''; + print "
    '; + print $langs->trans("CanEditAmount"); + print ''; + print $form->selectyesno("PARTNERSHIP_NEWFORM_EDITAMOUNT", (!empty($conf->global->PARTNERSHIP_NEWFORM_EDITAMOUNT) ? $conf->global->PARTNERSHIP_NEWFORM_EDITAMOUNT : 0), 1); + print "
    '; + print $langs->trans("PARTNERSHIP_NEWFORM_PAYONLINE"); + print ''; + $listofval = array(); + $listofval['-1'] = $langs->trans('No'); + $listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')'; + if (!empty($conf->paybox->enabled)) { + $listofval['paybox'] = 'Paybox'; + } + if (!empty($conf->paypal->enabled)) { + $listofval['paypal'] = 'PayPal'; + } + if (!empty($conf->stripe->enabled)) { + $listofval['stripe'] = 'Stripe'; + } + print $form->selectarray("PARTNERSHIP_NEWFORM_PAYONLINE", $listofval, (!empty($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE) ? $conf->global->PARTNERSHIP_NEWFORM_PAYONLINE : ''), 0); + print "
    '; + print ''; + + print '
    '; + print ''; + print '
    '; +} + + +print dol_get_fiche_end(); + +print ''; + + +if (!empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) { + print '
    '; + //print $langs->trans('FollowingLinksArePublic').'
    '; + print img_picto('', 'globe').' '.$langs->trans('BlankSubscriptionForm').'
    '; + if (!empty($conf->multicompany->enabled)) { + $entity_qr = '?entity='.$conf->entity; + } else { + $entity_qr = ''; + } + + // Define $urlwithroot + $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file + //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current + + print ''; + print ajax_autoselect('publicurlmember'); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index f40b771b34d..f2b15735762 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -131,14 +131,14 @@ class Partnership extends CommonObject */ public $rowid; - public $fk_soc; + public $fk_soc; // Link to thirdparty + public $fk_member; // Link to member public $tms; public $fk_user_creat; public $fk_user_modif; public $status; - public $fk_member; public $date_partnership_start; public $date_partnership_end; public $count_last_url_check_error; @@ -1065,16 +1065,16 @@ class Partnership extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("partnership"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated'); - $this->labelStatus[self::STATUS_ACCEPTED] = $langs->trans('Accepted'); - $this->labelStatus[self::STATUS_REFUSED] = $langs->trans('Refused'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Validated'); - $this->labelStatusShort[self::STATUS_ACCEPTED] = $langs->trans('Accepted'); - $this->labelStatusShort[self::STATUS_REFUSED] = $langs->trans('Refused'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Canceled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); + $this->labelStatus[self::STATUS_ACCEPTED] = $langs->transnoentitiesnoconv('Accepted'); + $this->labelStatus[self::STATUS_REFUSED] = $langs->transnoentitiesnoconv('Refused'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); + $this->labelStatusShort[self::STATUS_ACCEPTED] = $langs->transnoentitiesnoconv('Accepted'); + $this->labelStatusShort[self::STATUS_REFUSED] = $langs->transnoentitiesnoconv('Refused'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); } $statusType = 'status'.$status; diff --git a/htdocs/partnership/lib/partnership.lib.php b/htdocs/partnership/lib/partnership.lib.php index 5305f86132e..23b5a2901fb 100644 --- a/htdocs/partnership/lib/partnership.lib.php +++ b/htdocs/partnership/lib/partnership.lib.php @@ -46,6 +46,11 @@ function partnershipAdminPrepareHead() $head[$h][2] = 'partnership_extrafields'; $h++; + $head[$h][0] = dol_buildpath("/partnership/admin/website.php", 1); + $head[$h][1] = $langs->trans("BlankSubscriptionForm"); + $head[$h][2] = 'website'; + $h++; + /* $head[$h][0] = dol_buildpath("/partnership/admin/about.php", 1); $head[$h][1] = $langs->trans("About"); diff --git a/htdocs/partnership/partnership_card.php b/htdocs/partnership/partnership_card.php index 2a281931046..99cdb74e264 100644 --- a/htdocs/partnership/partnership_card.php +++ b/htdocs/partnership/partnership_card.php @@ -639,7 +639,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -652,7 +652,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } //Select mail models is same action as presend diff --git a/htdocs/partnership/partnership_list.php b/htdocs/partnership/partnership_list.php index e9c577213d6..a5c52609d74 100644 --- a/htdocs/partnership/partnership_list.php +++ b/htdocs/partnership/partnership_list.php @@ -652,7 +652,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/partnership/partnershipindex.php b/htdocs/partnership/partnershipindex.php index f1a9f8c507b..0b8a6cd33c9 100644 --- a/htdocs/partnership/partnershipindex.php +++ b/htdocs/partnership/partnershipindex.php @@ -133,7 +133,7 @@ if (! empty($conf->partnership->enabled) && $user->rights->partnership->read) { END MODULEBUILDER DRAFT MYOBJECT */ -print '
    '; +print '
    '; $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; @@ -190,7 +190,7 @@ if (! empty($conf->partnership->enabled) && $user->rights->partnership->read) { } */ -print '
    '; +print ''; // End of page llxFooter(); diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index dee6476f773..16e728512f6 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -282,7 +282,7 @@ function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $_SESSION["FinalPaymentAmt"] = $paymentAmount; $_SESSION["currencyCodeType"] = $currencyCodeType; $_SESSION["PaymentType"] = $paymentType; // 'Mark', 'Sole' - $_SESSION['ipaddress'] = getUserRemoteIP(); // Payer ip + $_SESSION['ipaddress'] = getUserRemoteIP(); // Payer ip //'--------------------------------------------------------------------------------------------------------------- //' Make the API call to PayPal diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 9ba8d9cec09..84562bf95a4 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -144,7 +144,7 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) { if (!$found && isset($price_level) && $price_level >= 1 && (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) { // If we need a particular price level (from 1 to 6) $sql = "SELECT price, price_ttc, price_base_type, tva_tx"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price "; - $sql .= " WHERE fk_product = '".$id."'"; + $sql .= " WHERE fk_product = ".((int) $id); $sql .= " AND entity IN (".getEntity('productprice').")"; $sql .= " AND price_level = ".((int) $price_level); $sql .= " ORDER BY date_price"; diff --git a/htdocs/product/canvas/product/tpl/card_create.tpl.php b/htdocs/product/canvas/product/tpl/card_create.tpl.php index 5d39b55ff76..8813e4a8d7e 100644 --- a/htdocs/product/canvas/product/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_create.tpl.php @@ -27,7 +27,7 @@ $object = $GLOBALS['object']; $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); ?> - + trans("NewProduct"), '', 'product'); diff --git a/htdocs/product/canvas/product/tpl/card_edit.tpl.php b/htdocs/product/canvas/product/tpl/card_edit.tpl.php index 2e04f660084..b21355c1c21 100644 --- a/htdocs/product/canvas/product/tpl/card_edit.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_edit.tpl.php @@ -27,7 +27,7 @@ $object = $GLOBALS['object']; $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); ?> - + - + trans("CardProduct".$object->type); diff --git a/htdocs/product/card.php b/htdocs/product/card.php index b4c951a953f..dd4fd64a28c 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -179,6 +179,9 @@ if ($object->id > 0) { // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('productcard', 'globalcard')); +$usercanread = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->lire) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->lire)); +$usercancreate = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer)); +$usercandelete = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->supprimer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->supprimer)); /* @@ -189,9 +192,6 @@ if ($cancel) { $action = ''; } -$usercanread = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->lire) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->lire)); -$usercancreate = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer)); -$usercandelete = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->supprimer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->supprimer)); $createbarcode = empty($conf->barcode->enabled) ? 0 : 1; if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->creer_advance)) { $createbarcode = 0; @@ -1172,8 +1172,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $tooltip .= '
    '.$langs->trans("GenericMaskCodes3"); $tooltip .= '
    '.$langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); $tooltip .= '
    '.$langs->trans("GenericMaskCodes5"); - if (($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') - || ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced')) { + if ((!empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') + || (!empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced')) { print ''.$langs->trans("ManageLotMask").''; $inherited_mask_lot = $conf->global->LOT_ADVANCED_MASK; $inherited_mask_sn = $conf->global->SN_ADVANCED_MASK; @@ -1221,10 +1221,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if ($showbarcode) { print ''.$langs->trans('BarcodeType').''; if (GETPOSTISSET('fk_barcode_type')) { - $fk_barcode_type = GETPOST('fk_barcode_type'); + $fk_barcode_type = GETPOST('fk_barcode_type')?GETPOST('fk_barcode_type'):0; } else { if (empty($fk_barcode_type) && !empty($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE)) { - $fk_barcode_type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; + $fk_barcode_type = getDolGlobalInt("PRODUIT_DEFAULT_BARCODE_TYPE"); + } else { + $fk_barcode_type=0; } } require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; @@ -1403,7 +1405,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } // Note (private, no output on invoices, propales...) @@ -1920,11 +1922,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''.$langs->trans("CountryOrigin").''; print ''; print img_picto('', 'globe-americas', 'class="paddingrightonly"'); - print $form->select_country($object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone'); + print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : $object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } print ''; + // State if (empty($conf->global->PRODUCT_DISABLE_STATE)) { print ''; @@ -1935,7 +1938,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } print img_picto('', 'state', 'class="pictofixedwidth"'); - print $formcompany->select_state($object->state_id, $object->country_code); + print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code); print ''; print ''; } @@ -2321,7 +2324,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; print ''; - print '
    '; + print '
    '; print '
    '; print ''; @@ -2477,7 +2480,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "
    \n"; print '
    '; - print '
    '; + print ''; print '
    '; print dol_get_fiche_end(); @@ -2699,7 +2702,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') { print $formfile->showdocuments($modulepart, $object->ref, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object); $somethingshown = $formfile->numoffiles; - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -2712,7 +2715,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'product', 0, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for product - print '
    '; + print ''; } // End of page diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index e7709b3af41..6283b692a28 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -1617,7 +1617,7 @@ class Products extends DolibarrApi $combinations[$key]->attributes = $prodc2vp->fetchByFkCombination((int) $combination->id); $combinations[$key] = $this->_cleanObjectDatas($combinations[$key]); - if ($includestock==1) { + if ($includestock==1 && DolibarrApiAccess::$user->rights->stock->lire) { $productModel = new Product($this->db); $productModel->fetch((int) $combination->fk_product_child); $productModel->load_stock(); @@ -1859,7 +1859,7 @@ class Products extends DolibarrApi public function getStock($id, $selected_warehouse_id = null) { - if (!DolibarrApiAccess::$user->rights->produit->lire) { + if (!DolibarrApiAccess::$user->rights->produit->lire || !DolibarrApiAccess::$user->rights->stock->lire) { throw new RestException(401); } @@ -1945,6 +1945,10 @@ class Products extends DolibarrApi unset($object->supplierprices); // Mut use another API to get them + if (empty(DolibarrApiAccess::$user->rights->stock->lire)) { + unset($object->stock_reel); + unset($object->stock_theorique); + } return $object; } @@ -2008,7 +2012,7 @@ class Products extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if ($includestockdata) { + if ($includestockdata && DolibarrApiAccess::$user->rights->stock->lire) { $this->product->load_stock(); if (is_array($this->product->stock_warehouse)) { diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 1b6b9bbf0a5..da10faa4f34 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -543,7 +543,7 @@ class FormProduct { global $conf, $langs; - dol_syslog(get_class($this)."::selectLot $selected, $htmlname, $filterstatus, $empty, $disabled, $fk_product, $fk_entrepot, $empty_label, $forcecombo, $morecss", LOG_DEBUG); + dol_syslog(get_class($this)."::selectLotStock $selected, $htmlname, $filterstatus, $empty, $disabled, $fk_product, $fk_entrepot, $empty_label, $forcecombo, $morecss", LOG_DEBUG); $out = ''; $productIdArray = array(); @@ -613,21 +613,20 @@ class FormProduct /** - * Return list of lot numbers (stock from product_batch) with stock location and stock qty + * Return list of lot numbers (stock from product_batch) for product and warehouse. * * @param string $htmlname Name of key that is inside attribute "list" of an input text field. * @param int $empty 1=Can be empty, 0 if not * @param int $fk_product show lot numbers of product with id fk_product. All from objectLines if 0. * @param int $fk_entrepot filter lot numbers for warehouse with id fk_entrepot. All if 0. * @param array $objectLines Only cache lot numbers for products in lines of object. If no lines only for fk_product. If no fk_product, all. - * * @return string HTML datalist */ - public function selectLot($htmlname = 'batch_id', $empty = 0, $fk_product = 0, $fk_entrepot = 0, $objectLines = array()) + public function selectLotDataList($htmlname = 'batch_id', $empty = 0, $fk_product = 0, $fk_entrepot = 0, $objectLines = array()) { global $conf, $langs; - dol_syslog(get_class($this)."::selectLot $htmlname, $empty, $fk_product, $fk_entrepot,$objectLines", LOG_DEBUG); + dol_syslog(get_class($this)."::selectLotDataList $htmlname, $empty, $fk_product, $fk_entrepot,$objectLines", LOG_DEBUG); $out = ''; $productIdArray = array(); diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 3be832dcea3..1d4a5926b6e 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5019,21 +5019,21 @@ class Product extends CommonObject if ($type == 2) { switch ($mode) { case 0: - $label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatch') : ($status == 1 ? $langs->trans('ProductStatusOnBatch') : $langs->trans('ProductStatusOnSerial'))); + $label = ($status == 0 ? $langs->transnoentitiesnoconv('ProductStatusNotOnBatch') : ($status == 1 ? $langs->transnoentitiesnoconv('ProductStatusOnBatch') : $langs->transnoentitiesnoconv('ProductStatusOnSerial'))); return dolGetStatus($label); case 1: - $label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatchShort') : ($status == 1 ? $langs->trans('ProductStatusOnBatchShort') : $langs->trans('ProductStatusOnSerialShort'))); + $label = ($status == 0 ? $langs->transnoentitiesnoconv('ProductStatusNotOnBatchShort') : ($status == 1 ? $langs->transnoentitiesnoconv('ProductStatusOnBatchShort') : $langs->transnoentitiesnoconv('ProductStatusOnSerialShort'))); return dolGetStatus($label); case 2: return $this->LibStatut($status, 3, 2).' '.$this->LibStatut($status, 1, 2); case 3: - return dolGetStatus($langs->trans('ProductStatusNotOnBatch'), '', '', empty($status) ? 'status5' : 'status4', 3, 'dot'); + return dolGetStatus($langs->transnoentitiesnoconv('ProductStatusNotOnBatch'), '', '', empty($status) ? 'status5' : 'status4', 3, 'dot'); case 4: return $this->LibStatut($status, 3, 2).' '.$this->LibStatut($status, 0, 2); case 5: return $this->LibStatut($status, 1, 2).' '.$this->LibStatut($status, 3, 2); default: - return dolGetStatus($langs->trans('Unknown')); + return dolGetStatus($langs->transnoentitiesnoconv('Unknown')); } } @@ -5042,34 +5042,34 @@ class Product extends CommonObject if ($status == 0) { // $type 0=Status "to sell", 1=Status "to buy", 2=Status "to Batch" if ($type == 0) { - $labelStatus = $langs->trans('ProductStatusNotOnSellShort'); - $labelStatusShort = $langs->trans('ProductStatusNotOnSell'); + $labelStatus = $langs->transnoentitiesnoconv('ProductStatusNotOnSellShort'); + $labelStatusShort = $langs->transnoentitiesnoconv('ProductStatusNotOnSell'); } elseif ($type == 1) { - $labelStatus = $langs->trans('ProductStatusNotOnBuyShort'); - $labelStatusShort = $langs->trans('ProductStatusNotOnBuy'); + $labelStatus = $langs->transnoentitiesnoconv('ProductStatusNotOnBuyShort'); + $labelStatusShort = $langs->transnoentitiesnoconv('ProductStatusNotOnBuy'); } elseif ($type == 2) { - $labelStatus = $langs->trans('ProductStatusNotOnBatch'); - $labelStatusShort = $langs->trans('ProductStatusNotOnBatchShort'); + $labelStatus = $langs->transnoentitiesnoconv('ProductStatusNotOnBatch'); + $labelStatusShort = $langs->transnoentitiesnoconv('ProductStatusNotOnBatchShort'); } } elseif ($status == 1) { // $type 0=Status "to sell", 1=Status "to buy", 2=Status "to Batch" if ($type == 0) { - $labelStatus = $langs->trans('ProductStatusOnSellShort'); - $labelStatusShort = $langs->trans('ProductStatusOnSell'); + $labelStatus = $langs->transnoentitiesnoconv('ProductStatusOnSellShort'); + $labelStatusShort = $langs->transnoentitiesnoconv('ProductStatusOnSell'); } elseif ($type == 1) { - $labelStatus = $langs->trans('ProductStatusOnBuyShort'); - $labelStatusShort = $langs->trans('ProductStatusOnBuy'); + $labelStatus = $langs->transnoentitiesnoconv('ProductStatusOnBuyShort'); + $labelStatusShort = $langs->transnoentitiesnoconv('ProductStatusOnBuy'); } elseif ($type == 2) { - $labelStatus = ($status == 1 ? $langs->trans('ProductStatusOnBatch') : $langs->trans('ProductStatusOnSerial')); - $labelStatusShort = ($status == 1 ? $langs->trans('ProductStatusOnBatchShort') : $langs->trans('ProductStatusOnSerialShort')); + $labelStatus = ($status == 1 ? $langs->transnoentitiesnoconv('ProductStatusOnBatch') : $langs->transnoentitiesnoconv('ProductStatusOnSerial')); + $labelStatusShort = ($status == 1 ? $langs->transnoentitiesnoconv('ProductStatusOnBatchShort') : $langs->transnoentitiesnoconv('ProductStatusOnSerialShort')); } } elseif ( $type == 2 && $status == 2 ) { - $labelStatus = $langs->trans('ProductStatusOnSerial'); - $labelStatusShort = $langs->trans('ProductStatusOnSerialShort'); + $labelStatus = $langs->transnoentitiesnoconv('ProductStatusOnSerial'); + $labelStatusShort = $langs->transnoentitiesnoconv('ProductStatusOnSerialShort'); } if ($mode > 6) { - return dolGetStatus($langs->trans('Unknown'), '', '', 'status0', 0); + return dolGetStatus($langs->transnoentitiesnoconv('Unknown'), '', '', 'status0', 0); } else { return dolGetStatus($labelStatus, $labelStatusShort, '', $statuttrans, $mode); } @@ -5335,7 +5335,7 @@ class Product extends CommonObject $stock_sending_client = $this->stats_expedition['qty']; } if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { - $filterStatus = empty($conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK) ? '2,3,4' : $conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK; + $filterStatus = empty($conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK) ? '3,4' : $conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK; if (isset($includedraftpoforvirtual)) { $filterStatus = '0,1,2,'.$filterStatus; // 1,2 may have already been inside $filterStatus but it is better to have twice than missing $filterStatus does not include them } diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 61cba58c374..407eac7c30a 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -739,7 +739,7 @@ class Productcustomerprice extends CommonObject $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').","; $sql .= " fk_product=".(isset($this->fk_product) ? $this->fk_product : "null").","; $sql .= " fk_soc=".(isset($this->fk_soc) ? $this->fk_soc : "null").","; - $sql .= " ref_customer=".(isset($this->ref_customer) ? "'" . $this->db->escape($this->ref_customer) . "'" : "null").","; + $sql .= " ref_customer=".(isset($this->ref_customer) ? "'".$this->db->escape($this->ref_customer)."'" : "null").","; $sql .= " price=".(isset($this->price) ? $this->price : "null").","; $sql .= " price_ttc=".(isset($this->price_ttc) ? $this->price_ttc : "null").","; $sql .= " price_min=".(isset($this->price_min) ? $this->price_min : "null").","; @@ -871,7 +871,7 @@ class Productcustomerprice extends CommonObject $resultupd = $prodsocpricenew->create($user, 0, $forceupdateaffiliate); if ($result < 0) { $error++; - $this->error = $prodsocpriceupd->error; + $this->error = $prodsocpricenew->error; } } } diff --git a/htdocs/product/class/productfournisseurprice.class.php b/htdocs/product/class/productfournisseurprice.class.php index 550b0e5db36..d82d1784938 100644 --- a/htdocs/product/class/productfournisseurprice.class.php +++ b/htdocs/product/class/productfournisseurprice.class.php @@ -675,12 +675,12 @@ class ProductFournisseurPrice extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("buypricehistory@buypricehistory"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status'.$status; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 0b15ad7a85c..230f8375538 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -96,8 +96,6 @@ if ($id > 0 || !empty($ref)) { $modulepart = 'produit'; -$permissiontoadd = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer)); - if ($object->id > 0) { if ($object->type == $object::TYPE_PRODUCT) { restrictedArea($user, 'produit', $object->id, 'product&product', '', ''); @@ -109,6 +107,8 @@ if ($object->id > 0) { restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); } +$permissiontoadd = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer)); + /* * Actions diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 2a7f35a436b..564c2448e58 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2014 Juanjo Menent -/* Copyright (C) 2015 Ion Agorria + * Copyright (C) 2015 Ion Agorria * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/product/dynamic_price/class/price_global_variable.class.php b/htdocs/product/dynamic_price/class/price_global_variable.class.php index 217ab25463a..a7b22f2ef13 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2014 Juanjo Menent -/* Copyright (C) 2015 Ion Agorria + * Copyright (C) 2015 Ion Agorria * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php index e24ff2c6769..8a9c1197a7f 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2014 Juanjo Menent -/* Copyright (C) 2015 Ion Agorria + * Copyright (C) 2015 Ion Agorria * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/product/index.php b/htdocs/product/index.php index e3be4b91415..082e8a4d8d2 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -274,7 +274,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA print ''; print ''; } -print '
    '; +print '
    '; /* @@ -416,7 +416,7 @@ if (!empty($conf->global->MAIN_SHOW_PRODUCT_ACTIVITY_TRIM)) { } -print '
    '; +print ''; $parameters = array('type' => $type, 'user' => $user); $reshook = $hookmanager->executeHooks('dashboardProductsServices', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index ee39486fb5b..b3a3fdc0b00 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -451,7 +451,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -464,7 +464,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element, 0, 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index a6d1504a42c..57abc333a58 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -615,14 +615,14 @@ class Inventory extends CommonObject global $langs; $labelStatus = array(); - $labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated').' ('.$langs->trans('Started').')'; - $labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); - $labelStatus[self::STATUS_RECORDED] = $langs->trans('Closed'); - $labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Started'); - $labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Canceled'); - $labelStatusShort[self::STATUS_RECORDED] = $langs->trans('Closed'); + $labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated').' ('.$langs->transnoentitiesnoconv('Started').')'; + $labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); + $labelStatus[self::STATUS_RECORDED] = $langs->transnoentitiesnoconv('Closed'); + $labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Started'); + $labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); + $labelStatusShort[self::STATUS_RECORDED] = $langs->transnoentitiesnoconv('Closed'); $statusType = 'status'.$status; if ($status == self::STATUS_RECORDED) { diff --git a/htdocs/product/inventory/list.php b/htdocs/product/inventory/list.php index 36910c75fb2..41e43fdf433 100644 --- a/htdocs/product/inventory/list.php +++ b/htdocs/product/inventory/list.php @@ -205,7 +205,7 @@ $sql .= $object->getFieldList('t'); // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } // Add fields from hooks @@ -561,7 +561,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/product/list.php b/htdocs/product/list.php index aaf9903aa85..14d9b320e8e 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -256,7 +256,7 @@ $arrayfields = array( // MultiPrices -if ($conf->global->PRODUIT_MULTIPRICES) { +if (!empty($conf->global->PRODUIT_MULTIPRICES)) { for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i; if (!empty($conf->global->$keyforlabel)) { @@ -405,7 +405,7 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); } -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields as ef on (p.rowid = ef.fk_object)"; } if (!empty($searchCategoryProductList) || !empty($catid)) { @@ -793,7 +793,7 @@ if ($resql) { $categoriesProductArr = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', '', 64, 0, 1); $categoriesProductArr[-2] = '- '.$langs->trans('NotCategorized').' -'; $moreforfilter .= Form::multiselectarray('search_category_product_list', $categoriesProductArr, $searchCategoryProductList, 0, 0, 'minwidth300'); - $moreforfilter .= ' '.$langs->trans('UseOrOperatorForCategories').''; + $moreforfilter .= ' '; $moreforfilter .= ''; } diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index c327b24e8f0..b0a1ce87ddd 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -46,6 +46,7 @@ $toolowstock = GETPOST('toolowstock'); $tosell = GETPOST("tosell"); $tobuy = GETPOST("tobuy"); $fourn_id = GETPOST("fourn_id", 'int'); +$sbarcode = GETPOST("sbarcode", 'int'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 2380b4103a2..e75d1504267 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -50,6 +50,7 @@ $toolowstock = GETPOST('toolowstock'); $tosell = GETPOST("tosell"); $tobuy = GETPOST("tobuy"); $fourn_id = GETPOST("fourn_id", 'int'); +$sbarcode = GETPOST("sbarcode", 'int'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); @@ -135,11 +136,11 @@ $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e on ps.fk_entrepot = e.rowid' $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_batch as pb on pb.fk_product_stock = ps.rowid'; // Detail for each lot on each warehouse $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot as pl on pl.fk_product = p.rowid AND pl.batch = pb.batch'; // Link on unique key // We'll need this table joined to the select in order to filter by categ -if ($search_categ) { +if ($search_categ > 0) { $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; } $sql .= " WHERE p.entity IN (".getEntity('product').")"; -if ($search_categ) { +if ($search_categ > 0) { $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ } if ($sall) { @@ -178,7 +179,7 @@ if ($fourn_id > 0) { $sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".((int) $fourn_id); } // Insert categ filter -if ($search_categ) { +if ($search_categ > 0) { $sql .= " AND cp.fk_categorie = ".((int) $search_categ); } if ($search_warehouse) { @@ -277,7 +278,7 @@ if ($resql) { if ($search_sale) { $param .= "&search_sale=".urlencode($search_sale); } - if ($search_categ) { + if ($search_categ > 0) { $param .= "&search_categ=".urlencode($search_categ); } /*if ($eatby) $param.="&eatby=".$eatby; diff --git a/htdocs/product/stats/bom.php b/htdocs/product/stats/bom.php index 52eec409185..ef4923e89be 100644 --- a/htdocs/product/stats/bom.php +++ b/htdocs/product/stats/bom.php @@ -261,14 +261,14 @@ if ($id > 0 || !empty($ref)) { } print '
    '; - print ''; + print '
    '; print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", "&id=".$product->id, '', $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "b.date_valid", "", "&id=".$product->id, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("RowMaterial", $_SERVER["PHP_SELF"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Finished", $_SERVER["PHP_SELF"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&id=".$product->id, '', $sortfield, $sortorder, 'right '); print "\n"; if (!empty($bom_data_result)) { @@ -281,7 +281,7 @@ if ($id > 0 || !empty($ref)) { print $data['date_valid'].""; print ''; print ''; - print ''; + print ''; print "\n"; } print '
    '.$data['qty_toconsume'].''.$data['qty_toproduce'].''.$data['status'].''.$data['status'].'
    '; diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 932a57d0885..ef4abef5173 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -67,6 +67,7 @@ $currentyear = $tmp['year']; if (empty($search_year)) { $search_year = $currentyear; } +$moreforfilter = ""; $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); @@ -418,10 +419,10 @@ if ($result || empty($id)) { if ($graphfiles == 'proposals_suppliers' && !$user->rights->supplier_proposal->lire) { continue; } - if ($graphfiles == 'invoices_suppliers' && !$user->rights->fournisseur->facture->lire) { + if ($graphfiles == 'invoices_suppliers' && empty($user->rights->fournisseur->facture->lire)) { continue; } - if ($graphfiles == 'orders_suppliers' && !$user->rights->fournisseur->commande->lire) { + if ($graphfiles == 'orders_suppliers' && empty($user->rights->fournisseur->commande->lire)) { continue; } if ($graphfiles == 'mrp' && empty($user->rights->mrp->mo->read)) { @@ -432,7 +433,7 @@ if ($result || empty($id)) { if ($i % 2 == 0) { print "\n".'
    '."\n"; } else { - print "\n".'
    '."\n"; + print "\n".'
    '."\n"; } // Date generation @@ -464,7 +465,7 @@ if ($result || empty($id)) { if ($i % 2 == 0) { print "\n".'
    '."\n"; } else { - print "\n".'
    '; + print "\n".'
    '; print '

    '."\n"; } @@ -473,8 +474,8 @@ if ($result || empty($id)) { } // div not closed if ($i % 2 == 1) { - print "\n".'
    '."\n"; - print "\n".'
    '; + print "\n".'
    '."\n"; + print "\n".'
    '; print '

    '."\n"; } } diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 623306536b7..abfd329dfa4 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -139,13 +139,13 @@ if ($id > 0 || !empty($ref)) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, c.rowid, d.total_ht as total_ht, c.ref,"; $sql .= " c.ref_client,"; $sql .= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid, d.rowid, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."commandedet as d"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -158,7 +158,7 @@ if ($id > 0 || !empty($ref)) { if (!empty($search_year)) { $sql .= ' AND YEAR(c.date_commande) IN ('.$db->sanitize($search_year).')'; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index fd64a1c0572..d9d81ad70dc 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -140,13 +140,13 @@ if ($id > 0 || !empty($ref)) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,"; $sql .= " c.rowid, d.total_ht as total_ht, c.ref,"; $sql .= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid, d.rowid, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseurdet as d"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -159,7 +159,7 @@ if ($id > 0 || !empty($ref)) { if (!empty($search_year)) { $sql .= ' AND YEAR(c.date_commande) IN ('.$db->sanitize($search_year).')'; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 65302ef2c7d..e44619d1b19 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -134,7 +134,7 @@ if ($id > 0 || !empty($ref)) { $sql .= " c.rowid as rowid, c.ref, c.ref_customer, c.ref_supplier, c.date_contrat, c.statut as statut,"; $sql .= " s.nom as name, s.rowid as socid, s.code_client"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ", ".MAIN_DB_PREFIX."contrat as c"; @@ -143,7 +143,7 @@ if ($id > 0 || !empty($ref)) { $sql .= " AND c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('contract').")"; $sql .= " AND cd.fk_product = ".((int) $product->id); - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index b3e5571ac5a..8da6e97f55c 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -156,13 +156,13 @@ if ($id > 0 || !empty($ref)) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,"; $sql .= " f.ref, f.datef, f.paye, f.type, f.fk_statut as statut, f.rowid as facid,"; $sql .= " d.rowid, d.total_ht as total_ht, d.qty"; // We must keep the d.rowid here to not loose record because of the distinct used to ignore duplicate line when link on societe_commerciaux is used - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture as f"; $sql .= ", ".MAIN_DB_PREFIX."facturedet as d"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; @@ -175,7 +175,7 @@ if ($id > 0 || !empty($ref)) { if (!empty($search_year)) { $sql .= ' AND YEAR(f.datef) IN ('.$db->sanitize($search_year).')'; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 212674582f9..d61b6de9491 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -139,13 +139,13 @@ if ($id > 0 || !empty($ref)) { if ($user->rights->fournisseur->facture->lire) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, d.rowid, d.total_ht as line_total_ht,"; $sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.libelle as label, f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut as statut, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn_det as d"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid"; @@ -158,7 +158,7 @@ if ($id > 0 || !empty($ref)) { if (!empty($search_year)) { $sql .= ' AND YEAR(f.datef) IN ('.$db->sanitize($search_year).')'; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php index 9ad400fe0de..c63034e95a6 100644 --- a/htdocs/product/stats/mo.php +++ b/htdocs/product/stats/mo.php @@ -183,7 +183,7 @@ if ($id > 0 || !empty($ref)) { print ''; } - print_barre_liste($langs->trans("Mos"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + print_barre_liste($langs->trans("MOs"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { $option .= '&page='.urlencode($page); @@ -202,6 +202,7 @@ if ($id > 0 || !empty($ref)) { print_liste_field_titre("QtyAlreadyConsumed", $_SERVER["PHP_SELF"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("QtyToProduce", $_SERVER["PHP_SELF"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("QtyAlreadyProduced", $_SERVER["PHP_SELF"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&id=".$product->id, '', $sortfield, $sortorder, 'right '); print "\n"; $motmp = new Mo($db); @@ -212,6 +213,7 @@ if ($id > 0 || !empty($ref)) { $motmp->id = $objp->rowid; $motmp->ref = $objp->ref; + $motmp->status = $objp->status; print ''; print ''; @@ -226,6 +228,7 @@ if ($id > 0 || !empty($ref)) { print ''.($objp->nb_toproduce > 0 ? $objp->nb_toproduce : '').''; print ''.($objp->nb_produced > 0 ? $objp->nb_produced : '').''; //$mostatic->LibStatut($objp->statut,5).''; + print ''.$motmp->getLibStatut(2).''; print "\n"; $i++; } diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index b83d0368b75..068184feb7e 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -141,13 +141,13 @@ if ($id > 0 || !empty($ref)) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,"; $sql .= " p.ref_client,"; $sql .= "p.datep, p.fk_statut as statut, d.rowid, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ",".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."propaldet as d"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.fk_soc = s.rowid"; @@ -160,7 +160,7 @@ if ($id > 0 || !empty($ref)) { if (!empty($search_year)) { $sql .= ' AND YEAR(p.datep) IN ('.$db->sanitize($search_year).')'; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/product/stats/supplier_proposal.php b/htdocs/product/stats/supplier_proposal.php index d583d58bff8..ab02e51fa57 100644 --- a/htdocs/product/stats/supplier_proposal.php +++ b/htdocs/product/stats/supplier_proposal.php @@ -140,13 +140,13 @@ if ($id > 0 || !empty($ref)) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,"; //$sql .= " p.ref_supplier,"; $sql .= "p.date_valid, p.fk_statut as statut, d.rowid, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ",".MAIN_DB_PREFIX."supplier_proposal as p"; $sql .= ", ".MAIN_DB_PREFIX."supplier_proposaldet as d"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.fk_soc = s.rowid"; @@ -159,7 +159,7 @@ if ($id > 0 || !empty($ref)) { if (!empty($search_year)) { $sql .= ' AND YEAR(p.datep) IN ('.$db->sanitize($search_year).')'; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 529c0205d32..e485ea3d543 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -87,6 +87,10 @@ if ($id > 0 || !empty($ref)) { } } +$usercanread = (($user->rights->stock->lire)); +$usercancreate = (($user->rights->stock->creer)); +$usercandelete = (($user->rights->stock->supprimer)); + /* * Actions @@ -94,10 +98,6 @@ if ($id > 0 || !empty($ref)) { $error = 0; -$usercanread = (($user->rights->stock->lire)); -$usercancreate = (($user->rights->stock->creer)); -$usercandelete = (($user->rights->stock->supprimer)); - $parameters = array('id'=>$id, 'ref'=>$ref); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -505,7 +505,6 @@ if ($action == 'create') { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -551,7 +550,6 @@ if ($action == 'create') { print "
    "; - print '
    '; print '
    '; print ''; @@ -963,7 +961,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') { print $formfile->showdocuments($modulepart, $object->ref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object); $somethingshown = $formfile->numoffiles; - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -976,7 +974,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'stock', 0, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for product - print '
    '; + print ''; } // End of page diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 991ec70b6aa..fe36b6364fc 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -680,8 +680,8 @@ class Entrepot extends CommonObject } $langs->load('stocks'); - $label = $langs->trans($this->statuts[$status]); - $labelshort = $langs->trans($this->statuts[$status]); + $label = $langs->transnoentitiesnoconv($this->statuts[$status]); + $labelshort = $langs->transnoentitiesnoconv($this->statuts[$status]); return dolGetStatus($label, $labelshort, '', $statusType, $mode); } diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index b64068df48b..9aad5f382cc 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -134,8 +134,7 @@ if ($result) { } -//print ''; -print '
    '; +print '
    '; // Latest movements @@ -235,8 +234,7 @@ if ($resql) { dol_print_error($db); } -//print ''; -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardWarehouse', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index a6fef44bb05..e223714e82d 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -624,7 +624,7 @@ while ($i < min($num, $limit)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index af6d6c08740..d7bd8bee9b4 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -443,6 +443,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') { */ $now = dol_now(); +$error = 0; $form = new Form($db); $formproduct = new FormProduct($db); diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index 24e5ae2b689..b5373fc9de6 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -605,7 +605,6 @@ if ($resql) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -637,7 +636,6 @@ if ($resql) { print "
    "; - print '
    '; print '
    '; print ''; @@ -1205,7 +1203,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id > 0) print $formfile->showdocuments($modulepart, $objectref, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object); $somethingshown = $formfile->numoffiles; - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -1218,7 +1216,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id > 0) $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'mouvement', 0, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for product - print '
    '; + print ''; } diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index bdd22c313ee..e028c49396b 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -132,7 +132,7 @@ $arrayfields = array( 'origin'=>array('label'=>"Origin", 'checked'=>1, 'position'=>155), 'm.fk_projet'=>array('label'=>'Project', 'checked'=>0, 'position'=>180), 'm.value'=>array('label'=>"Qty", 'checked'=>1, 'position'=>200), - 'm.price'=>array('label'=>"UnitPurchaseValue", 'checked'=>0, 'position'=>210) + 'm.price'=>array('label'=>"UnitPurchaseValue", 'checked'=>0, 'position'=>210, 'enabled'=>empty($conf->global->STOCK_MOVEMENT_LIST_HIDE_UNIT_PRICE)) //'m.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), //'m.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500) ); @@ -718,7 +718,6 @@ if ($object->id > 0) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -760,7 +759,6 @@ if ($object->id > 0) { print "
    "; - print '
    '; print '
    '; print ''; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index f8c88ce6d01..23900c85c0b 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -709,7 +709,7 @@ if ($id > 0 || $ref) { print ''; print ''; - print '
    '; + print '
    '; print ''; @@ -863,7 +863,6 @@ if ($id > 0 || $ref) { print "
    "; - print '
    '; print '
    '; print '
    '; diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index 36e230b911d..cbf7c901b37 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -569,7 +569,7 @@ if ($action != 'presend') { print $formfile->showdocuments('product_batch', $objref, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $langs->default_lang, '', $object); } - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -577,7 +577,7 @@ if ($action != 'presend') { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'productlot', 0, 1, '', $MAXEVENT); - print '
    '; + print ''; } // End of page diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php index 08b565c90a0..4f695f990e4 100644 --- a/htdocs/product/stock/productlot_document.php +++ b/htdocs/product/stock/productlot_document.php @@ -100,6 +100,7 @@ if (empty($upload_dir)) { $permissiontoread = $usercanread; $permissiontoadd = $usercancreate; +$permtoedit = $user->rights->produit->creer; //$permissiontodelete = $usercandelete; // Security check @@ -112,7 +113,9 @@ if ($user->socid > 0) { // Protection if external user accessforbidden(); } //$result = restrictedArea($user, 'productbatch'); -if (!$permissiontoread) accessforbidden(); +if (!$permissiontoread) { + accessforbidden(); +} /* @@ -130,8 +133,6 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; } -$permtoedit = $user->rights->produit->creer; - /* * View diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 25c9921ce18..3c987cd1cfa 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -537,7 +537,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index 01a7e2dd1a3..a0138743f20 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -122,7 +122,7 @@ $sql .= ' cf.rowid, cf.ref, cf.fk_statut, cf.total_ttc, cf.fk_user_author,'; $sql .= ' u.login'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'commande_fournisseur as cf'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON cf.fk_user_author = u.rowid'; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ', '.MAIN_DB_PREFIX.'societe_commerciaux as sc'; } $sql .= ' WHERE cf.fk_soc = s.rowid '; @@ -134,7 +134,7 @@ if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) { } else { $sql .= ' AND cf.fk_statut < 5'; } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ' AND s.rowid = sc.fk_soc AND sc.fk_user = '.((int) $user->id); } if ($sref) { diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index 940acdb551d..d5de51c7311 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -188,7 +188,7 @@ if ($date && $dateIsValid) { if ($mode == 'future') { $sql .= " AND sm.datem <= '".$db->idate($dateendofday)."'"; } else { - $sql .= " AND sm.datem >= '".$db->idate($date)."'"; + $sql .= " AND sm.datem >= '".$db->idate($dateendofday)."'"; } if ($productid > 0) { $sql .= " AND sm.fk_product = ".((int) $productid); @@ -607,7 +607,7 @@ $parameters = array('sql'=>$sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (empty($date) || ! $dateIsValid) { +if (empty($date) || !$dateIsValid) { $colspan = 8; if ($mode == 'future') { $colspan++; diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index bdce4353faf..453a4078978 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -159,7 +159,7 @@ print ""; print ''; -print '
    '; +print '
    '; /* Affichage de la liste des projets d'hier */ @@ -557,7 +557,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH } -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardActivities', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 763c57dc51e..091d20c24d6 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1006,13 +1006,13 @@ if ($action == 'create' && $user->rights->projet->creer) { $morehtmlref .= dol_escape_htmltag($object->title); // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '; - if ($object->thirdparty->id > 0) { + if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= $object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; } @@ -1129,10 +1129,9 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; print '
    '; - print '
    '; print '
    '; - print ''; + print '
    '; // Description print '
    '.$langs->trans("Description").''; @@ -1148,7 +1147,6 @@ if ($action == 'create' && $user->rights->projet->creer) { print '
    '; - print '
    '; print '
    '; print ''; @@ -1372,20 +1370,18 @@ if ($action == 'create' && $user->rights->projet->creer) { print $formfile->showdocuments('project', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf); - print '
    '; + print '
    '; $MAXEVENT = 10; - $morehtmlright = ''; - $morehtmlright .= $langs->trans("SeeAll"); - $morehtmlright .= ''; + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/projet/info.php?id='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'project', 0, 1, '', $MAXEVENT, '', $morehtmlright); + $somethingshown = $formactions->showactions($object, 'project', 0, 1, '', $MAXEVENT, '', $morehtmlcenter); - print '
    '; + print ''; } // Presend form diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 368fb3c2982..aa823dc44d6 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1152,7 +1152,7 @@ class Project extends CommonObject $statusClass = $statustrans[$status]; } - return dolGetStatus($langs->trans($this->statuts_long[$status]), $langs->trans($this->statuts_short[$status]), '', $statusClass, $mode); + return dolGetStatus($langs->transnoentitiesnoconv($this->statuts_long[$status]), $langs->transnoentitiesnoconv($this->statuts_short[$status]), '', $statusClass, $mode); } /** @@ -1601,19 +1601,23 @@ class Project extends CommonObject foreach (array('internal', 'external') as $source) { $tab = $origin_project->liste_contact(-1, $source); - - foreach ($tab as $contacttoadd) { - $clone_project->add_contact($contacttoadd['id'], $contacttoadd['code'], $contacttoadd['source'], $notrigger); - if ($clone_project->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - $langs->load("errors"); - $this->error .= $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); - $error++; - } else { - if ($clone_project->error != '') { - $this->error .= $clone_project->error; + if (is_array($tab) && count($tab)>0) { + foreach ($tab as $contacttoadd) { + $clone_project->add_contact($contacttoadd['id'], $contacttoadd['code'], $contacttoadd['source'], $notrigger); + if ($clone_project->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $langs->load("errors"); + $this->error .= $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); $error++; + } else { + if ($clone_project->error != '') { + $this->error .= $clone_project->error; + $error++; + } } } + } elseif ($tab < 0) { + $this->error .= $origin_project->error; + $error++; } } } @@ -1660,7 +1664,7 @@ class Project extends CommonObject foreach ($tasksarray as $tasktoclone) { $result_clone = $taskstatic->createFromClone($user, $tasktoclone->id, $clone_project_id, $tasktoclone->fk_parent, $move_date, true, false, $clone_task_file, true, false); if ($result_clone <= 0) { - $this->error .= $result_clone->error; + $this->error .= $taskstatic->error; $error++; } else { $new_task_id = $result_clone; @@ -1714,6 +1718,7 @@ class Project extends CommonObject global $user, $langs, $conf; $error = 0; + $result = 0; $taskstatic = new Task($this->db); @@ -2010,7 +2015,7 @@ class Project extends CommonObject //$socid=$user->socid; $projectsListId = null; - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $projectsListId = $this->getProjectsAuthorizedForUser($user, 0, 1); } @@ -2102,7 +2107,7 @@ class Project extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " WHERE"; $sql .= " p.entity IN (".getEntity('project').")"; - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $projectsListId = $this->getProjectsAuthorizedForUser($user, 0, 1); $sql .= "AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; } diff --git a/htdocs/projet/class/projectstats.class.php b/htdocs/projet/class/projectstats.class.php index 1439ecd5f20..efd8ecc3424 100644 --- a/htdocs/projet/class/projectstats.class.php +++ b/htdocs/projet/class/projectstats.class.php @@ -158,7 +158,7 @@ class ProjectStats extends Stats // Get list of project id allowed to user (in a string list separated by coma) $object = new Project($this->db); $projectsListId = ''; - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $projectsListId = $object->getProjectsAuthorizedForUser($user, 0, 1, $user->socid); } @@ -183,7 +183,7 @@ class ProjectStats extends Stats $sqlwhere[] = " t.fk_opp_status IN (".$this->db->sanitize($this->status).")"; } - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $sqlwhere[] = " t.rowid IN (".$this->db->sanitize($projectsListId).")"; // public and assigned to, or restricted to company for external users } diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 085d092c2ac..dac2afa4834 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -121,6 +121,16 @@ class Task extends CommonObject public $comments = array(); + /** + * @var float budget_amount + */ + public $budget_amount; + + /** + * @var float project_budget_amount + */ + public $project_budget_amount; + public $oldcopy; @@ -172,6 +182,7 @@ class Task extends CommonObject $sql .= ", datee"; $sql .= ", planned_workload"; $sql .= ", progress"; + $sql .= ", budget_amount"; $sql .= ") VALUES ("; $sql .= ((int) $conf->entity); $sql .= ", ".((int) $this->fk_project); @@ -185,6 +196,7 @@ class Task extends CommonObject $sql .= ", ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : 'null'); $sql .= ", ".(($this->planned_workload != '' && $this->planned_workload >= 0) ? ((int) $this->planned_workload) : 'null'); $sql .= ", ".(($this->progress != '' && $this->progress >= 0) ? ((int) $this->progress) : 'null'); + $sql .= ", ".(($this->budget_amount != '' && $this->budget_amount >= 0) ? ((int) $this->budget_amount) : 'null'); $sql .= ")"; $this->db->begin(); @@ -261,6 +273,7 @@ class Task extends CommonObject $sql .= " t.fk_user_valid,"; $sql .= " t.fk_statut,"; $sql .= " t.progress,"; + $sql .= " t.budget_amount,"; $sql .= " t.priority,"; $sql .= " t.note_private,"; $sql .= " t.note_public,"; @@ -304,6 +317,7 @@ class Task extends CommonObject $this->fk_user_valid = $obj->fk_user_valid; $this->fk_statut = $obj->fk_statut; $this->progress = $obj->progress; + $this->budget_amount = $obj->budget_amount; $this->priority = $obj->priority; $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; @@ -366,6 +380,9 @@ class Task extends CommonObject if (isset($this->planned_workload)) { $this->planned_workload = trim($this->planned_workload); } + if (isset($this->budget_amount)) { + $this->budget_amount = trim($this->budget_amount); + } // Check parameters // Put here code to add control on parameters values @@ -382,6 +399,7 @@ class Task extends CommonObject $sql .= " dateo=".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null').","; $sql .= " datee=".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null').","; $sql .= " progress=".(($this->progress != '' && $this->progress >= 0) ? $this->progress : 'null').","; + $sql .= " budget_amount=".(($this->budget_amount != '' && $this->budget_amount >= 0) ? $this->budget_amount : 'null').","; $sql .= " rang=".((!empty($this->rang)) ? $this->rang : "0"); $sql .= " WHERE rowid=".((int) $this->id); @@ -791,8 +809,9 @@ class Task extends CommonObject $sql .= " t.rowid as taskid, t.ref as taskref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut as status,"; $sql .= " t.dateo as date_start, t.datee as date_end, t.planned_workload, t.rang,"; $sql .= " t.description, "; + $sql .= " t.budget_amount, "; $sql .= " s.rowid as thirdparty_id, s.nom as thirdparty_name, s.email as thirdparty_email,"; - $sql .= " p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount"; + $sql .= " p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount as project_budget_amount"; if (!empty($extrafields->attributes['projet']['label'])) { foreach ($extrafields->attributes['projet']['label'] as $key => $val) { $sql .= ($extrafields->attributes['projet']['type'][$key] != 'separate' ? ",efp.".$key." as options_".$key : ''); @@ -897,6 +916,7 @@ class Task extends CommonObject $sql .= " t.rowid, t.ref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut,"; $sql .= " t.dateo, t.datee, t.planned_workload, t.rang,"; $sql .= " t.description, "; + $sql .= " t.budget_amount, "; $sql .= " s.rowid, s.nom, s.email,"; $sql .= " p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount"; if (!empty($extrafields->attributes['projet']['label'])) { @@ -950,6 +970,7 @@ class Task extends CommonObject $tasks[$i]->opp_amount = $obj->opp_amount; $tasks[$i]->opp_percent = $obj->opp_percent; $tasks[$i]->budget_amount = $obj->budget_amount; + $tasks[$i]->project_budget_amount = $obj->project_budget_amount; $tasks[$i]->usage_bill_time = $obj->usage_bill_time; $tasks[$i]->label = $obj->label; @@ -2056,7 +2077,7 @@ class Task extends CommonObject $sql .= " AND p.fk_statut = 1"; $sql .= " AND t.fk_projet = p.rowid"; $sql .= " AND (t.progress IS NULL OR t.progress < 100)"; // tasks to do - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; } // No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser @@ -2121,13 +2142,13 @@ class Task extends CommonObject $sql = "SELECT count(p.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; } $sql .= ", ".MAIN_DB_PREFIX."projet_task as t"; $sql .= " WHERE p.entity IN (".getEntity('project', 0).')'; $sql .= " AND t.fk_projet = p.rowid"; // tasks to do - if ($mine || !$user->rights->projet->all->lire) { + if ($mine || empty($user->rights->projet->all->lire)) { $sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; } // No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser @@ -2135,7 +2156,7 @@ class Task extends CommonObject if ($socid) { $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")"; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id).") OR (s.rowid IS NULL))"; } diff --git a/htdocs/projet/class/taskstats.class.php b/htdocs/projet/class/taskstats.class.php index 594ad38d723..a5b088f01e8 100644 --- a/htdocs/projet/class/taskstats.class.php +++ b/htdocs/projet/class/taskstats.class.php @@ -59,7 +59,7 @@ class TaskStats extends Stats $sql = "SELECT"; $sql .= " COUNT(t.rowid), t.priority"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task as t INNER JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = t.fk_projet"; - if (!$user->rights->societe->client->voir && !$user->soc_id) { + if (empty($user->rights->societe->client->voir) && !$user->soc_id) { $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc=p.fk_soc AND sc.fk_user=".((int) $user->id); } $sql .= $this->buildWhere(); @@ -118,7 +118,7 @@ class TaskStats extends Stats $sql = "SELECT date_format(t.datec,'%Y') as year, COUNT(t.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task as t INNER JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = t.fk_projet"; - if (!$user->rights->societe->client->voir && !$user->soc_id) { + if (empty($user->rights->societe->client->voir) && !$user->soc_id) { $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc=p.fk_soc AND sc.fk_user=".((int) $user->id); } $sql .= $this->buildWhere(); @@ -180,7 +180,7 @@ class TaskStats extends Stats $sql = "SELECT date_format(t.datec,'%m') as dm, COUNT(t.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task as t INNER JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = t.fk_projet"; - if (!$user->rights->societe->client->voir && !$user->soc_id) { + if (empty($user->rights->societe->client->voir) && !$user->soc_id) { $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc=p.fk_soc AND sc.fk_user=".((int) $user->id); } $sql .= $this->buildWhere(); diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php index 2aa8f473cb4..52a1f581df8 100644 --- a/htdocs/projet/comment.php +++ b/htdocs/projet/comment.php @@ -103,13 +103,13 @@ $morehtmlref = '
    '; // Title $morehtmlref .= $object->title; // Thirdparty -if ($object->thirdparty->id > 0) { +if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '
    '; // Define a complementary filter for search of next/prev ref. -if (!$user->rights->projet->all->lire) { +if (empty($user->rights->projet->all->lire)) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; } @@ -155,7 +155,6 @@ print ''; print ''; print '
    '; -print '
    '; print '
    '; print ''; @@ -179,7 +178,6 @@ print ''; print '
    '; -print '
    '; print '
    '; print ''; diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 1af3488bf5c..48f12e23ec4 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -94,7 +94,7 @@ if ($action == 'addcontact') { foreach ($task_array as $task) { $task_already_affected=false; $personsLinked = $task->liste_contact(-1, $source); - if (!is_array($personsLinked) && coun($personsLinked) < 0) { + if (!is_array($personsLinked) && count($personsLinked) < 0) { setEventMessage($object->error, 'errors'); } else { foreach ($personsLinked as $person) { @@ -294,13 +294,13 @@ if ($id > 0 || !empty($ref)) { // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) { + if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -406,10 +406,9 @@ if ($id > 0 || !empty($ref)) { print ''; print '
    '; - print '
    '; print '
    '; - print ''; + print '
    '; // Description print '
    '.$langs->trans("Description").''; @@ -425,7 +424,6 @@ if ($id > 0 || !empty($ref)) { print '
    '; - print '
    '; print '
    '; print ''; diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index df31724d07c..1bfbb9aa4a6 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -82,6 +82,7 @@ $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id, 'projet&project'); +$permissiontoadd = $user->rights->projet->creer; /* @@ -134,13 +135,13 @@ if ($object->id > 0) { // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) { + if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 9e14a53e7ea..feee30f3527 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -164,7 +164,7 @@ if ($id == '' && $ref == '') { exit(); } -$mine = $_REQUEST['mode'] == 'mine' ? 1 : 0; +$mine = (!empty($_REQUEST['mode']) && $_REQUEST['mode'] == 'mine') ? 1 : 0; //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $object = new Project($db); @@ -216,13 +216,13 @@ $morehtmlref = '
    '; // Title $morehtmlref .= $object->title; // Thirdparty -if ($object->thirdparty->id > 0) { +if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '
    '; // Define a complementary filter for search of next/prev ref. -if (!$user->rights->projet->all->lire) { +if (empty($user->rights->projet->all->lire)) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); $object->next_prev_filter = " te.rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -328,10 +328,9 @@ print ''; print ''; print '
    '; -print '
    '; print '
    '; -print ''; +print '
    '; // Description print '
    '.$langs->trans("Description").''; @@ -347,7 +346,6 @@ if ($conf->categorie->enabled) { print '
    '; -print '
    '; print '
    '; print ''; @@ -882,7 +880,7 @@ foreach ($listofreferent as $key => $value) { } // Add total if we have to - if ($qualifiedfortotal) { + if ($qualifiedfortotal) { $total_ht = $total_ht + $total_ht_by_line; $total_ttc = $total_ttc + $total_ttc_by_line; } diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index b5325ca93b2..9c20aa562d7 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -116,13 +116,13 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) { + if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -204,7 +204,6 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -223,7 +222,6 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { print '
    '; - print '
    '; print '
    '; print ''; diff --git a/htdocs/projet/graph_opportunities.inc.php b/htdocs/projet/graph_opportunities.inc.php index 56649af9a45..ae0542d8b4b 100644 --- a/htdocs/projet/graph_opportunities.inc.php +++ b/htdocs/projet/graph_opportunities.inc.php @@ -19,7 +19,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $sql = "SELECT p.fk_opp_status as opp_status, cls.code, COUNT(p.rowid) as nb, SUM(p.opp_amount) as opp_amount, SUM(p.opp_amount * p.opp_percent) as ponderated_opp_amount"; - $sql .= " FROM ".MAIN_DB_PREFIX."projet as p LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls ON p.fk_opp_status = cls.rowid"; // If lead status has been removed, we must show it in stats as unknown + $sql .= " FROM ".MAIN_DB_PREFIX."projet as p LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls ON p.fk_opp_status = cls.rowid"; // If lead status has been removed, we must show it in stats as unknown $sql .= " WHERE p.entity IN (".getEntity('project').")"; $sql .= " AND p.fk_statut = 1"; // Opend projects only if ($mine || empty($user->rights->projet->all->lire)) { @@ -91,7 +91,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $labelStatus = $listofopplabel[$status]; } if (empty($labelStatus)) { - $labelStatus = $langs->transnoentitiesnoconv('OldValue', $status); // When id is id of an entry no more in dictionary for example. + $labelStatus = $langs->transnoentitiesnoconv('OldValue', $status); // When id is id of an entry no more in dictionary for example. } //$labelStatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')'; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 213691f4e25..e1f86bcffc9 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -197,10 +197,10 @@ include DOL_DOCUMENT_ROOT.'/projet/graph_opportunities.inc.php'; print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppstatus, array('projectlabel', 'plannedworkload', 'declaredprogress', 'prospectionstatus', 'projectstatus')); -print '
    '; +print '
    '; // Latest modified projects -$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut as status, p.tms as datem"; +$sql = "SELECT p.rowid, p.ref, p.title, p.dateo, p.datee, p.fk_statut as status, p.tms as datem"; $sql .= ", s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; $sql .= ", s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur"; @@ -239,8 +239,6 @@ if ($resql) { $projectstatic->id = $obj->rowid; $projectstatic->ref = $obj->ref; $projectstatic->title = $obj->title; - $projectstatic->dateo = $obj->dateo; - $projectstatic->datep = $obj->datep; $projectstatic->thirdparty_name = $obj->name; $projectstatic->status = $obj->status; @@ -420,7 +418,7 @@ if (empty($conf->global->PROJECT_HIDE_PROJECT_LIST_ON_PROJECT_AREA)) { print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 1, $listofoppstatus, array()); } -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardProjects', $parameters, $projectstatic); // Note that $action and $object may have been modified by hook diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index b8c6ae046cf..c0afe5d1370 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -128,13 +128,13 @@ $morehtmlref = '
    '; // Title $morehtmlref .= $object->title; // Thirdparty -if ($object->thirdparty->id > 0) { +if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '
    '; // Define a complementary filter for search of next/prev ref. -if (!$user->rights->projet->all->lire) { +if (empty($user->rights->projet->all->lire)) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index a5f14431eda..444dc6d525f 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -357,7 +357,7 @@ $title = $langs->trans("Projects"); // Get list of project id allowed to user (in a string list separated by comma) $projectsListId = ''; -if (!$user->rights->projet->all->lire) { +if (empty($user->rights->projet->all->lire)) { $projectsListId = $object->getProjectsAuthorizedForUser($user, 0, 1, $socid); } @@ -421,7 +421,7 @@ $sql .= " WHERE p.entity IN (".getEntity('project').')'; if (!empty($conf->categorie->enabled)) { $sql .= Categorie::getFilterSelectQuery(Categorie::TYPE_PROJECT, "p.rowid", $search_category_array); } -if (!$user->rights->projet->all->lire) { +if (empty($user->rights->projet->all->lire)) { $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; // public and assigned to, or restricted to company for external users } // No need to check if company is external user, as filtering of projects must be done by getProjectsAuthorizedForUser diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 9fee6615c40..2ee52d3a247 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -33,7 +33,7 @@ $action = GETPOST('action', 'aZ09'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$mine = $_REQUEST['mode'] == 'mine' ? 1 : 0; +$mine = (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'mine') ? 1 : 0; //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $object = new Project($db); @@ -100,13 +100,13 @@ if ($id > 0 || !empty($ref)) { // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) { + if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php index afd86f3ed07..c5acc20bfe6 100644 --- a/htdocs/projet/stats/index.php +++ b/htdocs/projet/stats/index.php @@ -349,7 +349,7 @@ foreach ($data_all_year as $val) { print ''; print ''; -print '
    '; +print '
    '; $stringtoshow = ''; + print ''; + print ''; + print ''; + // Other options $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $taskstatic, $action); // Note that $action and $object may have been modified by hook @@ -944,6 +958,12 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third } */ + if (!empty($arrayfields['t.budget_amount']['checked'])) { + print ''; + } + if (!empty($arrayfields['c.assigned']['checked'])) { print ''; @@ -1005,6 +1025,11 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print_liste_field_titre("TaskRessourceLinks", $_SERVER["PHP_SELF"], '', '', $param, $sortfield, $sortorder); } */ + + if (!empty($arrayfields['t.budget_amount']['checked'])) { + print_liste_field_titre($arrayfields['t.budget_amount']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['c.assigned']['checked'])) { print_liste_field_titre($arrayfields['c.assigned']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ', ''); } diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index 76c5239fc17..a2bbba52305 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -137,7 +137,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; } @@ -247,7 +247,6 @@ if ($id > 0 || !empty($ref)) { print ''; print '
    '; - print '
    '; print '
    '; print '
    '; if ($mesg) { diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 2a814cd9cc5..80d39cf08d4 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -82,6 +82,7 @@ $search_planedworkload = GETPOST('search_planedworkload'); $search_timespend = GETPOST('search_timespend'); $search_progresscalc = GETPOST('search_progresscalc'); $search_progressdeclare = GETPOST('search_progressdeclare'); +$search_task_budget_amount = GETPOST('search_task_budget_amount'); $search_date_start_startmonth = GETPOST('search_date_start_startmonth', 'int'); $search_date_start_startyear = GETPOST('search_date_start_startyear', 'int'); @@ -142,6 +143,7 @@ $diroutputmassaction = $conf->projet->dir_output.'/tasks/temp/massgeneration/'.$ $hookmanager->initHooks(array('projecttaskscard', 'globalcard')); $progress = GETPOST('progress', 'int'); +$budget_amount = GETPOST('budget_amount', 'int'); $label = GETPOST('label', 'alpha'); $description = GETPOST('description', 'restricthtml'); $planned_workloadhour = (GETPOST('planned_workloadhour', 'int') ?GETPOST('planned_workloadhour', 'int') : 0); @@ -160,7 +162,8 @@ $arrayfields = array( 't.progress_calculated'=>array('label'=>$langs->trans("ProgressCalculated"), 'checked'=>1, 'position'=>8), 't.progress'=>array('label'=>$langs->trans("ProgressDeclared"), 'checked'=>1, 'position'=>9), 't.progress_summary'=>array('label'=>$langs->trans("TaskProgressSummary"), 'checked'=>1, 'position'=>10), - 'c.assigned'=>array('label'=>$langs->trans("TaskRessourceLinks"), 'checked'=>1, 'position'=>11), + 't.budget_amount'=>array('label'=>"Budget", 'checked'=>1, 'position'=>11), + 'c.assigned'=>array('label'=>$langs->trans("TaskRessourceLinks"), 'checked'=>1, 'position'=>12), ); if ($object->usage_bill_time) { $arrayfields['t.tobill'] = array('label'=>$langs->trans("TimeToBill"), 'checked'=>0, 'position'=>11); @@ -204,6 +207,7 @@ if (empty($reshook)) { $search_timespend = ''; $search_progresscalc = ''; $search_progressdeclare = ''; + $search_task_budget_amount = ''; $toselect = ''; $search_array_options = array(); $search_date_start_startmonth = ""; @@ -285,6 +289,10 @@ if (!empty($search_progressdeclare)) { $morewherefilterarray[] = natural_search('t.progress', $search_progressdeclare, 1, 1); } +if ($search_task_budget_amount) { + $morewherefilterarray[]= natural_search('t.budget_amount', $search_task_budget_amount, 1, 1); +} + $morewherefilter = ''; if (count($morewherefilterarray) > 0) { $morewherefilter = ' AND '.implode(' AND ', $morewherefilterarray); @@ -338,6 +346,7 @@ if ($action == 'createtask' && $user->rights->projet->creer) { $task->date_start = $date_start; $task->date_end = $date_end; $task->progress = $progress; + $task->budget_amount = $budget_amount; // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $task); @@ -524,6 +533,9 @@ if ($id > 0 || !empty($ref)) { if ($search_progressdeclare) { $param .= '&search_progressdeclare='.urlencode($search_progressdeclare); } + if ($search_task_budget_amount) { + $param .= '&search_task_budget_amount='.urlencode($search_task_budget_amount); + } if ($optioncss != '') { $param .= '&optioncss='.urlencode($optioncss); } @@ -538,13 +550,13 @@ if ($id > 0 || !empty($ref)) { // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) { + if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -625,7 +637,6 @@ if ($id > 0 || !empty($ref)) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -644,7 +655,6 @@ if ($id > 0 || !empty($ref)) { print '
    '; - print '
    '; print '
    '; print ''; @@ -757,6 +767,10 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; print '
    '.$langs->trans("Budget").'
    '; + print ''; + print ''; print '
    '; @@ -266,7 +265,6 @@ if ($id > 0 || !empty($ref)) { print '
    '; - print '
    '; print '
    '; print ''; diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index d79406d2d14..0b26161c28c 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -59,9 +59,9 @@ restrictedArea($user, 'projet', $object->fk_project, 'projet&project'); // Add new contact if ($action == 'addcontact' && $user->rights->projet->creer) { - $source = 'internal'; + $source = 'internal'; if (GETPOST("addsourceexternal")) { - $source ='external'; + $source = 'external'; } $result = $object->fetch($id, $ref); @@ -196,7 +196,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -277,10 +277,9 @@ if ($id > 0 || !empty($ref)) { print ''; print '
    '; - print '
    '; print '
    '; - print ''; + print '
    '; // Description print '
    '.$langs->trans("Description").''; @@ -296,7 +295,6 @@ if ($id > 0 || !empty($ref)) { print '
    '; - print '
    '; print '
    '; print ''; diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 3a56a7a018a..c60e3324741 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -74,6 +74,7 @@ $socid = 0; restrictedArea($user, 'projet', $object->fk_project, 'projet&project'); +$permissiontoadd = $$user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php /* @@ -151,7 +152,7 @@ if ($object->id > 0) { $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -232,7 +233,6 @@ if ($object->id > 0) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -251,7 +251,6 @@ if ($object->id > 0) { print '
    '; - print '
    '; print '
    '; print ''; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index e6d8e5c6dfa..53b1a85e889 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -65,6 +65,7 @@ $search_task_ref_parent = GETPOST('search_task_ref_parent'); $search_project_user = GETPOST('search_project_user', 'int'); $search_task_user = GETPOST('search_task_user', 'int'); $search_task_progress = GETPOST('search_task_progress'); +$search_task_budget_amount = GETPOST('search_task_budget_amount'); $search_societe = GETPOST('search_societe'); $mine = $_REQUEST['mode'] == 'mine' ? 1 : 0; @@ -154,6 +155,7 @@ $arrayfields = array( 't.progress_calculated'=>array('label'=>"ProgressCalculated", 'checked'=>1, 'position'=>104), 't.progress'=>array('label'=>"ProgressDeclared", 'checked'=>1, 'position'=>105), 't.progress_summary'=>array('label'=>"TaskProgressSummary", 'checked'=>1, 'position'=>106), + 't.budget_amount'=>array('label'=>"Budget", 'checked'=>1, 'position'=>107), 't.tobill'=>array('label'=>"TimeToBill", 'checked'=>0, 'position'=>110), 't.billed'=>array('label'=>"TimeBilled", 'checked'=>0, 'position'=>111), 't.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), @@ -200,6 +202,7 @@ if (empty($reshook)) { $search_task_description = ""; $search_task_ref_parent = ""; $search_task_progress = ""; + $search_task_budget_amount = ""; $search_task_user = -1; $search_project_user = -1; $search_date_startday = ''; @@ -270,7 +273,7 @@ if ($id) { } // Get list of project id allowed to user (in a string list separated by coma) -if (!$user->rights->projet->all->lire) { +if (empty($user->rights->projet->all->lire)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid); } //var_dump($projectsListId); @@ -314,6 +317,7 @@ $sql .= " s.nom as name, s.rowid as socid,"; $sql .= " t.datec as date_creation, t.dateo as date_start, t.datee as date_end, t.tms as date_update,"; $sql .= " t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut, "; $sql .= " t.description, t.fk_task_parent"; +$sql .= " ,t.budget_amount"; // We'll need these fields in order to filter by categ if ($search_categ) { $sql .= ", cs.fk_categorie, cs.fk_project"; @@ -353,7 +357,7 @@ if ($search_task_user > 0) { } $sql .= " WHERE t.fk_projet = p.rowid"; $sql .= " AND p.entity IN (".getEntity('project').')'; -if (!$user->rights->projet->all->lire) { +if (empty($user->rights->projet->all->lire)) { $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId ? $projectsListId : '0').")"; // public and assigned to projects, or restricted to company for external users } if (is_object($projectstatic) && $projectstatic->id > 0) { @@ -390,6 +394,9 @@ if ($search_task_ref_parent) { if ($search_task_progress) { $sql .= natural_search('t.progress', $search_task_progress, 1); } +if ($search_task_budget_amount) { + $sql .= natural_search('t.budget_amount', $search_task_budget_amount, 1); +} if ($search_societe) { $sql .= natural_search('s.nom', $search_societe); } @@ -431,7 +438,7 @@ if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed $sql .= " GROUP BY p.rowid, p.ref, p.title, p.fk_statut, p.datee, p.fk_opp_status, p.public, p.fk_user_creat,"; $sql .= " s.nom, s.rowid,"; $sql .= " t.datec, t.dateo, t.datee, t.tms,"; - $sql .= " t.rowid, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut"; + $sql .= " t.rowid, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress,t.budget_amount, t.fk_statut"; if ($search_categ) { $sql .= ", cs.fk_categorie, cs.fk_project"; } @@ -521,6 +528,9 @@ if ($search_datelimit_endmonth) { if ($search_datelimit_endyear) { $param .= '&search_datelimit_endyear='.urlencode($search_datelimit_endyear); } +if ($search_task_budget_amount) { + $param .= '&search_task_budget_amount='.urlencode($search_task_budget_amount); +} if ($socid) { $param .= '&socid='.urlencode($socid); } @@ -760,6 +770,13 @@ if (!empty($arrayfields['t.progress']['checked'])) { if (!empty($arrayfields['t.progress_summary']['checked'])) { print ''; } + +if (!empty($arrayfields['t.budget_amount']['checked'])) { + print ''; + print ''; + print ''; +} + if (!empty($arrayfields['t.tobill']['checked'])) { print ''; } @@ -835,6 +852,9 @@ if (!empty($arrayfields['t.progress']['checked'])) { if (!empty($arrayfields['t.progress_summary']['checked'])) { print_liste_field_titre($arrayfields['t.progress_summary']['label'], $_SERVER["PHP_SELF"], "t.progress", "", $param, '', $sortfield, $sortorder, 'center '); } +if (!empty($arrayfields['t.budget_amount']['checked'])) { + print_liste_field_titre($arrayfields['t.budget_amount']['label'], $_SERVER["PHP_SELF"], "t.budget_amount", "", $param, '', $sortfield, $sortorder, 'center '); +} if (!empty($arrayfields['t.tobill']['checked'])) { print_liste_field_titre($arrayfields['t.tobill']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'center '); } @@ -877,6 +897,7 @@ while ($i < min($num, $limit)) { $object->description = $obj->description; $object->fk_statut = $obj->fk_statut; $object->progress = $obj->progress; + $object->budget_amount = $obj->budget_amount; $object->date_start = $db->jdate($obj->date_start); $object->date_end = $db->jdate($obj->date_end); $object->planned_workload = $obj->planned_workload; @@ -1116,6 +1137,22 @@ while ($i < min($num, $limit)) { $totalarray['totalprogress_summary'] = $totalarray['nbfield']; } } + if (!empty($arrayfields['t.budget_amount']['checked'])) { + print ''; + print price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.budget_amount'; + } + $totalarray['val']['t.budget_amount'] += $obj->budget_amount; + if (!$i) { + $totalarray['totalbudget_amount'] = $totalarray['nbfield']; + } + $totalarray['totalbudgetamount'] += $obj->budget_amount; + print ''; + } // Time not billed if (!empty($arrayfields['t.tobill']['checked'])) { print ''; @@ -1232,6 +1269,8 @@ if (isset($totalarray['totaldurationeffectivefield']) || isset($totalarray['tota print ''.convertSecondToTime($totalarray['totaltobill'], $plannedworkloadoutputformat).''; } elseif ($totalarray['totalbilledfield'] == $i) { print ''.convertSecondToTime($totalarray['totalbilled'], $plannedworkloadoutputformat).''; + } elseif ($totalarray['totalbudget_amount'] == $i) { + print ''.price($totalarray['totalbudgetamount'], 0, $langs, 1, 0, 0, $conf->currency).''; } else { print ''; } diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 21be9b6d5c4..3d1ec610b48 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -142,7 +142,7 @@ if ($object->id > 0) { $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -223,7 +223,6 @@ if ($object->id > 0) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -242,7 +241,6 @@ if ($object->id > 0) { print '
    '; - print '
    '; print '
    '; print ''; diff --git a/htdocs/projet/tasks/stats/index.php b/htdocs/projet/tasks/stats/index.php index 76c74ba343c..60cbdf37072 100644 --- a/htdocs/projet/tasks/stats/index.php +++ b/htdocs/projet/tasks/stats/index.php @@ -205,7 +205,7 @@ foreach ($data_all_year as $val) { print ''; print ''; -print '
    '; +print '
    '; $stringtoshow = '
    '; if ($mesg) { @@ -219,7 +219,7 @@ $stringtoshow .= '
    '; print $stringtoshow; -print '
    '; +print ''; print '
    '; // End of page diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 2ae9bb7cc80..62714c72216 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -105,6 +105,7 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) { $object->date_start = dol_mktime(GETPOST('dateohour', 'int'), GETPOST('dateomin', 'int'), 0, GETPOST('dateomonth', 'int'), GETPOST('dateoday', 'int'), GETPOST('dateoyear', 'int')); $object->date_end = dol_mktime(GETPOST('dateehour', 'int'), GETPOST('dateemin', 'int'), 0, GETPOST('dateemonth', 'int'), GETPOST('dateeday', 'int'), GETPOST('dateeyear', 'int')); $object->progress = price2num(GETPOST('progress', 'alphanohtml')); + $object->budget_amount = price2num(GETPOST('budget_amount', 'alphanohtml')); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); @@ -234,7 +235,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -316,7 +317,6 @@ if ($id > 0 || !empty($ref)) { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -335,7 +335,6 @@ if ($id > 0 || !empty($ref)) { print '
    '; - print '
    '; print '
    '; print ''; @@ -403,8 +402,8 @@ if ($id > 0 || !empty($ref)) { // Third party print ''.$langs->trans("ThirdParty").''; - if ($projectstatic->societe->id) { - print $projectstatic->societe->getNomUrl(1); + if ($projectstatic->thirdparty->id) { + print $projectstatic->thirdparty->getNomUrl(1); } else { print ' '; } @@ -442,6 +441,10 @@ if ($id > 0 || !empty($ref)) { print ''; print ''; + print ''.$langs->trans("Budget").''; + print ''; + print ''; + // Other options $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -538,7 +541,7 @@ if ($id > 0 || !empty($ref)) { print ''; print ''; - print '
    '; + print '
    '; print '
    '; print ''; @@ -564,6 +567,13 @@ if ($id > 0 || !empty($ref)) { } print ''; + // Budget + print ''; + // Other attributes $cols = 3; $parameters = array('socid'=>$socid); @@ -571,7 +581,6 @@ if ($id > 0 || !empty($ref)) { print '
    '.$langs->trans("Budget").''; + if (strcmp($object->budget_amount, '')) { + print price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); + } + print '
    '; - print '
    '; print '
    '; print '
    '; @@ -627,7 +636,7 @@ if ($id > 0 || !empty($ref)) { print $formfile->showdocuments('project_task', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf); - print '
    '; + print '
    '; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; @@ -635,7 +644,7 @@ if ($id > 0 || !empty($ref)) { $defaultthirdpartyid = $socid > 0 ? $socid : $object->project->socid; $formactions->showactions($object, 'task', $defaultthirdpartyid, 1, '', 10, 'withproject='.$withproject); - print '
    '; + print ''; } } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 83f27c11796..e8dc79951f7 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -719,7 +719,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) { $head = project_prepare_head($projectstatic); print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project')); - $param = ($mode == 'mine' ? '&mode=mine' : ''); + $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : ''); // Project card @@ -729,13 +729,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) { // Title $morehtmlref .= $projectstatic->title; // Thirdparty - if ($projectstatic->thirdparty->id > 0) { + if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) { + if (empty($user->rights->projet->all->lire)) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } @@ -773,7 +773,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) { print '
    '; } if (!empty($conf->eventorganization->enabled)) { - print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; + print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); } @@ -816,10 +816,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) { print ''; print '
    '; - print '
    '; print '
    '; - print ''; + print '
    '; // Description print '
    '.$langs->trans("Description").''; @@ -835,7 +834,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) { print '
    '; - print '
    '; print '
    '; print ''; @@ -955,7 +953,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) { print ''; print ''; - print '
    '; + print '
    '; print '
    '; print ''; @@ -983,7 +981,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) { print '
    '; - print '
    '; print '
    '; print '
    '; diff --git a/htdocs/public/eventorganization/attendee_register.php b/htdocs/public/eventorganization/attendee_new.php similarity index 99% rename from htdocs/public/eventorganization/attendee_register.php rename to htdocs/public/eventorganization/attendee_new.php index 4dad36e4d03..ede24103bdb 100644 --- a/htdocs/public/eventorganization/attendee_register.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/public/eventorganization/attendee_register.php + * \file htdocs/public/eventorganization/attendee_new.php * \ingroup project * \brief Example of form to subscribe to an event * diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 5c7de4c321e..4795338a938 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -523,6 +523,7 @@ print '
    '. print ''; print ''; print ''; +print ''; print '
    '; @@ -563,7 +564,7 @@ jQuery(document).ready(function () { print ''."\n"; - // Type +// Type if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) { $listoftype = $adht->liste_array(); $tmp = array_keys($listoftype); @@ -596,7 +597,7 @@ if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) { // Company print ''."\n"; +print ''."\n"; // Title print ''."\n"; @@ -625,7 +626,7 @@ print ''."\n"; // Zip / Town print ''; diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index d034db38be3..65b12a91342 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -49,15 +49,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; // Load translation files -$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "paybox")); +$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "paybox","propal")); // Security check // No check on module enabled. Done later according to $validpaymentmethod // Get parameters $action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); +$refusepropal = GETPOST('refusepropal', 'alpha'); // Input are: // type ('invoice','order','contractline'), @@ -80,7 +83,9 @@ if (!$action) { exit; } } - +if (!empty($refusepropal)) { + $action = "refusepropal"; +} // Define $urlwithroot //$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); @@ -112,14 +117,29 @@ $urlko = preg_replace('/&$/', '', $urlko); // Remove last & $creditor = $mysoc->name; +$object = new Propal($db); +$object->fetch(0, $ref); /* * Actions */ - -if ($action == 'dosign') { - // TODO +if ($action == 'confirm_refusepropal') { + $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; + $sql .= " SET fk_statut = ".((int) $object::STATUS_NOTSIGNED).", note_private = '".$object->note_private."', date_signature='".$db->idate(dol_now())."'"; + $sql .= " WHERE rowid = ".((int) $object->id); + dol_syslog(__METHOD__, LOG_DEBUG); + $resql = $db->query($sql); + if (!$resql) { + $error++; + } + if (!$error) { + $db->commit(); + setEventMessage("PropalRefused"); + } else { + $db->rollback(); + } + $object->fetch(0, $ref); } @@ -127,6 +147,7 @@ if ($action == 'dosign') { * View */ +$form = new Form($db); $head = ''; if (!empty($conf->global->MAIN_SIGN_CSS_URL)) { $head = ''."\n"; @@ -138,6 +159,10 @@ $conf->dol_hide_leftmenu = 1; $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
    ' : '').'
    '; llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1); +if ($action == 'refusepropal') { + print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.$ref, $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1); +} + // Check link validity for param 'source' if (!empty($source) && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', ''))) { $langs->load("errors"); @@ -215,7 +240,7 @@ if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) { } if (empty($text)) { $text .= '
    '."\n"; - $text .= ''."\n"; + $text .= ''."\n"; } print $text; @@ -226,9 +251,8 @@ print ''."\n"; // Debitor - print ''."\n"; // Object $text = ''.$langs->trans("SignatureProposalRef", $proposal->ref).''; - print ''."\n"; + + // TODO Add link to download PDF (similar code than for invoice) } @@ -273,7 +317,7 @@ if (!$found && !$mesg) { } if ($mesg) { - print ''."\n"; + print ''."\n"; } print '
    '.$langs->trans("Company").''; print img_picto('', 'company', 'class="pictofixedwidth"'); -print '
    '.$langs->trans('UserTitle').''; print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'
    '.$langs->trans("Address").''."\n"; print '
    '.$langs->trans('Zip').' / '.$langs->trans('Town').''; -print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1); +print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 1, '', 'width75'); print ' / '; print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); print '

    '.$langs->trans("WelcomeOnOnlineSignaturePage", $mysoc->name).'
    '.$langs->trans("ThisScreenAllowsYouToSignDocFrom", $creditor).'

    '.$langs->trans("ThisScreenAllowsYouToSignDocFrom", $creditor).'

    '.$langs->trans("T $found = false; $error = 0; -$var = false; -// Payment on customer order +// Signature on commercial proposal if ($source == 'proposal') { $found = true; $langs->load("proposal"); @@ -246,24 +270,44 @@ if ($source == 'proposal') { // Creditor - print '
    '.$langs->trans("Creditor"); - print ''.$creditor.''; + print '
    '.$langs->trans("Creditor"); + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$creditor.''; print ''; print '
    '.$langs->trans("ThirdParty"); - print ''.$proposal->thirdparty->name.''; + print '
    '.$langs->trans("ThirdParty"); + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$proposal->thirdparty->name.''; + print '
    '.$langs->trans("Designation"); - print ''.$text; + print '
    '.$langs->trans("Designation"); + print ''.$text; + if ($proposal->status == $proposal::STATUS_VALIDATED) { + $directdownloadlink = $proposal->getLastMainDocLink('proposal'); + if ($directdownloadlink) { + print '
    '; + print img_mime($proposal->last_main_doc, ''); + print $langs->trans("DownloadDocument").''; + } + } else { + /* TODO If proposal signed newer than proposal ref, get link of proposal signed + + */ + } + print ''; print ''; print '

    '.dol_escape_htmltag($mesg).'

    '.dol_escape_htmltag($mesg).'
    '."\n"; @@ -290,7 +334,72 @@ if ($action != 'dosign') { } print ''."\n"; +print ''; +if ($action == "dosign" && empty($cancel)) { + print '
    '; + print ''; + print '
    '; + print '
    '; + print ''; + print ''; + print ' + '; +} else { + if ($object->status == $object::STATUS_SIGNED) { + print '
    '; + print ''.$langs->trans("PropalAlreadySigned").''; + } elseif ($object->status == $object::STATUS_NOTSIGNED) { + print '
    '; + print ''.$langs->trans("PropalAlreadyRefused").''; + } else { + print ''; + print ''; + } +} +print ''."\n"; print ''."\n"; print '
    '."\n"; print ''."\n"; diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 7be05684fd2..42cde055ac2 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -298,7 +298,7 @@ print ''."\n"; //The survey has expired, users can't vote or do any action if (!$canbemodified) { - print '

    '.$langs->trans('SurveyExpiredInfo').'

    '; + print '
    '.$langs->trans('SurveyExpiredInfo').'
    '; llxFooterSurvey(); $db->close(); diff --git a/htdocs/public/partnership/index.php b/htdocs/public/partnership/index.php new file mode 100644 index 00000000000..6a9a6f8a557 --- /dev/null +++ b/htdocs/public/partnership/index.php @@ -0,0 +1,26 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/public/partnership/index.php + * \ingroup core + * \brief A redirect page to an error + */ + +require '../../master.inc.php'; + +header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php new file mode 100644 index 00000000000..fe57f4ea424 --- /dev/null +++ b/htdocs/public/partnership/new.php @@ -0,0 +1,616 @@ + + * Copyright (C) 2001-2002 Jean-Louis Bergamo + * Copyright (C) 2006-2013 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 J. Fernando Lagrange + * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2021 Waël Almoman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/public/partnership/new.php + * \ingroup member + * \brief Example of form to add a new member + */ + +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} + +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retrieve from object ref and not from url. +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + +// Init vars +$errmsg = ''; +$num = 0; +$error = 0; +$backtopage = GETPOST('backtopage', 'alpha'); +$action = GETPOST('action', 'aZ09'); + +// Load translation files +$langs->loadLangs(array("main", "members", "companies", "install", "other")); + +// Security check +if (empty($conf->partnership->enabled)) { + accessforbidden('', 0, 0, 1); +} + +if (empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) { + print $langs->trans("Auto subscription form for public visitors has not been enabled"); + exit; +} + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('publicnewpartnershipcard', 'globalcard')); + +$extrafields = new ExtraFields($db); + +$object = new Partnership($db); + +$user->loadDefaultValues(); + + +/** + * Show header for new partnership + * + * @param string $title Title + * @param string $head Head array + * @param int $disablejs More content into html header + * @param int $disablehead More content into html header + * @param array $arrayofjs Array of complementary js files + * @param array $arrayofcss Array of complementary css files + * @return void + */ +function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') +{ + global $user, $conf, $langs, $mysoc; + + top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + + print ''; + + // Define urllogo + $urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png'; + + if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); + } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; + } + + print '
    '; + + // Output html code for logo + if ($urllogo) { + print '
    '; + print '
    '; + print ''; + print '
    '; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; + } + print '
    '; + } + + if (!empty($conf->global->PARTNERSHIP_IMAGE_PUBLIC_REGISTRATION)) { + print '
    '; + print ''; + print '
    '; + } + + print '
    '; + + print '
    '; +} + +/** + * Show footer for new member + * + * @return void + */ +function llxFooterVierge() +{ + print '
    '; + + printCommonFooter('public'); + + print "\n"; + print "\n"; +} + + + +/* + * Actions + */ +$parameters = array(); +// Note that $action and $object may have been modified by some hooks +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +// Action called when page is submitted +if (empty($reshook) && $action == 'add') { + $error = 0; + $urlback = ''; + + $db->begin(); + + /*if (GETPOST('typeid') <= 0) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type"))."
    \n"; + }*/ + if (!GETPOST('lastname')) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."
    \n"; + } + if (!GETPOST('firstname')) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."
    \n"; + } + if (empty(GETPOST('email'))) { + $error++; + $errmsg .= $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Email'))."
    \n"; + } elseif (GETPOST("email") && !isValidEmail(GETPOST("email"))) { + $langs->load('errors'); + $error++; + $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
    \n"; + } + + $public = GETPOSTISSET('public') ? 1 : 0; + + if (!$error) { + $partnership = new Partnership($db); + + // We try to find the thirdparty or the member + if (empty($conf->global->PARTNERSHIP_IS_MANAGED_FOR) || $conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'thirdparty') { + $partnership->fk_member = 0; + } elseif ($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member') { + $partnership->fk_soc = 0; + } + + $partnership->statut = -1; + $partnership->firstname = GETPOST('firstname'); + $partnership->lastname = GETPOST('lastname'); + $partnership->address = GETPOST('address'); + $partnership->zip = GETPOST('zipcode'); + $partnership->town = GETPOST('town'); + $partnership->email = GETPOST('email'); + $partnership->country_id = GETPOST('country_id', 'int'); + $partnership->state_id = GETPOST('state_id', 'int'); + //$partnership->typeid = $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE ? $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE : GETPOST('typeid', 'int'); + $partnership->note_private = GETPOST('note_private'); + + // Fill array 'array_options' with data from add form + $extrafields->fetch_name_optionals_label($partnership->table_element); + $ret = $extrafields->setOptionalsFromPost(null, $partnership); + if ($ret < 0) { + $error++; + } + + $result = $partnership->create($user); + if ($result > 0) { + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $object = $partnership; + + /* + $partnershipt = new PartnershipType($db); + $partnershipt->fetch($object->typeid); + + if ($object->email) { + $subject = ''; + $msg = ''; + + // Send subscription email + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + // Set output language + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "members")); + // Get email content from template + $arraydefaultmessage = null; + $labeltouse = $conf->global->PARTNERSHIP_EMAIL_TEMPLATE_AUTOREGISTER; + + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); + } + + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { + $subject = $arraydefaultmessage->topic; + $msg = $arraydefaultmessage->content; + } + + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); + $texttosend = make_substitutions(dol_concatdesc($msg, $partnershipt->getMailOnValid()), $substitutionarray, $outputlangs); + + if ($subjecttosend && $texttosend) { + $moreinheader = 'X-Dolibarr-Info: send_an_email by public/members/new.php'."\r\n"; + + $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); + } + } + */ + + // Send email to the foundation to say a new member subscribed with autosubscribe form + if (!empty($conf->global->MAIN_INFO_SOCIETE_MAIL) && !empty($conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL_SUBJECT) && + !empty($conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL)) { + // Define link to login card + $appli = constant('DOL_APPLICATION_TITLE'); + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $appli = $conf->global->MAIN_APPLICATION_TITLE; + if (preg_match('/\d\.\d/', $appli)) { + if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) { + $appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core + } + } else { + $appli .= " ".DOL_VERSION; + } + } else { + $appli .= " ".DOL_VERSION; + } + + $to = $partnership->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL); + $from = $conf->global->PARTNERSHIP_MAIL_FROM; + $mailfile = new CMailFile( + '['.$appli.'] '.$conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL_SUBJECT, + $to, + $from, + $partnership->makeSubstitution($conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL), + array(), + array(), + array(), + "", + "", + 0, + -1 + ); + + if (!$mailfile->sendfile()) { + dol_syslog($langs->trans("ErrorFailedToSendMail", $from, $to), LOG_ERR); + } + } + + if (!empty($backtopage)) { + $urlback = $backtopage; + } elseif (!empty($conf->global->PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION)) { + $urlback = $conf->global->PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION; + // TODO Make replacement of __AMOUNT__, etc... + } else { + $urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken(); + } + + if (!empty($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE) && $conf->global->PARTNERSHIP_NEWFORM_PAYONLINE != '-1') { + if ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'all') { + $urlback = DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); + } else { + $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } + } + } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'paybox') { + $urlback = DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); + } else { + $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } + } + } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'paypal') { + $urlback = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); + } else { + $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } + } + } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'stripe') { + $urlback = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.$partnership->ref; + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); + } else { + $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } + } + } else { + dol_print_error('', "Autosubscribe form is setup to ask an online payment for a not managed online payment"); + exit; + } + } + + if (!empty($entity)) { + $urlback .= '&entity='.$entity; + } + dol_syslog("partnership ".$partnership->ref." was created, we redirect to ".$urlback); + } else { + $error++; + $errmsg .= join('
    ', $partnership->errors); + } + } + + if (!$error) { + $db->commit(); + + Header("Location: ".$urlback); + exit; + } else { + $db->rollback(); + } +} + +// Action called after a submitted was send and member created successfully +// If PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION is set to url we never go here because a redirect was done to this url. +// backtopage parameter with an url was set on member submit page, we never go here because a redirect was done to this url. +if (empty($reshook) && $action == 'added') { + llxHeaderVierge($langs->trans("NewPartnershipForm")); + + // Si on a pas ete redirige + print '
    '; + print '
    '; + print $langs->trans("NewPartnershipbyWeb"); + print '
    '; + + llxFooterVierge(); + exit; +} + + + +/* + * View + */ + +$form = new Form($db); +$formcompany = new FormCompany($db); +$partnershipt = new AdherentType($db); +$extrafields->fetch_name_optionals_label('partnership'); // fetch optionals attributes and labels + + +llxHeaderVierge($langs->trans("NewSubscription")); + + +print load_fiche_titre($langs->trans("NewSubscription"), '', '', 0, 0, 'center'); + + +print '
    '; +print '
    '; + +print '
    '; +if (!empty($conf->global->PARTNERSHIP_NEWFORM_TEXT)) { + print $langs->trans($conf->global->PARTNERSHIP_NEWFORM_TEXT)."
    \n"; +} else { + print $langs->trans("NewSubscriptionDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL)."
    \n"; +} +print '
    '; + +dol_htmloutput_errors($errmsg); + +// Print form +print '
    '."\n"; +print ''; +print ''; +print ''; + +print '
    '; + +print '
    '.$langs->trans("FieldsWithAreMandatory", '*').'
    '; +//print $langs->trans("FieldsWithIsForPublic",'**').'
    '; + +print dol_get_fiche_head(''); + +print ''; + + +print ''."\n"; + +// Type +/* +if (empty($conf->global->PARTNERSHIP_NEWFORM_FORCETYPE)) { + $listoftype = $partnershipt->liste_array(); + $tmp = array_keys($listoftype); + $defaulttype = ''; + $isempty = 1; + if (count($listoftype) == 1) { + $defaulttype = $tmp[0]; + $isempty = 0; + } + print ''."\n"; +} else { + $partnershipt->fetch($conf->global->PARTNERSHIP_NEWFORM_FORCETYPE); + print ''; +} +*/ + +// Moral/Physic attribute +$morphys["phy"] = $langs->trans("Physical"); +$morphys["mor"] = $langs->trans("Moral"); +if (empty($conf->global->PARTNERSHIP_NEWFORM_FORCEMORPHY)) { + print ''."\n"; +} else { + print $morphys[$conf->global->PARTNERSHIP_NEWFORM_FORCEMORPHY]; + print ''; +} + +// Company +print ''."\n"; +// Title +print ''."\n"; +// Lastname +print ''."\n"; +// Firstname +print ''."\n"; +// EMail +print ''."\n"; +// Login +if (empty($conf->global->PARTNERSHIP_LOGIN_NOT_REQUIRED)) { + print ''."\n"; + print ''."\n"; + print ''."\n"; +} +// Gender +print ''; +print ''; +// Address +print ''."\n"; +// Zip / Town +print ''; +// Country +print ''; +// State +if (empty($conf->global->SOCIETE_DISABLE_STATE)) { + print ''; +} +// Logo +//print ''."\n"; +// Other attributes +$tpl_context = 'public'; // define template context to public +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; +// Comments +print ''; +print ''; +print ''; +print ''."\n"; + +print "
    '.$langs->trans("Type").' *'; + print $form->selectarray("typeid", $partnershipt->liste_array(1), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty); + print '
    '.$langs->trans('MemberNature').' *'."\n"; + print $form->selectarray("morphy", $morphys, GETPOST('morphy'), 1); + print '
    '.$langs->trans("Company").''; +print img_picto('', 'company', 'class="pictofixedwidth"'); +print '
    '.$langs->trans('UserTitle').''; +print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'
    '.$langs->trans("Lastname").' *
    '.$langs->trans("Firstname").' *
    '.$langs->trans("Email").($conf->global->PARTNERSHIP_MAIL_REQUIRED ? ' *' : '').''; +//print img_picto('', 'email', 'class="pictofixedwidth"'); +print '
    '.$langs->trans("Login").' *
    '.$langs->trans("Password").' *
    '.$langs->trans("PasswordAgain").' *
    '.$langs->trans("Gender").''; +$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman")); +print $form->selectarray('gender', $arraygender, GETPOST('gender') ?GETPOST('gender') : $object->gender, 1); +print '
    '.$langs->trans("Address").''."\n"; +print '
    '.$langs->trans('Zip').' / '.$langs->trans('Town').''; +print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1); +print ' / '; +print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); +print '
    '.$langs->trans('Country').''; +print img_picto('', 'country', 'class="pictofixedwidth"'); +$country_id = GETPOST('country_id', 'int'); +if (!$country_id && !empty($conf->global->PARTNERSHIP_NEWFORM_FORCECOUNTRYCODE)) { + $country_id = getCountry($conf->global->PARTNERSHIP_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs); +} +if (!$country_id && !empty($conf->geoipmaxmind->enabled)) { + $country_code = dol_user_country(); + //print $country_code; + if ($country_code) { + $new_country_id = getCountry($country_code, 3, $db, $langs); + //print 'xxx'.$country_code.' - '.$new_country_id; + if ($new_country_id) { + $country_id = $new_country_id; + } + } +} +$country_code = getCountry($country_id, 2, $db, $langs); +print $form->select_country($country_id, 'country_id'); +print '
    '.$langs->trans('State').''; + if ($country_code) { + print $formcompany->select_state(GETPOST("state_id"), $country_code); + } + print '
    '.$langs->trans("URLPhoto").'
    '.$langs->trans("Comments").'
    \n"; + +print dol_get_fiche_end(); + +// Save +print '
    '; +print ''; +if (!empty($backtopage)) { + print '     '; +} +print '
    '; + + +print "
    \n"; +print "
    "; +print '
    '; + + +llxFooterVierge(); + +$db->close(); diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 059042399a2..a5e24312ded 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -953,7 +953,9 @@ if (!$source) { // Creditor print ''.$langs->trans("Creditor"); - print ''.$creditor.''; + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$creditor.''; print ''; print ''."\n"; @@ -1025,13 +1027,17 @@ if ($source == 'order') { // Creditor print ''.$langs->trans("Creditor"); - print ''.$creditor.''; + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$creditor.''; print ''; print ''."\n"; // Debitor print ''.$langs->trans("ThirdParty"); - print ''.$order->thirdparty->name.''; + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$order->thirdparty->name.''; print ''."\n"; // Object @@ -1149,13 +1155,17 @@ if ($source == 'invoice') { // Creditor print ''.$langs->trans("Creditor"); - print ''.$creditor.''; + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$creditor.''; print ''; print ''."\n"; // Debitor print ''.$langs->trans("ThirdParty"); - print ''.$invoice->thirdparty->name.''; + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$invoice->thirdparty->name.''; print ''."\n"; // Object diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index 3990e31ba2f..5f450a6c557 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -64,7 +64,7 @@ $langs->loadLangs(array("other", "dict", "bills", "companies", "errors", "paybox // No check on module enabled. Done later according to $validpaymentmethod $action = GETPOST('action', 'aZ09'); -$id = GETPOST('id'); +$id = GETPOST('id', 'int'); $securekeyreceived = GETPOST("securekey", 'alpha'); $securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5'); @@ -183,11 +183,27 @@ if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT)) { print ''; } -print ''."\n"; +print '
    '; -$text = ''."\n"; -$text .= ''."\n"; -$text .= ''."\n"; + +// Event summary +print '
    '; +print ''.$project->title.'
    '; +print img_picto('', 'calendar', 'class="pictofixedwidth"').$langs->trans("Date").': '; +print dol_print_date($project->date_start, 'daytext'); +if ($project->date_end && $project->date_start != $project->date_end) { + print ' - '.dol_print_date($project->date_end, 'daytext'); +} +print '

    '."\n"; +print $langs->trans("EvntOrgRegistrationWelcomeMessage")."\n"; +print $project->note_public."\n"; +//print img_picto('', 'map-marker-alt').$langs->trans("Location").': xxxx'; +print '
    '; + + +print '
    '; + +print '

    '.$langs->trans("EvntOrgRegistrationWelcomeMessage").'
    '.$langs->trans("EvntOrgRegistrationHelpMessage").' '.$project->title.'.

    '.$project->note_public.'

    '."\n"; print $text; @@ -205,19 +221,27 @@ print "\n"; // Show all action buttons print '
    '; + // Output introduction text +$foundaction = 0; if ($project->accept_booth_suggestions) { - print ''; + $foundaction++; + print ''; print '

    '; } -if ($project->accept_conference_suggestions) { - print ''; +if ($project->accept_conference_suggestions == 1 || $project->accept_conference_suggestions == 2) { // Can suggest conferences + $foundaction++; + print ''; print '

    '; } -print ''; - - +if ($project->accept_conference_suggestions == 2 || $project->accept_conference_suggestions == 3) { // Can vote for conferences + $foundaction++; + print ''; +} +if (! $foundaction) { + print ''.$langs->trans("NoPublicActionsAllowedForThisEvent").''; +} print ''."\n"; diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php index b9b68c5e2e9..971031e7a80 100644 --- a/htdocs/public/project/new.php +++ b/htdocs/public/project/new.php @@ -24,7 +24,7 @@ /** * \file htdocs/public/project/new.php * \ingroup project - * \brief Example of form to add a new lead + * \brief Page to record a message/lead into a project/lead */ if (!defined('NOLOGIN')) { @@ -65,7 +65,7 @@ $backtopage = GETPOST('backtopage', 'alpha'); $action = GETPOST('action', 'aZ09'); // Load translation files -$langs->loadLangs(array("members", "companies", "install", "other")); +$langs->loadLangs(array("members", "companies", "install", "other", "projects")); if (empty($conf->global->PROJECT_ENABLE_PUBLIC)) { print $langs->trans("Form for public lead registration has not been enabled"); @@ -381,7 +381,7 @@ print '
    '; if (!empty($conf->global->PROJECT_NEWFORM_TEXT)) { print $langs->trans($conf->global->PROJECT_NEWFORM_TEXT)."
    \n"; } else { - print $langs->trans("NewLeadDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL)."
    \n"; + print $langs->trans("FormForNewLeadDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL)."
    \n"; } print '
    '; diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 7e1607adbe2..c0bcdc751c6 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -517,6 +517,22 @@ $formcompany = new FormCompany($db); llxHeaderVierge($langs->trans("NewSuggestionOfBooth")); +print '
    '; + +// Event summary +print '
    '; +print ''.$project->title.'
    '; +print img_picto('', 'calendar', 'class="pictofixedwidth"').$langs->trans("Date").': '; +print dol_print_date($project->date_start, 'daytext'); +if ($project->date_end && $project->date_start != $project->date_end) { + print ' - '.dol_print_date($project->date_end, 'daytext'); +} +print '

    '."\n"; +//print $langs->trans("EvntOrgRegistrationWelcomeMessage")."\n"; +//print $project->note_public."\n"; +//print img_picto('', 'map-marker-alt').$langs->trans("Location").': xxxx'; +print '
    '; + print load_fiche_titre($langs->trans("NewSuggestionOfBooth"), '', '', 0, 0, 'center'); @@ -525,13 +541,6 @@ print '
    '; print '
    '; print '
    '; -// Welcome message -$text = '

    '; -$text .= ''."\n"; -$text .= ''."\n"; -print $text; -print ''; - dol_htmloutput_errors($errmsg); // Print form diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index ff159e30943..f2a919c0aa2 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -450,6 +450,22 @@ $formcompany = new FormCompany($db); llxHeaderVierge($langs->trans("NewSuggestionOfConference")); +print '
    '; + +// Event summary +print '
    '; +print ''.$project->title.'
    '; +print img_picto('', 'calendar', 'class="pictofixedwidth"').$langs->trans("Date").': '; +print dol_print_date($project->date_start, 'daytext'); +if ($project->date_end && $project->date_start != $project->date_end) { + print ' - '.dol_print_date($project->date_end, 'daytext'); +} +print '

    '."\n"; +//print $langs->trans("EvntOrgRegistrationWelcomeMessage")."\n"; +//print $project->note_public."\n"; +//print img_picto('', 'map-marker-alt').$langs->trans("Location").': xxxx'; +print '
    '; + print load_fiche_titre($langs->trans("NewSuggestionOfConference"), '', '', 0, 0, 'center'); @@ -458,12 +474,6 @@ print '
    '; print '
    '; print '
    '; -// Welcome message -$text = '

    '; -$text .= ''."\n"; -$text .= ''."\n"; -print $text; -print ''; dol_htmloutput_errors($errmsg); diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index f119f08239d..e680df15a1c 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -101,20 +101,18 @@ if (empty($conf->eventorganization->enabled)) { $tmpthirdparty = new Societe($db); -$listOfConferences = $listOfBooths = ' - - - - - '; +$listOfConferences = ''; +$listOfConferences .= ''; +$listOfConferences .= ''; +$listOfConferences .= ''; -$sql = "SELECT a.id, a.fk_action, a.datep, a.datep2, a.label, a.fk_soc, a.note, ca.libelle +$sql = "SELECT a.id, a.fk_action, a.datep, a.datep2, a.label, a.fk_soc, a.note, ca.libelle as label FROM ".MAIN_DB_PREFIX."actioncomm as a INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as ca ON (a.fk_action=ca.id) WHERE a.status<2"; $sqlforconf = $sql." AND ca.module='conference@eventorganization'"; -$sqlforbooth = $sql." AND ca.module='booth@eventorganization'"; +//$sqlforbooth = $sql." AND ca.module='booth@eventorganization'"; // For conferences $result = $db->query($sqlforconf); @@ -132,12 +130,13 @@ while ($i < $db->num_rows($result)) { $thirdpartyname = ''; } - $listOfConferences .= ''; + $listOfConferences .= ''; $listOfConferences .= ''; $i++; } // For booths +/* $result = $db->query($sqlforbooth); $i = 0; while ($i < $db->num_rows($result)) { @@ -157,6 +156,7 @@ while ($i < $db->num_rows($result)) { $listOfBooths .= ''; $i++; } +*/ // Get vote result $idvote = GETPOST("vote"); @@ -275,19 +275,20 @@ $text .= '' print $text; print '
    '.$langs->trans("EvntOrgRegistrationBoothWelcomeMessage").'
    '.$langs->trans("EvntOrgRegistrationBoothHelpMessage").' '.$project->label.'.

    '.$project->note_public.'
    '.$langs->trans("EvntOrgRegistrationConfWelcomeMessage").'
    '.$langs->trans("EvntOrgRegistrationConfHelpMessage").' '.$project->label.'.

    '.$project->note_public.'
    '.$langs->trans('Label').''.$langs->trans('Type').''.$langs->trans('DateStart').''.$langs->trans('DateEnd').''.$langs->trans('Thirdparty').''.$langs->trans('Note').'
    '.$langs->trans('Label').''.$langs->trans('Type').''.$langs->trans('ThirdParty').''.$langs->trans('Note').'
    '.$obj->label.''.$obj->libelle.''.$obj->datep.''.$obj->datep2.''.$thirdpartyname.''.$obj->note.'
    '.$obj->label.''.$obj->label.''.$thirdpartyname.''.$obj->note.'
    '.$project->note_public.'
    '."\n"; -print dol_get_fiche_head(''); -print ''."\n"; +print '
    '."\n"; print ''; -print $listOfConferences.'
    '; +print $listOfConferences.'
    '; print '
    '.$langs->trans("ListOfSuggestedConferences").'
    '."\n"; -print '
    '; +/* +print '
    '; print ''."\n"; print ''; -print $listOfBooths.'
    '; +print $listOfBooths.'
    '; print '
    '.$langs->trans("ListOfSuggestedBooths").'
    '."\n"; +*/ $object = null; diff --git a/htdocs/public/recruitment/index.php b/htdocs/public/recruitment/index.php index 840fd1f4d8f..1736deef246 100644 --- a/htdocs/public/recruitment/index.php +++ b/htdocs/public/recruitment/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2020 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 @@ -16,21 +16,16 @@ */ /** - * \file htdocs/public/recruitment/index.php + * \file htdocs/public/recruitment/view.php * \ingroup recruitment - * \brief Public file to list jobs + * \brief Public file to show on job */ +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} -// Do not check anti CSRF attack test -if (!defined('NOREQUIREMENU')) { - define('NOREQUIREMENU', '1'); -} -// If there is no need to load and show top and left menu -if (!defined("NOLOGIN")) { - define("NOLOGIN", '1'); + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. } if (!defined('NOIPCHECK')) { define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip @@ -38,23 +33,48 @@ if (!defined('NOIPCHECK')) { if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } -// If this page is public (can be called outside logged session) require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "other", "recruitment")); // Get parameters -$action = GETPOST('action', 'aZ09'); -$email = GETPOST('email', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); +$email = GETPOST('email', 'alpha'); +$backtopage = ''; + +$ref = GETPOST('ref', 'alpha'); + +if (GETPOST('btn_view')) { + unset($_SESSION['email_customer']); +} +if (isset($_SESSION['email_customer'])) { + $email = $_SESSION['email_customer']; +} $object = new RecruitmentJobPosition($db); +if (!$action) { + if (!$ref) { + print $langs->trans('ErrorBadParameters')." - ref missing"; + exit; + } else { + $object->fetch('', $ref); + } +} + +// Define $urlwithroot +//$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); +//$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file +$urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost. + // Security check if (empty($conf->recruitment->enabled)) { accessforbidden('', 0, 0, 1); @@ -68,14 +88,17 @@ if (empty($conf->recruitment->enabled)) { // None - /* * View */ -$form = new Form($db); -$user_assign = new User($db); -$user_create = new User($db); +$head = ''; +if (!empty($conf->global->MAIN_RECRUITMENT_CSS_URL)) { + $head = ''."\n"; +} + +$conf->dol_hide_topmenu = 1; +$conf->dol_hide_leftmenu = 1; if (!$conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE) { $langs->load("errors"); @@ -87,382 +110,74 @@ if (!$conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE) { $arrayofjs = array(); $arrayofcss = array(); -llxHeaderTicket($langs->trans("Jobs"), "", 0, 0, $arrayofjs, $arrayofcss); +$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
    ' : '').'
    '; +llxHeader($head, $langs->trans("PositionToBeFilled"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1); -print '
    '; +print ''."\n"; +print '
    '."\n"; +print '
    '."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''; +print "\n"; +print ''."\n"; -$display_ticket_list = 1; - -print '
    '; -if ($display_ticket_list) { - // Filters - $search_fk_status = GETPOST("search_fk_status", 'alpha'); - $search_subject = GETPOST("search_subject", 'alpha'); - $search_type = GETPOST("search_type", 'alpha'); - $search_category = GETPOST("search_category", 'alpha'); - $search_severity = GETPOST("search_severity", 'alpha'); - $search_fk_user_create = GETPOST("search_fk_user_create", 'int'); - $search_fk_user_assign = GETPOST("search_fk_user_assign", 'int'); - - // Store current page url - $url_page_current = dol_buildpath('/public/ticket/list.php', 1); - - // Do we click on purge search criteria ? - if (GETPOST("button_removefilter_x")) { - $search_fk_status = ''; - $search_subject = ''; - $search_type = ''; - $search_category = ''; - $search_severity = ''; - $search_fk_user_create = ''; - $search_fk_user_assign = ''; +// Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo) +// Define logo and logosmall +$logosmall = $mysoc->logo_small; +$logo = $mysoc->logo; +$paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix; +if (!empty($conf->global->$paramlogo)) { + $logosmall = $conf->global->$paramlogo; +} elseif (!empty($conf->global->ONLINE_RECRUITMENT_LOGO)) { + $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO_; +} +//print ''."\n"; +// Define urllogo +$urllogo = ''; +$urllogofull = ''; +if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); + $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); +} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); + $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); +} +// Output html code for logo +if ($urllogo) { + print '
    '; + print '
    '; + print ''; + print '
    '; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; } + print '
    '; +} - // fetch optionals attributes and labels - $extrafields = new ExtraFields($db); - $extrafields->fetch_name_optionals_label($object->table_element); - - $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); - - $filter = array(); - $param = 'action=viewlist'; - - // Definition of fields for list - $arrayfields = array( - 't.datec' => array('label' => $langs->trans("Date"), 'checked' => 1), - 't.date_read' => array('label' => $langs->trans("TicketReadOn"), 'checked' => 0), - 't.date_close' => array('label' => $langs->trans("TicketCloseOn"), 'checked' => 0), - 't.ref' => array('label' => $langs->trans("Ref"), 'checked' => 1), - //'t.track_id' => array('label' => $langs->trans("IDTracking"), 'checked' => 0), - 't.fk_statut' => array('label' => $langs->trans("Status"), 'checked' => 1), - 't.subject' => array('label' => $langs->trans("Subject"), 'checked' => 1), - 'type.code' => array('label' => $langs->trans("Type"), 'checked' => 1), - 'category.code' => array('label' => $langs->trans("Category"), 'checked' => 1), - 'severity.code' => array('label' => $langs->trans("Severity"), 'checked' => 1), - 't.progress' => array('label' => $langs->trans("Progression"), 'checked' => 0), - //'t.fk_contract' => array('label' => $langs->trans("Contract"), 'checked' => 0), - 't.fk_user_create' => array('label' => $langs->trans("Author"), 'checked' => 1), - 't.fk_user_assign' => array('label' => $langs->trans("AssignedTo"), 'checked' => 0), - - //'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))), - //'t.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => 0, 'position' => 500), - //'t.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => 0, 'position' => 2) - //'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), - ); - - // Extra fields - if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - if ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate') { - $arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => ($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1, 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' =>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3) && $extrafields->attributes[$object->table_element]['perms'][$key]); - } - } - } - if (!empty($search_subject)) { - $filter['t.subject'] = $search_subject; - $param .= '&search_subject='.urlencode($search_subject); - } - if (!empty($search_type)) { - $filter['t.type_code'] = $search_type; - $param .= '&search_type='.urlencode($search_type); - } - if (!empty($search_category)) { - $filter['t.category_code'] = $search_category; - $param .= '&search_category='.urlencode($search_category); - } - if (!empty($search_severity)) { - $filter['t.severity_code'] = $search_severity; - $param .= '&search_severity='.urlencode($search_severity); - } - if (!empty($search_fk_user_assign)) { - // -1 value = all so no filter - if ($search_fk_user_assign > 0) { - $filter['t.fk_user_assign'] = $search_fk_user_assign; - $param .= '&search_fk_user_assign='.urlencode($search_fk_user_assign); - } - } - if (!empty($search_fk_user_create)) { - // -1 value = all so no filter - if ($search_fk_user_create > 0) { - $filter['t.fk_user_create'] = $search_fk_user_create; - $param .= '&search_fk_user_create='.urlencode($search_fk_user_create); - } - } - if ((isset($search_fk_status) && $search_fk_status != '') && $search_fk_status != '-1' && $search_fk_status != 'non_closed') { - $filter['t.fk_statut'] = $search_fk_status; - $param .= '&search_fk_status='.urlencode($search_fk_status); - } - if (isset($search_fk_status) && $search_fk_status == 'non_closed') { - $filter['t.fk_statut'] = array(0, 1, 3, 4, 5, 6); - $param .= '&search_fk_status=non_closed'; - } - - require DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; - - $sortfield = GETPOST("sortfield", 'alpha'); - $sortorder = GETPOST("sortorder", 'alpha'); - - if (!$sortfield) { - $sortfield = 't.datec'; - } - if (!$sortorder) { - $sortorder = 'DESC'; - } - - $limit = $conf->liste_limit; - - $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); - if (empty($page) || $page == -1) { - $page = 0; - } // If $page is not defined, or '' or -1 - $offset = $limit * $page; - $pageprev = $page - 1; - $pagenext = $page + 1; - - // Request SQL - $sql = "SELECT DISTINCT"; - $sql .= " t.rowid,"; - $sql .= " t.ref,"; - $sql .= " t.track_id,"; - $sql .= " t.fk_soc,"; - $sql .= " t.fk_project,"; - $sql .= " t.origin_email,"; - $sql .= " t.fk_user_create, uc.lastname as user_create_lastname, uc.firstname as user_create_firstname,"; - $sql .= " t.fk_user_assign, ua.lastname as user_assign_lastname, ua.firstname as user_assign_firstname,"; - $sql .= " t.subject,"; - $sql .= " t.message,"; - $sql .= " t.fk_statut,"; - $sql .= " t.resolution,"; - $sql .= " t.progress,"; - $sql .= " t.timing,"; - $sql .= " t.type_code,"; - $sql .= " t.category_code,"; - $sql .= " t.severity_code,"; - $sql .= " t.datec,"; - $sql .= " t.date_read,"; - $sql .= " t.date_close,"; - $sql .= " t.tms,"; - $sql .= " type.label as type_label, category.label as category_label, severity.label as severity_label"; - // Add fields for extrafields - if (is_array($extrafields->attributes[$object->table_element]['label']) && count($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." as options_".$key : ''); - } - } - $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as t"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=t.fk_soc"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as uc ON uc.rowid=t.fk_user_create"; - if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition_extrafields as ef on (t.rowid = ef.fk_object)"; - } - $sql .= " WHERE t.entity IN (".getEntity('recruitmentjobposition').")"; - // Manage filter - if (!empty($filter)) { - foreach ($filter as $key => $value) { - if (strpos($key, 'date')) { // To allow $filter['YEAR(s.dated)']=>$year - $sql .= " AND ".$key." = '".$db->escape($value)."'"; - } elseif ($key == 't.fk_statut') { - if (is_array($value) && count($value) > 0) { - $sql .= " AND ".$key.' IN ('.$db->sanitize(implode(',', $value)).')'; - } else { - $sql .= " AND ".$key." = ".((int) $value); - } - } else { - $sql .= " AND ".$key." LIKE '%".$db->escape($value)."%'"; - } - } - } - $sql .= $db->order($sortfield, $sortorder); - - $resql = $db->query($sql); - if ($resql) { - $num_total = $db->num_rows($resql); - if (!empty($limit)) { - $sql .= $db->plimit($limit + 1, $offset); - } - - $resql = $db->query($sql); - if ($resql) { - $num = $db->num_rows($resql); - print_barre_liste($langs->trans('JobList'), $page, 'public/recruitment/list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket'); - - // Search bar - print ''."\n"; - print ''; - print ''; - print ''; - print ''; - - $varpage = empty($contextpage) ? $url_page_current : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - - print ''; - - // Filter bar - print ''; - - if (!empty($arrayfields['t.datec']['checked'])) { - print ''; - } - - if (!empty($arrayfields['t.ref']['checked'])) { - print ''; - } - - if (!empty($arrayfields['t.fk_user_create']['checked'])) { - print ''; - } - - if (!empty($arrayfields['t.tms']['checked'])) { - print ''; - } - - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; - - // Fields from hook - $parameters = array('arrayfields'=>$arrayfields); - $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - // Status - if (!empty($arrayfields['t.fk_statut']['checked'])) { - print ''; - } - - // Action column - print ''; - print ''; - - // Field title - print ''; - if (!empty($arrayfields['t.datec']['checked'])) { - print_liste_field_titre($arrayfields['t.datec']['label'], $url_page_current, 't.datec', '', $param, '', $sortfield, $sortorder); - } - if (!empty($arrayfields['t.ref']['checked'])) { - print_liste_field_titre($arrayfields['t.ref']['label'], $url_page_current, 't.ref', '', $param, '', $sortfield, $sortorder); - } - if (!empty($arrayfields['t.fk_user_create']['checked'])) { - print_liste_field_titre($arrayfields['t.fk_user_create']['label'], $url_page_current, 't.fk_user_create', '', $param, '', $sortfield, $sortorder); - } - if (!empty($arrayfields['t.tms']['checked'])) { - print_liste_field_titre($arrayfields['t.tms']['label'], $url_page_current, 't.tms', '', $param, '', $sortfield, $sortorder); - } - - // 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); - $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - if (!empty($arrayfields['t.fk_statut']['checked'])) { - print_liste_field_titre($arrayfields['t.fk_statut']['label'], $url_page_current, 't.fk_statut', '', $param, '', $sortfield, $sortorder); - } - print_liste_field_titre($selectedfields, $url_page_current, "", '', '', 'align="right"', $sortfield, $sortorder, 'center maxwidthsearch '); - print ''; - - while ($obj = $db->fetch_object($resql)) { - print ''; - - // Date ticket - if (!empty($arrayfields['t.datec']['checked'])) { - print ''; - } - - // Ref - if (!empty($arrayfields['t.ref']['checked'])) { - print ''; - } - - // Message author - if (!empty($arrayfields['t.fk_user_create']['checked'])) { - print ''; - } - - if (!empty($arrayfields['t.tms']['checked'])) { - print ''; - } - - // Extra fields - if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - if (!empty($arrayfields["ef.".$key]['checked'])) { - print 'getAlignFlag($key); - if ($align) { - print ' align="'.$align.'"'; - } - print '>'; - $tmpkey = 'options_'.$key; - print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1); - print ''; - } - } - } - - // Statut - if (!empty($arrayfields['t.fk_statut']['checked'])) { - print ''; - } - - print ''; - - $i++; - print ''; - } - - print '
    '; - $selected = ($search_fk_status != "non_closed" ? $search_fk_status : ''); - //$object->printSelectStatus($selected); - print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - print '
    '; - print dol_print_date($db->jdate($obj->datec), 'dayhour'); - print ''; - print $obj->ref; - print ''; - if ($obj->fk_user_create > 0) { - $user_create->firstname = (!empty($obj->user_create_firstname) ? $obj->user_create_firstname : ''); - $user_create->name = (!empty($obj->user_create_lastname) ? $obj->user_create_lastname : ''); - $user_create->id = (!empty($obj->fk_user_create) ? $obj->fk_user_create : ''); - print $user_create->getFullName($langs); - } else { - print $langs->trans('Email'); - } - print ''.dol_print_date($db->jdate($obj->tms), 'dayhour').''; - $object->fk_statut = $obj->fk_statut; - print $object->getLibStatut(2); - print '
    '; - print '
    '; - - print '"; - print ''; - } - } -} else { - print ''; +if (!empty($conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE)) { + print '
    '; + print ''; + print '
    '; } -print "
    "; +// TODO List of jobs +print '
    '; +print $langs->trans("FeatureNotYetAvailable"); -// End of page -htmlPrintOnlinePaymentFooter($mysoc, $langs, 0, $suffix, $object); + +print ''."\n"; +print '
    '."\n"; +print '
    '; + + +htmlPrintOnlinePaymentFooter($mysoc, $langs); llxFooter('', 'public'); diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php index cd275d250c4..d105632abe8 100644 --- a/htdocs/public/recruitment/view.php +++ b/htdocs/public/recruitment/view.php @@ -192,8 +192,6 @@ print ''; print "\n"; print ''."\n"; -print ''."\n"; - // Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo) // Define logo and logosmall $logosmall = $mysoc->logo_small; @@ -234,6 +232,9 @@ if (!empty($conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE)) { print ''; } + +print '
    '."\n"; + // Output introduction text $text = ''; if (!empty($conf->global->RECRUITMENT_NEWFORM_TEXT)) { diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 4f25a281890..96953d93824 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -873,7 +873,7 @@ if ($action == 'create') { if ($objectsrc->fetch_optionals() > 0) { $recept->array_options = array_merge($recept->array_options, $objectsrc->array_options); } - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } // Incoterms @@ -1529,7 +1529,6 @@ if ($action == 'create') { print ''; print '
    '; - print '
    '; print '
    '; print '
    '; @@ -1596,7 +1595,6 @@ if ($action == 'create') { print "
    "; - print '
    '; print '
    '; print ''; @@ -2074,7 +2072,9 @@ if ($action == 'create') { //$linktoelem = $form->showLinkToObjectBlock($object, null, array('order')); $somethingshown = $form->showLinkedObjectBlock($object, ''); - print '
    '; + print '
    '; + + print '
    '; } // Presend form diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index b88f5519c3f..7f3451ad1ba 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -1167,8 +1167,8 @@ class Reception extends CommonObject // phpcs:enable global $langs; - $labelStatus = $langs->trans($this->statuts[$status]); - $labelStatusShort = $langs->trans($this->statutshorts[$status]); + $labelStatus = $langs->transnoentitiesnoconv($this->statuts[$status]); + $labelStatusShort = $langs->transnoentitiesnoconv($this->statutshorts[$status]); $statusType = 'status'.$status; if ($status == self::STATUS_VALIDATED) { diff --git a/htdocs/reception/class/receptionstats.class.php b/htdocs/reception/class/receptionstats.class.php index 4055d5d5dfe..872d6845a96 100644 --- a/htdocs/reception/class/receptionstats.class.php +++ b/htdocs/reception/class/receptionstats.class.php @@ -70,7 +70,7 @@ class ReceptionStats extends Stats //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where .= " AND c.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($this->socid) { @@ -93,7 +93,7 @@ class ReceptionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; @@ -117,7 +117,7 @@ class ReceptionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE ".$this->where; @@ -138,7 +138,7 @@ class ReceptionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as year, COUNT(*) as nb, SUM(c.".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) { + if (empty($user->rights->societe->client->voir) && !$this->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE ".$this->where; diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index 498b67d1593..1c368dc9caa 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -217,11 +217,9 @@ if ($id > 0 || !empty($ref)) { //print ''; //print '
    '; - //print '
    '; //print '
    '; - //print '
    '; //print '
    '; print ''; diff --git a/htdocs/reception/index.php b/htdocs/reception/index.php index 948489aa843..580de4aca1a 100644 --- a/htdocs/reception/index.php +++ b/htdocs/reception/index.php @@ -86,7 +86,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."reception as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'reception'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseur as c ON el.fk_source = c.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; $sql .= $clause." sc.fk_user = ".((int) $user->id); $clause = " AND "; @@ -135,8 +135,7 @@ if ($resql) { } -//print ''; -print '
    '; +print '
    '; $max = 5; @@ -151,11 +150,11 @@ $sql .= " FROM ".MAIN_DB_PREFIX."reception as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'reception' AND el.sourcetype IN ('order_supplier')"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseur as c ON el.fk_source = c.rowid AND el.sourcetype IN ('order_supplier') AND el.targettype = 'reception'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; } $sql .= " WHERE e.entity IN (".getEntity('reception').")"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND sc.fk_user = ".((int) $user->id); } $sql .= " AND e.fk_statut = 1"; @@ -212,7 +211,7 @@ if ($resql) { $sql = "SELECT c.rowid, c.ref, c.ref_supplier as ref_supplier, c.fk_statut as status, c.billed as billed, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -221,7 +220,7 @@ $sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_ORDERSENT.", ".Comma if ($socid > 0) { $sql .= " AND c.fk_soc = ".((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY c.rowid ASC"; @@ -265,7 +264,7 @@ if ($resql) { } } -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardWarehouseReceptions', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index f32e09aa580..5a6db5b53b1 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -488,7 +488,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_ty $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as ee ON e.rowid = ee.fk_source AND ee.sourcetype = 'reception' AND ee.targettype = 'delivery'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.rowid = ee.fk_target"; -if (!$user->rights->societe->client->voir && !$socid) { // Internal user with no permission to see all +if (empty($user->rights->societe->client->voir) && !$socid) { // Internal user with no permission to see all $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } @@ -498,7 +498,7 @@ $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Not $sql .= $hookmanager->resPrint; $sql .= " WHERE e.entity IN (".getEntity('reception').")"; -if (!$user->rights->societe->client->voir && !$socid) { // Internal user with no permission to see all +if (empty($user->rights->societe->client->voir) && !$socid) { // Internal user with no permission to see all $sql .= " AND e.fk_soc = sc.fk_soc"; $sql .= " AND sc.fk_user = ".((int) $user->id); } @@ -623,7 +623,7 @@ if ($search_array_options) { $crit = $val; $tmpkey = preg_replace('/search_options_/', '', $key); if ($val != '') { - $param .= '&search_options_' . $tmpkey . '=' . urlencode($val); + $param .= '&search_options_'.$tmpkey.'='.urlencode($val); } } } diff --git a/htdocs/reception/stats/index.php b/htdocs/reception/stats/index.php index 61098e74322..8f20ed58065 100644 --- a/htdocs/reception/stats/index.php +++ b/htdocs/reception/stats/index.php @@ -70,7 +70,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) { +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenamenb = $dir.'/receptionsnbinyear-'.$user->id.'-'.$year.'.png'; } else { $filenamenb = $dir.'/receptionsnbinyear-'.$year.'.png'; @@ -105,7 +105,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear); //var_dump($data); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) +if (empty($user->rights->societe->client->voir) || $user->socid) { $filenameamount = $dir.'/receptionsamountinyear-'.$user->id.'-'.$year.'.png'; } @@ -143,7 +143,7 @@ if (! $mesg) /* $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) +if (empty($user->rights->societe->client->voir) || $user->socid) { $filename_avg = $dir.'/receptionsaverage-'.$user->id.'-'.$year.'.png'; } @@ -282,7 +282,7 @@ foreach ($data as $val) { print ''; -print '
    '; +print '
    '; // Show graphs @@ -299,7 +299,7 @@ if ($mesg) { print ''; -print '
    '; +print ''; print '
    '; print dol_get_fiche_end(); diff --git a/htdocs/reception/tpl/linkedobjectblock.tpl.php b/htdocs/reception/tpl/linkedobjectblock.tpl.php index 41ebc02747f..bb6777c0639 100644 --- a/htdocs/reception/tpl/linkedobjectblock.tpl.php +++ b/htdocs/reception/tpl/linkedobjectblock.tpl.php @@ -25,7 +25,7 @@ if (empty($conf) || !is_object($conf)) { ?> - + labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("recruitment@recruitment"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Received').' ('.$langs->trans("InterviewToDo").')'; - $this->labelStatus[self::STATUS_CONTRACT_PROPOSED] = $langs->trans('ContractProposed'); - $this->labelStatus[self::STATUS_CONTRACT_SIGNED] = $langs->trans('ContractSigned'); - $this->labelStatus[self::STATUS_CONTRACT_REFUSED] = $langs->trans('ContractRefused'); - $this->labelStatus[self::STATUS_REFUSED] = $langs->trans('Refused'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Received'); - $this->labelStatusShort[self::STATUS_CONTRACT_PROPOSED] = $langs->trans('ContractProposed'); - $this->labelStatusShort[self::STATUS_CONTRACT_SIGNED] = $langs->trans('ContractSigned'); - $this->labelStatusShort[self::STATUS_CONTRACT_REFUSED] = $langs->trans('ContractRefused'); - $this->labelStatusShort[self::STATUS_REFUSED] = $langs->trans('Refused'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Canceled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Received').' ('.$langs->transnoentitiesnoconv("InterviewToDo").')'; + $this->labelStatus[self::STATUS_CONTRACT_PROPOSED] = $langs->transnoentitiesnoconv('ContractProposed'); + $this->labelStatus[self::STATUS_CONTRACT_SIGNED] = $langs->transnoentitiesnoconv('ContractSigned'); + $this->labelStatus[self::STATUS_CONTRACT_REFUSED] = $langs->transnoentitiesnoconv('ContractRefused'); + $this->labelStatus[self::STATUS_REFUSED] = $langs->transnoentitiesnoconv('Refused'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Received'); + $this->labelStatusShort[self::STATUS_CONTRACT_PROPOSED] = $langs->transnoentitiesnoconv('ContractProposed'); + $this->labelStatusShort[self::STATUS_CONTRACT_SIGNED] = $langs->transnoentitiesnoconv('ContractSigned'); + $this->labelStatusShort[self::STATUS_CONTRACT_REFUSED] = $langs->transnoentitiesnoconv('ContractRefused'); + $this->labelStatusShort[self::STATUS_REFUSED] = $langs->transnoentitiesnoconv('Refused'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); } $statusType = 'status'.$status; diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index cbfd11fd431..3b52e5b4fa6 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -698,8 +698,14 @@ class RecruitmentJobPosition extends CommonObject $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); } + + // PDF + $hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0); + $hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0); + $hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0); + //$ret=$object->fetch($id); // Reload to get new records - $this->generateDocument($modelpdf, $outputlangs); + $this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } if (!$error) { @@ -893,14 +899,14 @@ class RecruitmentJobPosition extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("recruitment"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated'); - $this->labelStatus[self::STATUS_RECRUITED] = $langs->trans('Recruited'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Validated'); - $this->labelStatusShort[self::STATUS_RECRUITED] = $langs->trans('Recruited'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Canceled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); + $this->labelStatus[self::STATUS_RECRUITED] = $langs->transnoentitiesnoconv('Recruited'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated'); + $this->labelStatusShort[self::STATUS_RECRUITED] = $langs->transnoentitiesnoconv('Recruited'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled'); } $statusType = 'status'.$status; diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index 5fbc1029e4e..9feebcc1434 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -656,7 +656,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -669,7 +669,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element.'@recruitment', (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } //Select mail models is same action as presend diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php index d2315b1f756..f16b8c3dcf9 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -237,13 +237,11 @@ $title = $langs->trans('ListOfCandidatures'); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) { - $sql .= "t.".$key.", "; -} +$sql .= $object->getFieldList('t'); // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); } } // Add fields from hooks @@ -571,7 +569,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/recruitment/recruitmentindex.php b/htdocs/recruitment/recruitmentindex.php index 5473572f842..b4d943584cd 100644 --- a/htdocs/recruitment/recruitmentindex.php +++ b/htdocs/recruitment/recruitmentindex.php @@ -320,7 +320,7 @@ if (! empty($conf->recruitment->enabled) && $user->rights->recruitment->read) END MODULEBUILDER DRAFT MYOBJECT */ -print '
    '; +print '
    '; $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; @@ -331,11 +331,11 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms, s.status, COUNT(rc.rowid) as nbapplications"; $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc ON rc.fk_recruitmentjobposition = s.rowid"; - if ($conf->societe->enabled && !$user->rights->societe->client->voir && !$socid) { + if ($conf->societe->enabled && empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE s.entity IN (".getEntity($staticrecruitmentjobposition->element).")"; - if ($conf->societe->enabled && !$user->rights->societe->client->voir && !$socid) { + if ($conf->societe->enabled && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -402,11 +402,11 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme $sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status"; $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s ON rc.fk_recruitmentjobposition = s.rowid"; - if ($conf->societe->enabled && !$user->rights->societe->client->voir && !$socid) { + if ($conf->societe->enabled && empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE rc.entity IN (".getEntity($staticrecruitmentjobposition->element).")"; - if ($conf->societe->enabled && !$user->rights->societe->client->voir && !$socid) { + if ($conf->societe->enabled && empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -463,7 +463,7 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme } } -print '
    '; +print ''; // End of page llxFooter(); diff --git a/htdocs/recruitment/recruitmentjobposition_card.php b/htdocs/recruitment/recruitmentjobposition_card.php index 3fa7617f55c..5c9d902b817 100644 --- a/htdocs/recruitment/recruitmentjobposition_card.php +++ b/htdocs/recruitment/recruitmentjobposition_card.php @@ -556,7 +556,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print $out; } - print '
    '; + print '
    '; $MAXEVENT = 10; @@ -569,7 +569,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, $object->element.'@recruitment', (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print ''; } //Select mail models is same action as presend diff --git a/htdocs/recruitment/recruitmentjobposition_list.php b/htdocs/recruitment/recruitmentjobposition_list.php index 0544cdb160f..f0935bc8798 100644 --- a/htdocs/recruitment/recruitmentjobposition_list.php +++ b/htdocs/recruitment/recruitmentjobposition_list.php @@ -243,10 +243,11 @@ $title = $langs->trans('ListOfPositionsToBeFilled'); // -------------------------------------------------------------------- $sql = 'SELECT '; $sql .= $object->getFieldList('t'); + // 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." as options_".$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } // Add fields from hooks @@ -611,7 +612,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } diff --git a/htdocs/resource/agenda.php b/htdocs/resource/agenda.php index 6f9cfa8ce34..bf300141bc4 100644 --- a/htdocs/resource/agenda.php +++ b/htdocs/resource/agenda.php @@ -71,14 +71,18 @@ if (!$sortorder) { $sortorder = 'DESC,DESC'; } -$object = new DolResource($db); -$object->fetch($id, $ref); - // Initialize technical objects //$object=new MyObject($db); $extrafields = new ExtraFields($db); $hookmanager->initHooks(array('agendaresource')); +$object = new DolResource($db); + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + +$result = restrictedArea($user, 'resource', $object->id, 'resource'); + // Security check if (!$user->rights->resource->read) { accessforbidden(); diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 989aa4ccf91..f89e16da3f9 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -48,10 +48,6 @@ if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->resource->read) { - accessforbidden(); -} - $object = new Dolresource($db); $extrafields = new ExtraFields($db); @@ -59,6 +55,14 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + + +$result = restrictedArea($user, 'resource', $object->id, 'resource'); + +$permissiontoadd = $user->rights->resource->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php + /* diff --git a/htdocs/resource/contact.php b/htdocs/resource/contact.php index 811bb476430..aca47d49743 100644 --- a/htdocs/resource/contact.php +++ b/htdocs/resource/contact.php @@ -38,14 +38,21 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); +$object = new DolResource($db); + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + // Security check if ($user->socid) { $socid = $user->socid; } -$result = restrictedArea($user, 'resource', $id, 'resource'); +$result = restrictedArea($user, 'resource', $object->id, 'resource'); -$object = new DolResource($db); -$result = $object->fetch($id, $ref); +// Security check +if (!$user->rights->resource->read) { + accessforbidden(); +} /* diff --git a/htdocs/resource/document.php b/htdocs/resource/document.php index fec869d5620..001598d2023 100644 --- a/htdocs/resource/document.php +++ b/htdocs/resource/document.php @@ -70,11 +70,17 @@ if (!$sortfield) { $object = new DolResource($db); -$object->fetch($id, $ref); + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. $upload_dir = $conf->resource->dir_output.'/'.dol_sanitizeFileName($object->ref); $modulepart = 'resource'; +$result = restrictedArea($user, 'resource', $object->id, 'resource'); + +$permissiontoadd = $user->rights->resource->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles + /* * Actions diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 4a51f1dfbb3..e6a8a02d59a 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -76,6 +76,19 @@ if ($socid > 0) { // Special for thirdparty $element = 'societe'; } +// Permission is not permission on resources. We just make link here on objects. +if ($element == 'action') { + $result = restrictedArea($user, 'agenda', $element_id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id'); +} +if ($element == 'fichinter') { + $result = restrictedArea($user, 'ficheinter', $element_id, 'fichinter'); +} +if ($element == 'product' || $element == 'service') { // When RESOURCE_ON_PRODUCTS or RESOURCE_ON_SERVICES is set + $tmpobject = new Product($db); + $tmpobject->fetch($element_id); + $fieldtype = $tmpobject->type; + $result = restrictedArea($user, 'produit|service', $element_id, 'product&product', '', '', $fieldtype); +} /* @@ -370,9 +383,9 @@ if (!$ret) { // Date start print ''.$langs->trans("DateActionStart").''; if (!$act->fulldayevent) { - print dol_print_date($act->datep, 'dayhour'); + print dol_print_date($act->datep, 'dayhour', 'tzuser'); } else { - print dol_print_date($act->datep, 'day'); + print dol_print_date($act->datep, 'day', 'tzuser'); } if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) { print img_warning($langs->trans("Late")); @@ -383,9 +396,9 @@ if (!$ret) { // Date end print ''.$langs->trans("DateActionEnd").''; if (!$act->fulldayevent) { - print dol_print_date($act->datef, 'dayhour'); + print dol_print_date($act->datef, 'dayhour', 'tzuser'); } else { - print dol_print_date($act->datef, 'day'); + print dol_print_date($act->datef, 'day', 'tzuser'); } if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now - $delay_warning)) { print img_warning($langs->trans("Late")); diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 356df3a746e..4e7a5c57ae7 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -66,10 +66,10 @@ $filter = array(); $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { - $param .= '&contextpage='.urlencode($contextpage); + $param .= '&contextpage='.urlencode($contextpage); } if ($limit > 0 && $limit != $conf->liste_limit) { - $param .= '&limit='.urlencode($limit); + $param .= '&limit='.urlencode($limit); } if ($search_ref != '') { @@ -126,9 +126,6 @@ $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$user->rights->resource->read) { - accessforbidden(); -} $arrayfields = array( 't.ref' => array( 'label' => $langs->trans("Ref"), @@ -156,6 +153,10 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $filter = array(); } +if (empty($user->rights->resource->read)) { + accessforbidden(); +} + /* * Action diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php index b43c9f8cb37..98efb72d55b 100644 --- a/htdocs/resource/note.php +++ b/htdocs/resource/note.php @@ -43,10 +43,12 @@ if ($user->socid) { // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('resourcenote')); -$result = restrictedArea($user, 'resource', $id, 'resource'); - $object = new DolResource($db); -$object->fetch($id, $ref); + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + +$result = restrictedArea($user, 'resource', $object->id, 'resource'); $permissionnote = $user->rights->resource->write; // Used by the include of actions_setnotes.inc.php diff --git a/htdocs/salaries/admin/salaries.php b/htdocs/salaries/admin/salaries.php index f8ed3f3f7ce..1c9eeec6464 100644 --- a/htdocs/salaries/admin/salaries.php +++ b/htdocs/salaries/admin/salaries.php @@ -120,7 +120,7 @@ foreach ($list as $key) { // Value print ''; if (!empty($conf->accounting->enabled)) { - print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1); + print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1); } else { print ''; } diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 322ffcd4942..0d47a90796f 100755 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -579,7 +579,7 @@ if ($action == 'create') { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'create'); } print ''; @@ -854,7 +854,6 @@ if ($id) { print ''; print '
    '; - print '
    '; $nbcols = 3; if (!empty($conf->banque->enabled)) { @@ -955,7 +954,6 @@ if ($id) { dol_print_error($db); } - print '
    '; print '
    '; print ''; diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 5c87b3c53b9..454a94bcf1f 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -700,12 +700,12 @@ class Salary extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid'); - $this->labelStatus[self::STATUS_PAID] = $langs->trans('BillStatusPaid'); - if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); - $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid'); - $this->labelStatusShort[self::STATUS_PAID] = $langs->trans('BillStatusPaid'); - if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid'); + $this->labelStatus[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid'); + if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid'); + $this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid'); + if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); } $statusType = 'status1'; diff --git a/htdocs/salaries/document.php b/htdocs/salaries/document.php index 4f49858eb7a..47d03e62380 100644 --- a/htdocs/salaries/document.php +++ b/htdocs/salaries/document.php @@ -104,6 +104,8 @@ if ($user->socid) { } restrictedArea($user, 'salaries', $object->id, 'salary', ''); +$permissiontoadd = $user->rights->salaries->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles + /* * Actions diff --git a/htdocs/salaries/stats/index.php b/htdocs/salaries/stats/index.php index ecc62c2a237..7eefe7982fc 100644 --- a/htdocs/salaries/stats/index.php +++ b/htdocs/salaries/stats/index.php @@ -256,7 +256,7 @@ print ''; print ''; -print '
    '; +print '
    '; // Show graphs @@ -273,7 +273,7 @@ if ($mesg) { print ''; -print '
    '; +print ''; print '
    '; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 11cc7b55a4d..195b2957e76 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -204,7 +204,7 @@ if (empty($reshook)) { $object->client = $object->client | $soc_origin->client; $object->fournisseur = $object->fournisseur | $soc_origin->fournisseur; $listofproperties = array( - 'address', 'zip', 'town', 'state_id', 'country_id', 'phone', 'phone_pro', 'fax', 'email', 'skype', 'twitter', 'facebook', 'linkedin', 'socialnetworks', 'url', 'barcode', + 'address', 'zip', 'town', 'state_id', 'country_id', 'phone', 'phone_pro', 'fax', 'email', 'socialnetworks', 'url', 'barcode', 'idprof1', 'idprof2', 'idprof3', 'idprof4', 'idprof5', 'idprof6', 'tva_intra', 'effectif_id', 'forme_juridique', 'remise_percent', 'remise_supplier_percent', 'mode_reglement_supplier_id', 'cond_reglement_supplier_id', 'name_bis', 'stcomm_id', 'outstanding_limit', 'price_level', 'parent', 'default_lang', 'ref', 'ref_ext', 'import_key', 'fk_incoterms', 'fk_multicurrency', @@ -458,10 +458,7 @@ if (empty($reshook)) { $object->town = GETPOST('town', 'alphanohtml'); $object->country_id = GETPOST('country_id', 'int'); $object->state_id = GETPOST('state_id', 'int'); - //$object->skype = GETPOST('skype', 'alpha'); - //$object->twitter = GETPOST('twitter', 'alpha'); - //$object->facebook = GETPOST('facebook', 'alpha'); - //$object->linkedin = GETPOST('linkedin', 'alpha'); + $object->socialnetworks = array(); if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -470,6 +467,7 @@ if (empty($reshook)) { } } } + $object->phone = GETPOST('phone', 'alpha'); $object->fax = GETPOST('fax', 'alpha'); $object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); @@ -1045,10 +1043,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->zip = GETPOST('zipcode', 'alphanohtml'); $object->town = GETPOST('town', 'alphanohtml'); $object->state_id = GETPOST('state_id', 'int'); - //$object->skype = GETPOST('skype', 'alpha'); - //$object->twitter = GETPOST('twitter', 'alpha'); - //$object->facebook = GETPOST('facebook', 'alpha'); - //$object->linkedin = GETPOST('linkedin', 'alpha'); + $object->socialnetworks = array(); if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -1057,6 +1052,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } } + $object->phone = GETPOST('phone', 'alpha'); $object->fax = GETPOST('fax', 'alpha'); $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); @@ -1170,6 +1166,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $("#typent_id").change(); $("#effectif_id").val(id_ef15); $("#effectif_id").change(); + /* Force to recompute the width of a select2 field when it was hidden and then shown programatically */ + if ($("#civility_id").data("select2")) { + $("#civility_id").select2({width: "resolve"}); + } $("#TypeName").html(document.formsoc.LastName.value); document.formsoc.private.value=1; }); @@ -1406,7 +1406,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; } print ''.$form->editfieldkey('Town', 'town', '', $object, 0).''; - print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100 quatrevingtpercent'); + print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth150 quatrevingtpercent'); print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent'); print ''; @@ -1781,10 +1781,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->town = GETPOST('town', 'alphanohtml'); $object->country_id = GETPOST('country_id') ?GETPOST('country_id', 'int') : $mysoc->country_id; $object->state_id = GETPOST('state_id', 'int'); - //$object->skype = GETPOST('skype', 'alpha'); - //$object->twitter = GETPOST('twitter', 'alpha'); - //$object->facebook = GETPOST('facebook', 'alpha'); - //$object->linkedin = GETPOST('linkedin', 'alpha'); + $object->socialnetworks = array(); if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -1793,6 +1790,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } } + $object->phone = GETPOST('phone', 'alpha'); $object->fax = GETPOST('fax', 'alpha'); $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); @@ -2511,7 +2509,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; print ''; print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); - print ''; $tmpcheck = $object->check_codeclient(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' ('.$langs->trans("WrongCustomerCode").')'; @@ -2718,10 +2715,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; print ''; - print '
    '; + print '
    '; print '
    '; - print ''; + print '
    '; // Tags / categories if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { @@ -2891,7 +2888,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print '
    '; - print '
    '; + print ''; print '
    '; print dol_get_fiche_end(); @@ -2980,18 +2977,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $result = show_subsidiaries($conf, $langs, $db, $object); } - print '
    '; + print '
    '; $MAXEVENT = 10; - $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, '', $socid, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for thirdparty + $somethingshown = $formactions->showactions($object, '', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter); // Show all action for thirdparty - print '
    '; + print ''; if (!empty($conf->global->MAIN_DUPLICATE_CONTACTS_TAB_ON_MAIN_CARD)) { // Contacts list diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 0257b692b62..ab8153a39bc 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1799,6 +1799,11 @@ class Thirdparties extends DolibarrApi unset($object->twitter); unset($object->facebook); unset($object->linkedin); + unset($object->instagram); + unset($object->snapchat); + unset($object->googleplus); + unset($object->youtube); + unset($object->whatsapp); return $object; } diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php index 91e8cbc290b..4e55a914339 100644 --- a/htdocs/societe/class/client.class.php +++ b/htdocs/societe/class/client.class.php @@ -64,7 +64,7 @@ class Client extends Societe $sql = "SELECT count(s.rowid) as nb, s.client"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 9574544a11a..8026c467c16 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -519,10 +519,10 @@ class CompanyPaymentMode extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); - $this->labelStatusShort[self::STATUS_ENABLED] = $langs->trans('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); } $statusType = 'status5'; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 4cf6b2ba6dd..bd5e7635b99 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -857,7 +857,7 @@ class Societe extends CommonObject $this->accountancy_code_customer = trim($this->code_compta); $this->accountancy_code_supplier = trim($this->code_compta_fournisseur); $this->accountancy_code_buy = trim($this->accountancy_code_buy); - $this->accountancy_code_sell= trim($this->accountancy_code_sell); + $this->accountancy_code_sell = trim($this->accountancy_code_sell); if (!empty($this->multicurrency_code)) { $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); @@ -921,8 +921,8 @@ class Societe extends CommonObject $sql .= ", ".(int) $this->fk_multicurrency; $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; if (empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { - $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; - $sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'"; } $sql .= ")"; @@ -935,9 +935,9 @@ class Societe extends CommonObject // update accountancy for this entity if (!$error && !empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { - $this->db->query("DELETE FROM " . MAIN_DB_PREFIX . "societe_perentity WHERE fk_soc = " . ((int) $this->id) . " AND entity = " . ((int) $conf->entity)); + $this->db->query("DELETE FROM ".MAIN_DB_PREFIX."societe_perentity WHERE fk_soc = ".((int) $this->id)." AND entity = ".((int) $conf->entity)); - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "societe_perentity ("; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_perentity ("; $sql .= " fk_soc"; $sql .= ", entity"; $sql .= ", accountancy_code_customer"; @@ -946,11 +946,11 @@ class Societe extends CommonObject $sql .= ", accountancy_code_sell"; $sql .= ") VALUES ("; $sql .= $this->id; - $sql .= ", " . $conf->entity; - $sql .= ", '" . $this->db->escape($this->accountancy_code_customer) . "'"; - $sql .= ", '" . $this->db->escape($this->accountancy_code_supplier) . "'"; - $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; - $sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'"; + $sql .= ", ".$conf->entity; + $sql .= ", '".$this->db->escape($this->accountancy_code_customer)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_supplier)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'"; $sql .= ")"; $result = $this->db->query($sql); if (!$result) { @@ -1057,7 +1057,7 @@ class Societe extends CommonObject $error++; $this->error = $contact->error; $this->errors = array_merge($this->errors, $contact->errors); - dol_syslog(get_class($this) . "::create_individual Affect Tag ERROR:" . $this->error, LOG_ERR); + dol_syslog(get_class($this)."::create_individual Affect Tag ERROR:".$this->error, LOG_ERR); $contactId = $result; } } @@ -1067,7 +1067,7 @@ class Societe extends CommonObject if ($result < 0) { $this->error = $contact->error; $this->errors = array_merge($this->errors, $contact->errors); - dol_syslog(get_class($this) . "::create_individual set mailing status ERROR:" . $this->error, LOG_ERR); + dol_syslog(get_class($this)."::create_individual set mailing status ERROR:".$this->error, LOG_ERR); $contactId = $result; } } @@ -1303,7 +1303,7 @@ class Societe extends CommonObject } $this->code_compta_client = trim(empty($this->code_compta) ? $this->code_compta_client : $this->code_compta); - $this->code_compta = $this->code_compta_client; // for backward compatibility + $this->code_compta = $this->code_compta_client; // for backward compatibility $this->code_compta_fournisseur = trim($this->code_compta_fournisseur); // Check parameters. More tests are done later in the ->verify() @@ -1344,7 +1344,7 @@ class Societe extends CommonObject $this->webservices_key = trim($this->webservices_key); $this->accountancy_code_buy = trim($this->accountancy_code_buy); - $this->accountancy_code_sell= trim($this->accountancy_code_sell); + $this->accountancy_code_sell = trim($this->accountancy_code_sell); //Incoterms $this->fk_incoterms = (int) $this->fk_incoterms; @@ -1472,8 +1472,8 @@ class Societe extends CommonObject $sql .= ",supplier_order_min_amount= ".($this->supplier_order_min_amount != '' ? $this->supplier_order_min_amount : 'null'); $sql .= ",fk_prospectlevel='".$this->db->escape($this->fk_prospectlevel)."'"; if (empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { - $sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'"; - $sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'"; + $sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'"; + $sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'"; if ($customer) { $sql .= ", code_compta = ".(!empty($this->code_compta_client) ? "'".$this->db->escape($this->code_compta_client)."'" : "null"); @@ -1564,9 +1564,9 @@ class Societe extends CommonObject // update accountancy for this entity if (!$error && !empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { - $this->db->query("DELETE FROM " . MAIN_DB_PREFIX . "societe_perentity WHERE fk_soc = " . ((int) $this->id) . " AND entity = " . ((int) $conf->entity)); + $this->db->query("DELETE FROM ".MAIN_DB_PREFIX."societe_perentity WHERE fk_soc = ".((int) $this->id)." AND entity = ".((int) $conf->entity)); - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "societe_perentity ("; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_perentity ("; $sql .= " fk_soc"; $sql .= ", entity"; $sql .= ", accountancy_code_customer"; @@ -1575,11 +1575,11 @@ class Societe extends CommonObject $sql .= ", accountancy_code_sell"; $sql .= ") VALUES ("; $sql .= $this->id; - $sql .= ", " . $conf->entity; - $sql .= ", '" . $this->db->escape($this->code_compta_client)."'"; - $sql .= ", '" . $this->db->escape($this->code_compta_fournisseur)."'"; - $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; - $sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'"; + $sql .= ", ".$conf->entity; + $sql .= ", '".$this->db->escape($this->code_compta_client)."'"; + $sql .= ", '".$this->db->escape($this->code_compta_fournisseur)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'"; $sql .= ")"; $result = $this->db->query($sql); if (!$result) { @@ -1707,7 +1707,7 @@ class Societe extends CommonObject } $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity); } $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as e ON s.fk_effectif = e.id'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid'; @@ -1797,7 +1797,7 @@ class Societe extends CommonObject $this->state_id = $obj->state_id; $this->state_code = $obj->state_code; $this->region_id = $obj->region_id; - $this->region_code = $obj->region_code; + $this->region_code = $obj->region_code; $this->state = ($obj->state != '-' ? $obj->state : ''); $transcode = $langs->trans('StatusProspect'.$obj->fk_stcomm); @@ -2636,7 +2636,7 @@ class Societe extends CommonObject $label .= '
    '.implode(' ', $phonelist); } if (!empty($this->address)) { - $label .= '
    '.$langs->trans("Address").': '.dol_format_address($this, 1, ' ', $langs); // Address + country + $label .= '
    '.$langs->trans("Address").': '.dol_format_address($this, 1, ' ', $langs); // Address + country } elseif (!empty($this->country_code)) { $label .= '
    '.$langs->trans('Country').': '.$this->country_code; } @@ -2709,7 +2709,7 @@ class Societe extends CommonObject $linkend = ''; global $user; - if (!$user->rights->societe->client->voir && $user->socid > 0 && $this->id != $user->socid) { + if (empty($user->rights->societe->client->voir) && $user->socid > 0 && $this->id != $user->socid) { $linkstart = ''; $linkend = ''; } @@ -2807,10 +2807,10 @@ class Societe extends CommonObject } if (empty($this->labelStatus) || empty($this->labelStatusShort)) { - $this->labelStatus[0] = $langs->trans("ActivityCeased"); - $this->labelStatus[1] = $langs->trans("InActivity"); - $this->labelStatusShort[0] = $langs->trans("ActivityCeased"); - $this->labelStatusShort[1] = $langs->trans("InActivity"); + $this->labelStatus[0] = $langs->transnoentitiesnoconv("ActivityCeased"); + $this->labelStatus[1] = $langs->transnoentitiesnoconv("InActivity"); + $this->labelStatusShort[0] = $langs->transnoentitiesnoconv("ActivityCeased"); + $this->labelStatusShort[1] = $langs->transnoentitiesnoconv("InActivity"); } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); @@ -3356,7 +3356,7 @@ class Societe extends CommonObject if ($type == 'customer') { $this->code_compta_client = $mod->code; - $this->code_compta = $this->code_compta_client; // For backward compatibility + $this->code_compta = $this->code_compta_client; // For backward compatibility } elseif ($type == 'supplier') { $this->code_compta_fournisseur = $mod->code; } @@ -3391,7 +3391,7 @@ class Societe extends CommonObject if ($this->id) { // Check if the id we want to add as parent has not already one parent that is the current id we try to update if ($id > 0) { - $sameparent = $this->validateFamilyTree($id, $this->id, 0); + $sameparent = $this->validateFamilyTree($id, $this->id, 0); if ($sameparent < 0) { return -1; } @@ -3403,7 +3403,7 @@ class Societe extends CommonObject $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe SET parent = '.($id > 0 ? $id : 'null').' WHERE rowid = '.((int) $this->id); - $resql = $this->db->query($sql); + $resql = $this->db->query($sql); if ($resql) { $this->parent = $id; return 1; @@ -3432,16 +3432,16 @@ class Societe extends CommonObject $sql = 'SELECT s.parent'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE rowid = '.((int) $idparent); - $resql = $this->db->query($sql); + $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj->parent == '') { + if ($obj->parent == '') { return 0; - } elseif ($obj->parent == $idchild) { + } elseif ($obj->parent == $idchild) { return 1; } else { - $sameparent = $this->validateFamilyTree($obj->parent, $idchild, ($counter + 1)); + $sameparent = $this->validateFamilyTree($obj->parent, $idchild, ($counter + 1)); } return $sameparent; } else { @@ -3942,7 +3942,7 @@ class Societe extends CommonObject */ public function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '') { - // phpcs:enable + // phpcs:enable global $conf, $user, $langs; dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG); @@ -4825,19 +4825,19 @@ class Societe extends CommonObject } $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET "; - $sql.= $field." = '".$this->db->escape($value)."'"; - $sql.= " WHERE rowid = ".((int) $this->id); + $sql .= $field." = '".$this->db->escape($value)."'"; + $sql .= " WHERE rowid = ".((int) $this->id); dol_syslog(get_class($this)."::".__FUNCTION__."", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('COMPANY_MODIFY', $this, $user, $langs, $conf); + include_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php'; + $interface = new Interfaces($this->db); + $result = $interface->run_triggers('COMPANY_MODIFY', $this, $user, $langs, $conf); if ($result < 0) { - $this->errors=$interface->errors; + $this->errors = $interface->errors; $this->db->rollback(); return -1; } @@ -4848,7 +4848,7 @@ class Societe extends CommonObject $this->db->commit(); return 1; } else { - $this->error=$this->db->lasterror(); + $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 23720ebd54c..9ce01c64638 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -85,6 +85,8 @@ if ($user->socid > 0) { } $result = restrictedArea($user, 'societe', $object->id, '&societe'); +$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles + /* * Actions diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index de3bae16627..422ec5c8552 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -94,17 +94,17 @@ $total = 0; $sql = "SELECT s.rowid, s.client, s.fournisseur"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ' WHERE s.entity IN ('.getEntity('societe').')'; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid > 0) { $sql .= " AND s.rowid = ".((int) $socid); } -if (!$user->rights->fournisseur->lire) { +if (empty($user->rights->fournisseur->lire)) { $sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible } //print $sql; @@ -277,17 +277,17 @@ $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ' WHERE s.entity IN ('.getEntity('societe').')'; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { $sql .= " AND s.rowid = ".((int) $socid); } -if (!$user->rights->fournisseur->lire) { +if (empty($user->rights->fournisseur->lire)) { $sql .= " AND (s.fournisseur != 1 OR s.client != 0)"; } $sql .= $db->order("s.tms", "DESC"); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index ab567733959..ed836de658d 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -258,7 +258,7 @@ $arrayfields = array( 's.import_key'=>array('label'=>"ImportId", 'checked'=>0, 'position'=>1100), ); if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { - $arrayfields['s.price_level'] =array('label'=>"PriceLevel", 'position'=>30, 'checked'=>0); + $arrayfields['s.price_level'] = array('label'=>"PriceLevel", 'position'=>30, 'checked'=>0); } // Extra fields @@ -467,10 +467,10 @@ if ($search_sale && $search_sale != '-1') { $sql .= ", sc.fk_soc, sc.fk_user"; } // We'll need these fields in order to filter by categ -if ($search_categ_cus && $search_categ_cus!=-1) { +if ($search_categ_cus && $search_categ_cus != -1) { $sql .= ", cc.fk_categorie, cc.fk_soc"; } -if ($search_categ_sup && $search_categ_sup!=-1) { +if ($search_categ_sup && $search_categ_sup != -1) { $sql .= ", cs.fk_categorie, cs.fk_soc"; } // Add fields from extrafields @@ -520,7 +520,7 @@ if (empty($user->rights->societe->client->voir) && !$socid) { if ($search_sale && $search_sale != '-1' && $search_sale != '-2') { $sql .= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale } -if (!$user->rights->fournisseur->lire) { +if (empty($user->rights->fournisseur->lire)) { $sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible } if ($search_sale == -2) { @@ -573,7 +573,7 @@ if ($search_account_supplier_code) { $sql .= natural_search("s.code_compta_fournisseur", $search_account_supplier_code); } if ($search_address) { - $sql.= natural_search('s.address', $search_address); + $sql .= natural_search('s.address', $search_address); } if ($search_town) { $sql .= natural_search("s.town", $search_town); @@ -751,7 +751,7 @@ if ($search_alias != '') { $param .= "&search_alias=".urlencode($search_alias); } if ($search_address != '') { - $param .= '&search_address=' . urlencode($search_address); + $param .= '&search_address='.urlencode($search_address); } if ($search_town != '') { $param .= "&search_town=".urlencode($search_town); @@ -1007,12 +1007,12 @@ print ''; if (!empty($arrayfields['s.rowid']['checked'])) { - print ''; } if (!empty($arrayfields['s.nom']['checked'])) { - print ''; } // Multiprice level @@ -1243,10 +1243,10 @@ print ''; print "\n"; print ''; if (!empty($arrayfields['s.rowid']['checked'])) { - print_liste_field_titre($arrayfields['s.rowid']['label'], $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre($arrayfields['s.rowid']['label'], $_SERVER["PHP_SELF"], "s.rowid", "", $param, ' data-key="id"', $sortfield, $sortorder); } if (!empty($arrayfields['s.nom']['checked'])) { - print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, ' data-key="ref"', $sortfield, $sortorder); } if (!empty($arrayfields['s.name_alias']['checked'])) { print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder); @@ -1363,6 +1363,7 @@ print "\n"; $i = 0; $totalarray = array(); +$totalarray['nbfield'] = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); @@ -1393,7 +1394,7 @@ while ($i < min($num, $limit)) { } print '>'; if (!empty($arrayfields['s.rowid']['checked'])) { - print '\n"; if (!$i) { @@ -1405,7 +1406,7 @@ while ($i < min($num, $limit)) { if (!empty($arrayfields['s.name_alias']['checked'])) { $companystatic->name_alias = ''; } - print 'global->MAIN_SOCIETE_SHOW_COMPLETE_NAME) ? ' class="tdoverflowmax200"' : '').'>'; + print 'global->MAIN_SOCIETE_SHOW_COMPLETE_NAME) ? ' class="tdoverflowmax200"' : '').' data-key="ref">'; if ($contextpage == 'poslist') { print $obj->name; } else { @@ -1507,11 +1508,13 @@ while ($i < min($num, $limit)) { } // Type ent if (!empty($arrayfields['typent.code']['checked'])) { - print ''; if (!$i) { $totalarray['nbfield']++; diff --git a/htdocs/societe/partnership.php b/htdocs/societe/partnership.php index 443126290ab..2ce4884932e 100644 --- a/htdocs/societe/partnership.php +++ b/htdocs/societe/partnership.php @@ -65,7 +65,7 @@ if ($id > 0) { $object = new Partnership($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('partnershipthirdparty', 'globalcard')); // Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('thirdpartypartnership', 'globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 6a0b9fac742..9cb0eadecf5 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1507,10 +1507,10 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } } - print '
    '; + print '
    '; - print '
    '; + print ''; print '
    '; } diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index bf19fc0385b..72246fdf9cb 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -326,22 +326,14 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $text = $langs->trans('SellingPrice'); print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print ''; // Price minimum print ''; // Update all child soc @@ -382,7 +374,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Ref. Customer print ''; - print ''; + print ''; // VAT print '\n"; print '\n"; // Services diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 0266ba491f6..2c4da0515f1 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -823,6 +823,7 @@ $( document ).ready(function() { if (getDolGlobalString('TAKEPOS_CONTROL_CASH_OPENING')) { $sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE"; $sql .= " entity = ".$conf->entity." AND "; + $sql .= " posnumber = ".$_SESSION["takeposterminal"]." AND "; $sql .= " date_creation > '".$db->idate(dol_get_first_hour(dol_now()))."'"; $resql = $db->query($sql); if ($resql) { @@ -1105,6 +1106,7 @@ if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") { $sql = "SELECT rowid, status, entity FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE"; $sql .= " entity = ".$conf->entity." AND "; +$sql .= " posnumber = ".$_SESSION["takeposterminal"]." AND "; $sql .= " date_creation > '".$db->idate(dol_get_first_hour(dol_now()))."'"; $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index f4242c616e0..3b40d726a77 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1543,7 +1543,7 @@ if ($placeid > 0) { $htmlforlines .= ''; } $htmlforlines .= ''."\n"; - $htmlforlines .= empty($htmlsupplements[$line->id]) ? '' : empty($htmlsupplements[$line->id]); + $htmlforlines .= empty($htmlsupplements[$line->id]) ? '' : $htmlsupplements[$line->id]; print $htmlforlines; } diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index 59ee28ade94..ffa33fbe8fc 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -269,38 +269,33 @@ if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) {
    - -
    -
    trans('TotalTTC'); ?>: total_ttc, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?>
    +
    + trans('TotalTTC'); ?>: total_ttc, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?> +
    + total_ttc) { ?> +
    + trans('RemainToPay'); ?>: multicurrency_code); ?> +
    + +
    + trans("Received"); ?>: multicurrency_code); ?> +
    +
    + trans("Change"); ?>: multicurrency_code); ?> +
    + global->TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; + print '
    '; + $filter = ''; + $form = new Form($db); + print ''.$langs->trans("BankAccount").': '; + $form->select_comptes(0, 'accountid', 0, $filter, 1, ''); + print ajax_combobox('selectaccountid'); + print '
    '; + } + ?>
    -total_ttc) { ?> -
    -
    trans('RemainToPay'); ?>: multicurrency_code); ?>
    -
    - -
    -
    trans("Received"); ?>: multicurrency_code); ?>
    -
    -
    -
    trans("Change"); ?>: multicurrency_code); ?>
    -
    -global->TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT)) { - require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; - print '
    -
    '; - $filter = ''; - $form = new Form($db); - print ''.$langs->trans("BankAccount").': '; - $form->select_comptes(0, 'accountid', 0, $filter, 1, ''); - print ajax_combobox('selectaccountid'); - print '
    -
    '; -} -?> - -
    -
    '.(!empty($payIcon) ? '
    '. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code)).'
    '; + print ''; } else { print ''; } @@ -367,7 +362,7 @@ print ''; + print ''; } else { $button = array_pop($action_buttons); print ''; @@ -394,7 +389,7 @@ print ''; + print ''; } else { $button = array_pop($action_buttons); print ''; @@ -422,7 +417,7 @@ while ($i < count($arrayOfValidPaymentModes)) { } } - print ''; + print ''; $i = $i + 1; } diff --git a/htdocs/takepos/split.php b/htdocs/takepos/split.php index 4de053513f5..75599d0160f 100644 --- a/htdocs/takepos/split.php +++ b/htdocs/takepos/split.php @@ -103,12 +103,10 @@ if ($action=="split") { dol_htmloutput_errors($invoice->error, $invoice->errors, 1); } $sql = "UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' where rowid=".$placeid; - echo $sql; $db->query($sql); } } $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set fk_facture=".$placeid." where rowid=".$line; - echo $sql; $db->query($sql); } $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-SPLIT)'); @@ -167,11 +165,11 @@ if ($conf->global->TAKEPOS_COLOR_THEME == 1) {
    '; + print ''; print ''; print ''; + print ''; if (!empty($search_nom_only) && empty($search_nom)) { $search_nom = $search_nom_only; } @@ -1094,7 +1094,7 @@ if (!empty($arrayfields['country.code_iso']['checked'])) { if (!empty($arrayfields['typent.code']['checked'])) { print ''; // We use showempty=0 here because there is already an unknown value into dictionary. - print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'minwidth50 maxwidth100', 1); + print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'minwidth50 maxwidth125', 1); print '
    '; + print ''; print $obj->rowid; print "'; if (!isset($typenArray) || !is_array($typenArray) || count($typenArray) == 0) { $typenArray = $formcompany->typent_array(1); } - print empty($typenArray[$obj->typent_code]) ? '' : $typenArray[$obj->typent_code]; + $labeltypeofcompany= empty($typenArray[$obj->typent_code]) ? '' : $typenArray[$obj->typent_code]; + + print ''; + print dol_escape_htmltag($labeltypeofcompany); print ''; - if ($object->price_base_type == 'TTC') { - print ''; - } else { - print ''; - } + print ''; print '
    '; $text = $langs->trans('MinPrice'); print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); - if ($object->price_base_type == 'TTC') { - print ''; - } else { - print ''; - } + print ''; print '
    '.$langs->trans('RefCustomer').'
    '.$langs->trans("VATRate").''; diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index 0bc51450e44..d093af10dbb 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -493,8 +493,8 @@ while ($i < min($num, $limit)) { $objectwebsiteaccount->login = $obj->login; $objectwebsiteaccount->ref = $obj->login; foreach ($objectwebsiteaccount->fields as $key => $val) { - if (property_exists($obj, $key)) { - $object->$key = $obj->$key; + if (property_exists($objectwebsiteaccount, $key)) { + $objectwebsiteaccount->$key = $obj->$key; } } @@ -526,7 +526,7 @@ while ($i < min($num, $limit)) { if (!$i) { $totalarray['nbfield']++; } - if (!empty($val['isameasure'])) { + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; } @@ -536,7 +536,7 @@ while ($i < min($num, $limit)) { if (!isset($totalarray['val']['t.'.$key])) { $totalarray['val']['t.'.$key] = 0; } - $totalarray['val']['t.'.$key] += $obj->$key; + $totalarray['val']['t.'.$key] += $objectwebsiteaccount->$key; } } } diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index f8b5f5d64ca..6fc7f4df73a 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1261,7 +1261,7 @@ if ($action == 'create') { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'create', $parameters); } @@ -1685,7 +1685,6 @@ if ($action == 'create') { print ''; print '
    '; - print '
    '; print '
    '; print ''; @@ -1741,7 +1740,6 @@ if ($action == 'create') { $formmargin->displayMarginInfos($object); }*/ - print ''; print ''; print ''; @@ -1935,14 +1933,14 @@ if ($action == 'create') { $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'supplier_proposal', $socid, 1); - print '
    '; + print ''; } // Select mail models is same action as presend diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index de73b7a0296..9c84e2c2e89 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1019,7 +1019,7 @@ class SupplierProposal extends CommonObject $fk_parent_line, $this->lines[$i]->fk_fournprice, $this->lines[$i]->pa_ht, - empty($this->lines[$i]->label) ? '' : $this->lines[$i]->label, // deprecated + empty($this->lines[$i]->label) ? '' : $this->lines[$i]->label, // deprecated $this->lines[$i]->array_options, $this->lines[$i]->ref_fourn, $this->lines[$i]->fk_unit, @@ -1405,7 +1405,9 @@ class SupplierProposal extends CommonObject $soc = new Societe($this->db); $result = $soc->fetch($this->socid); - if ($result < 0) return -1; + if ($result < 0) { + return -1; + } // Define new ref if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) { // empty should not happened, but when it occurs, the test save life @@ -1935,17 +1937,17 @@ class SupplierProposal extends CommonObject $sql = "SELECT s.rowid, s.nom as name, s.client,"; $sql .= " p.rowid as supplier_proposalid, p.fk_statut, p.total_ht, p.ref, p.remise, "; $sql .= " p.datep as dp, p.fin_validite as datelimite"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user"; } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."supplier_proposal as p, ".MAIN_DB_PREFIX."c_propalst as c"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.entity IN (".getEntity('supplier_proposal').")"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut = c.id"; - if (!$user->rights->societe->client->voir && !$socid) { //restriction + if (empty($user->rights->societe->client->voir) && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -2218,7 +2220,7 @@ class SupplierProposal extends CommonObject $sql = "SELECT p.rowid, p.ref, p.datec as datec, p.date_cloture as datefin"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON p.fk_soc = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = " AND"; @@ -2375,7 +2377,7 @@ class SupplierProposal extends CommonObject $sql = "SELECT count(p.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) { + if (empty($user->rights->societe->client->voir) && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".((int) $user->id); $clause = "AND"; diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index 2795c006723..3d5ce3fbb47 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -73,6 +73,15 @@ $object->fetch($id, $ref); if ($object->id > 0) { $object->fetch_thirdparty(); $upload_dir = $conf->supplier_proposal->dir_output.'/'.dol_sanitizeFileName($object->ref); +} + + + +/* + * Actions + */ + +if ($object->id > 0) { include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; } @@ -80,6 +89,7 @@ if ($object->id > 0) { /* * View */ + $title = $langs->trans('CommRequest')." - ".$langs->trans('Documents'); $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; llxHeader('', $title, $help_url); diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index ac937fe480d..f151651d186 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -66,7 +66,7 @@ print '
    '; $sql = "SELECT count(p.rowid), p.fk_statut"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."supplier_proposal as p"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.fk_soc = s.rowid"; @@ -74,7 +74,7 @@ $sql .= " AND p.entity IN (".getEntity('supplier_proposal').")"; if ($user->socid) { $sql .= ' AND p.fk_soc = '.((int) $user->socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " AND p.fk_statut IN (0,1,2,3,4)"; @@ -166,7 +166,7 @@ if (!empty($conf->supplier_proposal->enabled)) { $sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -175,7 +175,7 @@ if (!empty($conf->supplier_proposal->enabled)) { if ($socid) { $sql .= " AND c.fk_soc = ".((int) $socid); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -211,7 +211,7 @@ if (!empty($conf->supplier_proposal->enabled)) { } } -print '
    '; +print '
    '; $max = 5; @@ -224,7 +224,7 @@ $sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as socname, s.rowid as socid, $sql .= " date_cloture as datec"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.fk_soc = s.rowid"; @@ -233,7 +233,7 @@ $sql .= " AND c.entity = ".$conf->entity; if ($socid) { $sql .= " AND c.fk_soc = ".((int) $socid); } -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " ORDER BY c.tms DESC"; @@ -305,13 +305,13 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, p.rowid as supplier_proposalid, p.total_ttc, p.total_tva, p.total_ht, p.ref, p.fk_statut, p.datec as dp"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."supplier_proposal as p"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('supplier_proposal').")"; $sql .= " AND p.fk_statut = 1"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($socid) { @@ -385,7 +385,7 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa } } -print '
    '; +print ''; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardSupplierProposal', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 71cd1c1fa69..d34d3ae01e0 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -299,7 +299,7 @@ $sql .= ' sp.rowid, sp.note_public, sp.note_private, sp.total_ht, sp.total_tva, $sql .= ' sp.fk_multicurrency, sp.multicurrency_code, sp.multicurrency_tx, sp.multicurrency_total_ht, sp.multicurrency_total_tva as multicurrency_total_vat, sp.multicurrency_total_ttc,'; $sql .= ' sp.datec as date_creation, sp.tms as date_update,'; $sql .= " p.rowid as project_id, p.ref as project_ref,"; -if (!$user->rights->societe->client->voir && !$socid) { +if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " sc.fk_soc, sc.fk_user,"; } $sql .= " u.firstname, u.lastname, u.photo, u.login"; @@ -330,7 +330,7 @@ if ($search_product_category > 0) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON sp.fk_user_author = u.rowid'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = sp.fk_projet"; // We'll need this table joined to the select in order to filter by sale -if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { +if ($search_sale > 0 || (empty($user->rights->societe->client->voir) && !$socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } if ($search_user > 0) { @@ -339,7 +339,7 @@ if ($search_user > 0) { } $sql .= ' WHERE sp.fk_soc = s.rowid'; $sql .= ' AND sp.entity IN ('.getEntity('supplier_proposal').')'; -if (!$user->rights->societe->client->voir && !$socid) { //restriction +if (empty($user->rights->societe->client->voir) && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } if ($search_town) { diff --git a/htdocs/takepos/admin/orderprinters.php b/htdocs/takepos/admin/orderprinters.php index eb23f26806c..cddf839375a 100644 --- a/htdocs/takepos/admin/orderprinters.php +++ b/htdocs/takepos/admin/orderprinters.php @@ -135,14 +135,11 @@ print load_fiche_titre($langs->trans("OrderPrinters")); //print '
    '; print '
    '; +print '
    '; -//print '
    '; -print '
    '; +print '
    '; -//print '
    '; -print '
    '; - print '

    '; diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index db3b28d0948..870fe1844ad 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -256,8 +256,7 @@ print "
    '; print $langs->trans("NumberOfTerminals"); print ''; -$array = array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5", 6=>"6", 7=>"7", 8=>"8", 9=>"9"); -print $form->selectarray('TAKEPOS_NUM_TERMINALS', $array, (empty($conf->global->TAKEPOS_NUM_TERMINALS) ? '0' : $conf->global->TAKEPOS_NUM_TERMINALS), 0); +print ''; print "