@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function getExample() |
| 78 | 78 | { |
| 79 | - return $this->prefix.'0-0501-0001'; // TC0-0501-0001 |
|
| 79 | + return $this->prefix.'0-0501-0001'; // TC0-0501-0001 |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -92,10 +92,10 @@ discard block |
||
| 92 | 92 | $pryymm = ''; |
| 93 | 93 | $max = ''; |
| 94 | 94 | |
| 95 | - $pos_source = 0; // POS source = Terminal ID |
|
| 95 | + $pos_source = 0; // POS source = Terminal ID |
|
| 96 | 96 | |
| 97 | 97 | // First, we get the max value |
| 98 | - $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM- |
|
| 98 | + $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM- |
|
| 99 | 99 | |
| 100 | 100 | $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; |
| 101 | 101 | $sql .= " FROM ".MAIN_DB_PREFIX."facture"; |
@@ -135,10 +135,10 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | global $db; |
| 137 | 137 | |
| 138 | - $pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID |
|
| 138 | + $pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID |
|
| 139 | 139 | |
| 140 | 140 | // First, we get the max value |
| 141 | - $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM- |
|
| 141 | + $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM- |
|
| 142 | 142 | $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL |
| 143 | 143 | $sql .= " FROM ".MAIN_DB_PREFIX."facture"; |
| 144 | 144 | $sql .= " WHERE ref LIKE '".$db->escape($this->prefix.$pos_source."-____-%")."'"; |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | } else { |
| 81 | 81 | dol_print_error($db); |
| 82 | 82 | } |
| 83 | - dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 83 | + dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 84 | 84 | } |
| 85 | 85 | $head[$tab][0] = DOL_URL_ROOT.'/contact/project.php?id='.$object->id; |
| 86 | 86 | $head[$tab][1] = $langs->trans("Projects"); |
@@ -235,7 +235,7 @@ |
||
| 235 | 235 | $this->dateh = $this->db->jdate($obj->dateh); |
| 236 | 236 | $this->datef = $this->db->jdate($obj->datef); |
| 237 | 237 | $this->amount = $obj->subscription; |
| 238 | - $this->note = $obj->note_public; // deprecated |
|
| 238 | + $this->note = $obj->note_public; // deprecated |
|
| 239 | 239 | $this->note_public = $obj->note_public; |
| 240 | 240 | $this->fk_bank = $obj->fk_bank; |
| 241 | 241 | return 1; |
@@ -421,7 +421,7 @@ |
||
| 421 | 421 | $allowupgrade = true; |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | - $dir = DOL_DOCUMENT_ROOT."/install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
| 424 | + $dir = DOL_DOCUMENT_ROOT."/install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
| 425 | 425 | dolibarr_install_syslog("Scan sql files for migration files in ".$dir); |
| 426 | 426 | |
| 427 | 427 | // Get files list of migration file x.y.z-a.b.c.sql into /install/mysql/migration |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | $action = GETPOST('action', 'aZ09'); |
| 43 | 43 | $value = GETPOST('value', 'alpha'); |
| 44 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 44 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | /* |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | // Object card |
| 93 | 93 | // ------------------------------------------------------------ |
| 94 | - $linkback = '<a href="' . DOL_URL_ROOT . '/asset/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
| 94 | + $linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
| 95 | 95 | |
| 96 | 96 | $morehtmlref = '<div class="refidno">'; |
| 97 | 97 | $morehtmlref .= '</div>'; |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | |
| 107 | 107 | $cssclass = "titlefield"; |
| 108 | - include DOL_DOCUMENT_ROOT . '/core/tpl/notes.tpl.php'; |
|
| 108 | + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; |
|
| 109 | 109 | |
| 110 | 110 | print '</div>'; |
| 111 | 111 | |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | |
| 92 | 92 | // Object card |
| 93 | 93 | // ------------------------------------------------------------ |
| 94 | - $linkback = '<a href="' . DOL_URL_ROOT . '/asset/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
| 94 | + $linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
| 95 | 95 | |
| 96 | 96 | $morehtmlref = '<div class="refidno">'; |
| 97 | 97 | $morehtmlref .= '</div>'; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | print '<div class="fichecenter">'; |
| 68 | 68 | print '<div class="fichehalfleft">'; |
| 69 | 69 | print '<div class="underbanner clearboth"></div>'; |
| 70 | - print '<table class="border centpercent tableforfield">' . "\n"; |
|
| 70 | + print '<table class="border centpercent tableforfield">'."\n"; |
|
| 71 | 71 | $mode_info['fields'] = dol_sort_array($mode_info['fields'], 'position'); |
| 72 | 72 | foreach ($mode_info['fields'] as $field_key => $field_info) { |
| 73 | 73 | if (!empty($field_info['enabled_field'])) { |
@@ -94,11 +94,11 @@ discard block |
||
| 94 | 94 | print '<table class="border centpercent tableforfield">'; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - $key = $mode_key . '_' . $field_key; |
|
| 97 | + $key = $mode_key.'_'.$field_key; |
|
| 98 | 98 | $value = $assetdepreciationoptions->deprecation_options[$mode_key][$field_key]; |
| 99 | 99 | |
| 100 | - print '<tr class="field_' . $key . '"><td'; |
|
| 101 | - print ' class="' . (empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']) . ' fieldname_' . $key; |
|
| 100 | + print '<tr class="field_'.$key.'"><td'; |
|
| 101 | + print ' class="'.(empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']).' fieldname_'.$key; |
|
| 102 | 102 | if ($field_info['type'] == 'text' || $field_info['type'] == 'html') { |
| 103 | 103 | print ' tdtop'; |
| 104 | 104 | } |
@@ -113,12 +113,12 @@ discard block |
||
| 113 | 113 | } |
| 114 | 114 | } |
| 115 | 115 | print '</td>'; |
| 116 | - print '<td class="valuefield fieldname_' . $key; |
|
| 116 | + print '<td class="valuefield fieldname_'.$key; |
|
| 117 | 117 | if ($field_info['type'] == 'text') { |
| 118 | 118 | print ' wordbreak'; |
| 119 | 119 | } |
| 120 | 120 | if (!empty($field_info['cssview'])) { |
| 121 | - print ' ' . $field_info['cssview']; |
|
| 121 | + print ' '.$field_info['cssview']; |
|
| 122 | 122 | } |
| 123 | 123 | print '">'; |
| 124 | 124 | if (in_array($field_info['type'], array('text', 'html'))) { |
@@ -126,15 +126,15 @@ discard block |
||
| 126 | 126 | } |
| 127 | 127 | if ($field_key == 'lang') { |
| 128 | 128 | $langs->load("languages"); |
| 129 | - $labellang = ($value ? $langs->trans('Language_' . $value) : ''); |
|
| 129 | + $labellang = ($value ? $langs->trans('Language_'.$value) : ''); |
|
| 130 | 130 | print picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"'); |
| 131 | 131 | print $labellang; |
| 132 | 132 | } else { |
| 133 | 133 | if (isset($field_info['copytoclipboard']) && $field_info['copytoclipboard'] == 2) { |
| 134 | - $out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0); |
|
| 134 | + $out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0); |
|
| 135 | 135 | print showValueWithClipboardCPButton($out, 0, $out); |
| 136 | 136 | } else { |
| 137 | - print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0); |
|
| 137 | + print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0); |
|
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | if (in_array($field_info['type'], array('text', 'html'))) { |
@@ -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 | } |