@@ -47,7 +47,7 @@ |
||
| 47 | 47 | } |
| 48 | 48 | $result = restrictedArea($user, 'commande', $id, ''); |
| 49 | 49 | |
| 50 | -$usercancreate = $user->hasRight("commande", "creer"); |
|
| 50 | +$usercancreate = $user->hasRight("commande", "creer"); |
|
| 51 | 51 | |
| 52 | 52 | $object = new Commande($db); |
| 53 | 53 | |
@@ -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 | } |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | if (GETPOSTISSET('supplier_invoice_id')) { |
| 183 | 183 | $object->fields['supplier_invoice_id'] = array('type' => 'integer:FactureFournisseur:fourn/class/fournisseur.facture.class.php:1:entity IN (__SHARED_ENTITIES__)', 'label' => 'SupplierInvoice', 'enabled' => '1', 'noteditable' => '1', 'position' => 280, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'validate' => '1',); |
| 184 | - print '<input type="hidden" name="supplier_invoice_id" value="' . GETPOST('supplier_invoice_id', 'int') . '">'; |
|
| 184 | + print '<input type="hidden" name="supplier_invoice_id" value="'.GETPOST('supplier_invoice_id', 'int').'">'; |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | print dol_get_fiche_head(array(), ''); |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | array('type' => 'checkbox', 'name' => 'disposal_depreciated', 'label' => $langs->trans("AssetDisposalDepreciated"), 'value' => $disposal_depreciated), |
| 285 | 285 | array('type' => 'checkbox', 'name' => 'disposal_subject_to_vat', 'label' => $langs->trans("AssetDisposalSubjectToVat"), 'value' => $disposal_subject_to_vat), |
| 286 | 286 | ); |
| 287 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref . ' - ' . $object->label), 'confirm_disposal', $formquestion, 'yes', 1); |
|
| 287 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref.' - '.$object->label), 'confirm_disposal', $formquestion, 'yes', 1); |
|
| 288 | 288 | } elseif ($action == 'reopen') { |
| 289 | 289 | // Re-open |
| 290 | 290 | // Create an array for form |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | print '<table class="border centpercent tableforfield">'."\n"; |
| 329 | 329 | |
| 330 | 330 | // Common attributes |
| 331 | - $keyforbreak='date_acquisition'; // We change column just before this field |
|
| 331 | + $keyforbreak = 'date_acquisition'; // We change column just before this field |
|
| 332 | 332 | //unset($object->fields['fk_project']); // Hide field already shown in banner |
| 333 | 333 | //unset($object->fields['fk_soc']); // Hide field already shown in banner |
| 334 | 334 | include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | |
| 347 | 347 | // Buttons for actions |
| 348 | 348 | if ($action != 'presend' && $action != 'editline') { |
| 349 | - print '<div class="tabsAction">' . "\n"; |
|
| 349 | + print '<div class="tabsAction">'."\n"; |
|
| 350 | 350 | $parameters = array(); |
| 351 | 351 | $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 352 | 352 | if ($reshook < 0) { |
@@ -356,26 +356,26 @@ discard block |
||
| 356 | 356 | if (empty($reshook)) { |
| 357 | 357 | // Send |
| 358 | 358 | if (empty($user->socid)) { |
| 359 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init&token=' . newToken() . '#formmailbeforetitle'); |
|
| 359 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); |
|
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | if ($object->status == $object::STATUS_DRAFT) { |
| 363 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd); |
|
| 363 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | // Clone |
| 367 | 367 | //print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=clone&token=' . newToken(), '', false && $permissiontoadd); |
| 368 | 368 | |
| 369 | 369 | if ($object->status == $object::STATUS_DRAFT) { |
| 370 | - print dolGetButtonAction($langs->trans('AssetDisposal'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disposal&token=' . newToken(), '', $permissiontoadd); |
|
| 370 | + print dolGetButtonAction($langs->trans('AssetDisposal'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disposal&token='.newToken(), '', $permissiontoadd); |
|
| 371 | 371 | } else { |
| 372 | - print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=reopen&token=' . newToken(), '', $permissiontoadd); |
|
| 372 | + print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd); |
|
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | // Delete (need delete permission, or if draft, just need create/modify permission) |
| 376 | - print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); |
|
| 376 | + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); |
|
| 377 | 377 | } |
| 378 | - print '</div>' . "\n"; |
|
| 378 | + print '</div>'."\n"; |
|
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 381 | // Select mail models is same action as presend |
@@ -234,7 +234,7 @@ |
||
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | // For the case type is not 'system...' neither 'module', we just check module is on |
| 237 | - if (! in_array($obj->type, array('system', 'systemauto', 'module', 'moduleauto'))) { |
|
| 237 | + if (!in_array($obj->type, array('system', 'systemauto', 'module', 'moduleauto'))) { |
|
| 238 | 238 | $tmpmodule = $obj->module; |
| 239 | 239 | //var_dump($tmpmodule); |
| 240 | 240 | if ($tmpmodule && isset($conf->$tmpmodule) && isModEnabled($tmpmodule)) { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $customerStatic->loadCacheOfProspStatus(); |
| 126 | 126 | if (!empty($customerStatic->cacheprospectstatus)) { |
| 127 | 127 | foreach ($customerStatic->cacheprospectstatus as $dataProspectSt) { |
| 128 | - $this->type_statuscommprospect[$dataProspectSt['id']]=$dataProspectSt['label']; |
|
| 128 | + $this->type_statuscommprospect[$dataProspectSt['id']] = $dataProspectSt['label']; |
|
| 129 | 129 | } |
| 130 | 130 | } else { |
| 131 | 131 | $this->type_statuscommprospect = array( |
@@ -628,7 +628,7 @@ discard block |
||
| 628 | 628 | } |
| 629 | 629 | } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { |
| 630 | 630 | if ($arrayquery['options_'.$key] > 0) { |
| 631 | - $sqlwhere[]= " (te.".$key." = ".((int) $arrayquery["options_".$key]).")"; |
|
| 631 | + $sqlwhere[] = " (te.".$key." = ".((int) $arrayquery["options_".$key]).")"; |
|
| 632 | 632 | } |
| 633 | 633 | } else { |
| 634 | 634 | if (is_array($arrayquery['options_'.$key])) { |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | // Create a line of payments |
| 96 | 96 | $payment = new PaymentDonation($db); |
| 97 | 97 | $payment->chid = $chid; |
| 98 | - $payment->datep = $datepaid; |
|
| 98 | + $payment->datep = $datepaid; |
|
| 99 | 99 | $payment->amounts = $amounts; // Tableau de montant |
| 100 | 100 | $payment->paymenttype = GETPOST("paymenttype", 'int'); |
| 101 | 101 | $payment->num_payment = GETPOST("num_payment", 'alphanohtml'); |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | } |
| 82 | 82 | $result = restrictedArea($user, 'don', $object->id); |
| 83 | 83 | |
| 84 | -$permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php |
|
| 84 | +$permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php |
|
| 85 | 85 | |
| 86 | 86 | |
| 87 | 87 | /* |