@@ -81,9 +81,9 @@ |
||
| 81 | 81 | require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
| 82 | 82 | require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; |
| 83 | 83 | require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
| 84 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; |
|
| 85 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; |
|
| 86 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; |
|
| 84 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/position.class.php'; |
|
| 85 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_position.lib.php'; |
|
| 86 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |
|
| 87 | 87 | |
| 88 | 88 | // Load translation files required by the page |
| 89 | 89 | $langs->loadLangs(array("hrm", "companies", "other", "mails")); |
@@ -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 | |
@@ -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 { |
@@ -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 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | |
| 140 | 140 | // If we have a hash public (hashp), we guess the original_file. |
| 141 | -$ecmfile=''; |
|
| 141 | +$ecmfile = ''; |
|
| 142 | 142 | if (!empty($hashp)) { |
| 143 | 143 | include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; |
| 144 | 144 | $ecmfile = new EcmFiles($db); |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | // Security: Delete string ../ or ..\ into $original_file |
| 199 | -$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
| 199 | +$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
| 200 | 200 | $original_file = str_replace('../', '/', $original_file); |
| 201 | 201 | $original_file = str_replace('..\\', '/', $original_file); |
| 202 | 202 | |
@@ -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 |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $result = $db->query($sql); |
| 79 | 79 | if ($result) { |
| 80 | 80 | $nbline = $db->num_rows($result); |
| 81 | - for ($i=0; $i < $nbline; $i++) { |
|
| 81 | + for ($i = 0; $i < $nbline; $i++) { |
|
| 82 | 82 | $object = $db->fetch_object($result); |
| 83 | 83 | if (($mode == "barcode" && $barcode == $object->barcode) || ($mode == "lotserial" && $barcode == $object->batch)) { |
| 84 | 84 | $warehouse->fetch(0, $product["Warehouse"]); |
@@ -88,22 +88,22 @@ discard block |
||
| 88 | 88 | $fk_product = $object->fk_product; |
| 89 | 89 | $reelqty = $object->reel; |
| 90 | 90 | |
| 91 | - $objectreturn = array('fk_warehouse'=>$warehouseid,'fk_product'=>$fk_product,'reelqty'=>$reelqty); |
|
| 91 | + $objectreturn = array('fk_warehouse'=>$warehouseid, 'fk_product'=>$fk_product, 'reelqty'=>$reelqty); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | if ($warehousefound < 1) { |
| 96 | - $response = array('status'=>'error','errorcode'=>'NotFound','message'=>'No warehouse found for barcode'.$barcode); |
|
| 96 | + $response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>'No warehouse found for barcode'.$barcode); |
|
| 97 | 97 | } elseif ($warehousefound > 1) { |
| 98 | - $response = array('status'=>'error','errorcode'=>'TooManyWarehouse','message'=>'Too many warehouse found'); |
|
| 98 | + $response = array('status'=>'error', 'errorcode'=>'TooManyWarehouse', 'message'=>'Too many warehouse found'); |
|
| 99 | 99 | } else { |
| 100 | - $response = array('status'=>'success','message'=>'Warehouse found','object'=>$objectreturn); |
|
| 100 | + $response = array('status'=>'success', 'message'=>'Warehouse found', 'object'=>$objectreturn); |
|
| 101 | 101 | } |
| 102 | 102 | } else { |
| 103 | - $response = array('status'=>'error','errorcode'=>'NotFound','message'=>"No results found for barcode"); |
|
| 103 | + $response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>"No results found for barcode"); |
|
| 104 | 104 | } |
| 105 | 105 | } else { |
| 106 | - $response = array('status'=>'error','errorcode'=>'ActionError','message'=>"Error on action"); |
|
| 106 | + $response = array('status'=>'error', 'errorcode'=>'ActionError', 'message'=>"Error on action"); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | if ($action == "addnewlineproduct") { |
@@ -122,12 +122,12 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | $result = $inventoryline->create($user); |
| 124 | 124 | if ($result > 0) { |
| 125 | - $response = array('status'=>'success','message'=>'Success on creating line','id_line'=>$result); |
|
| 125 | + $response = array('status'=>'success', 'message'=>'Success on creating line', 'id_line'=>$result); |
|
| 126 | 126 | } else { |
| 127 | - $response = array('status'=>'error','errorcode'=>'ErrorCreation','message'=>"Error on line creation"); |
|
| 127 | + $response = array('status'=>'error', 'errorcode'=>'ErrorCreation', 'message'=>"Error on line creation"); |
|
| 128 | 128 | } |
| 129 | 129 | } else { |
| 130 | - $response = array('status'=>'error','errorcode'=>'NoIdForInventory','message'=>"No id for inventory"); |
|
| 130 | + $response = array('status'=>'error', 'errorcode'=>'NoIdForInventory', 'message'=>"No id for inventory"); |
|
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | |