@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $action = GETPOST('action', 'aZ09'); |
| 52 | 52 | $value = GETPOST('value', 'alpha'); |
| 53 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 53 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 54 | 54 | $label = GETPOST('label', 'alpha'); |
| 55 | 55 | $scandir = GETPOST('scan_dir', 'alpha'); |
| 56 | 56 | $type = 'stock'; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $arrayofcode = array( |
| 72 | 72 | 'STOCK_CALCULATE_ON_BILL', 'STOCK_CALCULATE_ON_VALIDATE_ORDER', 'STOCK_CALCULATE_ON_SHIPMENT', 'STOCK_CALCULATE_ON_SHIPMENT_CLOSE', |
| 73 | 73 | 'STOCK_CALCULATE_ON_SUPPLIER_BILL', 'STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER', 'STOCK_CALCULATE_ON_RECEPTION', 'STOCK_CALCULATE_ON_RECEPTION_CLOSE', 'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER', |
| 74 | - 'STOCK_DISALLOW_NEGATIVE_TRANSFER', 'STOCK_MUST_BE_ENOUGH_FOR_INVOICE', 'STOCK_MUST_BE_ENOUGH_FOR_ORDER', 'STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT', |
|
| 74 | + 'STOCK_DISALLOW_NEGATIVE_TRANSFER', 'STOCK_MUST_BE_ENOUGH_FOR_INVOICE', 'STOCK_MUST_BE_ENOUGH_FOR_ORDER', 'STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT', |
|
| 75 | 75 | 'STOCK_USE_REAL_STOCK_BY_DEFAULT_FOR_REPLENISHMENT' |
| 76 | 76 | ); |
| 77 | 77 | } else { |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | print(empty($module->name) ? $name : $module->name); |
| 684 | 684 | print "</td><td>\n"; |
| 685 | 685 | if (method_exists($module, 'info')) { |
| 686 | - print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 686 | + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 687 | 687 | } else { |
| 688 | 688 | print $module->description; |
| 689 | 689 | } |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | |
| 385 | 385 | $classname = ucfirst($subelement); |
| 386 | 386 | $srcobject = new $classname($db); |
| 387 | - '@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Maybe other class but CommonObject is too generic |
|
| 387 | + '@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Maybe other class but CommonObject is too generic |
|
| 388 | 388 | |
| 389 | 389 | dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); |
| 390 | 390 | $result = $srcobject->fetch($object->origin_id); |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | $idprod = GETPOSTINT('idprod'); |
| 615 | 615 | } |
| 616 | 616 | |
| 617 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 617 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 618 | 618 | |
| 619 | 619 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
| 620 | 620 | $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); |
@@ -738,7 +738,7 @@ discard block |
||
| 738 | 738 | // Get vat rate |
| 739 | 739 | $tva_npr = 0; |
| 740 | 740 | if (!GETPOSTISSET('tva_tx')) { // If vat rate not provided from the form (the form has the priority) |
| 741 | - $tmpidprodfournprice = GETPOST('idprodfournprice', 'alpha'); // can be an id of price, or -1, -2, -99 or 'idprod_...' |
|
| 741 | + $tmpidprodfournprice = GETPOST('idprodfournprice', 'alpha'); // can be an id of price, or -1, -2, -99 or 'idprod_...' |
|
| 742 | 742 | if (is_numeric($tmpidprodfournprice) && (int) $tmpidprodfournprice > 0) { |
| 743 | 743 | $tmpidprodfournprice = (int) $tmpidprodfournprice; |
| 744 | 744 | } else { |
@@ -1003,7 +1003,7 @@ discard block |
||
| 1003 | 1003 | $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), 'CU', 2); |
| 1004 | 1004 | |
| 1005 | 1005 | // Add buying price |
| 1006 | - $fournprice = (GETPOST('fournprice') ? GETPOSTINT('fournprice') : ''); // foreigh key |
|
| 1006 | + $fournprice = (GETPOST('fournprice') ? GETPOSTINT('fournprice') : ''); // foreigh key |
|
| 1007 | 1007 | $buyingprice = (GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value |
| 1008 | 1008 | |
| 1009 | 1009 | // Extrafields Lines |
@@ -1157,7 +1157,7 @@ discard block |
||
| 1157 | 1157 | // Multicurrency rate |
| 1158 | 1158 | $result = $object->setMulticurrencyRate(GETPOSTFLOAT('multicurrency_tx'), GETPOSTINT('calculation_mode')); |
| 1159 | 1159 | } elseif ($action == 'update_extras' && $usercancreate) { |
| 1160 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 1160 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 1161 | 1161 | $attribute_name = GETPOST('attribute', 'restricthtml'); |
| 1162 | 1162 | |
| 1163 | 1163 | // Fill array 'array_options' with data from update form |
@@ -1237,7 +1237,7 @@ discard block |
||
| 1237 | 1237 | |
| 1238 | 1238 | $classname = ucfirst($subelement); |
| 1239 | 1239 | $objectsrc = new $classname($db); |
| 1240 | - '@phan-var-force Commande|Propal|CommandeFournisseur|SupplierProposal $objectsrc'; // Could be other classes, but CommonObject is too generic |
|
| 1240 | + '@phan-var-force Commande|Propal|CommandeFournisseur|SupplierProposal $objectsrc'; // Could be other classes, but CommonObject is too generic |
|
| 1241 | 1241 | $objectsrc->fetch($originid); |
| 1242 | 1242 | if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { |
| 1243 | 1243 | $objectsrc->fetch_lines(); |
@@ -1807,40 +1807,40 @@ discard block |
||
| 1807 | 1807 | |
| 1808 | 1808 | print '<tr>'; |
| 1809 | 1809 | // Amount HT |
| 1810 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 1811 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1810 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 1811 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1812 | 1812 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1813 | 1813 | // Multicurrency Amount HT |
| 1814 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1814 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1815 | 1815 | } |
| 1816 | 1816 | print '</tr>'; |
| 1817 | 1817 | |
| 1818 | 1818 | print '<tr>'; |
| 1819 | 1819 | // Amount VAT |
| 1820 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 1821 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1820 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 1821 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1822 | 1822 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1823 | 1823 | // Multicurrency Amount VAT |
| 1824 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1824 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1825 | 1825 | } |
| 1826 | 1826 | print '</tr>'; |
| 1827 | 1827 | |
| 1828 | 1828 | // Amount Local Taxes |
| 1829 | 1829 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 1830 | 1830 | print '<tr>'; |
| 1831 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 1832 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1831 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 1832 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1833 | 1833 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1834 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1834 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1835 | 1835 | } |
| 1836 | 1836 | print '</tr>'; |
| 1837 | 1837 | |
| 1838 | 1838 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 1839 | 1839 | print '<tr>'; |
| 1840 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 1841 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1840 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 1841 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1842 | 1842 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1843 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1843 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1844 | 1844 | } |
| 1845 | 1845 | print '</tr>'; |
| 1846 | 1846 | } |
@@ -1848,11 +1848,11 @@ discard block |
||
| 1848 | 1848 | |
| 1849 | 1849 | print '<tr>'; |
| 1850 | 1850 | // Amount TTC |
| 1851 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 1852 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1851 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 1852 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1853 | 1853 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1854 | 1854 | // Multicurrency Amount TTC |
| 1855 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1855 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1856 | 1856 | } |
| 1857 | 1857 | print '</tr>'; |
| 1858 | 1858 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | $permissiontoadd = $user->hasRight('projet', 'creer'); |
| 122 | 122 | $permissiontodelete = $user->hasRight('projet', 'supprimer'); |
| 123 | -$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 123 | +$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 124 | 124 | |
| 125 | 125 | |
| 126 | 126 | /* |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $action = ''; |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | - include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 174 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 175 | 175 | |
| 176 | 176 | // Action setdraft object |
| 177 | 177 | if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) { |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $action = ''; |
| 186 | 186 | |
| 187 | 187 | // For backward compatibility |
| 188 | - $object->statut = $object::STATUS_DRAFT; // this already set for $object->status by $object->setStatut() |
|
| 188 | + $object->statut = $object::STATUS_DRAFT; // this already set for $object->status by $object->setStatut() |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | // Action add |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | $db->begin(); |
| 316 | 316 | $old_start_date = 0; |
| 317 | 317 | if (!$error) { |
| 318 | - $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 318 | + $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 319 | 319 | |
| 320 | 320 | $old_start_date = $object->date_start; |
| 321 | 321 | |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | $object->date_end_event = (!GETPOST('date_end_event')) ? '' : $date_end_event; |
| 333 | 333 | $object->location = $location; |
| 334 | 334 | if (GETPOSTISSET('opp_amount')) { |
| 335 | - $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); |
|
| 335 | + $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); |
|
| 336 | 336 | } |
| 337 | 337 | if (GETPOSTISSET('budget_amount')) { |
| 338 | 338 | $object->budget_amount = price2num(GETPOST('budget_amount', 'alpha')); |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
| 520 | 520 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
| 521 | 521 | $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl); |
| 522 | - $urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1'; |
|
| 522 | + $urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1'; |
|
| 523 | 523 | } else { |
| 524 | 524 | $urlback = DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1'; |
| 525 | 525 | } |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | |
| 562 | 562 | // Quick edit for extrafields |
| 563 | 563 | if ($action == 'update_extras' && $permissiontoadd) { |
| 564 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 564 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 565 | 565 | |
| 566 | 566 | // Fill array 'array_options' with data from update form |
| 567 | 567 | $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); |
@@ -994,7 +994,7 @@ discard block |
||
| 994 | 994 | $userDelete = $object->restrictedProjectArea($user, 'delete'); |
| 995 | 995 | //print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete; |
| 996 | 996 | |
| 997 | - $formconfirm = "" ; |
|
| 997 | + $formconfirm = ""; |
|
| 998 | 998 | |
| 999 | 999 | // Confirmation validation |
| 1000 | 1000 | if ($action == 'validate') { |
@@ -1132,7 +1132,7 @@ discard block |
||
| 1132 | 1132 | print '<br>'; |
| 1133 | 1133 | } |
| 1134 | 1134 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
| 1135 | - print '<input type="checkbox" id="usage_task" name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '> '; |
|
| 1135 | + print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'> '; |
|
| 1136 | 1136 | $htmltext = $langs->trans("ProjectFollowTasks"); |
| 1137 | 1137 | print '<label for="usage_task">'.$form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext).'</label>'; |
| 1138 | 1138 | print '<script>'; |
@@ -1158,7 +1158,7 @@ discard block |
||
| 1158 | 1158 | print '<br>'; |
| 1159 | 1159 | } |
| 1160 | 1160 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 1161 | - print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '> '; |
|
| 1161 | + print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'> '; |
|
| 1162 | 1162 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
| 1163 | 1163 | print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>'; |
| 1164 | 1164 | print '<script>'; |
@@ -1184,7 +1184,7 @@ discard block |
||
| 1184 | 1184 | print '<br>'; |
| 1185 | 1185 | } |
| 1186 | 1186 | if (isModEnabled('eventorganization')) { |
| 1187 | - print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '> '; |
|
| 1187 | + print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'> '; |
|
| 1188 | 1188 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
| 1189 | 1189 | print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>'; |
| 1190 | 1190 | print '<script>'; |
@@ -1363,7 +1363,7 @@ discard block |
||
| 1363 | 1363 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
| 1364 | 1364 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
| 1365 | 1365 | $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl); |
| 1366 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 1366 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 1367 | 1367 | } else { |
| 1368 | 1368 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
| 1369 | 1369 | } |
@@ -1440,8 +1440,8 @@ discard block |
||
| 1440 | 1440 | print '<a class="editfielda paddingtop" href="'.$_SERVER["PHP_SELF"].'?action=edit_opp_status&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a>'; |
| 1441 | 1441 | } |
| 1442 | 1442 | print '</td><td>'; |
| 1443 | - $html_name_status = ($action == 'edit_opp_status') ? 'opp_status' : 'none'; |
|
| 1444 | - $html_name_percent = ($action == 'edit_opp_status') ? 'opp_percent' : 'none'; |
|
| 1443 | + $html_name_status = ($action == 'edit_opp_status') ? 'opp_status' : 'none'; |
|
| 1444 | + $html_name_percent = ($action == 'edit_opp_status') ? 'opp_percent' : 'none'; |
|
| 1445 | 1445 | $percent_value = (GETPOSTISSET('opp_percent') ? GETPOSTINT('opp_percent') : (strcmp($object->opp_percent, '') ? vatrate($object->opp_percent) : '')); |
| 1446 | 1446 | $formproject->formOpportunityStatus($_SERVER['PHP_SELF'].'?socid='.$object->id, (string) $object->opp_status, $percent_value, $html_name_status, $html_name_percent); |
| 1447 | 1447 | print '</td></tr>'; |
@@ -1668,7 +1668,7 @@ discard block |
||
| 1668 | 1668 | if ($userWrite > 0) { |
| 1669 | 1669 | print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=confirm_setdraft&confirm=yes&token='.newToken().'&id='.$object->id, ''); |
| 1670 | 1670 | } else { |
| 1671 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1671 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1672 | 1672 | } |
| 1673 | 1673 | } |
| 1674 | 1674 | } |
@@ -1678,7 +1678,7 @@ discard block |
||
| 1678 | 1678 | if ($userWrite > 0) { |
| 1679 | 1679 | print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, ''); |
| 1680 | 1680 | } else { |
| 1681 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1681 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1682 | 1682 | } |
| 1683 | 1683 | } |
| 1684 | 1684 | |
@@ -1688,7 +1688,7 @@ discard block |
||
| 1688 | 1688 | //print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, ''); |
| 1689 | 1689 | print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=confirm_validate&confirm=yes&token='.newToken().'&id='.$object->id, ''); |
| 1690 | 1690 | } else { |
| 1691 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1691 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1692 | 1692 | } |
| 1693 | 1693 | } |
| 1694 | 1694 | |
@@ -1698,7 +1698,7 @@ discard block |
||
| 1698 | 1698 | //print dolGetButtonAction('', $langs->trans('Close'), 'default', $_SERVER["PHP_SELF"].'?action=close&token='.newToken().'&id='.$object->id, ''); |
| 1699 | 1699 | print dolGetButtonAction('', $langs->trans('Close'), 'default', $_SERVER["PHP_SELF"].'?action=confirm_close&confirm=yes&token='.newToken().'&id='.$object->id, ''); |
| 1700 | 1700 | } else { |
| 1701 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1701 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1702 | 1702 | } |
| 1703 | 1703 | } |
| 1704 | 1704 | |
@@ -1707,7 +1707,7 @@ discard block |
||
| 1707 | 1707 | if ($userWrite > 0) { |
| 1708 | 1708 | print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, ''); |
| 1709 | 1709 | } else { |
| 1710 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1710 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1711 | 1711 | } |
| 1712 | 1712 | } |
| 1713 | 1713 | |
@@ -1739,7 +1739,7 @@ discard block |
||
| 1739 | 1739 | if ($userWrite > 0) { |
| 1740 | 1740 | print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"].'?action=clone&token='.newToken().'&id='.((int) $object->id), ''); |
| 1741 | 1741 | } else { |
| 1742 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1742 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1743 | 1743 | } |
| 1744 | 1744 | } |
| 1745 | 1745 | |
@@ -1748,7 +1748,7 @@ discard block |
||
| 1748 | 1748 | if ($userDelete > 0 || ($object->status == Project::STATUS_DRAFT && $user->hasRight('projet', 'creer'))) { |
| 1749 | 1749 | print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
| 1750 | 1750 | } else { |
| 1751 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1751 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1752 | 1752 | } |
| 1753 | 1753 | } |
| 1754 | 1754 | } |
@@ -1494,7 +1494,7 @@ discard block |
||
| 1494 | 1494 | $tooltipClass = ' classfortooltip'; |
| 1495 | 1495 | $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1496 | 1496 | } else { |
| 1497 | - $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0 ; |
|
| 1497 | + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
|
| 1498 | 1498 | } |
| 1499 | 1499 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1500 | 1500 | |
@@ -1743,7 +1743,7 @@ discard block |
||
| 1743 | 1743 | $tooltipClass = ' classfortooltip'; |
| 1744 | 1744 | $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1745 | 1745 | } else { |
| 1746 | - $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0 ; |
|
| 1746 | + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
|
| 1747 | 1747 | } |
| 1748 | 1748 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1749 | 1749 | |
@@ -1812,7 +1812,7 @@ discard block |
||
| 1812 | 1812 | } |
| 1813 | 1813 | print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0"'.($disabled ? ' '.$disabled : '').'> '; |
| 1814 | 1814 | if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) { |
| 1815 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">'; |
|
| 1815 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">'; |
|
| 1816 | 1816 | } |
| 1817 | 1817 | } elseif ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
| 1818 | 1818 | $disabled = ''; |
@@ -1824,7 +1824,7 @@ discard block |
||
| 1824 | 1824 | } |
| 1825 | 1825 | print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$quantityToBeDelivered.'"'.($disabled ? ' '.$disabled : '').'> '; |
| 1826 | 1826 | if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) { |
| 1827 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">'; |
|
| 1827 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">'; |
|
| 1828 | 1828 | } |
| 1829 | 1829 | } else { |
| 1830 | 1830 | print $langs->trans("NA"); |
@@ -1893,7 +1893,7 @@ discard block |
||
| 1893 | 1893 | } |
| 1894 | 1894 | } |
| 1895 | 1895 | } elseif ($object->id > 0) { |
| 1896 | - '@phan-var-force Expedition $object'; // Need to force it (type overridden earlier) |
|
| 1896 | + '@phan-var-force Expedition $object'; // Need to force it (type overridden earlier) |
|
| 1897 | 1897 | /* *************************************************************************** */ |
| 1898 | 1898 | /* */ |
| 1899 | 1899 | /* Edit and view mode */ |
@@ -2007,7 +2007,7 @@ discard block |
||
| 2007 | 2007 | $morehtmlref = '<div class="refidno">'; |
| 2008 | 2008 | // Ref customer shipment |
| 2009 | 2009 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1); |
| 2010 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2010 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2011 | 2011 | // Thirdparty |
| 2012 | 2012 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1); |
| 2013 | 2013 | // Project |
@@ -2816,7 +2816,7 @@ discard block |
||
| 2816 | 2816 | || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'shipping_advance', 'validate'))) { |
| 2817 | 2817 | print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, ''); |
| 2818 | 2818 | } else { |
| 2819 | - print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 2819 | + print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 2820 | 2820 | } |
| 2821 | 2821 | } |
| 2822 | 2822 | |
@@ -2838,7 +2838,7 @@ discard block |
||
| 2838 | 2838 | if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('expedition', 'shipping_advance', 'send')) { |
| 2839 | 2839 | print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
| 2840 | 2840 | } else { |
| 2841 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 2841 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 2842 | 2842 | } |
| 2843 | 2843 | } |
| 2844 | 2844 | } |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | if ($action == 'update' && GETPOSTISSET('savevalidator') && $user->hasRight('holiday', 'approve')) { |
| 310 | 310 | $object->fetch($id); |
| 311 | 311 | |
| 312 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 312 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 313 | 313 | |
| 314 | 314 | $object->fk_validator = GETPOSTINT('valideur'); |
| 315 | 315 | |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | |
| 469 | 469 | // If draft and owner of leave |
| 470 | 470 | if ($object->status == Holiday::STATUS_DRAFT && $permissiontoadd) { |
| 471 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 471 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 472 | 472 | |
| 473 | 473 | $object->status = Holiday::STATUS_VALIDATED; |
| 474 | 474 | |
@@ -509,7 +509,7 @@ discard block |
||
| 509 | 509 | |
| 510 | 510 | // option to warn the validator in case of too short delay |
| 511 | 511 | if (!getDolGlobalString('HOLIDAY_HIDE_APPROVER_ABOUT_TOO_LOW_DELAY')) { |
| 512 | - $delayForRequest = 0; // TODO Set delay depending of holiday leave type |
|
| 512 | + $delayForRequest = 0; // TODO Set delay depending of holiday leave type |
|
| 513 | 513 | if ($delayForRequest) { |
| 514 | 514 | $nowplusdelay = dol_time_plus_duree($now, $delayForRequest, 'd'); |
| 515 | 515 | |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | $endhalfdaykey = ""; |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | - $link = dol_buildpath("/holiday/card.php", 3) . '?id='.$object->id; |
|
| 554 | + $link = dol_buildpath("/holiday/card.php", 3).'?id='.$object->id; |
|
| 555 | 555 | |
| 556 | 556 | $message .= "<ul>"; |
| 557 | 557 | $message .= "<li>".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."</li>\n"; |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | if ($action == 'update_extras') { |
| 587 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 587 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 588 | 588 | |
| 589 | 589 | // Fill array 'array_options' with data from update form |
| 590 | 590 | $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | |
| 613 | 613 | // If status is waiting approval and approver is also user |
| 614 | 614 | if ($object->status == Holiday::STATUS_VALIDATED && ($user->id == $object->fk_validator || $permissiontoaddall) && $user->hasRight('holiday', 'approve')) { |
| 615 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 615 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 616 | 616 | |
| 617 | 617 | $object->date_approval = dol_now(); |
| 618 | 618 | $object->fk_user_approve = $user->id; |
@@ -1245,7 +1245,7 @@ discard block |
||
| 1245 | 1245 | $result = $object->fetch($id, $ref); |
| 1246 | 1246 | |
| 1247 | 1247 | $approverexpected = new User($db); |
| 1248 | - $approverexpected->fetch($object->fk_validator); // Use that should be the approver |
|
| 1248 | + $approverexpected->fetch($object->fk_validator); // Use that should be the approver |
|
| 1249 | 1249 | |
| 1250 | 1250 | $userRequest = new User($db); |
| 1251 | 1251 | $userRequest->fetch($object->fk_user); |
@@ -1480,7 +1480,7 @@ discard block |
||
| 1480 | 1480 | print '</tr>'; |
| 1481 | 1481 | } else { |
| 1482 | 1482 | print '<tr>'; |
| 1483 | - print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>'; // Will be approved by |
|
| 1483 | + print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>'; // Will be approved by |
|
| 1484 | 1484 | print '<td>'; |
| 1485 | 1485 | $include_users = $object->fetch_users_approver_holiday(); |
| 1486 | 1486 | if (!in_array($object->fk_validator, $include_users)) { // Add the current validator to the list to not lose it when editing. |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | |
| 330 | 330 | if ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('societe', 'contact', 'supprimer')) { |
| 331 | 331 | $result = $object->fetch($id); |
| 332 | - $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 332 | + $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 333 | 333 | |
| 334 | 334 | $result = $object->delete($user); |
| 335 | 335 | if ($result > 0) { |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | } |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | - $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 416 | + $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 417 | 417 | |
| 418 | 418 | $object->socid = $socid; |
| 419 | 419 | $object->lastname = (string) GETPOST("lastname", 'alpha'); |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | |
| 538 | 538 | // Update extrafields |
| 539 | 539 | if ($action == 'update_extras' && $user->hasRight('societe', 'contact', 'creer')) { |
| 540 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 540 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 541 | 541 | |
| 542 | 542 | // Fill array 'array_options' with data from update form |
| 543 | 543 | $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); |
@@ -1279,7 +1279,7 @@ discard block |
||
| 1279 | 1279 | $maxfilesizearray = getMaxFileSizeArray(); |
| 1280 | 1280 | $maxmin = $maxfilesizearray['maxmin']; |
| 1281 | 1281 | if ($maxmin > 0) { |
| 1282 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 1282 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 1283 | 1283 | } |
| 1284 | 1284 | print '<input type="file" class="flat maxwidth200" name="photo" id="photoinput">'; |
| 1285 | 1285 | print '</td></tr>'; |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | require_once DOL_DOCUMENT_ROOT."/core/class/html.formcontract.class.php"; |
| 50 | 50 | require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"; |
| 51 | 51 | } |
| 52 | -if (getDolGlobalString('FICHEINTER_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_" . getDolGlobalString('FICHEINTER_ADDON').".php")) { |
|
| 53 | - require_once DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_" . getDolGlobalString('FICHEINTER_ADDON').'.php'; |
|
| 52 | +if (getDolGlobalString('FICHEINTER_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_".getDolGlobalString('FICHEINTER_ADDON').".php")) { |
|
| 53 | + require_once DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_".getDolGlobalString('FICHEINTER_ADDON').'.php'; |
|
| 54 | 54 | } |
| 55 | 55 | require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
| 56 | 56 | require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | $id = GETPOSTINT('id'); |
| 70 | 70 | $ref = GETPOST('ref', 'alpha'); |
| 71 | -$ref_client = GETPOST('ref_client', 'alpha'); |
|
| 71 | +$ref_client = GETPOST('ref_client', 'alpha'); |
|
| 72 | 72 | $socid = GETPOSTINT('socid'); |
| 73 | 73 | $contratid = GETPOSTINT('contratid'); |
| 74 | 74 | $action = GETPOST('action', 'alpha'); |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->model_pdf : GETPOST('model', 'alpha'), $outputlangs); |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 241 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 242 | 242 | exit; |
| 243 | 243 | } else { |
| 244 | 244 | $mesg = $object->error; |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->model_pdf : GETPOST('model', 'alpha'), $outputlangs); |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 266 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 267 | 267 | exit; |
| 268 | 268 | } else { |
| 269 | 269 | $mesg = $object->error; |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->model_pdf : GETPOST('model', 'alpha'), $outputlangs); |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 291 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 292 | 292 | exit; |
| 293 | 293 | } else { |
| 294 | 294 | $mesg = $object->error; |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | |
| 385 | 385 | $classname = ucfirst($subelement); |
| 386 | 386 | $srcobject = new $classname($db); |
| 387 | - '@phan-var-force Commande|Propal|Contrat $srcobject'; // Can be other class, but CommonObject is too generic |
|
| 387 | + '@phan-var-force Commande|Propal|Contrat $srcobject'; // Can be other class, but CommonObject is too generic |
|
| 388 | 388 | /** @var Commande|Propal|Contrat $srcobject */ |
| 389 | 389 | |
| 390 | 390 | dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); |
@@ -819,7 +819,7 @@ discard block |
||
| 819 | 819 | include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
| 820 | 820 | |
| 821 | 821 | if ($action == 'update_extras' && $permissiontoadd) { |
| 822 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 822 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 823 | 823 | $attribute_name = GETPOST('attribute', 'restricthtml'); |
| 824 | 824 | |
| 825 | 825 | // Fill array 'array_options' with data from update form |
@@ -1145,7 +1145,7 @@ discard block |
||
| 1145 | 1145 | } else { |
| 1146 | 1146 | print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">'; |
| 1147 | 1147 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 1148 | - print '<input type="hidden" name="action" value="create">'; // We go back to create action |
|
| 1148 | + print '<input type="hidden" name="action" value="create">'; // We go back to create action |
|
| 1149 | 1149 | print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
| 1150 | 1150 | |
| 1151 | 1151 | print dol_get_fiche_head([]); |
@@ -1852,9 +1852,9 @@ discard block |
||
| 1852 | 1852 | // Sign |
| 1853 | 1853 | if ($object->statut > Fichinter::STATUS_DRAFT) { |
| 1854 | 1854 | if ($object->signed_status != Fichinter::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) { |
| 1855 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=sign&token=' . newToken() . '">' . $langs->trans("InterventionSign") . '</a></div>'; |
|
| 1855 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=sign&token='.newToken().'">'.$langs->trans("InterventionSign").'</a></div>'; |
|
| 1856 | 1856 | } else { |
| 1857 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=unsign&token=' . newToken() . '">' . $langs->trans("InterventionUnsign") . '</a></div>'; |
|
| 1857 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=unsign&token='.newToken().'">'.$langs->trans("InterventionUnsign").'</a></div>'; |
|
| 1858 | 1858 | } |
| 1859 | 1859 | } |
| 1860 | 1860 | |
@@ -1031,7 +1031,7 @@ discard block |
||
| 1031 | 1031 | $datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.dol_escape_htmltag($this->ref); |
| 1032 | 1032 | $datas['label'] = '<br><b>'.$langs->trans('Title').':</b> '.$langs->trans($this->label); |
| 1033 | 1033 | if ($this->label != $langs->trans($this->label)) { |
| 1034 | - $datas['label'] .= ' <span class="opacitymedium">('.$this->label.')</span>'; |
|
| 1034 | + $datas['label'] .= ' <span class="opacitymedium">('.$this->label.')</span>'; |
|
| 1035 | 1035 | } |
| 1036 | 1036 | if (!empty($this->params)) { |
| 1037 | 1037 | $datas['params'] = '<br><b>'.$langs->trans('Parameters').':</b> '.dol_escape_htmltag($this->params); |
@@ -1450,7 +1450,7 @@ discard block |
||
| 1450 | 1450 | $msg = $langs->transnoentitiesnoconv("ErrorInBatch", $this->label); |
| 1451 | 1451 | $from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); |
| 1452 | 1452 | $cmailfile = new CMailFile($subject, $this->email_alert, $from, $msg); |
| 1453 | - $result = $cmailfile->sendfile(); // Do not test result |
|
| 1453 | + $result = $cmailfile->sendfile(); // Do not test result |
|
| 1454 | 1454 | } |
| 1455 | 1455 | |
| 1456 | 1456 | return $error ? -1 : 1; |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | } else { |
| 244 | 244 | $result = $object->fetch($id); |
| 245 | 245 | |
| 246 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 246 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 247 | 247 | |
| 248 | 248 | $object->type = $actioncode; |
| 249 | 249 | $object->date_ech = $dateech; |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $object->date_ech = dol_time_plus_duree($object->date_ech, 1, 'm'); |
| 294 | 294 | } else { |
| 295 | 295 | // Note date_ech is often a little bit higher than dateperiod |
| 296 | - $newdateech = dol_mktime(0, 0, 0, GETPOSTINT('clone_date_echmonth'), GETPOSTINT('clone_date_echday'), GETPOSTINT('clone_date_echyear')); // = date of creation or due date |
|
| 296 | + $newdateech = dol_mktime(0, 0, 0, GETPOSTINT('clone_date_echmonth'), GETPOSTINT('clone_date_echday'), GETPOSTINT('clone_date_echyear')); // = date of creation or due date |
|
| 297 | 297 | $newdateperiod = dol_mktime(0, 0, 0, GETPOSTINT('clone_periodmonth'), GETPOSTINT('clone_periodday'), GETPOSTINT('clone_periodyear')); |
| 298 | 298 | |
| 299 | 299 | if ($newdateperiod) { |
@@ -533,10 +533,10 @@ discard block |
||
| 533 | 533 | $userstatic = new User($db); |
| 534 | 534 | $result = $userstatic->fetch($object->fk_user); |
| 535 | 535 | if ($result > 0) { |
| 536 | - $morehtmlref .= '<br>' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(1); |
|
| 536 | + $morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$userstatic->getNomUrl(1); |
|
| 537 | 537 | } |
| 538 | 538 | } else { |
| 539 | - $morehtmlref .= '<br>' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->hasRight('salaries', 'write'), 'string', '', 0, 1); |
|
| 539 | + $morehtmlref .= '<br>'.$form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->hasRight('salaries', 'write'), 'string', '', 0, 1); |
|
| 540 | 540 | if ($object->fk_user > 0) { |
| 541 | 541 | $userstatic = new User($db); |
| 542 | 542 | $result = $userstatic->fetch($object->fk_user); |