@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $this->atleastonediscount = 0; |
136 | 136 | |
137 | 137 | if ($mysoc === null) { |
138 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
138 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
139 | 139 | return; |
140 | 140 | } |
141 | 141 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
308 | 308 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
309 | 309 | } |
310 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
310 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
311 | 311 | $tplidx = $pdf->importPage(1); |
312 | 312 | } |
313 | 313 | |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | $bg_color = colorStringToArray(getDolGlobalString("SUBTOTAL_BACK_COLOR_LEVEL_".abs($object->lines[$i]->qty))); |
665 | 665 | $pdf->SetFillColor($bg_color[0], $bg_color[1], $bg_color[2]); |
666 | 666 | $pdf->SetXY($pdf->GetX(), $curY); |
667 | - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->marge_gauche, 6, '', 0, '', true); |
|
667 | + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->marge_gauche, 6, '', 0, '', true); |
|
668 | 668 | $previous_align = array(); |
669 | 669 | $previous_align['align'] = $this->cols['desc']['content']['align']; |
670 | 670 | if ($object->lines[$i]->qty < 0) { |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | |
950 | 950 | // Add number of pages in footer |
951 | 951 | if (method_exists($pdf, 'AliasNbPages')) { |
952 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
952 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
953 | 953 | } |
954 | 954 | |
955 | 955 | // Add terms to sale |
@@ -1989,7 +1989,7 @@ discard block |
||
1989 | 1989 | if (!empty($carac_client_shipping)) { |
1990 | 1990 | $posy += $hautcadre; |
1991 | 1991 | |
1992 | - $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
1992 | + $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
1993 | 1993 | |
1994 | 1994 | // Show shipping frame |
1995 | 1995 | $pdf->SetXY($posx + 2, $posy - 5); |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | |
65 | 65 | $msid = GETPOSTINT('msid'); |
66 | 66 | |
67 | -$year = GETPOST("year"); // TODO Rename into search_year |
|
68 | -$month = GETPOST("month"); // TODO Rename into search_month |
|
67 | +$year = GETPOST("year"); // TODO Rename into search_year |
|
68 | +$month = GETPOST("month"); // TODO Rename into search_month |
|
69 | 69 | |
70 | 70 | $search_ref = GETPOST('search_ref', 'alpha'); |
71 | 71 | $search_movement = GETPOST("search_movement", 'alpha'); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $object = new Mo($db); |
98 | 98 | $extrafields = new ExtraFields($db); |
99 | 99 | $diroutputmassaction = $conf->mrp->dir_output.'/temp/massgeneration/'.$user->id; |
100 | -$hookmanager->initHooks(array('mocard', 'globalcard', 'mocardmovelist' )); // Note that conf->hooks_modules contains array |
|
100 | +$hookmanager->initHooks(array('mocard', 'globalcard', 'mocardmovelist')); // Note that conf->hooks_modules contains array |
|
101 | 101 | |
102 | 102 | // Fetch optionals attributes and labels |
103 | 103 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | 'linkedObjectsIds', |
470 | 470 | 'linkedObjects', |
471 | 471 | 'fk_delivery_address', |
472 | - 'projet', // There is already ->fk_project |
|
472 | + 'projet', // There is already ->fk_project |
|
473 | 473 | 'restrictiononfksoc', |
474 | 474 | 'specimen', |
475 | 475 | ); |
@@ -814,10 +814,10 @@ discard block |
||
814 | 814 | if ($resql) { |
815 | 815 | $obj = $this->db->fetch_object($resql); |
816 | 816 | if ($obj) { |
817 | - $this->id = $obj->rowid; |
|
818 | - $this->entity = $obj->entity; |
|
817 | + $this->id = $obj->rowid; |
|
818 | + $this->entity = $obj->entity; |
|
819 | 819 | |
820 | - $this->date_creation = $this->db->jdate($obj->date_creation); |
|
820 | + $this->date_creation = $this->db->jdate($obj->date_creation); |
|
821 | 821 | $this->date_modification = $this->db->jdate($obj->tms); |
822 | 822 | |
823 | 823 | $this->amounts = (float) $obj->amounts; |
@@ -835,7 +835,7 @@ discard block |
||
835 | 835 | $this->object_version = $obj->object_version; |
836 | 836 | |
837 | 837 | $this->signature = $obj->signature; |
838 | - $this->signature_line = $obj->signature_line; |
|
838 | + $this->signature_line = $obj->signature_line; |
|
839 | 839 | $this->certified = ($obj->certified == 1); |
840 | 840 | |
841 | 841 | return 1; |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | |
956 | 956 | $previoushash = $this->getPreviousHash(1, 0); // This get last record and lock database until insert is done and transaction closed |
957 | 957 | |
958 | - $concatenatedata = $this->buildKeyForSignature(); // All the information for the hash (meta data + data saved) |
|
958 | + $concatenatedata = $this->buildKeyForSignature(); // All the information for the hash (meta data + data saved) |
|
959 | 959 | |
960 | 960 | $this->debuginfo = $this->buildFirstPartOfKeyForSignature(); |
961 | 961 | |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | $sql .= " fk_user,"; |
985 | 985 | $sql .= " user_fullname,"; |
986 | 986 | $sql .= " entity,"; |
987 | - $sql .= " debuginfo"; // Only stored |
|
987 | + $sql .= " debuginfo"; // Only stored |
|
988 | 988 | $sql .= ") VALUES ("; |
989 | 989 | $sql .= "'".$this->db->idate($this->date_creation)."',"; |
990 | 990 | $sql .= "'".$this->db->escape($this->action)."',"; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | // If we have a hash public (hashp), we guess the original_file. |
178 | 178 | $ecmfile = ''; |
179 | 179 | if (!empty($hashp)) { |
180 | - if (GETPOST('type', 'alpha')=='link') { |
|
180 | + if (GETPOST('type', 'alpha') == 'link') { |
|
181 | 181 | require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; |
182 | 182 | $link = new Link($db); |
183 | 183 | $result = $link->fetch(0, $hashp); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | httponly_accessforbidden($langs->trans("ErrorLinkNotFoundWithSharedLink"), 403, 1); |
190 | 190 | } |
191 | 191 | } else { |
192 | - include_once DOL_DOCUMENT_ROOT . '/ecm/class/ecmfiles.class.php'; |
|
192 | + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; |
|
193 | 193 | $ecmfile = new EcmFiles($db); |
194 | 194 | $result = $ecmfile->fetch(0, '', '', '', $hashp); |
195 | 195 | if ($result > 0) { |
@@ -203,14 +203,14 @@ discard block |
||
203 | 203 | if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. |
204 | 204 | if ($moduleparttocheck == $modulepart) { |
205 | 205 | // We remove first level of directory |
206 | - $original_file = (($tmp[1] ? $tmp[1] . '/' : '') . $ecmfile->filename); // this is relative to module dir |
|
206 | + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir |
|
207 | 207 | //var_dump($original_file); exit; |
208 | 208 | } else { |
209 | 209 | httponly_accessforbidden('Bad link. File is from another module part.', 403); |
210 | 210 | } |
211 | 211 | } else { |
212 | 212 | $modulepart = $moduleparttocheck; |
213 | - $original_file = (($tmp[1] ? $tmp[1] . '/' : '') . $ecmfile->filename); // this is relative to module dir |
|
213 | + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | $entity = $ecmfile->entity; |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | } |
260 | 260 | |
261 | 261 | // Security: Delete string ../ or ..\ into $original_file |
262 | -$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
262 | +$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
263 | 263 | $original_file = str_replace('../', '/', $original_file); |
264 | 264 | $original_file = str_replace('..\\', '/', $original_file); |
265 | 265 | |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | // This test if file exists should be useless. We keep it to find bug more easily |
327 | 327 | if (!file_exists($fullpath_original_file_osencoded)) { |
328 | 328 | dol_syslog("ErrorFileDoesNotExists: ".$fullpath_original_file); |
329 | - print $langs->trans("ErrorFileDoesNotExists") . ' : ' . dol_escape_htmltag($original_file); |
|
329 | + print $langs->trans("ErrorFileDoesNotExists").' : '.dol_escape_htmltag($original_file); |
|
330 | 330 | exit; |
331 | 331 | } |
332 | 332 |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | // General $Variables |
95 | -$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
95 | +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
96 | 96 | $ref = GETPOST('ref', 'alpha'); |
97 | 97 | $socid = GETPOSTINT('socid'); |
98 | 98 | $action = GETPOST('action', 'aZ09'); |
99 | 99 | $confirm = GETPOST('confirm', 'alpha'); |
100 | 100 | $cancel = GETPOST('cancel', 'alpha'); |
101 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
102 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
101 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
102 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
103 | 103 | $lineid = GETPOSTINT('lineid'); |
104 | 104 | $userid = GETPOSTINT('userid'); |
105 | 105 | $search_ref = GETPOST('sf_ref', 'alpha') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha'); |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | setEventMessages('', $warningMsgLineList, 'warnings'); |
276 | 276 | } |
277 | 277 | |
278 | - header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result); |
|
278 | + header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result); |
|
279 | 279 | exit(); |
280 | 280 | } else { |
281 | 281 | $langs->load("errors"); |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | // Validation |
402 | 402 | $object->fetch($id); |
403 | 403 | |
404 | - if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
404 | + if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
405 | 405 | getDolGlobalString('FAC_FORCE_DATE_VALIDATION') // If option enabled, we force invoice date |
406 | 406 | ) { |
407 | 407 | $object->date = dol_now(); |
@@ -834,8 +834,8 @@ discard block |
||
834 | 834 | // We check if invoice has payments |
835 | 835 | $totalpaid = 0; |
836 | 836 | $sql = 'SELECT pf.amount'; |
837 | - $sql .= ' FROM ' . MAIN_DB_PREFIX . 'paiement_facture as pf'; |
|
838 | - $sql .= ' WHERE pf.fk_facture = ' . ((int) $object->id); |
|
837 | + $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf'; |
|
838 | + $sql .= ' WHERE pf.fk_facture = '.((int) $object->id); |
|
839 | 839 | |
840 | 840 | $result = $db->query($sql); |
841 | 841 | if ($result) { |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | $tempTva->datev = $object->date; |
912 | 912 | $tempTva->datep = $object->date; |
913 | 913 | $tempTva->amount = $amount; |
914 | - $tempTva->label = $langs->trans('WithholdingTax') . ' - ' . $object->ref; |
|
914 | + $tempTva->label = $langs->trans('WithholdingTax').' - '.$object->ref; |
|
915 | 915 | //$tempTva->paye = 1; |
916 | 916 | $valid = $tempTva->getIdForLabel($tempTva->label); |
917 | 917 | if (!$valid) { |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | if ($result < 0) { |
940 | 940 | setEventMessages($object->error, $object->errors, 'errors'); |
941 | 941 | } else { |
942 | - $object->fetch($object->id); // Reload properties |
|
942 | + $object->fetch($object->id); // Reload properties |
|
943 | 943 | } |
944 | 944 | } |
945 | 945 | } else { |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | if ($result < 0) { |
956 | 956 | setEventMessages($object->error, $object->errors, 'errors'); |
957 | 957 | } else { |
958 | - $object->fetch($object->id); // Reload properties |
|
958 | + $object->fetch($object->id); // Reload properties |
|
959 | 959 | } |
960 | 960 | } else { |
961 | 961 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); |
@@ -1156,7 +1156,7 @@ discard block |
||
1156 | 1156 | // Set invoice as paid |
1157 | 1157 | $result = $object->setPaid($user); |
1158 | 1158 | if ($result >= 0) { |
1159 | - $object->fetch($object->id); // Reload properties |
|
1159 | + $object->fetch($object->id); // Reload properties |
|
1160 | 1160 | $db->commit(); |
1161 | 1161 | } else { |
1162 | 1162 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1207,7 +1207,7 @@ discard block |
||
1207 | 1207 | $error++; |
1208 | 1208 | } |
1209 | 1209 | |
1210 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
1210 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
1211 | 1211 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); |
1212 | 1212 | |
1213 | 1213 | // Replacement invoice |
@@ -1239,7 +1239,7 @@ discard block |
||
1239 | 1239 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
1240 | 1240 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
1241 | 1241 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
1242 | - $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
1242 | + $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
1243 | 1243 | $object->fk_project = GETPOSTINT('projectid'); |
1244 | 1244 | $object->cond_reglement_id = GETPOSTINT('cond_reglement_id'); |
1245 | 1245 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
@@ -1300,9 +1300,9 @@ discard block |
||
1300 | 1300 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
1301 | 1301 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
1302 | 1302 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
1303 | - $object->model_pdf = GETPOST('model'); |
|
1303 | + $object->model_pdf = GETPOST('model'); |
|
1304 | 1304 | $object->fk_project = GETPOSTINT('projectid'); |
1305 | - $object->cond_reglement_id = 0; // No payment term for a credit note |
|
1305 | + $object->cond_reglement_id = 0; // No payment term for a credit note |
|
1306 | 1306 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
1307 | 1307 | $object->fk_account = GETPOSTINT('fk_account'); |
1308 | 1308 | //$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); |
@@ -1625,7 +1625,7 @@ discard block |
||
1625 | 1625 | $object->note_public = trim(GETPOST('note_public', 'restricthtml')); |
1626 | 1626 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
1627 | 1627 | $object->ref_client = GETPOST('ref_client'); |
1628 | - $object->ref_customer = GETPOST('ref_client'); |
|
1628 | + $object->ref_customer = GETPOST('ref_client'); |
|
1629 | 1629 | $object->model_pdf = GETPOST('model'); |
1630 | 1630 | $object->fk_project = GETPOSTINT('projectid'); |
1631 | 1631 | $object->cond_reglement_id = (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id')); |
@@ -1689,7 +1689,7 @@ discard block |
||
1689 | 1689 | $element = $subelement = 'expedition'; |
1690 | 1690 | } |
1691 | 1691 | |
1692 | - $object->origin = $origin; // deprecated |
|
1692 | + $object->origin = $origin; // deprecated |
|
1693 | 1693 | $object->origin_type = $origin; |
1694 | 1694 | $object->origin_id = $originid; |
1695 | 1695 | |
@@ -1724,7 +1724,7 @@ discard block |
||
1724 | 1724 | dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines or deposit lines"); |
1725 | 1725 | $result = $srcobject->fetch($object->origin_id); |
1726 | 1726 | |
1727 | - $i = -1; // Ensure initialised for static analysis, but with invalid idx. |
|
1727 | + $i = -1; // Ensure initialised for static analysis, but with invalid idx. |
|
1728 | 1728 | // If deposit invoice - down payment with 1 line (fixed amount or percent) |
1729 | 1729 | if (GETPOST('type') == Facture::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) { |
1730 | 1730 | // Define the array $amountdeposit |
@@ -2142,7 +2142,7 @@ discard block |
||
2142 | 2142 | if (!empty($origin) && !empty($originid)) { |
2143 | 2143 | include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; |
2144 | 2144 | |
2145 | - $object->origin = $origin; // deprecated |
|
2145 | + $object->origin = $origin; // deprecated |
|
2146 | 2146 | $object->origin_type = $origin; |
2147 | 2147 | $object->origin_id = $originid; |
2148 | 2148 | |
@@ -2168,7 +2168,7 @@ discard block |
||
2168 | 2168 | $line->fk_prev_id = $line->id; |
2169 | 2169 | $line->fetch_optionals(); |
2170 | 2170 | if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) { |
2171 | - $line->situation_percent = 0; // New situation percent must be 0 (No cumulative) |
|
2171 | + $line->situation_percent = 0; // New situation percent must be 0 (No cumulative) |
|
2172 | 2172 | } else { |
2173 | 2173 | $line->situation_percent = $line->get_prev_progress($object->id); // get good progress including credit note |
2174 | 2174 | } |
@@ -2285,7 +2285,7 @@ discard block |
||
2285 | 2285 | } else { |
2286 | 2286 | $db->rollback(); |
2287 | 2287 | $action = 'create'; |
2288 | - $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
2288 | + $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
2289 | 2289 | $_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ? |
2290 | 2290 | setEventMessages($object->error, $object->errors, 'errors'); |
2291 | 2291 | } |
@@ -2751,7 +2751,7 @@ discard block |
||
2751 | 2751 | */ |
2752 | 2752 | |
2753 | 2753 | // Margin |
2754 | - $fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
2754 | + $fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
2755 | 2755 | $buyingprice = price2num(GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''); // If buying_price is '0', we must keep this value |
2756 | 2756 | |
2757 | 2757 | |
@@ -2887,7 +2887,7 @@ discard block |
||
2887 | 2887 | if ($prod->price_min > $line->subprice) { |
2888 | 2888 | $price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
2889 | 2889 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
2890 | - setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings'); |
|
2890 | + setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
|
2891 | 2891 | } else { |
2892 | 2892 | setEventMessages($prod->error, $prod->errors, 'errors'); |
2893 | 2893 | } |
@@ -3038,7 +3038,7 @@ discard block |
||
3038 | 3038 | $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty); |
3039 | 3039 | |
3040 | 3040 | // Add buying price |
3041 | - $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
3041 | + $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
3042 | 3042 | $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value |
3043 | 3043 | |
3044 | 3044 | // Prepare a price equivalent for minimum price check |
@@ -3081,7 +3081,7 @@ discard block |
||
3081 | 3081 | // Define special_code for special lines |
3082 | 3082 | $special_code = GETPOSTINT('special_code'); |
3083 | 3083 | if ($special_code == 3) { |
3084 | - $special_code = 0; // Options should not exists on invoices |
|
3084 | + $special_code = 0; // Options should not exists on invoices |
|
3085 | 3085 | } |
3086 | 3086 | |
3087 | 3087 | $line = new FactureLigne($db); |
@@ -3535,7 +3535,7 @@ discard block |
||
3535 | 3535 | |
3536 | 3536 | |
3537 | 3537 | if ($action == 'update_extras' && $permissiontoeditextra) { |
3538 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
3538 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
3539 | 3539 | |
3540 | 3540 | $attribute_name = GETPOST('attribute', 'aZ09'); |
3541 | 3541 | |
@@ -3652,7 +3652,7 @@ discard block |
||
3652 | 3652 | $fk_account = GETPOSTINT('fk_account'); |
3653 | 3653 | |
3654 | 3654 | // Load objectsrc |
3655 | - $objectsrc = null; // Initialise |
|
3655 | + $objectsrc = null; // Initialise |
|
3656 | 3656 | //$remise_absolue = 0; |
3657 | 3657 | if (!empty($origin) && !empty($originid)) { |
3658 | 3658 | // Parse element/subelement (ex: project_task) |
@@ -3663,7 +3663,7 @@ discard block |
||
3663 | 3663 | $subelement = $regs[2]; |
3664 | 3664 | } |
3665 | 3665 | |
3666 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
3666 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
3667 | 3667 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); |
3668 | 3668 | |
3669 | 3669 | if ($element == 'project') { |
@@ -3741,8 +3741,8 @@ discard block |
||
3741 | 3741 | $fk_account = (!empty($expesrc->fk_account) ? $expesrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0)); |
3742 | 3742 | |
3743 | 3743 | if (isModEnabled('multicurrency')) { |
3744 | - $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
3745 | - $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
3744 | + $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
3745 | + $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
3746 | 3746 | } |
3747 | 3747 | |
3748 | 3748 | // replicate input reason |
@@ -3842,7 +3842,7 @@ discard block |
||
3842 | 3842 | print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">'; |
3843 | 3843 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
3844 | 3844 | print '<input type="hidden" name="action" id="formtocreateaction" value="add">'; |
3845 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
3845 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
3846 | 3846 | if ($soc->id > 0) { |
3847 | 3847 | print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n"; |
3848 | 3848 | } |
@@ -4024,7 +4024,7 @@ discard block |
||
4024 | 4024 | print $form->selectarray('typestandard', $arraylist, GETPOST('typestandard', 'aZ09'), 0, 0, 0, '', 1); |
4025 | 4025 | print '</td>';*/ |
4026 | 4026 | if (!getDolGlobalInt('INVOICE_DEPOSIT_INVOICE_ONLY_SAME_LINES')) { |
4027 | - print '<span class="opacitymedium marginleftonly">' . $langs->trans('PercentOfOriginalObject') . '</span>:<input class="right" placeholder="100%" type="text" id="valuestandardinvoice" name="valuestandardinvoice" size="3" value="' . (GETPOSTISSET('valuestandardinvoice') ? GETPOST('valuestandardinvoice', 'alpha') : '100%') . '"/>'; |
|
4027 | + print '<span class="opacitymedium marginleftonly">'.$langs->trans('PercentOfOriginalObject').'</span>:<input class="right" placeholder="100%" type="text" id="valuestandardinvoice" name="valuestandardinvoice" size="3" value="'.(GETPOSTISSET('valuestandardinvoice') ? GETPOST('valuestandardinvoice', 'alpha') : '100%').'"/>'; |
|
4028 | 4028 | } |
4029 | 4029 | } |
4030 | 4030 | print '</div></div>'."\n"; |
@@ -4378,8 +4378,8 @@ discard block |
||
4378 | 4378 | if ($socid > 0) { |
4379 | 4379 | print '<tr><td>'.$langs->trans('DiscountStillRemaining').'</td><td colspan="2">'; |
4380 | 4380 | |
4381 | - $thirdparty = $soc; // used by object_discounts.tpl.php |
|
4382 | - $discount_type = 0; // used by object_discounts.tpl.php |
|
4381 | + $thirdparty = $soc; // used by object_discounts.tpl.php |
|
4382 | + $discount_type = 0; // used by object_discounts.tpl.php |
|
4383 | 4383 | $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid'))); |
4384 | 4384 | |
4385 | 4385 | // loading object_discounts.tpl.php from module core/tpl if exists |
@@ -4439,7 +4439,7 @@ discard block |
||
4439 | 4439 | if (empty($retained_warranty)) { |
4440 | 4440 | if ($objectsrc !== null && property_exists($objectsrc, 'retained_warranty') && !empty($objectsrc->retained_warranty)) { // use previous situation value |
4441 | 4441 | // Facture->retained_warranty (does not exist on Expedition) |
4442 | - $retained_warranty = $objectsrc->retained_warranty; // @phan-suppress-current-line PhanUndeclaredProperty |
|
4442 | + $retained_warranty = $objectsrc->retained_warranty; // @phan-suppress-current-line PhanUndeclaredProperty |
|
4443 | 4443 | } |
4444 | 4444 | } |
4445 | 4445 | $retained_warranty_js_default = !empty($retained_warranty) ? $retained_warranty : getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT'); |
@@ -4938,7 +4938,7 @@ discard block |
||
4938 | 4938 | $nbMandated = 0; |
4939 | 4939 | foreach ($object->lines as $line) { |
4940 | 4940 | $res = $line->fetch_product(); |
4941 | - if ($res > 0) { |
|
4941 | + if ($res > 0) { |
|
4942 | 4942 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
4943 | 4943 | $nbMandated++; |
4944 | 4944 | break; |
@@ -5181,7 +5181,7 @@ discard block |
||
5181 | 5181 | } |
5182 | 5182 | // Ref customer |
5183 | 5183 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string', '', 0, 1); |
5184 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
5184 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
5185 | 5185 | // Thirdparty |
5186 | 5186 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer'); |
5187 | 5187 | if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { |
@@ -5313,7 +5313,7 @@ discard block |
||
5313 | 5313 | print '</td><td class="valuefield fieldname_type">'; |
5314 | 5314 | print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" name="formposinfo">'; |
5315 | 5315 | print '<input type="hidden" name="action" value="setposinfo">'; |
5316 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
5316 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
5317 | 5317 | if ($action == 'editposinfo') { |
5318 | 5318 | print '<input type="text" class="maxwidth150" name="posmodule" placeholder="'.$langs->trans("POSModule").'" value="'.$object->module_source.'"> '; |
5319 | 5319 | print '<input type="text" class="maxwidth100" name="posterminal" placeholder="'.$langs->trans("Terminal").'" value="'.$object->pos_source.'">'; |
@@ -5658,45 +5658,45 @@ discard block |
||
5658 | 5658 | } |
5659 | 5659 | print '<tr>'; |
5660 | 5660 | // Amount HT |
5661 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
5662 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5661 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
5662 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5663 | 5663 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5664 | 5664 | // Multicurrency Amount HT |
5665 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5665 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5666 | 5666 | } |
5667 | 5667 | print '</tr>'; |
5668 | 5668 | |
5669 | 5669 | print '<tr>'; |
5670 | 5670 | // Amount VAT |
5671 | - print '<td>' . $langs->trans('AmountVAT') . '</td>'; |
|
5672 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5671 | + print '<td>'.$langs->trans('AmountVAT').'</td>'; |
|
5672 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5673 | 5673 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5674 | 5674 | // Multicurrency Amount VAT |
5675 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5675 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5676 | 5676 | } |
5677 | 5677 | print '</tr>'; |
5678 | 5678 | |
5679 | 5679 | // Amount Local Taxes |
5680 | 5680 | if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) { |
5681 | 5681 | print '<tr>'; |
5682 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
5683 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5682 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
5683 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5684 | 5684 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5685 | 5685 | $object->multicurrency_total_localtax1 = (float) price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT'); |
5686 | 5686 | |
5687 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5687 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5688 | 5688 | } |
5689 | 5689 | print '</tr>'; |
5690 | 5690 | } |
5691 | 5691 | |
5692 | 5692 | if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) { |
5693 | 5693 | print '<tr>'; |
5694 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
5695 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5694 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
5695 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5696 | 5696 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5697 | 5697 | $object->multicurrency_total_localtax2 = (float) price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT'); |
5698 | 5698 | |
5699 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5699 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5700 | 5700 | } |
5701 | 5701 | print '</tr>'; |
5702 | 5702 | } |
@@ -5756,11 +5756,11 @@ discard block |
||
5756 | 5756 | |
5757 | 5757 | print '<tr>'; |
5758 | 5758 | // Amount TTC |
5759 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
5760 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5759 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
5760 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5761 | 5761 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5762 | 5762 | // Multicurrency Amount TTC |
5763 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5763 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5764 | 5764 | } |
5765 | 5765 | print '</tr>'; |
5766 | 5766 | |
@@ -6331,7 +6331,7 @@ discard block |
||
6331 | 6331 | if (isModEnabled('subtotals')) { |
6332 | 6332 | include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_ajaxrow.tpl.php'; |
6333 | 6333 | } else { |
6334 | - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; |
|
6334 | + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; |
|
6335 | 6335 | } |
6336 | 6336 | } |
6337 | 6337 | |
@@ -6394,10 +6394,10 @@ discard block |
||
6394 | 6394 | if (!$objectidnext && $object->is_last_in_cycle()) { |
6395 | 6395 | if ($usercanunvalidate) { |
6396 | 6396 | unset($params['attr']['title']); |
6397 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', true, $params); |
|
6397 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', true, $params); |
|
6398 | 6398 | } else { |
6399 | 6399 | $params['attr']['title'] = $langs->trans('NotEnoughPermissions'); |
6400 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', false, $params); |
|
6400 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', false, $params); |
|
6401 | 6401 | } |
6402 | 6402 | } elseif (!$object->is_last_in_cycle()) { |
6403 | 6403 | $params['attr']['title'] = $langs->trans('NotLastInCycle'); |
@@ -6438,7 +6438,7 @@ discard block |
||
6438 | 6438 | $langs->load("contracts"); |
6439 | 6439 | |
6440 | 6440 | if ($usercancreatecontract) { |
6441 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>'; |
|
6441 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>'; |
|
6442 | 6442 | } |
6443 | 6443 | } |
6444 | 6444 | } |
@@ -6688,7 +6688,7 @@ discard block |
||
6688 | 6688 | if ($usercandelete || ($usercancreate && $isErasable == 1)) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) |
6689 | 6689 | $enableDelete = false; |
6690 | 6690 | $deleteHref = '#'; |
6691 | - if ($isErasable > 0 && ! $objectidnext) { |
|
6691 | + if ($isErasable > 0 && !$objectidnext) { |
|
6692 | 6692 | $deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken(); |
6693 | 6693 | $enableDelete = true; |
6694 | 6694 | } |
@@ -118,10 +118,10 @@ discard block |
||
118 | 118 | */ |
119 | 119 | |
120 | 120 | $parameters = array(); |
121 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
121 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
122 | 122 | // Delete Link |
123 | 123 | $permissiondellink = $user->hasRight('expedition', 'delivery', 'supprimer'); // Used by the include of actions_dellink.inc.php |
124 | -include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
124 | +include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
125 | 125 | |
126 | 126 | if ($action == 'add' && $permissiontoadd) { |
127 | 127 | $array_options = array(); |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | |
222 | 222 | // Update extrafields |
223 | 223 | if ($action == 'update_extras' && $permissiontoeditextra) { |
224 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
224 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
225 | 225 | |
226 | 226 | $attribute_name = GETPOST('attribute', 'aZ09'); |
227 | 227 | |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | $paramname = 'id'; |
289 | 289 | $autocopy = 'MAIN_MAIL_AUTOCOPY_RECEPTION_TO'; |
290 | 290 | $mode = 'emailfromreception'; |
291 | -$trackid = 'bl' . $object->id; |
|
292 | -include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
291 | +$trackid = 'bl'.$object->id; |
|
292 | +include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
293 | 293 | |
294 | 294 | |
295 | 295 | /* |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | $morehtmlref = '<div class="refidno">'; |
369 | 369 | // Ref customer shipment |
370 | 370 | $morehtmlref .= $form->editfieldkey("RefCustomer", '', $expedition->ref_customer, $expedition, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1); |
371 | - $morehtmlref .= $form->editfieldval("RefCustomer", '', $expedition->ref_customer, $expedition, $user->hasRight('expedition', 'creer'), 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
371 | + $morehtmlref .= $form->editfieldval("RefCustomer", '', $expedition->ref_customer, $expedition, $user->hasRight('expedition', 'creer'), 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
372 | 372 | $morehtmlref .= '<br>'.$langs->trans("RefDeliveryReceipt").' : '.$object->ref; |
373 | 373 | // Thirdparty |
374 | 374 | $morehtmlref .= '<br>'.$expedition->thirdparty->getNomUrl(1); |
@@ -48,21 +48,21 @@ discard block |
||
48 | 48 | |
49 | 49 | |
50 | 50 | // Get parameters |
51 | -$action = GETPOST('action', 'aZ09'); |
|
52 | -$confirm = GETPOST('confirm'); |
|
53 | -$id = (GETPOSTINT('socid') ? GETPOSTINT('socid') : GETPOSTINT('id')); |
|
54 | -$ref = GETPOST('ref', 'alpha'); |
|
51 | +$action = GETPOST('action', 'aZ09'); |
|
52 | +$confirm = GETPOST('confirm'); |
|
53 | +$id = (GETPOSTINT('socid') ? GETPOSTINT('socid') : GETPOSTINT('id')); |
|
54 | +$ref = GETPOST('ref', 'alpha'); |
|
55 | 55 | |
56 | -$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; |
|
56 | +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; |
|
57 | 57 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
58 | 58 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
59 | -$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page"); |
|
59 | +$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page"); |
|
60 | 60 | |
61 | 61 | if (empty($page) || $page == -1) { |
62 | 62 | $page = 0; |
63 | 63 | } // If $page is not defined, or '' or -1 |
64 | 64 | |
65 | -$offset = $limit * $page; |
|
65 | +$offset = $limit * $page; |
|
66 | 66 | $pageprev = $page - 1; |
67 | 67 | $pagenext = $page + 1; |
68 | 68 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $permissiontoadd = $user->hasRight('societe', 'creer'); |
197 | 197 | $permtoedit = $user->hasRight('societe', 'creer'); |
198 | 198 | $param = '&id='.$object->id; |
199 | -$relativepathwithnofile = $object->id . '/'; |
|
199 | +$relativepathwithnofile = $object->id.'/'; |
|
200 | 200 | include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; |
201 | 201 | |
202 | 202 | // End of page |