diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index f0013632b53..b1836836e84 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -138,7 +138,7 @@ if ($action == 'display' || $action == 'delete') { if(!empty($obj)){ foreach ( $obj as $cpt ) { $var = ! $var; - print ""; + print ''; print '' . length_accountg($cpt->account_number) . ''; print '' . $cpt->label . ''; print $form->formconfirm($_SERVER["PHP_SELF"]."?account_category=$cat_id&cptid=".$cpt->rowid, $langs->trans("DeleteCptCategory"), $langs->trans("ConfirmDeleteCptCategory"), "delete", '', 0, "action-delete".$j); diff --git a/htdocs/accountancy/admin/importaccounts.php b/htdocs/accountancy/admin/importaccounts.php index 0dc560aa62e..720f3a4f012 100644 --- a/htdocs/accountancy/admin/importaccounts.php +++ b/htdocs/accountancy/admin/importaccounts.php @@ -138,7 +138,7 @@ if ($result) { while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); $var = ! $var; - print ""; + print ''; print ''; print $objp->accounting; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 80ed3f6fb47..63060e1ed60 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -328,10 +328,10 @@ if ($result) { $product_static = new Product($db); - print ""; + print ''; print ""; - print ""; + print ''; // Ref produit as link $product_static->ref = $obj->ref; $product_static->id = $obj->rowid; diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index e89799d765e..736aec48644 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -223,7 +223,7 @@ else { if(empty($description)){ $link = '' . img_edit_add() .''; } - print ""; + print ''; print '' . length_accountg($line->numero_compte) . ''; print '' . $description . ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 5421a4a350d..7293797ecc6 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -346,7 +346,7 @@ if ($action == 'create') { foreach ( $book->linesmvt as $line ) { $var = ! $var; - print ""; + print ''; $total_debit += $line->debit; $total_credit += $line->credit; @@ -400,7 +400,7 @@ if ($action == 'create') { if ($action == "" || $action == 'add') { $var = ! $var; - print ""; + print ''; print ''; print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, ''); print ''; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 557143164a9..cb5d7caf006 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -368,7 +368,7 @@ foreach ( $object->lines as $line ) { $total_debit += $line->debit; $total_credit += $line->credit; - print ""; + print ''; print '' . $line->piece_num . ''; print '' . dol_print_date($line->doc_date, 'day') . ''; diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php index 10640c1887a..23eeb79621a 100644 --- a/htdocs/accountancy/bookkeeping/listbyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -269,7 +269,7 @@ $var = True; foreach ( $object->lines as $line ) { $var = ! $var; - print ""; + print ''; print '' . $line->piece_num . '' . "\n"; print '' . $line->doc_type . '' . "\n"; print '' . dol_print_date($line->doc_date) . ''; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 292b52b5863..3549651cbd6 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -288,7 +288,7 @@ if ($result) { $var = ! $var; $codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte; - print ""; + print ''; // Ref Invoice $facture_static->ref = $objp->facnumber; diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 438eb30c621..167f558d830 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -302,7 +302,7 @@ if ($result) { if ($objp->code_sell_l != $objp->code_sell_p) $code_sell_p_l_differ = 'color:red'; - print ""; + print ''; // Ref Invoice $facture_static->ref = $objp->facnumber; diff --git a/htdocs/accountancy/report/result.php b/htdocs/accountancy/report/result.php index 48d587b575b..72a4d6e96b2 100644 --- a/htdocs/accountancy/report/result.php +++ b/htdocs/accountancy/report/result.php @@ -127,7 +127,7 @@ if(!empty($cats)) $resultN = $AccCat->getResult($cpt['account_number'], 0, $year_current, $cpt['dc']); $sommes[$code]['NP'] += $resultNP; $sommes[$code]['N'] += $resultN; - print ""; + print ''; print '' . $cpt['account_number'] . ''; print '' . $cpt['name_cpt'] . ''; print '' . price($resultNP) . ''; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 6ab2cf589a6..a0b2365350f 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -236,7 +236,7 @@ if ($result) { $var = ! $var; $codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label; - print ""; + print ''; // Ref Invoice $facturefournisseur_static->ref = $objp->facnumber; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 8685cb7d5d4..c98ba050222 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -314,7 +314,7 @@ if ($result) { if ($objp->code_buy_l != $objp->code_buy_p) $code_buy_p_l_differ = 'color:red'; - print ""; + print ''; // Ref Invoice $facturefourn_static->ref = $objp->ref; diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 66de3be2cc5..be81c9b967d 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -253,7 +253,8 @@ if (empty($reshook)) } $lastname=$_POST["lastname"]; $firstname=$_POST["firstname"]; - $morphy=$morphy=$_POST["morphy"]; + $morphy=$_POST["morphy"]; + $login=$_POST["login"]; if ($morphy != 'mor' && empty($lastname)) { $error++; $langs->load("errors"); @@ -264,7 +265,14 @@ if (empty($reshook)) $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Firstname")), null, 'errors'); } - + // Test si le login existe deja + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) + { + if (empty($login)) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Login")), null, 'errors'); + } + } // Create new object if ($result > 0 && ! $error) { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 3287ac5d4b7..c26251f2312 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -744,7 +744,8 @@ abstract class CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact"; $sql.= " WHERE element_id = ".$this->id; - $sql.= " AND fk_c_type_contact IN (".$listId.")"; + if ($listId) + $sql.= " AND fk_c_type_contact IN (".$listId.")"; dol_syslog(get_class($this)."::delete_linked_contact", LOG_DEBUG); if ($this->db->query($sql)) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 34e52b3c205..c95a83be335 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -902,8 +902,15 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r if ($showimage) $morehtmlleft.='
'.$object->show_photos($conf->product->multidir_output[$object->entity],'small',-$maxvisiblephotos,0,0,0,$width,0).'
'; else { - $nophoto='/public/theme/common/nophoto.png'; - $morehtmlleft.='
No photo
'; + if (!empty($conf->global->PRODUCT_NODISPLAYIFNOPHOTO)) { + $nophoto=''; + $morehtmlleft.='
'; + } + else { + $nophoto='/public/theme/common/nophoto.png'; + $morehtmlleft.='
No photo
'; + } + } } else diff --git a/htdocs/expensereport/synchro_compta.php b/htdocs/expensereport/synchro_compta.php index 59a6b8926fe..31c2d985840 100644 --- a/htdocs/expensereport/synchro_compta.php +++ b/htdocs/expensereport/synchro_compta.php @@ -165,7 +165,7 @@ else: while($i<$num): $objp = $db->fetch_object($resql); $var=!$var; - print ""; + print ''; print ''.$objp->ref.''; print ''.dol_print_date($db->jdate($objp->date_valid),'day').''; print ''.img_object($langs->trans("ShowUser"),"user").' '.$objp->declarant_NDF.''; diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index b97721f2108..92a41209ba4 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -89,7 +89,18 @@ if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not do { // Note: If calling page was not into htdocs (index.php, ...), then this redirect will fails. // There is no real solution, because the only way to know the apache url relative path is to have into conf file. - header("Location: install/index.php"); + $TDir = explode('/', $_SERVER['PHP_SELF']); + $path = ''; + $i = count($TDir); + while ($i--) + { + if (empty($TDir[$i]) || $TDir[$i] == 'htdocs') break; + if (substr($TDir[$i], -4, 4) == '.php') continue; + + $path .= '../'; + } + + header("Location: ".$path."install/index.php"); exit; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 53a3081aa4e..b87bfd6134f 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -979,10 +979,10 @@ DelayBeforeWarning=Delay before warning DelaysBeforeWarning=Delays before warning DelaysOfToleranceBeforeWarning=Tolerance delays before warning DelaysOfToleranceDesc=This screen allows you to define the tolerated delays before an alert is reported on screen with picto %s for each late element. -Delays_MAIN_DELAY_ACTIONS_TODO=Delay tolerance (in days) before alert on planned events not yet realised -Delays_MAIN_DELAY_TASKS_TODO=Delay tolerance (in days) before alert on planned tasks not yet realised -Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Delay tolerance (in days) before alert on orders not yet processed -Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Delay tolerance (in days) before alert on suppliers orders not yet processed +Delays_MAIN_DELAY_ACTIONS_TODO=Delay tolerance (in days) before alert on planned events not completed yet +Delays_MAIN_DELAY_TASKS_TODO=Delay tolerance (in days) before alert on planned tasks not completed yet +Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Delay tolerance (in days) before alert on orders not processed yet +Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Delay tolerance (in days) before alert on suppliers orders not processed yet Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Delay tolerance (in days) before alert on proposals to close Delays_MAIN_DELAY_PROPALS_TO_BILL=Delay tolerance (in days) before alert on proposals not billed Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Tolerance delay (in days) before alert on services to activate @@ -993,7 +993,7 @@ Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Tolerance delay (in days) before al Delays_MAIN_DELAY_MEMBERS=Tolerance delay (in days) before alert on delayed membership fee Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Tolerance delay (in days) before alert for cheques deposit to do Delays_MAIN_DELAY_EXPENSEREPORTS=Tolerance delay (in days) before alert for expense reports to approve -SetupDescription1=All parameters available in the setup area allow you to setup Dolibarr before starting using it. +SetupDescription1=The setup area is for initial setup parameters before starting to use Dolibarr. SetupDescription2=The two most important setup steps are the first two in the setup menu on the left: Company/foundation setup page and Modules setup page: SetupDescription3=Parameters in menu Setup -> Company/foundation are required because submitted data are used on Dolibarr displays and to customize the default behaviour of the software (for country-related features for example). SetupDescription4=Parameters in menu Setup -> Modules are required because Dolibarr is not a monolithic ERP/CRM but a collection of several modules, all more or less independent. New features will be added to menus for every module you'll enable. @@ -1032,9 +1032,9 @@ TriggerAlwaysActive=Triggers in this file are always active, whatever are the ac TriggerActiveAsModuleActive=Triggers in this file are active as module %s is enabled. GeneratedPasswordDesc=Define here which rule you want to use to generate new password if you ask to have auto generated password DictionaryDesc=Insert all reference data. You can add your values to the default. -ConstDesc=This page allows you to edit all other parameters not available in previous pages. They are reserved parameters for advanced developers or for troubleshouting. +ConstDesc=This page allows you to edit all other parameters not available in previous pages. These are mostly reserved parameters for developers or advanced troubleshooting. OnceSetupFinishedCreateUsers=Warning, you are a Dolibarr administrator user. Administrator users are used to setup Dolibarr. For a usual usage of Dolibarr, it is recommended to use a non administrator user created from Users & Groups menu. -MiscellaneousDesc=Define here all other parameters related to security. +MiscellaneousDesc=All other security related parameters are defined here. LimitsSetup=Limits/Precision setup LimitsDesc=You can define limits, precisions and optimisations used by Dolibarr here MAIN_MAX_DECIMALS_UNIT=Max decimals for unit prices @@ -1104,8 +1104,8 @@ PathToDocuments=Path to documents PathDirectory=Directory SendmailOptionMayHurtBuggedMTA=Feature to send mails using method "PHP mail direct" will generate a mail message that might be not correctly parsed by some receiving mail servers. Result is that some mails can't be read by people hosted by those bugged platforms. It's case for some Internet providers (Ex: Orange in France). This is not a problem into Dolibarr nor into PHP but onto receiving mail server. You can however add option MAIN_FIX_FOR_BUGGED_MTA to 1 into setup - other to modify Dolibarr to avoid this. However, you may experience problem with other servers that respect strictly the SMTP standard. The other solution (recommended) is to use the method "SMTP socket library" that has no disadvantages. TranslationSetup=Configuration de la traduction -TranslationDesc=Choice of language visible on screen can be modified:
* Globally from menu Home - Setup - Display
* For user only from tab User display of user card (click on login on top of screen). -TranslationOverwriteDesc=You can also overwrite some value by completing/editing the following table. You must use for "%s" the language code, for "%s" the key found into file langs/xx_XX/somefile.lang and "%s" the new value you want to use as new translation. +TranslationDesc=How to set displayed application language
* Systemwide: menu Home - Setup - Display
* Per user: User display setup tab of user card (click on username at the top of the screen). +TranslationOverwriteDesc=You can also override strings filling the following table. Choose your language from "%s" dropdown, insert the key string found in the lang file (langs/xx_XX/somefile.lang) into "%s" and your new translation into "%s". TotalNumberOfActivatedModules=Total number of activated feature modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found into PHP path diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index b54f59dcfc2..f8942c406a9 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -226,3 +226,4 @@ 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_1=Import social/fiscal taxes +ErrorBankAccountNotFound=Error: Bank account not found diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index f581b76deda..0aa839d09c2 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -746,7 +746,7 @@ Sincerely=Sincerely DeleteLine=Delete line ConfirmDeleteLine=Are you sure you want to delete this line ? NoPDFAvailableForDocGenAmongChecked=No PDF were available for the document generation among checked records -TooManyRecordForMassAction=Too many records selected for mass action. Such action are restriced to a list of %s records. +TooManyRecordForMassAction=Too many records selected for mass action. The action is restricted to a list of %s records. MassFilesArea=Area for files built by mass actions HideTempMassFilesArea=Hide area of files built by mass actions ShowTempMassFilesArea=Show area of files built by mass actions diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 67bb3165fb6..694297b5b2f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1315,7 +1315,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_ { $objp = $db->fetch_object($result); $var = ! $var; - print ""; + print ''; // Date print "" . dol_print_date($db->jdate($objp->dp), "dayhour") . ""; diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 45eba9b397f..4c988603417 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -416,7 +416,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { foreach ( $prodcustprice->lines as $line ) { - print ""; + print ''; $staticprod = new Product($db); $staticprod->fetch($line->fk_product); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 72074c25a07..dc10819ba84 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1914,7 +1914,7 @@ else if ($user->admin // Need to be admin to allow downgrade of an admin && ($user->id != $object->id) // Don't downgrade ourself && ( - (empty($conf->multicompany->enabled) && $nbAdmin > 1) + (empty($conf->multicompany->enabled) && $nbAdmin >= 1) || (! empty($conf->multicompany->enabled) && ($object->entity > 0 || $nbSuperAdmin > 1)) // Don't downgrade a superadmin if alone ) ) diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php index 05236aabf7e..c84ffdabc0f 100755 --- a/scripts/accountancy/export-thirdpartyaccount.php +++ b/scripts/accountancy/export-thirdpartyaccount.php @@ -207,7 +207,7 @@ if ($resql) { $var = ! $var; - print ""; + print ''; print ''; $thirdpartystatic->id = $obj->rowid; $thirdpartystatic->name = $obj->name;