@@ -91,8 +91,8 @@ |
||
| 91 | 91 | $label_default = getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT'); |
| 92 | 92 | $qty_default = 1; |
| 93 | 93 | |
| 94 | - print '<input type="text" id="label" name="label" class="takepospay" value="' . $label_default . '" style="width:40%;" placeholder="' . $langs->trans('Label') . '">'; |
|
| 95 | - print '<input type="text" id="qty" name="qty" class="takepospay" value="' . $qty_default . '" style="width:10%;" placeholder="' . $langs->trans('Qty') . '">'; |
|
| 94 | + print '<input type="text" id="label" name="label" class="takepospay" value="'.$label_default.'" style="width:40%;" placeholder="'.$langs->trans('Label').'">'; |
|
| 95 | + print '<input type="text" id="qty" name="qty" class="takepospay" value="'.$qty_default.'" style="width:10%;" placeholder="'.$langs->trans('Qty').'">'; |
|
| 96 | 96 | } |
| 97 | 97 | ?> |
| 98 | 98 | <input type="button" class="button takepospay clearboth" value="OK" onclick="Save();"> |
@@ -273,7 +273,7 @@ |
||
| 273 | 273 | print '<tr class="oddeven"><td>'; |
| 274 | 274 | print $langs->trans('PrintWithoutDetailsLabelDefault'); |
| 275 | 275 | print '<td colspan="2">'; |
| 276 | - print '<input type="text" name="TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT" value="' . getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT') . '" />'; |
|
| 276 | + print '<input type="text" name="TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT" value="'.getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT').'" />'; |
|
| 277 | 277 | print "</td></tr>\n"; |
| 278 | 278 | } |
| 279 | 279 | |
@@ -195,7 +195,7 @@ |
||
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | // Security: Delete string ../ or ..\ into $original_file |
| 198 | -$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
| 198 | +$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
| 199 | 199 | $original_file = str_replace('../', '/', $original_file); |
| 200 | 200 | $original_file = str_replace('..\\', '/', $original_file); |
| 201 | 201 | |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | |
| 75 | 75 | // update of object |
| 76 | 76 | if ($forcelangprod == $current_lang) { |
| 77 | - $object->label = GETPOST("libelle", 'alphanohtml'); |
|
| 77 | + $object->label = GETPOST("libelle", 'alphanohtml'); |
|
| 78 | 78 | $object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml')); |
| 79 | 79 | //$object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); |
| 80 | 80 | } else { |
@@ -682,7 +682,7 @@ |
||
| 682 | 682 | { |
| 683 | 683 | $base = new DateTime("$year-03-21", new DateTimeZone("UTC")); |
| 684 | 684 | $days = easter_days($year); // Return number of days between 21 march and easter day. |
| 685 | - $tmp = $base->add(new DateInterval("P{$days}D")); |
|
| 685 | + $tmp = $base->add(new DateInterval("p{$days}d")); |
|
| 686 | 686 | return $tmp->getTimestamp(); |
| 687 | 687 | } |
| 688 | 688 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | $newtimeyear = (int) dol_print_date($newtime, '%Y'); |
| 188 | 188 | $newtimemonth = (int) dol_print_date($newtime, '%m'); |
| 189 | - $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth); |
|
| 189 | + $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth); |
|
| 190 | 190 | |
| 191 | 191 | if ($monthsexpected < $newtimetotalmonths) { |
| 192 | 192 | $newtimehours = (int) dol_print_date($newtime, '%H'); |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | $sql = "SELECT id, code, entity, fk_country, dayrule, year, month, day, active"; |
| 802 | 802 | $sql .= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday"; |
| 803 | 803 | $sql .= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")"; |
| 804 | - $sql .= " AND entity IN (0," .getEntity('holiday') .")"; |
|
| 804 | + $sql .= " AND entity IN (0,".getEntity('holiday').")"; |
|
| 805 | 805 | |
| 806 | 806 | $resql = $db->query($sql); |
| 807 | 807 | if ($resql) { |
@@ -1056,13 +1056,13 @@ discard block |
||
| 1056 | 1056 | |
| 1057 | 1057 | $country_id = dol_getIdFromCode($db, $country_code, 'c_country', 'code', 'rowid'); |
| 1058 | 1058 | |
| 1059 | - if (empty($conf->cache['arrayOfActivePublicHolidays_' . $country_id])) { |
|
| 1059 | + if (empty($conf->cache['arrayOfActivePublicHolidays_'.$country_id])) { |
|
| 1060 | 1060 | // Loop on public holiday defined into hrm_public_holiday for the day, month and year analyzed |
| 1061 | 1061 | $tmpArrayOfPublicHolidays = array(); |
| 1062 | 1062 | $sql = "SELECT id, code, entity, fk_country, dayrule, year, month, day, active"; |
| 1063 | - $sql .= " FROM " . MAIN_DB_PREFIX . "c_hrm_public_holiday"; |
|
| 1064 | - $sql .= " WHERE active = 1 and fk_country IN (0" . ($country_id > 0 ? ", " . $country_id : 0) . ")"; |
|
| 1065 | - $sql .= " AND entity IN (0," . getEntity('holiday') . ")"; |
|
| 1063 | + $sql .= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday"; |
|
| 1064 | + $sql .= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")"; |
|
| 1065 | + $sql .= " AND entity IN (0,".getEntity('holiday').")"; |
|
| 1066 | 1066 | |
| 1067 | 1067 | $resql = $db->query($sql); |
| 1068 | 1068 | if ($resql) { |
@@ -1075,14 +1075,14 @@ discard block |
||
| 1075 | 1075 | } |
| 1076 | 1076 | } else { |
| 1077 | 1077 | dol_syslog($db->lasterror(), LOG_ERR); |
| 1078 | - return 'Error sql ' . $db->lasterror(); |
|
| 1078 | + return 'Error sql '.$db->lasterror(); |
|
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 1081 | 1081 | //var_dump($tmpArrayOfPublicHolidays); |
| 1082 | - $conf->cache['arrayOfActivePublicHolidays_' . $country_id] = $tmpArrayOfPublicHolidays; |
|
| 1082 | + $conf->cache['arrayOfActivePublicHolidays_'.$country_id] = $tmpArrayOfPublicHolidays; |
|
| 1083 | 1083 | } |
| 1084 | 1084 | |
| 1085 | - $arrayOfPublicHolidays = $conf->cache['arrayOfActivePublicHolidays_' . $country_id]; |
|
| 1085 | + $arrayOfPublicHolidays = $conf->cache['arrayOfActivePublicHolidays_'.$country_id]; |
|
| 1086 | 1086 | $listFeries = []; |
| 1087 | 1087 | $i = 0; |
| 1088 | 1088 | while ((($lastday == 0 && $timestampStart < $timestampEnd) || ($lastday && $timestampStart <= $timestampEnd)) |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | case 'sellist': |
| 49 | 49 | $tmp = ''; |
| 50 | 50 | $tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null |
| 51 | - if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
| 51 | + if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
| 52 | 52 | $tmpkeys = array_keys($tmpparam['options']); |
| 53 | 53 | $tmp = array_shift($tmpkeys); |
| 54 | 54 | } |
@@ -124,8 +124,8 @@ |
||
| 124 | 124 | $htmlname = 'activesynchro'; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - $dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP") . (($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : ""); |
|
| 128 | - $ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr") . (($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : ""); |
|
| 127 | + $dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP").(($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : ""); |
|
| 128 | + $ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr").(($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : ""); |
|
| 129 | 129 | |
| 130 | 130 | $arraylist = array( |
| 131 | 131 | Ldap::SYNCHRO_NONE => $langs->trans("No"), |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | $this->rights[$r][0] = 130; |
| 202 | 202 | $this->rights[$r][1] = 'Modify thirdparty information payment'; |
| 203 | 203 | $this->rights[$r][3] = 0; |
| 204 | - $this->rights[$r][4] = 'thirdparty_paymentinformation_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on |
|
| 204 | + $this->rights[$r][4] = 'thirdparty_paymentinformation_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on |
|
| 205 | 205 | $this->rights[$r][5] = 'write'; |
| 206 | 206 | |
| 207 | 207 | // 262 : Restrict access to sales representative |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | $title = $langs->trans("Bookmarks"); |
| 59 | 59 | |
| 60 | 60 | // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests |
| 61 | -$head = '<!-- Bookmarks -->'."\n"; // This is used by DoliDroid to know page is a bookmark selection page |
|
| 61 | +$head = '<!-- Bookmarks -->'."\n"; // This is used by DoliDroid to know page is a bookmark selection page |
|
| 62 | 62 | $arrayofjs = array(); |
| 63 | 63 | $arrayofcss = array(); |
| 64 | 64 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |