@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | // Load Dolibarr environment |
39 | 39 | require '../../main.inc.php'; |
40 | -require DOL_DOCUMENT_ROOT . '/variants/class/ProductAttribute.class.php'; |
|
40 | +require DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; |
|
41 | 41 | |
42 | 42 | // Security check |
43 | 43 | if (!isModEnabled('variants')) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | if (GETPOST('roworder', 'alpha', 3)) { |
62 | 62 | $roworder = GETPOST('roworder', 'alpha', 3); |
63 | 63 | |
64 | - dol_syslog("AjaxOrderAttribute roworder=" . $roworder, LOG_DEBUG); |
|
64 | + dol_syslog("AjaxOrderAttribute roworder=".$roworder, LOG_DEBUG); |
|
65 | 65 | |
66 | 66 | $rowordertab = explode(',', $roworder); |
67 | 67 | $newrowordertab = array(); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $idc = GETPOST('c', 'int'); |
41 | 41 | $ids = GETPOST('s', 'int'); |
42 | 42 | $ida = GETPOST('a', 'int'); |
43 | -$action = GETPOST('action', 'aZ09'); // 1 or 2 |
|
43 | +$action = GETPOST('action', 'aZ09'); // 1 or 2 |
|
44 | 44 | $l = GETPOST('l', 'alpha'); |
45 | 45 | $securitykey = GETPOST('key', 'alpha'); |
46 | 46 |
@@ -133,16 +133,16 @@ |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | $coldisplay++; |
136 | - print '<td class="nobottom linecolqtyfrozen right"><input type="checkbox" name="qty_frozen" id="qty_frozen" class="flat right" value="1"' . (GETPOSTISSET("qty_frozen") ? (GETPOST('qty_frozen', 'int') ? ' checked="checked"' : '') : ($line->qty_frozen ? ' checked="checked"' : '')) . '>'; |
|
136 | + print '<td class="nobottom linecolqtyfrozen right"><input type="checkbox" name="qty_frozen" id="qty_frozen" class="flat right" value="1"'.(GETPOSTISSET("qty_frozen") ? (GETPOST('qty_frozen', 'int') ? ' checked="checked"' : '') : ($line->qty_frozen ? ' checked="checked"' : '')).'>'; |
|
137 | 137 | print '</td>'; |
138 | 138 | |
139 | 139 | $coldisplay++; |
140 | - print '<td class="nobottom linecoldisablestockchange right"><input type="checkbox" name="disable_stock_change" id="disable_stock_change" class="flat right" value="1"' . (GETPOSTISSET('disablestockchange') ? (GETPOST("disable_stock_change", 'int') ? ' checked="checked"' : '') : ($line->disable_stock_change ? ' checked="checked"' : '')) . '">'; |
|
140 | + print '<td class="nobottom linecoldisablestockchange right"><input type="checkbox" name="disable_stock_change" id="disable_stock_change" class="flat right" value="1"'.(GETPOSTISSET('disablestockchange') ? (GETPOST("disable_stock_change", 'int') ? ' checked="checked"' : '') : ($line->disable_stock_change ? ' checked="checked"' : '')).'">'; |
|
141 | 141 | print '</td>'; |
142 | 142 | |
143 | 143 | $coldisplay++; |
144 | 144 | print '<td class="nobottom nowrap linecollost right">'; |
145 | - print '<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="' . $line->efficiency . '"></td>'; |
|
145 | + print '<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="'.$line->efficiency.'"></td>'; |
|
146 | 146 | |
147 | 147 | $coldisplay++; |
148 | 148 | print '<td class="nobottom nowrap linecolcostprice right">'; |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | |
56 | 56 | $id = GETPOST('rowid', 'int'); |
57 | 57 | $rowid = GETPOST("rowid", 'int'); |
58 | -$accountoldid = GETPOST('account', 'int'); // GETPOST('account') is old account id |
|
59 | -$accountid = GETPOST('accountid', 'int'); // GETPOST('accountid') is new account id |
|
58 | +$accountoldid = GETPOST('account', 'int'); // GETPOST('account') is old account id |
|
59 | +$accountid = GETPOST('accountid', 'int'); // GETPOST('accountid') is new account id |
|
60 | 60 | $ref = GETPOST('ref', 'alpha'); |
61 | 61 | $action = GETPOST('action', 'aZ09'); |
62 | 62 | $confirm = GETPOST('confirm', 'alpha'); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | $result = $object->fetch($rowid); |
132 | 132 | if ($result <= 0) { |
133 | - dol_syslog('Failed to read bank line with id '.$rowid, LOG_WARNING); // This happens due to old bug that has set fk_account to null. |
|
133 | + dol_syslog('Failed to read bank line with id '.$rowid, LOG_WARNING); // This happens due to old bug that has set fk_account to null. |
|
134 | 134 | $object->id = $rowid; |
135 | 135 | } |
136 | 136 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | $result = restrictedArea($user, 'commande', $id, ''); |
54 | 54 | |
55 | -$usercancreate = $user->hasRight("commande", "creer"); |
|
55 | +$usercancreate = $user->hasRight("commande", "creer"); |
|
56 | 56 | |
57 | 57 | $permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php |
58 | 58 |
@@ -73,7 +73,7 @@ |
||
73 | 73 | |
74 | 74 | $object = new Commande($db); |
75 | 75 | |
76 | -$usercancreate = $user->hasRight("commande", "creer"); |
|
76 | +$usercancreate = $user->hasRight("commande", "creer"); |
|
77 | 77 | $permissiontoadd = $usercancreate; |
78 | 78 | |
79 | 79 | // Security check |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | require_once DOL_DOCUMENT_ROOT.'/partnership/lib/partnership.lib.php'; |
34 | 34 | |
35 | 35 | // Load translation files required by the page |
36 | -$langs->loadLangs(array("companies","members","partnership", "other")); |
|
36 | +$langs->loadLangs(array("companies", "members", "partnership", "other")); |
|
37 | 37 | |
38 | 38 | // Get parameters |
39 | 39 | $id = GETPOST('rowid', 'int') ? GETPOST('rowid', 'int') : GETPOST('id', 'int'); |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // Initialize technical objects |
55 | -$object = new Partnership($db); |
|
56 | -$extrafields = new ExtraFields($db); |
|
57 | -$adht = new AdherentType($db); |
|
55 | +$object = new Partnership($db); |
|
56 | +$extrafields = new ExtraFields($db); |
|
57 | +$adht = new AdherentType($db); |
|
58 | 58 | $diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; |
59 | 59 | $hookmanager->initHooks(array('partnershipthirdparty', 'globalcard')); // Note that conf->hooks_modules contains array |
60 | 60 |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | |
25 | 25 | // Load Dolibarr environment |
26 | 26 | require '../main.inc.php'; |
27 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; |
|
28 | -require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php'; |
|
29 | -require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.php'; |
|
27 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; |
|
28 | +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; |
|
29 | +require_once DOL_DOCUMENT_ROOT.'/asset/class/assetdepreciationoptions.class.php'; |
|
30 | 30 | |
31 | 31 | // Load translation files required by the page |
32 | 32 | $langs->loadLangs(array("assets", "companies")); |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | $extrafields->fetch_name_optionals_label($object->table_element); |
49 | 49 | |
50 | 50 | // Load object |
51 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
51 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
52 | 52 | if ($id > 0 || !empty($ref)) { |
53 | - $upload_dir = $conf->asset->multidir_output[$object->entity] . "/" . $object->id; |
|
53 | + $upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | // Security check (enable the most restrictive one) |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | // Object card |
100 | 100 | // ------------------------------------------------------------ |
101 | - $linkback = '<a href="' . DOL_URL_ROOT . '/asset/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
101 | + $linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
102 | 102 | |
103 | 103 | $morehtmlref = '<div class="refidno">'; |
104 | 104 | $morehtmlref .= '</div>'; |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | print '<div class="fichecenter">'; |
135 | 135 | print '<div class="fichehalfleft">'; |
136 | 136 | print '<div class="underbanner clearboth"></div>'; |
137 | - print '<table class="border centpercent tableforfield">' . "\n"; |
|
138 | - print '<tr><td class="titlefield">' . $langs->trans('AssetBaseDepreciationHT') . '</td><td>' . price($depreciation_info['base_depreciation_ht']) . '</td></tr>'; |
|
139 | - print '<tr><td class="titlefield">' . $langs->trans('AssetDepreciationBeginDate') . '</td><td>' . dol_print_date($object->date_start > $object->date_acquisition ? $object->date_start : $object->date_acquisition, 'day') . '</td></tr>'; |
|
137 | + print '<table class="border centpercent tableforfield">'."\n"; |
|
138 | + print '<tr><td class="titlefield">'.$langs->trans('AssetBaseDepreciationHT').'</td><td>'.price($depreciation_info['base_depreciation_ht']).'</td></tr>'; |
|
139 | + print '<tr><td class="titlefield">'.$langs->trans('AssetDepreciationBeginDate').'</td><td>'.dol_print_date($object->date_start > $object->date_acquisition ? $object->date_start : $object->date_acquisition, 'day').'</td></tr>'; |
|
140 | 140 | print '</table>'; |
141 | 141 | |
142 | 142 | // We close div and reopen for second column |
@@ -145,8 +145,8 @@ discard block |
||
145 | 145 | |
146 | 146 | print '<div class="underbanner clearboth"></div>'; |
147 | 147 | print '<table class="border centpercent tableforfield">'; |
148 | - print '<tr><td class="titlefield">' . $langs->trans('AssetDepreciationDuration') . '</td><td>' . $depreciation_info['duration'] . ' ( ' . $depreciation_info['duration_type'] . ' )</td></tr>'; |
|
149 | - print '<tr><td class="titlefield">' . $langs->trans('AssetDepreciationRate') . '</td><td>' . $depreciation_info['rate'] . '</td></tr>'; |
|
148 | + print '<tr><td class="titlefield">'.$langs->trans('AssetDepreciationDuration').'</td><td>'.$depreciation_info['duration'].' ( '.$depreciation_info['duration_type'].' )</td></tr>'; |
|
149 | + print '<tr><td class="titlefield">'.$langs->trans('AssetDepreciationRate').'</td><td>'.$depreciation_info['rate'].'</td></tr>'; |
|
150 | 150 | print '</table>'; |
151 | 151 | print '</div>'; |
152 | 152 | print '</div>'; |
@@ -160,21 +160,21 @@ discard block |
||
160 | 160 | |
161 | 161 | print '<tr class="liste_titre">'; |
162 | 162 | print '<td class="width20"></td>'; |
163 | - print '<td>' . $langs->trans("Ref") . '</td>'; |
|
164 | - print '<td class="center">' . $langs->trans("AssetDepreciationDate") . '</td>'; |
|
165 | - print '<td class="right">' . $langs->trans("AssetDepreciationHT") . '</td>'; |
|
166 | - print '<td class="right">' . $langs->trans("AssetCumulativeDepreciationHT") . '</td>'; |
|
167 | - print '<td class="right">' . $langs->trans("AssetResidualHT") . '</td>'; |
|
163 | + print '<td>'.$langs->trans("Ref").'</td>'; |
|
164 | + print '<td class="center">'.$langs->trans("AssetDepreciationDate").'</td>'; |
|
165 | + print '<td class="right">'.$langs->trans("AssetDepreciationHT").'</td>'; |
|
166 | + print '<td class="right">'.$langs->trans("AssetCumulativeDepreciationHT").'</td>'; |
|
167 | + print '<td class="right">'.$langs->trans("AssetResidualHT").'</td>'; |
|
168 | 168 | print '</tr>'; |
169 | 169 | |
170 | 170 | if (empty($lines)) { |
171 | - print '<tr><td class="impair center" colspan="6"><span class="opacitymedium">' . $langs->trans("None") . '</span></td></tr>'; |
|
171 | + print '<tr><td class="impair center" colspan="6"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>'; |
|
172 | 172 | } else { |
173 | 173 | foreach ($lines as $line) { |
174 | 174 | print '<tr class="oddeven">'; |
175 | - print '<td>' . ($line['bookkeeping'] ? $bookkeeping_icon : ($line['depreciation_date'] > $now ? $future_icon : '')) . '</td>'; |
|
176 | - print '<td >' . (empty($line['ref']) ? $langs->trans('AssetDepreciationReversal') : $line['ref']) . '</td>'; |
|
177 | - print '<td class="center">' . dol_print_date($line['depreciation_date'], 'day') . '</td>'; |
|
175 | + print '<td>'.($line['bookkeeping'] ? $bookkeeping_icon : ($line['depreciation_date'] > $now ? $future_icon : '')).'</td>'; |
|
176 | + print '<td >'.(empty($line['ref']) ? $langs->trans('AssetDepreciationReversal') : $line['ref']).'</td>'; |
|
177 | + print '<td class="center">'.dol_print_date($line['depreciation_date'], 'day').'</td>'; |
|
178 | 178 | print '<td class="right">'; |
179 | 179 | print price($line['depreciation_ht']); |
180 | 180 | print '</td>'; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | if (isModEnabled('accounting') && !is_object($formaccounting)) { |
38 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; |
|
38 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; |
|
39 | 39 | $formaccounting = new FormAccounting($db); |
40 | 40 | } |
41 | 41 | |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | print '<div class="underbanner clearboth"></div>'; |
64 | 64 | print '<table class="border centpercent tableforfield">'; |
65 | 65 | foreach ($mode_info['fields'] as $field_key => $field_info) { |
66 | - $html_name = $mode_key . '_' . $field_key; |
|
67 | - print '<tr><td class="titlefieldcreate">' . $langs->trans($field_info['label']) . '</td><td colspan="3">'; |
|
66 | + $html_name = $mode_key.'_'.$field_key; |
|
67 | + print '<tr><td class="titlefieldcreate">'.$langs->trans($field_info['label']).'</td><td colspan="3">'; |
|
68 | 68 | $accountancy_code = GETPOSTISSET($html_name) ? GETPOST($html_name, 'aZ09') : (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key]) ? $assetaccountancycodes->accountancy_codes[$mode_key][$field_key] : ''); |
69 | 69 | if (isModEnabled('accounting')) { |
70 | 70 | print $formaccounting->select_account($accountancy_code, $html_name, 1, null, 1, 1, 'minwidth150 maxwidth300', 1); |
71 | 71 | } else { |
72 | - print '<input name="' . $html_name . '" class="maxwidth200" value="' . dol_escape_htmltag($accountancy_code) . '">'; |
|
72 | + print '<input name="'.$html_name.'" class="maxwidth200" value="'.dol_escape_htmltag($accountancy_code).'">'; |
|
73 | 73 | } |
74 | 74 | print '</td></tr>'; |
75 | 75 | } |