diff --git a/.travis.yml b/.travis.yml index e7895e21cb0..d660f89e79d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -289,7 +289,7 @@ script: # Ensure we catch errors set -e #parallel-lint --exclude htdocs/includes --blame . - parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame . + parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame . set +e echo diff --git a/ChangeLog b/ChangeLog index 0bc9d008ea8..d609b7a347a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,20 +5,111 @@ English Dolibarr ChangeLog ***** ChangeLog for 9.0.0 compared to 8.0.0 ***** For Users: -NEW: Stable module: Website -NEW: Stable module: WebDAV -NEW: Stable module: Module Builder +NEW: Stable module: DAV (WebDAV only for the moment) NEW: Stable module "Skype" has been replaced with module "Social Networks" to support more services. +NEW: Stable module "Module Builder" +NEW: Stable module: Website NEW: Experimental module "TakePos" NEW: Experimental module "Ticket" +NEW: Experimental module "Data Privacy" +NEW: Experimental module "Email Collector" NEW: Dolibarr can provide information in page title when multicompany is enabled of not, making Android application like DoliDroid able to provide native features for multicompany module. -NEW: Compatibility with PHP 7.3 +NEW: Compatibility with PHP 7.3 => +NEW: Add admin page for modulebuilder +NEW: Add civility in list of members. Close #9251 +NEW: Add configuration to disable "customer/prospect" thirdparty type +NEW: Add CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY and CONTRACT_HIDE_UNSELECTABLES by SELECT_HIDE_UNSELECTABLES +NEW: Add __DAY_TEXT__ and __MONTH_TEXT__ substitutions vars +NEW: Add due date column in payment lists +NEW: Add email in event history, for reminder email of expired subsription +NEW: Add event tab on resource record +NEW: Add FEC Export in accountancy +NEW: Add filter on staff range in list of thirdparties +NEW: Add a first complete template of website +NEW: Add format code into exported filename of ledger +NEW: Add hidden option EXPENSEREPORT_DEFAULT_VALIDATOR_UNCHANGEABLE +NEW: Add hidden option MAIN_DOCUMENTS_DESCRIPTION_FIRST +NEW: Add link to inventory code +NEW: Add more common social networks fields for business +NEW: Add option PDF_DISABLE_MYCOMPANY_LOGO to disable logo on PDF +NEW: add option PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT +NEW: Add option to display thirdparty adress in combolist +NEW: Add option to swap sender/recipient address on PDF +NEW: Add option to display thirdparty adress in combolist +NEW: Add project on pament of salaries +NEW: Add SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME and +NEW: Add somes hooks in bank planned entries +NEW: Add supplier ref in item reception page +NEW: Advanced permission to ignore price min +NEW: Allow to enter a timespent with a numeric value +NEW: Automatic position of scroll when creating an extrafield +NEW: Can add autorefresh=X in any URLs to refresh page after X seconds +NEW: can add project's task to agenda on create event form +NEW: Can delete a website in experimental website module +NEW: Can disable meteo on smartphone only +NEW: Can export/import a website template +NEW: Can filter on EEC, not EEC, etc... in binding step of accountancy +NEW: Can mix offset before and after with rules for due date of invoices +NEW: Can record the supplier product description +NEW: Can select several prospect level in thirdparty filter. +NEW: Can set 2 url in url field of thirdparty +NEW: Can set if a field is mandatory on form level. +NEW: Can set the default focus of each page. +NEW: Add category filter on user list +NEW: Change forgotten password link in general parameters +NEW: Child label of variants change if parent label changes +NEW: Compatibility with new Paybox HMAC requirement +NEW: Each user can set its prefered default calendar page +NEW: Enhancement in process to make manual bank conciliation +NEW: Enhancement in the generic file manager +NEW: Extrafield totalizable +NEW: Hidden conf INVOICE_USE_DEFAULT_DOCUMENT +NEW: hidden conf to search product by supplier ref +NEW: hidden constant to be able to use a thirdparty for donation +NEW: hidden option to define an invoice template for each invoice type +NEW: Highlight lines on lists when they are checked +NEW: Notification module support expense report+holiday validation and approval +NEW: On customer/supplier card, add simple tooltip to amount boxes +NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachements +NEW: possibility to add all rights of all modules in one time +NEW: redirect if only one result on global search on card +NEW: Permission to ignore price min +NEW: Can build an archive of full documents directory from backup page +NEW: tag odt line_product_ref_fourn for supplier doc lines +NEW: The binding step in accountancy has a country filter with autocompletion +NEW: Top menu is always on screen with MD theme. +NEW: Withdraw request massaction can include already partially paid invoices For developers: -* Code changes to be more compatible with PSR2 -* Removed trigger USER_LOGOUT, USER_LOGIN, USER_LOGIN_FAILED (Some hooks are already dedicated for that) +NEW: Add lib for multiselect with checkboxes +NEW: Add function isValidMXRecord +NEW: Add hook changeRoundingMode in update_price +NEW: Add hook formconfirm to contractcard +NEW: Add hook for virtual stock +NEW: ADD url to see the last version of a external module +NEW: Can enable a module, even external module, from command line +NEW: Can set a tooltip help text on extrafields +NEW: Add product search from barcode via REST api +NEW: can add documents on agenda events using API REST +NEW: Can set the datestart and dateend of cron job into module descriptor +NEW: Close #9296 Add field ref_ext into llx_categorie +NEW: move ticket dictionary in API /setup +NEW: PHPUnitTest on Loan class #3163 +NEW: Code changes to be more compatible with PSR2 +NEW: Removed trigger USER_LOGOUT, USER_LOGIN, USER_LOGIN_FAILED (Some hooks are already dedicated for that) +NEW: Add agenda documents in API REST +NEW: Add "checked" field for new list engine compatibility +NEW: REST API improvements +NEW: Save external payment IDs into table of payment +NEW: triggers add commercial and del commercial +NEW: #9236 Allow to import shipment lines via API +NEW: ADD civility list in API +NEW: support selllist in the module builder +NEW: optional param to show a specific extrafield +NEW: hook formConfirm always called if hooked +NEW: hook on dispatch order fourn WARNING: diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 74958d606ec..33fdb675ac0 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro - * Copyright (C) 2014 Florian Henry +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2014 Florian Henry * * 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 @@ -41,6 +41,7 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $rowid = GETPOST('rowid', 'int'); $cancel = GETPOST('cancel','alpha'); +$accountingaccount = GETPOST('accountingaccount','alpha'); // Security check @@ -229,7 +230,7 @@ if ($action == 'create') { // Account number print '' . $langs->trans("AccountNumber") . ''; - print ''; + print ''; // Label print '' . $langs->trans("Label") . ''; diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index e807d1acced..5183281f4cd 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -266,7 +266,7 @@ if ($action != 'export_csv') $description = $object->get_compte_desc($line->numero_compte); // Search description of the account $root_account_description = $object->get_compte_racine($line->numero_compte); if (empty($description)) { - $link = '' . img_edit_add() . ''; + $link = '' . img_edit_add() . ''; } print ''; diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index a68a4bda5a6..f724bd9e50c 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -129,4 +129,4 @@ print ''; // End of page llxFooter(); -$db->close();; +$db->close(); diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index f98ab3ed82a..57337226f40 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -234,7 +234,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; $sql = "SELECT"; if ($usergroup > 0) $sql.=" DISTINCT"; -$sql.= " s.nom as societe, s.rowid as socid, s.client,"; +$sql.= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,"; $sql.= " a.id, a.label, a.datep as dp, a.datep2 as dp2,"; $sql.= ' a.fk_user_author,a.fk_user_action,'; $sql.= " a.fk_contact, a.note, a.percent as percent,"; @@ -605,11 +605,13 @@ if ($resql) // Third party if (! empty($arrayfields['s.nom']['checked'])) { print ''; - if ($obj->socid) + if ($obj->socid > 0) { $societestatic->id=$obj->socid; $societestatic->client=$obj->client; $societestatic->name=$obj->societe; + $societestatic->email=$obj->socemail; + print $societestatic->getNomUrl(1,'',28); } else print ' '; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 937160f7bb6..be8bddedfa4 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -11,7 +11,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016-2018 Ferran Marcet - * Copyright (C) 2017 Charlene Benke + * Copyright (C) 2017-2018 Charlene Benke * Copyright (C) 2018 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify @@ -175,9 +175,6 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab } } -$object = new Propal($db); // To be passed as parameter of executeHooks that need - - /* * Actions */ diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index e49f42bb14f..9f5d13f98a3 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -589,7 +589,7 @@ else // Localtax print ''; - $temp_vat=($local==1?$fields['localtax1']:$fields['localtax2'])*$ratiopaymentinvoice;; + $temp_vat=($local==1?$fields['localtax1']:$fields['localtax2'])*$ratiopaymentinvoice; print price(price2num($temp_vat,'MT'),1); //print price($fields['vat']); print ''; diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 76ab712bffd..2e48802a554 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -63,7 +63,7 @@ $hookmanager->initHooks(array('salarycard','globalcard')); if ($cancel) { - header("Location: index.php"); + header("Location: list.php"); exit; } @@ -139,7 +139,7 @@ if ($action == 'add' && empty($cancel)) if ($ret > 0) { $db->commit(); - header("Location: index.php"); + header("Location: list.php"); exit; } else diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index 6b6d4b7a176..bae5001b256 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -29,7 +29,7 @@ $mesg=array(); $extrasize=GETPOST('size','int'); $type=GETPOST('type','alpha'); -$param=GETPOST('param','alpha');; +$param=GETPOST('param','alpha'); if ($type=='double' && strpos($extrasize,',')===false) $extrasize='24,8'; if ($type=='date') $extrasize=''; diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 195bec09daf..42386494a37 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -1108,7 +1108,7 @@ class DolGraph // Background color $color1=sprintf("%02x%02x%02x",$this->bgcolorgrid[0],$this->bgcolorgrid[0],$this->bgcolorgrid[2]); $color2=sprintf("%02x%02x%02x",$this->bgcolorgrid[0],$this->bgcolorgrid[1],$this->bgcolorgrid[2]); - $this->stringtoshow.=', grid: { hoverable: true, backgroundColor: { colors: ["#'.$color1.'", "#'.$color2.'"] }, borderWidth: 1, borderColor: \'#eee\', tickColor : \'#f3f3f3\' }'."\n"; + $this->stringtoshow.=', grid: { hoverable: true, backgroundColor: { colors: ["#'.$color1.'", "#'.$color2.'"] }, borderWidth: 1, borderColor: \'#e6e6e6\', tickColor : \'#e6e6e6\' }'."\n"; //$this->stringtoshow.=', shadowSize: 20'."\n"; TODO Uncommet this $this->stringtoshow.='});'."\n"; $this->stringtoshow.='}'."\n"; diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index 15594570fd7..f2aa6fc521f 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2018 Laurent Destailleur * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud * @@ -46,33 +46,33 @@ else header('Cache-Control: no-cache'); // Define tradMonths javascript array (we define this in datepicker AND in parent page to avoid errors with IE8) $tradMonths=array( -dol_escape_js($langs->transnoentitiesnoconv("January")), -dol_escape_js($langs->transnoentitiesnoconv("February")), -dol_escape_js($langs->transnoentitiesnoconv("March")), -dol_escape_js($langs->transnoentitiesnoconv("April")), -dol_escape_js($langs->transnoentitiesnoconv("May")), -dol_escape_js($langs->transnoentitiesnoconv("June")), -dol_escape_js($langs->transnoentitiesnoconv("July")), -dol_escape_js($langs->transnoentitiesnoconv("August")), -dol_escape_js($langs->transnoentitiesnoconv("September")), -dol_escape_js($langs->transnoentitiesnoconv("October")), -dol_escape_js($langs->transnoentitiesnoconv("November")), -dol_escape_js($langs->transnoentitiesnoconv("December")) +dol_escape_js($langs->transnoentitiesnoconv("Month01")), +dol_escape_js($langs->transnoentitiesnoconv("Month02")), +dol_escape_js($langs->transnoentitiesnoconv("Month03")), +dol_escape_js($langs->transnoentitiesnoconv("Month04")), +dol_escape_js($langs->transnoentitiesnoconv("Month05")), +dol_escape_js($langs->transnoentitiesnoconv("Month06")), +dol_escape_js($langs->transnoentitiesnoconv("Month07")), +dol_escape_js($langs->transnoentitiesnoconv("Month08")), +dol_escape_js($langs->transnoentitiesnoconv("Month09")), +dol_escape_js($langs->transnoentitiesnoconv("Month10")), +dol_escape_js($langs->transnoentitiesnoconv("Month11")), +dol_escape_js($langs->transnoentitiesnoconv("Month12")) ); $tradMonthsShort=array( -$langs->trans("JanuaryMin"), -$langs->trans("FebruaryMin"), -$langs->trans("MarchMin"), -$langs->trans("AprilMin"), -$langs->trans("MayMin"), -$langs->trans("JuneMin"), -$langs->trans("JulyMin"), -$langs->trans("AugustMin"), -$langs->trans("SeptemberMin"), -$langs->trans("OctoberMin"), -$langs->trans("NovemberMin"), -$langs->trans("DecemberMin") +$langs->trans("MonthShort01"), +$langs->trans("MonthShort02"), +$langs->trans("MonthShort03"), +$langs->trans("MonthShort04"), +$langs->trans("MonthShort05"), +$langs->trans("MonthShort06"), +$langs->trans("MonthShort07"), +$langs->trans("MonthShort08"), +$langs->trans("MonthShort09"), +$langs->trans("MonthShort10"), +$langs->trans("MonthShort11"), +$langs->trans("MonthShort12") ); $tradDays=array( diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 09f7bd85c90..4618828e476 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1344,7 +1344,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql.= ", ".MAIN_DB_PREFIX."product as o"; $sql.= " WHERE a.entity IN (".getEntity('agenda').")"; - if (is_object($filterobj) && get_class($filterobj) == 'Societe' && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id; + if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id; elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) $sql.= " AND a.fk_project = ".$filterobj->id; elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') { @@ -1386,6 +1386,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; if (is_array($filters) && $filters['search_agenda_label']) $sql.= natural_search('a.label', $filters['search_agenda_label']); + + //TODO Add limit for thirdparty in contexte very all result $sql.= $db->order($sortfield, $sortorder); dol_syslog("company.lib::show_actions_done", LOG_DEBUG); $resql=$db->query($sql); diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index 10fd7bc8919..5a8aa344240 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -91,7 +91,7 @@ function report_header($reportname,$notused,$period,$periodlink,$description,$bu print ''.$langs->trans("ReportPeriod").''; print ''; if ($period) print $period; - if ($variante) print ''.$periodlink.''; + if ($variante) print ''.$periodlink.''; print ''; print ''; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 32b2be816df..033d4eb37fe 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -822,22 +822,22 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) //print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; if ($edit) { - if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='edf4fb'; + if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='e6edf0'; else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER,array()),''); print $formother->selectColor($color,'THEME_ELDY_USE_HOVER','formcolor',1).' '; } else { - if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='edf4fb'; + if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='e6edf0'; else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER,array()),''); if ($color) { - if ($color != 'edf4fb') print ''; + if ($color != 'e6edf0') print ''; else print $langs->trans("Default"); } else print $langs->trans("None"); } - print '   ('.$langs->trans("Default").': edf4fb) '; + print '   ('.$langs->trans("Default").': e6edf0) '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); print ''; print ''; @@ -866,22 +866,22 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) //print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; if ($edit) { - if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color='ffefbb'; + if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color='e6edf0'; else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED,array()),''); print $formother->selectColor($color,'THEME_ELDY_USE_CHECKED','formcolor',1).' '; } else { - if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color='ffefbb'; + if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color='e6edf0'; else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED,array()),''); if ($color) { - if ($color != 'ffefbb') print ''; + if ($color != 'e6edf0') print ''; else print $langs->trans("Default"); } else print $langs->trans("None"); } - print '   ('.$langs->trans("Default").': ffefbb) '; + print '   ('.$langs->trans("Default").': e6edf0) '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); print ''; print ''; diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 20b9bf54edd..c47e8d310f1 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -80,7 +80,7 @@ class modAccounting extends DolibarrModules "MAIN_COMPANY_CODE_ALWAYS_REQUIRED", "chaine", "1", - "With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 0 + "With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 1 ); $this->const[2] = array( "MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED", diff --git a/htdocs/core/modules/modCashDesk.class.php b/htdocs/core/modules/modCashDesk.class.php index d9d4a6c2816..d9bfe6b0b5f 100644 --- a/htdocs/core/modules/modCashDesk.class.php +++ b/htdocs/core/modules/modCashDesk.class.php @@ -97,7 +97,7 @@ class modCashDesk extends DolibarrModules // This is to declare the Top Menu entry: $this->menu[$r]=array( 'fk_menu'=>0, // Put 0 if this is a top menu 'type'=>'top', // This is a Top menu entry - 'titre'=>'CashDeskMenu', + 'titre'=>'PointOfSaleShort', 'mainmenu'=>'cashdesk', 'url'=>'/cashdesk/index.php?user=__LOGIN__', 'langs'=>'cashdesk', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. diff --git a/htdocs/core/modules/modTakePos.class.php b/htdocs/core/modules/modTakePos.class.php index 4404ee9de63..1a0a681e206 100644 --- a/htdocs/core/modules/modTakePos.class.php +++ b/htdocs/core/modules/modTakePos.class.php @@ -102,7 +102,7 @@ class modTakePos extends DolibarrModules $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->langfiles = array("cashdesk"); - $this->phpmin = array(5,43); // Minimum version of PHP required by module + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->need_dolibarr_version = array(4,0); // Minimum version of Dolibarr required by module $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) @@ -226,7 +226,7 @@ class modTakePos extends DolibarrModules /* BEGIN MODULEBUILDER TOPMENU */ $this->menu[$r++]=array('fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'type'=>'top', // This is a Top menu entry - 'titre'=>'PointOfSale', + 'titre'=>'PointOfSaleShort', 'mainmenu'=>'takepos', 'leftmenu'=>'', 'url'=>'/takepos/takepos.php', diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index ade9a23e759..01490278566 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -167,7 +167,7 @@ class modWebsite extends DolibarrModules if ($result < 0) { $langs->load("errors"); - $this->error=$langs->trans('ErrorFailToCopyDirectory',$src,$dest); + $this->error=$langs->trans('ErrorFailToCopyDir',$src,$dest); return 0; } } diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 1ab3dc0180c..76aa73e960e 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -796,7 +796,7 @@ class doc_generic_project_odt extends ModelePDFProjects if (!empty($row['thm'])) { $row['amountht']=($row['task_duration'] / 3600) * $row['thm']; $defaultvat = get_default_tva($mysoc, $mysoc); - $row['amountttc']=price2num($row['amountht'] * (1 + ($defaultvat / 100)),'MT');; + $row['amountttc']=price2num($row['amountht'] * (1 + ($defaultvat / 100)),'MT'); } else { $row['amountht']=0; $row['amountttc']=0; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 222538a8554..3ea7e184e35 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -150,7 +150,7 @@ class pdf_stdmovement extends ModelePDFMovement // Define position of columns $this->wref = 15; $this->posxidref = $this->marge_gauche; - $this->posxdatemouv = $this->marge_gauche+8;; + $this->posxdatemouv = $this->marge_gauche+8; $this->posxdesc=37; $this->posxlabel=50; $this->posxtva=80; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index b6604133c31..c3941059e64 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -711,8 +711,20 @@ class Don extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps - /** + /** + * Validate a intervention + * + * @param User $user User that validate + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 if KO, >0 if OK + */ + function setValid($user, $notrigger=0) + { + return $this->valid_promesse($this->id, $user->id, $notrigger); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + /** * Validate a promise of donation * * @param int $id id of donation @@ -720,9 +732,9 @@ class Don extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function valid_promesse($id, $userid, $notrigger=0) - { - // phpcs:enable + function valid_promesse($id, $userid, $notrigger=0) + { + // phpcs:enable global $langs, $user; $error=0; diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index 1d42a15134c..620795870a0 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -83,7 +83,7 @@ class EmailCollectorAction extends CommonObject */ public $fields=array( 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), - 'fk_emailcollector' => array('type'=>'integer', 'label'=>'Id of emailcollector', 'foreignkey'=>'emailcollecotr.rowid'), + 'fk_emailcollector' => array('type'=>'integer', 'label'=>'Id of emailcollector', 'foreignkey'=>'emailcollector.rowid'), 'type' => array('type'=>'varchar(128)', 'label'=>'Type', 'enabled'=>1, 'visible'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1), 'actionparam' => array('type'=>'varchar(255)', 'label'=>'ParamForAction', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'notnull'=>-1), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,), diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 4bc41f6fa47..2a09fa2a71e 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1925,7 +1925,7 @@ else print $paymentexpensereportstatic->getNomUrl(1); print ''; print ''.dol_print_date($db->jdate($objp->dp),'day')."\n"; - $labeltype=$langs->trans("PaymentType".$objp->p_code)!=("PaymentType".$objp->p_code)?$langs->trans("PaymentType".$objp->p_code):$objp->fk_typepayment; + $labeltype=$langs->trans("PaymentType".$objp->p_code)!=("PaymentType".$objp->p_code)?$langs->trans("PaymentType".$objp->p_code):$objp->payment_type; print "".$labeltype.' '.$objp->num_payment."\n"; if (! empty($conf->banque->enabled)) { diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 7c05eda422e..32643b77811 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -315,7 +315,6 @@ class Fichinter extends CommonObject */ function update($user, $notrigger=0) { - global $conf; if (! is_numeric($this->duration)) { $this->duration = 0; } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index b6ff1d36551..4f40b0cae36 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -904,7 +904,7 @@ if (empty($reshook)) // FIXME Missing special_code into addline and updateline methods $object->special_code = $lines[$i]->special_code; - + // FIXME Missing $lines[$i]->ref_supplier and $lines[$i]->label into addline and updateline methods. They are filled when coming from order for example. $result = $object->addline( $desc, @@ -2717,7 +2717,7 @@ else $paymentstatic->id=$objp->rowid; $paymentstatic->datepaye=$db->jdate($objp->dp); - $paymentstatic->ref=($objp->ref ? $objp->ref : $objp->rowid);; + $paymentstatic->ref=($objp->ref ? $objp->ref : $objp->rowid); $paymentstatic->num_paiement=$objp->num_paiement; $paymentstatic->payment_code=$objp->payment_code; diff --git a/htdocs/install/doctemplates/websites/website_template-corporate.zip b/htdocs/install/doctemplates/websites/website_template-corporate.zip index e3bc4063fcb..5aca2fbc8aa 100644 Binary files a/htdocs/install/doctemplates/websites/website_template-corporate.zip and b/htdocs/install/doctemplates/websites/website_template-corporate.zip differ diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5396149f72e..8d6e8e39b04 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -305,7 +305,7 @@ ModuleFamilyTechnic=Multi-modules tools ModuleFamilyExperimental=Experimental modules ModuleFamilyFinancial=Financial Modules (Accounting/Treasury) ModuleFamilyECM=Electronic Content Management (ECM) -ModuleFamilyPortal=Web sites and other frontal application +ModuleFamilyPortal=Websites and other frontal application ModuleFamilyInterface=Interfaces with external systems MenuHandlers=Menu handlers MenuAdmin=Menu editor @@ -1843,6 +1843,7 @@ LoadThirdPartyFromName=Load thirdparty from name (load only) LoadThirdPartyFromNameOrCreate=Load thirdparty from name (create if not found) WithDolTrackingID=Dolibarr Tracking ID found WithoutDolTrackingID=Dolibarr Tracking ID not found +FormatZip=Zip ##### Resource #### ResourceSetup=Configuration du module Resource UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list). diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 7fb03ea235c..986ac02a7e9 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -33,6 +33,7 @@ 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 sales +PointOfSaleShort=POS CloseBill=Close Bill Floors=Floors Floor=Floor diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index bd535ae150e..b3ea678aea0 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -848,9 +848,9 @@ ModuleBuilder=Module Builder SetMultiCurrencyCode=Set currency BulkActions=Bulk actions ClickToShowHelp=Click to show tooltip help -WebSite=Web site -WebSites=Web sites -WebSiteAccounts=Web site accounts +WebSite=Website +WebSites=Websites +WebSiteAccounts=Website accounts ExpenseReport=Expense report ExpenseReports=Expense reports HR=HR diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 55ca8ceaf3d..d96f2bfb1cb 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -13,7 +13,7 @@ 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=Web site .htaccess file +WEBSITE_HTACCESS=Website .htaccess file 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. @@ -54,7 +54,7 @@ YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" bu 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.

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">
ClonePage=Clone page/container CloneSite=Clone site -SiteAdded=Web site added +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. @@ -68,8 +68,8 @@ ImportSite=Import website template IDOfPage=Id of page Banner=Banner BlogPost=Blog post -WebsiteAccount=Web site account -WebsiteAccounts=Web site accounts +WebsiteAccount=Website account +WebsiteAccounts=Website accounts AddWebsiteAccount=Create web site account BackToListOfThirdParty=Back to list for Third Party DisableSiteFirst=Disable website first @@ -78,7 +78,7 @@ AnotherContainer=Another container 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 / thirdparty YouMustDefineTheHomePage=You must first define the default Home page -OnlyEditionOfSourceForGrabbedContentFuture=Warning: Creating a web page by importing an external web page is reserved to experienced user. Depending on the complexity of source page, the result of importation may differs once imported from original. Also if the source page use common CSS style or not compatible javascript, it may break the look or features of the Web site editor when working on this page. This method is faster way to have a page but it is recommanded to create your new page from scratch or from a suggested page template.
Note also that only edition of HTML source will be possible when a page content has been initialized by grabbing it from an external page ("Online" editor will NOT be available) +OnlyEditionOfSourceForGrabbedContentFuture=Warning: Creating a web page by importing an external web page is reserved to experienced user. Depending on the complexity of source page, the result of importation may differs once imported from original. Also if the source page use common CSS style or not compatible javascript, it may break the look or features of the Website editor when working on this page. This method is faster way to have a page but it is recommanded to create your new page from scratch or from a suggested page template.
Note also that only edition of HTML source will be possible when a page content has been initialized by grabbing it from an external page ("Online" editor will NOT be available) 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 diff --git a/htdocs/langs/es_ES/accountancy.lang b/htdocs/langs/es_ES/accountancy.lang index f1974e50b4a..e66bcace056 100644 --- a/htdocs/langs/es_ES/accountancy.lang +++ b/htdocs/langs/es_ES/accountancy.lang @@ -104,7 +104,7 @@ WriteBookKeeping=Registrar movimientos en el Libro Mayor Bookkeeping=Libro Mayor AccountBalance=Saldo de la cuenta ObjectsRef=Referencia de objeto origen -CAHTF=Total purchase supplier before tax +CAHTF=Total compras a proveedor antes de impuestos TotalExpenseReport=Total informe de gastos InvoiceLines=Líneas de facturas a contabilizar InvoiceLinesDone=Líneas de facturas contabilizadas diff --git a/htdocs/langs/es_ES/commercial.lang b/htdocs/langs/es_ES/commercial.lang index 7682a8572be..94a6697ec05 100644 --- a/htdocs/langs/es_ES/commercial.lang +++ b/htdocs/langs/es_ES/commercial.lang @@ -60,8 +60,8 @@ ActionAC_CLO=Cierre ActionAC_EMAILING=Envío mailing masivo ActionAC_COM=Envío pedido de cliente por correo ActionAC_SHIP=Envío expedición por correo -ActionAC_SUP_ORD=Send purchase order by mail -ActionAC_SUP_INV=Send vendor invoice by mail +ActionAC_SUP_ORD=Envío pedido a proveedor por correo +ActionAC_SUP_INV=Envío de factura de proveedor por correo ActionAC_OTH=Otra ActionAC_OTH_AUTO=Eventos creados automáticamente ActionAC_MANUAL=Eventos creados manualmente diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang index cbebd3033d3..0c56501ab5a 100644 --- a/htdocs/langs/es_ES/orders.lang +++ b/htdocs/langs/es_ES/orders.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - orders OrdersArea=Área pedidos de clientes -SuppliersOrdersArea=Purchase orders area +SuppliersOrdersArea=Área pedidos a proveedores OrderCard=Ficha pedido OrderId=Id pedido Order=Pedido @@ -13,9 +13,9 @@ OrderToProcess=Pedido a procesar NewOrder=Nuevo pedido ToOrder=Realizar pedido MakeOrder=Realizar pedido -SupplierOrder=Purchase order -SuppliersOrders=Purchase orders -SuppliersOrdersRunning=Current purchase orders +SupplierOrder=Pedido a proveedor +SuppliersOrders=Pedidos a proveedores +SuppliersOrdersRunning=Pedidos a proveedores actuales CustomerOrder=Cuenta bloqueada CustomersOrders=Pedidos de clientes CustomersOrdersRunning=Pedidos de clientes en curso @@ -24,7 +24,7 @@ OrdersDeliveredToBill=Pedidos de clientes enviados a facturar OrdersToBill=Pedidos de clientes enviados OrdersInProcess=Pedidos de clientes en proceso OrdersToProcess=Pedidos de clientes a procesar -SuppliersOrdersToProcess=Purchase orders to process +SuppliersOrdersToProcess=Pedidos a proveedores a procesar StatusOrderCanceledShort=Anulado StatusOrderDraftShort=Borrador StatusOrderValidatedShort=Validado diff --git a/htdocs/langs/es_ES/suppliers.lang b/htdocs/langs/es_ES/suppliers.lang index 0cc0b1805c4..4cbcf8788eb 100644 --- a/htdocs/langs/es_ES/suppliers.lang +++ b/htdocs/langs/es_ES/suppliers.lang @@ -21,20 +21,20 @@ SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Disponibilidad -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines -ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_1=Facturas de proveedor y líneas de factura +ExportDataset_fournisseur_2=Facturas de proveedor y pagos +ExportDataset_fournisseur_3=Pedidos a proveedor y líneas de pedido ApproveThisOrder=Aprobar este pedido ConfirmApproveThisOrder=Está seguro de querer aprobar el pedido a proveedor %s? DenyingThisOrder=Denegar este pedido ConfirmDenyingThisOrder=¿Está seguro de querer denegar el pedido a proveedor %s? ConfirmCancelThisOrder=¿Está seguro de querer cancelar el pedido a proveedor %s? -AddSupplierOrder=Create Purchase Order -AddSupplierInvoice=Create vendor invoice +AddSupplierOrder=Crear pedido a proveedor +AddSupplierInvoice=Crear factura de proveedor ListOfSupplierProductForSupplier=List of products and prices for vendor %s SentToSuppliers=Sent to vendors -ListOfSupplierOrders=List of purchase orders -MenuOrdersSupplierToBill=Purchase orders to invoice +ListOfSupplierOrders=Listado de pedidos a proveedor +MenuOrdersSupplierToBill=Pedidos a proveedor a facturar NbDaysToDelivery=Tiempo de entrega en días DescNbDaysToDelivery=El mayor retraso en las entregas de productos de este pedido SupplierReputation=Vendor reputation diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 7f3f3d99ebf..852bf2a4e8d 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -868,7 +868,7 @@ if (! $variants) { print ''; if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price * $obj->reel, 'MT'), 1) . ''; else print $langs->trans("Variable"); - print '';; + print ''; $total += $obj->reel; if (price2num($object->pmp)) $totalwithpmp += $obj->reel; $totalvalue = $totalvalue + ($object->pmp * $obj->reel); diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index e291bf84f67..23a0152c19c 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -544,7 +544,7 @@ print ''.$langs->trans("Note").''; print ''; print "\n"; -$colspan = 6+(empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)?0:2);; +$colspan = 6+(empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)?0:2); if ($conf->use_javascript_ajax) { diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 5811e89aacc..ed1e0502020 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -642,7 +642,7 @@ if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_r dol_print_error_email('BADREFINPAYMENTFORM', $langs->trans("ErrorBadLinkSourceSetButBadValueForRef", $source, $ref)); // End of page llxFooter(); - $db->close();; + $db->close(); exit; } @@ -1423,7 +1423,150 @@ if ($source == 'membersubscription') print ''."\n"; } +// Payment on donation +if ($source == 'donation') +{ + $found=true; + $langs->load("don"); + require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; + + $don=new Don($db); + $result=$don->fetch($ref); + if ($result <= 0) + { + $mesg=$don->error; + $error++; + } + else + { + $don->fetch_thirdparty(); + $object = $don; + } + + if ($action != 'dopayment') // Do not change amount if we just click on first dopayment + { + $amount=$subscription->total_ttc; + if (GETPOST("amount",'int')) $amount=GETPOST("amount",'int'); + $amount=price2num($amount); + } + + $fulltag='DON='.$don->ref.'.DAT='.dol_print_date(dol_now(),'%Y%m%d%H%M'); + if (! empty($TAG)) { $tag=$TAG; $fulltag.='.TAG='.$TAG; } + $fulltag=dol_string_unaccent($fulltag); + + // Creditor + + print ''.$langs->trans("Creditor"); + print ''.$creditor.''; + print ''; + print ''."\n"; + + // Debitor + + print ''.$langs->trans("Member"); + print ''; + if ($don->morphy == 'mor' && ! empty($don->societe)) print $don->societe; + else print $don->getFullName($langs); + print ''; + + // Object + + $text=''.$langs->trans("PaymentDonation").''; + if (GETPOST('desc','alpha')) $text=''.$langs->trans(GETPOST('desc','alpha')).''; + print ''.$langs->trans("Designation"); + print ''.$text; + print ''; + print ''; + print ''."\n"; + + // Amount + + print ''.$langs->trans("Amount"); + if (empty($amount)) + { + if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) print ' ('.$langs->trans("ToComplete"); + if (! empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) print ' - '.$langs->trans("SeeHere").''; + if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) print ')'; + } + print ''; + $valtoshow=''; + if (empty($amount) || ! is_numeric($amount)) + { + $valtoshow=price2num(GETPOST("newamount",'alpha'),'MT'); + // force default subscription amount to value defined into constant... + if (empty($valtoshow)) + { + if (! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { + if (! empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { + $valtoshow = $conf->global->MEMBER_NEWFORM_AMOUNT; + } + } + else { + if (! empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { + $amount = $conf->global->MEMBER_NEWFORM_AMOUNT; + } + } + } + } + if (empty($amount) || ! is_numeric($amount)) + { + //$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT'); + if (! empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow=max($conf->global->MEMBER_MIN_AMOUNT,$valtoshow); + print ''; + print ''; + } + else { + $valtoshow=$amount; + if (! empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow=max($conf->global->MEMBER_MIN_AMOUNT,$valtoshow); + print ''.price($valtoshow).''; + print ''; + print ''; + } + // Currency + print ' '.$langs->trans("Currency".$currency).''; + print ''; + print ''."\n"; + + // Tag + + print ''.$langs->trans("PaymentCode"); + print ''.$fulltag.''; + print ''; + print ''; + print ''."\n"; + + // Shipping address + $shipToName=$don->getFullName($langs); + $shipToStreet=$don->address; + $shipToCity=$don->town; + $shipToState=$don->state_code; + $shipToCountryCode=$don->country_code; + $shipToZip=$don->zip; + $shipToStreet2=''; + $phoneNum=$don->phone; + if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) + { + print ''; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + } + else + { + print ''."\n"; + } + if (is_object($don->thirdparty)) print ''."\n"; + print ''."\n"; + $labeldesc = $langs->trans("PaymentSubscription"); + if (GETPOST('desc','alpha')) $labeldesc=GETPOST('desc','alpha'); + print ''."\n"; +} if (! $found && ! $mesg) $mesg=$langs->trans("ErrorBadParameters"); diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 1222689358f..0c125ae3b4c 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -57,7 +57,7 @@ else $vatNumber = preg_replace('/\^\w/', '', $vatNumber); $countryCode=substr($vatNumber,0,2); $vatNumber=substr($vatNumber,2); - + print ''.$langs->trans("Country").': '.$countryCode.'
'; print ''.$langs->trans("VATIntraShort").': '.$vatNumber.'
'; print '
'; @@ -176,4 +176,4 @@ if ($messagetoshow) // End of page llxFooter(); -$db->close();; +$db->close(); diff --git a/htdocs/stripe/class/actions_stripe.class.php b/htdocs/stripe/class/actions_stripe.class.php index 3ecb02a6300..69dc4e33307 100644 --- a/htdocs/stripe/class/actions_stripe.class.php +++ b/htdocs/stripe/class/actions_stripe.class.php @@ -25,7 +25,7 @@ * \ingroup stripe * \brief File Class actionsstripeconnect */ -require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';; +require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; $langs->load("stripe@stripe"); @@ -44,8 +44,8 @@ class ActionsStripeconnect private $config=array(); // For Hookmanager return - var $resprints; - var $results=array(); + public $resprints; + public $results=array(); /** diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index c71f7f861a3..f7f79b03414 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -237,7 +237,7 @@ function Print(id){ function TakeposPrinting(id){ var receipt; $.get("receipt.php?facid="+id, function(data, status){ - receipt=data.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '');; + receipt=data.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, ''); $.ajax({ type: "POST", url: 'http://global->TAKEPOS_PRINT_SERVER;?>:8111/print', diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 487d4125284..4afac8ac2cc 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -47,7 +47,7 @@ $colorbacklineimpair1='255,255,255'; // line impair $colorbacklineimpair2='255,255,255'; // line impair $colorbacklinepair1='250,250,250'; // line pair $colorbacklinepair2='250,250,250'; // line pair -$colorbacklinepairhover='238,246,252'; // line pair +$colorbacklinepairhover='230,237,244'; // line hover $colorbacklinebreak='214,218,220'; // line break $colorbackbody='255,255,255'; $colortexttitlenotab='100,60,20'; @@ -144,12 +144,12 @@ $fontsize =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty( $fontsizesmaller =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_FONT_SIZE2) ?$fontsize:$conf->global->THEME_ELDY_FONT_SIZE2) :(empty($user->conf->THEME_ELDY_FONT_SIZE2)?$fontsize:$user->conf->THEME_ELDY_FONT_SIZE2); // Hover color -$colorbacklinepairhover=((! isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '0')?'':($conf->global->THEME_ELDY_USE_HOVER === '1'?'edf4fb':$conf->global->THEME_ELDY_USE_HOVER)); -$colorbacklinepairchecked=((! isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '0')?'':($conf->global->THEME_ELDY_USE_CHECKED === '1'?'edf4fb':$conf->global->THEME_ELDY_USE_CHECKED)); +$colorbacklinepairhover=((! isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '0')?'':($conf->global->THEME_ELDY_USE_HOVER === '1'?'e6edf0':$conf->global->THEME_ELDY_USE_HOVER)); +$colorbacklinepairchecked=((! isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '0')?'':($conf->global->THEME_ELDY_USE_CHECKED === '1'?'e6edf0':$conf->global->THEME_ELDY_USE_CHECKED)); if (! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) { - $colorbacklinepairhover=((! isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '0')?'':($user->conf->THEME_ELDY_USE_HOVER === '1'?'edf4fb':$user->conf->THEME_ELDY_USE_HOVER)); - $colorbacklinepairchecked=((! isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '0')?'':($user->conf->THEME_ELDY_USE_CHECKED === '1'?'edf4fb':$user->conf->THEME_ELDY_USE_CHECKED)); + $colorbacklinepairhover=((! isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '0')?'':($user->conf->THEME_ELDY_USE_HOVER === '1'?'e6edf0':$user->conf->THEME_ELDY_USE_HOVER)); + $colorbacklinepairchecked=((! isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '0')?'':($user->conf->THEME_ELDY_USE_CHECKED === '1'?'e6edf0':$user->conf->THEME_ELDY_USE_CHECKED)); } //$colortopbordertitle1=$colorbackhmenu1; @@ -2306,7 +2306,6 @@ div.tabs { padding-right: 6px !important; clear:both; height:100%; - /* background-image: linear-gradient(to top,#f6f6f6 0,#fff 8px); */ } div.tabsElem { margin-top: 1px; @@ -2464,7 +2463,7 @@ span.butAction, span.butActionDelete { } .butAction { - background: rgb(230, 236, 230) + background: rgb(225, 231, 225) /* background: rgb(230, 232, 239); */ } .butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { @@ -2522,7 +2521,7 @@ a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-ci } .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete { - background: rgb(239, 232, 230); + background: rgb(234, 228, 225); /* border: 1px solid #633; */ color: #633; } @@ -3410,7 +3409,7 @@ table.noborder.boxtable tr td { border-bottom-width: 0 !important; } .boxtable .fichehalfright, .boxtable .fichehalfleft { - min-width: 300px; + min-width: 275px; /* increasing this, make chart on box not side by side on laptops */ } .tdboxstats { text-align: center; @@ -3885,7 +3884,7 @@ tr.visible { } .websitebar { border-bottom: 1px solid #ccc; - background: #eee; + background: #e6e6e6; display: inline-block; } .websitebar .buttonDelete, .websitebar .button { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 72edb17b719..3422135628c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -48,7 +48,7 @@ $colorbacklineimpair1='255,255,255'; // line impair $colorbacklineimpair2='255,255,255'; // line impair $colorbacklinepair1='248,248,248'; // line pair $colorbacklinepair2='246,246,246'; // line pair -$colorbacklinepairhover='244,244,244'; // line pair +$colorbacklinepairhover='230,237,244'; // line pair $colorbacklinebreak='214,218,220'; $colorbackbody='248,248,248'; $colortexttitlenotab='90,90,90'; @@ -3323,7 +3323,7 @@ span.dashboardlineko { /* border-bottom-width: 0 !important; */ } .boxtable .fichehalfright, .boxtable .fichehalfleft { - min-width: 300px; + min-width: 275px; } .tdboxstats { text-align: center; @@ -4705,7 +4705,7 @@ a span.select2-chosen /* Special case for the select2 add widget */ #addbox .select2-container .select2-choice > .select2-chosen, #actionbookmark .select2-container .select2-choice > .select2-chosen { - text-align: ;; + text-align: ; opacity: 0.3; } .select2-container--default .select2-selection--single .select2-selection__placeholder { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index f51fb404579..6c0ff6e4915 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2283,7 +2283,7 @@ class User extends CommonObject $label.= '
'.$langs->trans("Browser").': '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')'; $label.= '
'.$langs->trans("Layout").': '.$conf->browser->layout; $label.= '
'.$langs->trans("Screen").': '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; - if ($conf->browser->layout == 'phone') $label.= '
'.$langs->trans("Phone").': '.$langs->trans("Yes");; + if ($conf->browser->layout == 'phone') $label.= '
'.$langs->trans("Phone").': '.$langs->trans("Yes"); if (! empty($_SESSION["disablemodules"])) $label.= '
'.$langs->trans("DisabledModules").':
'.join(', ',explode(',',$_SESSION["disablemodules"])); } if ($infologin < 0) $label=''; diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index 1f04e5edb87..374341c51f6 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -300,4 +300,4 @@ if ($action == 'edit') { ?> // End of page llxFooter(); -$db->close();; +$db->close(); diff --git a/htdocs/website/index.php b/htdocs/website/index.php index ff7137c22a4..7ee5e2d8f6d 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -348,20 +348,30 @@ if ($action == 'addcontainer') { include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; - // Clean url to grab, so url can be - // http://www.example.com/ or http://www.example.com/dir1/ or http://www.example.com/dir1/aaa - $urltograbwithoutdomainandparam = preg_replace('/^https?:\/\/[^\/]+\/?/i', '', $urltograb); - $urltograbwithoutdomainandparam = preg_replace('/\?.*$/', '', $urltograbwithoutdomainandparam); - if (empty($urltograbwithoutdomainandparam) && ! preg_match('/\/$/', $urltograb)) + if (! preg_match('/^http/', $urltograb)) { - $urltograb.='/'; + $error++; + setEventMessages('Error URL must start with http:// or https://', null, 'errors'); + $action = 'createcontainer'; } - $pageurl = dol_sanitizeFileName(preg_replace('/[\/\.]/','-', preg_replace('/\/+$/', '', $urltograbwithoutdomainandparam))); - $urltograbdirwithoutslash = dirname($urltograb.'.'); - $urltograbdirrootwithoutslash = getRootURLFromURL($urltograbdirwithoutslash); - // Exemple, now $urltograbdirwithoutslash is https://www.dolimed.com/screenshots - // and $urltograbdirrootwithoutslash is https://www.dolimed.com + if (! $error) + { + // Clean url to grab, so url can be + // http://www.example.com/ or http://www.example.com/dir1/ or http://www.example.com/dir1/aaa + $urltograbwithoutdomainandparam = preg_replace('/^https?:\/\/[^\/]+\/?/i', '', $urltograb); + $urltograbwithoutdomainandparam = preg_replace('/\?.*$/', '', $urltograbwithoutdomainandparam); + if (empty($urltograbwithoutdomainandparam) && ! preg_match('/\/$/', $urltograb)) + { + $urltograb.='/'; + } + $pageurl = dol_sanitizeFileName(preg_replace('/[\/\.]/','-', preg_replace('/\/+$/', '', $urltograbwithoutdomainandparam))); + + $urltograbdirwithoutslash = dirname($urltograb.'.'); + $urltograbdirrootwithoutslash = getRootURLFromURL($urltograbdirwithoutslash); + // Exemple, now $urltograbdirwithoutslash is https://www.dolimed.com/screenshots + // and $urltograbdirrootwithoutslash is https://www.dolimed.com + } // Check pageurl is not already used if ($pageurl) @@ -465,6 +475,7 @@ if ($action == 'addcontainer') $tmp = $objectpage->htmlheader; preg_match_all('/]+)src=["\']([^"\'>]+)["\']([^>]*)><\/script>/i', $objectpage->htmlheader, $regs); + $errorforsubresource = 0; foreach ($regs[0] as $key => $val) { dol_syslog("We will grab the resource found into script tag ".$regs[2][$key]); @@ -500,13 +511,15 @@ if ($action == 'addcontainer') if ($tmpgeturl['curl_error_no']) { $error++; - setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors'); + setEventMessages('Error getting script url '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors'); + $errorforsubresource++; $action='createcontainer'; } elseif ($tmpgeturl['http_code'] != '200') { $error++; - setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['http_code'], null, 'errors'); + setEventMessages('Error getting script url '.$urltograbbis.': '.$tmpgeturl['http_code'], null, 'errors'); + $errorforsubresource++; $action='createcontainer'; } else @@ -531,9 +544,10 @@ if ($action == 'addcontainer') $pagecsscontent = "\n".'