@@ -43,10 +43,10 @@ |
||
| 43 | 43 | // Load translation files required by the page |
| 44 | 44 | $langs->load("bom"); |
| 45 | 45 | |
| 46 | -'@phan-var-force BOM[] $linkedObjectBlock'; // Type before use |
|
| 46 | +'@phan-var-force BOM[] $linkedObjectBlock'; // Type before use |
|
| 47 | 47 | /** @var BOM[] $linkedObjectBlock */ |
| 48 | 48 | $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); |
| 49 | -'@phan-var-force BOM[] $linkedObjectBlock'; // Type after dol_sort_array which looses typing |
|
| 49 | +'@phan-var-force BOM[] $linkedObjectBlock'; // Type after dol_sort_array which looses typing |
|
| 50 | 50 | /** @var BOM[] $linkedObjectBlock */ |
| 51 | 51 | |
| 52 | 52 | $total = 0; |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $langs->load("assets"); |
| 50 | 50 | |
| 51 | 51 | $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); |
| 52 | -'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array) |
|
| 52 | +'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array) |
|
| 53 | 53 | /** @var Asset[] $linkedObjectBlock */ |
| 54 | 54 | |
| 55 | 55 | $total = 0; |
@@ -117,98 +117,98 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - if ($max_existing_level+1 < $depth) { |
|
| 121 | - $depth = $max_existing_level+1; |
|
| 120 | + if ($max_existing_level + 1 < $depth) { |
|
| 121 | + $depth = $max_existing_level + 1; |
|
| 122 | 122 | if (isset($this->errors)) { |
| 123 | 123 | $this->errors[] = $langs->trans("TitleAddedLevelTooHigh", $depth); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - $error ++; |
|
| 126 | + $error++; |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | // Add the line calling the right module |
| 131 | 131 | if ($current_module == 'facture' && $this instanceof Facture) { |
| 132 | 132 | $result = $this->addline( |
| 133 | - $desc, // Description |
|
| 134 | - 0, // Unit price |
|
| 135 | - $depth, // Quantity |
|
| 136 | - 0, // VAT rate |
|
| 137 | - 0, // Local tax 1 |
|
| 138 | - 0, // Local tax 2 |
|
| 139 | - 0, // FK product |
|
| 140 | - 0, // Discount percentage |
|
| 141 | - '', // Date start |
|
| 142 | - '', // Date end |
|
| 143 | - 0, // FK code ventilation |
|
| 144 | - 0, // Info bits |
|
| 145 | - 0, // FK remise except |
|
| 146 | - '', // Price base type |
|
| 147 | - 0, // PU ttc |
|
| 148 | - self::$PRODUCT_TYPE, // Type |
|
| 149 | - $rang, // Rang |
|
| 133 | + $desc, // Description |
|
| 134 | + 0, // Unit price |
|
| 135 | + $depth, // Quantity |
|
| 136 | + 0, // VAT rate |
|
| 137 | + 0, // Local tax 1 |
|
| 138 | + 0, // Local tax 2 |
|
| 139 | + 0, // FK product |
|
| 140 | + 0, // Discount percentage |
|
| 141 | + '', // Date start |
|
| 142 | + '', // Date end |
|
| 143 | + 0, // FK code ventilation |
|
| 144 | + 0, // Info bits |
|
| 145 | + 0, // FK remise except |
|
| 146 | + '', // Price base type |
|
| 147 | + 0, // PU ttc |
|
| 148 | + self::$PRODUCT_TYPE, // Type |
|
| 149 | + $rang, // Rang |
|
| 150 | 150 | SUBTOTALS_SPECIAL_CODE // Special code |
| 151 | 151 | ); |
| 152 | 152 | } elseif ($current_module == 'propal' && $this instanceof Propal) { |
| 153 | 153 | $result = $this->addline( |
| 154 | - $desc, // Description |
|
| 155 | - 0, // Unit price |
|
| 156 | - $depth, // Quantity |
|
| 157 | - 0, // VAT rate |
|
| 158 | - 0, // Local tax 1 |
|
| 159 | - 0, // Local tax 2 |
|
| 160 | - 0, // FK product |
|
| 161 | - 0, // Discount percentage |
|
| 162 | - '', // Price base type |
|
| 163 | - 0, // PU ttc |
|
| 164 | - 0, // Info bits |
|
| 165 | - self::$PRODUCT_TYPE, // Type |
|
| 166 | - $rang, // Rang |
|
| 154 | + $desc, // Description |
|
| 155 | + 0, // Unit price |
|
| 156 | + $depth, // Quantity |
|
| 157 | + 0, // VAT rate |
|
| 158 | + 0, // Local tax 1 |
|
| 159 | + 0, // Local tax 2 |
|
| 160 | + 0, // FK product |
|
| 161 | + 0, // Discount percentage |
|
| 162 | + '', // Price base type |
|
| 163 | + 0, // PU ttc |
|
| 164 | + 0, // Info bits |
|
| 165 | + self::$PRODUCT_TYPE, // Type |
|
| 166 | + $rang, // Rang |
|
| 167 | 167 | SUBTOTALS_SPECIAL_CODE // Special code |
| 168 | 168 | ); |
| 169 | 169 | } elseif ($current_module == 'commande' && $this instanceof Commande) { |
| 170 | 170 | $result = $this->addline( |
| 171 | - $desc, // Description |
|
| 172 | - 0, // Unit price |
|
| 173 | - $depth, // Quantity |
|
| 174 | - 0, // VAT rate |
|
| 175 | - 0, // Local tax 1 |
|
| 176 | - 0, // Local tax 2 |
|
| 177 | - 0, // FK product |
|
| 178 | - 0, // Discount percentage |
|
| 179 | - 0, // Info bits |
|
| 180 | - 0, // FK remise except |
|
| 181 | - '', // Price base type |
|
| 182 | - 0, // PU ttc |
|
| 183 | - '', // Date start |
|
| 184 | - '', // Date end |
|
| 185 | - self::$PRODUCT_TYPE, // Type |
|
| 186 | - $rang, // Rang |
|
| 171 | + $desc, // Description |
|
| 172 | + 0, // Unit price |
|
| 173 | + $depth, // Quantity |
|
| 174 | + 0, // VAT rate |
|
| 175 | + 0, // Local tax 1 |
|
| 176 | + 0, // Local tax 2 |
|
| 177 | + 0, // FK product |
|
| 178 | + 0, // Discount percentage |
|
| 179 | + 0, // Info bits |
|
| 180 | + 0, // FK remise except |
|
| 181 | + '', // Price base type |
|
| 182 | + 0, // PU ttc |
|
| 183 | + '', // Date start |
|
| 184 | + '', // Date end |
|
| 185 | + self::$PRODUCT_TYPE, // Type |
|
| 186 | + $rang, // Rang |
|
| 187 | 187 | SUBTOTALS_SPECIAL_CODE // Special code |
| 188 | 188 | ); |
| 189 | 189 | } elseif ($current_module == 'shipping' && $this instanceof Expedition) { |
| 190 | 190 | $result = $this->addline( |
| 191 | - 0, // Warehouse ID |
|
| 192 | - (int) $parent_line, // Source line |
|
| 191 | + 0, // Warehouse ID |
|
| 192 | + (int) $parent_line, // Source line |
|
| 193 | 193 | $depth // Quantity |
| 194 | 194 | ); |
| 195 | 195 | } elseif ($current_module == 'facturerec' && $this instanceof FactureRec) { |
| 196 | - $rang = $rang == -1 ? $rang : $rang-1; |
|
| 196 | + $rang = $rang == -1 ? $rang : $rang - 1; |
|
| 197 | 197 | $result = $this->addline( |
| 198 | - $desc, // Description |
|
| 199 | - 0, // Unit price |
|
| 200 | - $depth, // Quantity |
|
| 201 | - 0, // VAT rate |
|
| 202 | - 0, // Local tax 1 |
|
| 203 | - 0, // Local tax 2 |
|
| 204 | - 0, // FK product |
|
| 205 | - 0, // Discount percentage |
|
| 206 | - '', // Price base type |
|
| 207 | - 0, // Info bits |
|
| 208 | - 0, // FK remise except |
|
| 209 | - 0, // PU ttc |
|
| 210 | - self::$PRODUCT_TYPE, // Type |
|
| 211 | - $rang, // Rang |
|
| 198 | + $desc, // Description |
|
| 199 | + 0, // Unit price |
|
| 200 | + $depth, // Quantity |
|
| 201 | + 0, // VAT rate |
|
| 202 | + 0, // Local tax 1 |
|
| 203 | + 0, // Local tax 2 |
|
| 204 | + 0, // FK product |
|
| 205 | + 0, // Discount percentage |
|
| 206 | + '', // Price base type |
|
| 207 | + 0, // Info bits |
|
| 208 | + 0, // FK remise except |
|
| 209 | + 0, // PU ttc |
|
| 210 | + self::$PRODUCT_TYPE, // Type |
|
| 211 | + $rang, // Rang |
|
| 212 | 212 | SUBTOTALS_SPECIAL_CODE // Special code |
| 213 | 213 | ); |
| 214 | 214 | $this->fetch_lines(); |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | if ($correspondingstline) { |
| 269 | 269 | $oldDesc = ""; |
| 270 | - $oldDepth = 0; |
|
| 270 | + $oldDepth = 0; |
|
| 271 | 271 | foreach ($this->lines as $line) { |
| 272 | 272 | if ($line->id == $id) { |
| 273 | 273 | $oldDesc = $line->desc; |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | |
| 342 | 342 | $max_existing_level = 0; |
| 343 | 343 | |
| 344 | - if ($depth>0) { |
|
| 344 | + if ($depth > 0) { |
|
| 345 | 345 | foreach ($this->lines as $line) { |
| 346 | 346 | if ($line->special_code == SUBTOTALS_SPECIAL_CODE && $line->qty > $max_existing_level && $line->id != $lineid) { |
| 347 | 347 | $max_existing_level = $line->qty; |
@@ -349,17 +349,17 @@ discard block |
||
| 349 | 349 | } |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | - if ($max_existing_level+1 < $depth) { |
|
| 353 | - $depth = $max_existing_level+1; |
|
| 352 | + if ($max_existing_level + 1 < $depth) { |
|
| 353 | + $depth = $max_existing_level + 1; |
|
| 354 | 354 | if (isset($this->errors)) { |
| 355 | 355 | $this->errors[] = $langs->trans("TitleEditedLevelTooHigh"); |
| 356 | 356 | } |
| 357 | - $error ++; |
|
| 357 | + $error++; |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | - if ($depth>0) { |
|
| 360 | + if ($depth > 0) { |
|
| 361 | 361 | $oldDesc = ""; |
| 362 | - $oldDepth = 0; |
|
| 362 | + $oldDepth = 0; |
|
| 363 | 363 | foreach ($this->lines as $line) { |
| 364 | 364 | if ($line->id == $lineid) { |
| 365 | 365 | $oldDesc = $line->desc; |
@@ -375,66 +375,66 @@ discard block |
||
| 375 | 375 | // Update the line calling the right module |
| 376 | 376 | if ($current_module == 'facture' && $this instanceof Facture) { |
| 377 | 377 | $result = $this->updateline( |
| 378 | - $lineid, // ID of line to change |
|
| 379 | - $desc, // Description |
|
| 380 | - 0, // Unit price |
|
| 381 | - $depth, // Quantity |
|
| 382 | - 0, // Discount percentage |
|
| 383 | - '', // Date start |
|
| 384 | - '', // Date end |
|
| 385 | - 0, // VAT rate |
|
| 386 | - 0, // Local tax 1 |
|
| 387 | - 0, // Local tax 2 |
|
| 388 | - '', // Price base type |
|
| 389 | - 0, // Info bits |
|
| 390 | - self::$PRODUCT_TYPE, // Type |
|
| 391 | - 0, // FK parent line |
|
| 392 | - 0, // Skip update total |
|
| 393 | - 0, // FK fournprice |
|
| 394 | - 0, // PA ht |
|
| 395 | - '', // Label |
|
| 378 | + $lineid, // ID of line to change |
|
| 379 | + $desc, // Description |
|
| 380 | + 0, // Unit price |
|
| 381 | + $depth, // Quantity |
|
| 382 | + 0, // Discount percentage |
|
| 383 | + '', // Date start |
|
| 384 | + '', // Date end |
|
| 385 | + 0, // VAT rate |
|
| 386 | + 0, // Local tax 1 |
|
| 387 | + 0, // Local tax 2 |
|
| 388 | + '', // Price base type |
|
| 389 | + 0, // Info bits |
|
| 390 | + self::$PRODUCT_TYPE, // Type |
|
| 391 | + 0, // FK parent line |
|
| 392 | + 0, // Skip update total |
|
| 393 | + 0, // FK fournprice |
|
| 394 | + 0, // PA ht |
|
| 395 | + '', // Label |
|
| 396 | 396 | SUBTOTALS_SPECIAL_CODE // Special code |
| 397 | 397 | ); |
| 398 | 398 | } elseif ($current_module == 'propal' && $this instanceof Propal) { |
| 399 | 399 | $result = $this->updateline( |
| 400 | - $lineid, // ID of line to change |
|
| 401 | - 0, // Unit price |
|
| 402 | - $depth, // Quantity |
|
| 403 | - 0, // Discount percentage |
|
| 404 | - 0, // VAT rate |
|
| 405 | - 0, // Local tax 1 |
|
| 406 | - 0, // Local tax 2 |
|
| 407 | - $desc, // Description |
|
| 408 | - '', // Price base type |
|
| 409 | - 0, // Info bits |
|
| 400 | + $lineid, // ID of line to change |
|
| 401 | + 0, // Unit price |
|
| 402 | + $depth, // Quantity |
|
| 403 | + 0, // Discount percentage |
|
| 404 | + 0, // VAT rate |
|
| 405 | + 0, // Local tax 1 |
|
| 406 | + 0, // Local tax 2 |
|
| 407 | + $desc, // Description |
|
| 408 | + '', // Price base type |
|
| 409 | + 0, // Info bits |
|
| 410 | 410 | SUBTOTALS_SPECIAL_CODE, // Special code |
| 411 | - 0, // FK parent line |
|
| 412 | - 0, // Skip update total |
|
| 413 | - 0, // FK fournprice |
|
| 414 | - 0, // PA ht |
|
| 415 | - '', // Label |
|
| 411 | + 0, // FK parent line |
|
| 412 | + 0, // Skip update total |
|
| 413 | + 0, // FK fournprice |
|
| 414 | + 0, // PA ht |
|
| 415 | + '', // Label |
|
| 416 | 416 | self::$PRODUCT_TYPE // Type |
| 417 | 417 | ); |
| 418 | 418 | } elseif ($current_module == 'commande' && $this instanceof Commande) { |
| 419 | 419 | $result = $this->updateline( |
| 420 | - $lineid, // ID of line to change |
|
| 421 | - $desc, // Description |
|
| 422 | - 0, // Unit price |
|
| 423 | - $depth, // Quantity |
|
| 424 | - 0, // Discount percentage |
|
| 425 | - 0, // VAT rate |
|
| 426 | - 0, // Local tax 1 |
|
| 427 | - 0, // Local tax 2 |
|
| 428 | - '', // Price base type |
|
| 429 | - 0, // Info bits |
|
| 430 | - '', // Date start |
|
| 431 | - '', // Date end |
|
| 432 | - self::$PRODUCT_TYPE, // Type |
|
| 433 | - 0, // FK parent line |
|
| 434 | - 0, // Skip update total |
|
| 435 | - 0, // FK fournprice |
|
| 436 | - 0, // PA ht |
|
| 437 | - '', // Label |
|
| 420 | + $lineid, // ID of line to change |
|
| 421 | + $desc, // Description |
|
| 422 | + 0, // Unit price |
|
| 423 | + $depth, // Quantity |
|
| 424 | + 0, // Discount percentage |
|
| 425 | + 0, // VAT rate |
|
| 426 | + 0, // Local tax 1 |
|
| 427 | + 0, // Local tax 2 |
|
| 428 | + '', // Price base type |
|
| 429 | + 0, // Info bits |
|
| 430 | + '', // Date start |
|
| 431 | + '', // Date end |
|
| 432 | + self::$PRODUCT_TYPE, // Type |
|
| 433 | + 0, // FK parent line |
|
| 434 | + 0, // Skip update total |
|
| 435 | + 0, // FK fournprice |
|
| 436 | + 0, // PA ht |
|
| 437 | + '', // Label |
|
| 438 | 438 | SUBTOTALS_SPECIAL_CODE // Special code |
| 439 | 439 | ); |
| 440 | 440 | } elseif ($current_module == 'facturerec' && $this instanceof FactureRec) { |
@@ -442,21 +442,21 @@ discard block |
||
| 442 | 442 | $objectline->fetch($lineid); |
| 443 | 443 | $line_rang = $objectline->rang; |
| 444 | 444 | $result = $this->updateline( |
| 445 | - $lineid, // ID of line to change |
|
| 446 | - $desc, // Description |
|
| 447 | - 0, // Unit price |
|
| 448 | - $depth, // Quantity |
|
| 449 | - 0, // VAT rate |
|
| 450 | - 0, // Local tax 1 |
|
| 451 | - 0, // Local tax 2 |
|
| 452 | - 0, // FK parent line |
|
| 453 | - 0, // Discount percentage |
|
| 454 | - '', // Price base type |
|
| 455 | - 0, // Info bits |
|
| 456 | - 0, // FK parent line |
|
| 457 | - 0, // PU ttc |
|
| 458 | - self::$PRODUCT_TYPE, // Type |
|
| 459 | - $line_rang, // Rang |
|
| 445 | + $lineid, // ID of line to change |
|
| 446 | + $desc, // Description |
|
| 447 | + 0, // Unit price |
|
| 448 | + $depth, // Quantity |
|
| 449 | + 0, // VAT rate |
|
| 450 | + 0, // Local tax 1 |
|
| 451 | + 0, // Local tax 2 |
|
| 452 | + 0, // FK parent line |
|
| 453 | + 0, // Discount percentage |
|
| 454 | + '', // Price base type |
|
| 455 | + 0, // Info bits |
|
| 456 | + 0, // FK parent line |
|
| 457 | + 0, // PU ttc |
|
| 458 | + self::$PRODUCT_TYPE, // Type |
|
| 459 | + $line_rang, // Rang |
|
| 460 | 460 | SUBTOTALS_SPECIAL_CODE // Special code |
| 461 | 461 | ); |
| 462 | 462 | } |
@@ -504,9 +504,9 @@ discard block |
||
| 504 | 504 | $result = 0; |
| 505 | 505 | $linerang -= 1; |
| 506 | 506 | |
| 507 | - $nb_lines = count($this->lines)+1; |
|
| 507 | + $nb_lines = count($this->lines) + 1; |
|
| 508 | 508 | |
| 509 | - for ($i = $linerang+1; $i < $nb_lines; $i++) { |
|
| 509 | + for ($i = $linerang + 1; $i < $nb_lines; $i++) { |
|
| 510 | 510 | if ($this->lines[$i]->special_code == SUBTOTALS_SPECIAL_CODE) { |
| 511 | 511 | if (abs($this->lines[$i]->qty) <= (int) $this->lines[$linerang]->qty) { |
| 512 | 512 | return 1; |
@@ -606,16 +606,16 @@ discard block |
||
| 606 | 606 | public function getSubtotalLineAmount($line) |
| 607 | 607 | { |
| 608 | 608 | $final_amount = 0; |
| 609 | - for ($i = $line->rang-1; $i > 0; $i--) { |
|
| 610 | - if (is_null($this->lines[$i-1]) || $this->lines[$i-1]->rang >= $line->rang) { |
|
| 609 | + for ($i = $line->rang - 1; $i > 0; $i--) { |
|
| 610 | + if (is_null($this->lines[$i - 1]) || $this->lines[$i - 1]->rang >= $line->rang) { |
|
| 611 | 611 | continue; |
| 612 | 612 | } |
| 613 | - if ($this->lines[$i-1]->special_code == SUBTOTALS_SPECIAL_CODE && $this->lines[$i-1]->qty > 0) { |
|
| 614 | - if ($this->lines[$i-1]->qty <= abs($line->qty)) { |
|
| 613 | + if ($this->lines[$i - 1]->special_code == SUBTOTALS_SPECIAL_CODE && $this->lines[$i - 1]->qty > 0) { |
|
| 614 | + if ($this->lines[$i - 1]->qty <= abs($line->qty)) { |
|
| 615 | 615 | return price($final_amount); |
| 616 | 616 | } |
| 617 | 617 | } else { |
| 618 | - $final_amount += $this->lines[$i-1]->total_ht; |
|
| 618 | + $final_amount += $this->lines[$i - 1]->total_ht; |
|
| 619 | 619 | } |
| 620 | 620 | } |
| 621 | 621 | return price($final_amount); |
@@ -633,16 +633,16 @@ discard block |
||
| 633 | 633 | public function getSubtotalLineMulticurrencyAmount($line) |
| 634 | 634 | { |
| 635 | 635 | $final_amount = 0; |
| 636 | - for ($i = $line->rang-1; $i > 0; $i--) { |
|
| 637 | - if (is_null($this->lines[$i-1]) || $this->lines[$i-1]->rang >= $line->rang) { |
|
| 636 | + for ($i = $line->rang - 1; $i > 0; $i--) { |
|
| 637 | + if (is_null($this->lines[$i - 1]) || $this->lines[$i - 1]->rang >= $line->rang) { |
|
| 638 | 638 | continue; |
| 639 | 639 | } |
| 640 | - if ($this->lines[$i-1]->special_code == SUBTOTALS_SPECIAL_CODE && $this->lines[$i-1]->qty>0) { |
|
| 641 | - if ($this->lines[$i-1]->qty <= abs($line->qty)) { |
|
| 640 | + if ($this->lines[$i - 1]->special_code == SUBTOTALS_SPECIAL_CODE && $this->lines[$i - 1]->qty > 0) { |
|
| 641 | + if ($this->lines[$i - 1]->qty <= abs($line->qty)) { |
|
| 642 | 642 | return price($final_amount); |
| 643 | 643 | } |
| 644 | 644 | } else { |
| 645 | - $final_amount += $this->lines[$i-1]->multicurrency_total_ht; |
|
| 645 | + $final_amount += $this->lines[$i - 1]->multicurrency_total_ht; |
|
| 646 | 646 | } |
| 647 | 647 | } |
| 648 | 648 | return price($final_amount); |
@@ -710,7 +710,7 @@ discard block |
||
| 710 | 710 | $toDisableLines = array(); |
| 711 | 711 | $toDisable = true; |
| 712 | 712 | $oldDesc = ""; |
| 713 | - $oldDepth = 0; |
|
| 713 | + $oldDepth = 0; |
|
| 714 | 714 | |
| 715 | 715 | foreach ($this->lines as $titleLine) { |
| 716 | 716 | if ($titleLine->special_code != SUBTOTALS_SPECIAL_CODE || $titleLine->qty <= 0) { |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | $toDisableLines = array_merge($toDisableLines, array($titleLine->id, $line->id)); |
| 730 | 730 | } |
| 731 | 731 | $oldDesc = ""; |
| 732 | - $oldDepth = 0; |
|
| 732 | + $oldDepth = 0; |
|
| 733 | 733 | $toDisable = true; |
| 734 | 734 | break; |
| 735 | 735 | } |
@@ -39,29 +39,29 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | // Load Dolibarr environment |
| 41 | 41 | require '../main.inc.php'; |
| 42 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
| 43 | -require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; |
|
| 44 | -require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 45 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/product.lib.php'; |
|
| 46 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/sendings.lib.php'; |
|
| 47 | -require_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; |
|
| 48 | -require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
| 49 | -require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
| 50 | -require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php'; |
|
| 51 | -require_once DOL_DOCUMENT_ROOT . '/product/stock/class/productlot.class.php'; |
|
| 52 | -require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php'; |
|
| 42 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
| 43 | +require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; |
|
| 44 | +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 45 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; |
|
| 46 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php'; |
|
| 47 | +require_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; |
|
| 48 | +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
| 49 | +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
| 50 | +require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; |
|
| 51 | +require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; |
|
| 52 | +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; |
|
| 53 | 53 | if (isModEnabled("product") || isModEnabled("service")) { |
| 54 | - require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 54 | + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 55 | 55 | } |
| 56 | 56 | if (isModEnabled("propal")) { |
| 57 | - require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; |
|
| 57 | + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; |
|
| 58 | 58 | } |
| 59 | 59 | if (isModEnabled('productbatch')) { |
| 60 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productbatch.class.php'; |
|
| 60 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; |
|
| 61 | 61 | } |
| 62 | 62 | if (isModEnabled('project')) { |
| 63 | - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 64 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 63 | + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 64 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $extrafields->fetch_name_optionals_label($objectorder->table_element_line); |
| 115 | 115 | |
| 116 | 116 | // Load object. Make an object->fetch |
| 117 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once' |
|
| 117 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once' |
|
| 118 | 118 | |
| 119 | 119 | // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context |
| 120 | 120 | $hookmanager->initHooks(array('expeditioncard', 'globalcard')); |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $permissiontoeditextra = dol_eval($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')]); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | -$upload_dir = $conf->expedition->dir_output . '/sending'; |
|
| 147 | +$upload_dir = $conf->expedition->dir_output.'/sending'; |
|
| 148 | 148 | |
| 149 | 149 | $editColspan = 0; |
| 150 | 150 | $objectsrc = null; |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | if ($cancel) { |
| 167 | 167 | if ($origin && $origin_id > 0) { |
| 168 | 168 | if ($origin == 'commande') { |
| 169 | - header("Location: " . DOL_URL_ROOT . '/expedition/shipment.php?id=' . ((int) $origin_id)); |
|
| 169 | + header("Location: ".DOL_URL_ROOT.'/expedition/shipment.php?id='.((int) $origin_id)); |
|
| 170 | 170 | exit; |
| 171 | 171 | } |
| 172 | 172 | } else { |
@@ -175,10 +175,10 @@ discard block |
||
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 178 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 179 | 179 | |
| 180 | 180 | // Actions to build doc |
| 181 | - include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; |
|
| 181 | + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
|
| 182 | 182 | |
| 183 | 183 | // Back to draft |
| 184 | 184 | if ($action == 'setdraft' && $permissiontoadd) { |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | if ($result < 0) { |
| 188 | 188 | setEventMessages($object->error, $object->errors, 'errors'); |
| 189 | 189 | } else { |
| 190 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 190 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 191 | 191 | exit; |
| 192 | 192 | } |
| 193 | 193 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | if ($result < 0) { |
| 199 | 199 | setEventMessages($object->error, $object->errors, 'errors'); |
| 200 | 200 | } else { |
| 201 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 201 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 202 | 202 | exit; |
| 203 | 203 | } |
| 204 | 204 | } |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | setEventMessages($object->error, $object->errors, 'errors'); |
| 220 | 220 | $action = 'editref_customer'; |
| 221 | 221 | } else { |
| 222 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 222 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 223 | 223 | exit; |
| 224 | 224 | } |
| 225 | 225 | } |
@@ -296,16 +296,16 @@ discard block |
||
| 296 | 296 | $product_batch_used = array(); |
| 297 | 297 | |
| 298 | 298 | for ($i = 0; $i < $num; $i++) { |
| 299 | - $idl = "idl" . $i; |
|
| 299 | + $idl = "idl".$i; |
|
| 300 | 300 | |
| 301 | 301 | $sub_qty = array(); |
| 302 | 302 | $subtotalqty = 0; |
| 303 | 303 | |
| 304 | 304 | $j = 0; |
| 305 | 305 | |
| 306 | - $batch = "batchl" . $i . "_0"; |
|
| 307 | - $stockLocation = "ent1" . $i . "_0"; |
|
| 308 | - $qty = "qtyl" . $i; |
|
| 306 | + $batch = "batchl".$i."_0"; |
|
| 307 | + $stockLocation = "ent1".$i."_0"; |
|
| 308 | + $qty = "qtyl".$i; |
|
| 309 | 309 | |
| 310 | 310 | $is_batch_or_serial = 0; |
| 311 | 311 | if (!empty($objectsrc->lines[$i]->fk_product)) { |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | if (isModEnabled('productbatch') && $objectsrc->lines[$i]->product_tobatch) { |
| 321 | 321 | if (GETPOSTISSET($batch)) { |
| 322 | 322 | //shipment line with batch-enable product |
| 323 | - $qty .= '_' . $j; |
|
| 323 | + $qty .= '_'.$j; |
|
| 324 | 324 | while (GETPOSTISSET($batch)) { |
| 325 | 325 | // save line of detail into sub_qty |
| 326 | 326 | $sub_qty[$j]['q'] = price2num(GETPOST($qty, 'alpha'), 'MS'); // the qty we want to move for this stock record |
@@ -339,8 +339,8 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | $j++; |
| 342 | - $batch = "batchl" . $i . "_" . $j; |
|
| 343 | - $qty = "qtyl" . $i . '_' . $j; |
|
| 342 | + $batch = "batchl".$i."_".$j; |
|
| 343 | + $qty = "qtyl".$i.'_'.$j; |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | $batch_line[$i]['detail'] = $sub_qty; // array of details |
@@ -354,13 +354,13 @@ discard block |
||
| 354 | 354 | // We try to set an amount |
| 355 | 355 | // Case we don't use the list of available qty for each warehouse/lot |
| 356 | 356 | // GUI does not allow this yet |
| 357 | - setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse") . ' (' . $langs->trans("Line") . ' ' . GETPOSTINT($idl) . ')', null, 'errors'); |
|
| 357 | + setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse").' ('.$langs->trans("Line").' '.GETPOSTINT($idl).')', null, 'errors'); |
|
| 358 | 358 | $error++; |
| 359 | 359 | } |
| 360 | 360 | } |
| 361 | 361 | } elseif (GETPOSTISSET($stockLocation)) { |
| 362 | 362 | //shipment line from multiple stock locations |
| 363 | - $qty .= '_' . $j; |
|
| 363 | + $qty .= '_'.$j; |
|
| 364 | 364 | while (GETPOSTISSET($stockLocation)) { |
| 365 | 365 | // save sub line of warehouse |
| 366 | 366 | $stockLine[$i][$j]['qty'] = price2num(GETPOST($qty, 'alpha'), 'MS'); |
@@ -371,8 +371,8 @@ discard block |
||
| 371 | 371 | $subtotalqty += price2num(GETPOST($qty, 'alpha'), 'MS'); |
| 372 | 372 | |
| 373 | 373 | $j++; |
| 374 | - $stockLocation = "ent1" . $i . "_" . $j; |
|
| 375 | - $qty = "qtyl" . $i . '_' . $j; |
|
| 374 | + $stockLocation = "ent1".$i."_".$j; |
|
| 375 | + $qty = "qtyl".$i.'_'.$j; |
|
| 376 | 376 | } |
| 377 | 377 | } else { |
| 378 | 378 | //shipment line for product with no batch management and no multiple stock location |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | if (isset($extrafields->attributes[$object->table_element_line]['label']) && is_array($extrafields->attributes[$object->table_element_line]['label'])) { |
| 396 | 396 | // Get extra fields |
| 397 | 397 | foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) { |
| 398 | - unset($_POST["options_" . $key]); |
|
| 398 | + unset($_POST["options_".$key]); |
|
| 399 | 399 | } |
| 400 | 400 | } |
| 401 | 401 | } |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | if (($totalqty > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) && !$error) { // There is at least one thing to ship and no error |
| 404 | 404 | $selected_subtotal_lines = GETPOST('subtotal_toselect', 'array'); |
| 405 | 405 | for ($i = 0; $i < $num; $i++) { |
| 406 | - $qty = "qtyl" . $i; |
|
| 406 | + $qty = "qtyl".$i; |
|
| 407 | 407 | |
| 408 | 408 | if (!isset($batch_line[$i])) { |
| 409 | 409 | // not batch mode |
@@ -421,8 +421,8 @@ discard block |
||
| 421 | 421 | } |
| 422 | 422 | } else { |
| 423 | 423 | if (GETPOSTFLOAT($qty) > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { |
| 424 | - $ent = "entl" . $i; |
|
| 425 | - $idl = "idl" . $i; |
|
| 424 | + $ent = "entl".$i; |
|
| 425 | + $idl = "idl".$i; |
|
| 426 | 426 | $entrepot_id = is_numeric(GETPOSTINT($ent)) ? GETPOSTINT($ent) : GETPOSTINT('entrepot_id'); |
| 427 | 427 | if ($entrepot_id < 0) { |
| 428 | 428 | $entrepot_id = ''; |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | } elseif (!$error) { |
| 476 | 476 | $labelfieldmissing = $langs->transnoentitiesnoconv("QtyToShip"); |
| 477 | 477 | if (isModEnabled('stock')) { |
| 478 | - $labelfieldmissing .= '/' . $langs->transnoentitiesnoconv("Warehouse"); |
|
| 478 | + $labelfieldmissing .= '/'.$langs->transnoentitiesnoconv("Warehouse"); |
|
| 479 | 479 | } |
| 480 | 480 | setEventMessages($langs->trans("ErrorFieldRequired", $labelfieldmissing), null, 'errors'); |
| 481 | 481 | $error++; |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | $line->extraparams = $objectsrc_line->extraparams; |
| 492 | 492 | $line->setExtraParameters(); |
| 493 | 493 | } |
| 494 | - header("Location: card.php?id=" . $object->id); |
|
| 494 | + header("Location: card.php?id=".$object->id); |
|
| 495 | 495 | exit; |
| 496 | 496 | } else { |
| 497 | 497 | $db->rollback(); |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | if ($result > 0) { |
| 507 | 507 | $db->commit(); |
| 508 | 508 | |
| 509 | - header("Location: " . DOL_URL_ROOT . '/delivery/card.php?action=create_delivery&token=' . newToken() . '&id=' . $result); |
|
| 509 | + header("Location: ".DOL_URL_ROOT.'/delivery/card.php?action=create_delivery&token='.newToken().'&id='.$result); |
|
| 510 | 510 | exit; |
| 511 | 511 | } else { |
| 512 | 512 | $db->rollback(); |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); |
| 560 | 560 | $result = $object->delete($user, 0, (bool) $also_update_stock); |
| 561 | 561 | if ($result > 0) { |
| 562 | - header("Location: " . DOL_URL_ROOT . '/expedition/index.php'); |
|
| 562 | + header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); |
|
| 563 | 563 | exit; |
| 564 | 564 | } else { |
| 565 | 565 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 597 | 597 | } |
| 598 | 598 | |
| 599 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 599 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 600 | 600 | exit; |
| 601 | 601 | } else { |
| 602 | 602 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | } elseif ($action == 'confirm_sign' && $confirm == 'yes' && $user->hasRight('expedition', 'creer')) { |
| 605 | 605 | $result = $object->setSignedStatus($user, GETPOSTINT('signed_status'), 0, 'SHIPPING_MODIFY'); |
| 606 | 606 | if ($result >= 0) { |
| 607 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 607 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 608 | 608 | exit; |
| 609 | 609 | } else { |
| 610 | 610 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | } elseif ($action == 'confirm_unsign' && $confirm == 'yes' && $user->hasRight('expedition', 'creer')) { |
| 613 | 613 | $result = $object->setSignedStatus($user, Expedition::$SIGNED_STATUSES['STATUS_NO_SIGNATURE'], 0, 'SHIPPING_MODIFY'); |
| 614 | 614 | if ($result >= 0) { |
| 615 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 615 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 616 | 616 | exit; |
| 617 | 617 | } else { |
| 618 | 618 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -621,7 +621,7 @@ discard block |
||
| 621 | 621 | $datedelivery = dol_mktime(GETPOSTINT('liv_hour'), GETPOSTINT('liv_min'), 0, GETPOSTINT('liv_month'), GETPOSTINT('liv_day'), GETPOSTINT('liv_year')); |
| 622 | 622 | |
| 623 | 623 | $object->fetch($id); |
| 624 | - $result = $object->setDeliveryDate($user, $datedelivery); // Set the planned delivery date |
|
| 624 | + $result = $object->setDeliveryDate($user, $datedelivery); // Set the planned delivery date |
|
| 625 | 625 | if ($result < 0) { |
| 626 | 626 | setEventMessages($object->error, $object->errors, 'errors'); |
| 627 | 627 | } |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | |
| 664 | 664 | if (!$error) { |
| 665 | 665 | if ($object->update($user) >= 0) { |
| 666 | - header("Location: card.php?id=" . $object->id); |
|
| 666 | + header("Location: card.php?id=".$object->id); |
|
| 667 | 667 | exit; |
| 668 | 668 | } |
| 669 | 669 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | $object->fetch($id); |
| 675 | 675 | $result = $object->setBilled(); |
| 676 | 676 | if ($result >= 0) { |
| 677 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 677 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 678 | 678 | exit(); |
| 679 | 679 | } |
| 680 | 680 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | $object->fetch($id); |
| 683 | 683 | $result = $object->setClosed(); |
| 684 | 684 | if ($result >= 0) { |
| 685 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 685 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 686 | 686 | exit(); |
| 687 | 687 | } |
| 688 | 688 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | } |
| 717 | 717 | |
| 718 | 718 | if (!$error) { |
| 719 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 719 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 720 | 720 | exit(); |
| 721 | 721 | } else { |
| 722 | 722 | setEventMessages($line->error, $line->errors, 'errors'); |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | // Unset extrafield POST Data |
| 741 | 741 | if (is_array($extrafields->attributes[$object->table_element_line]['label'])) { |
| 742 | 742 | foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) { |
| 743 | - unset($_POST["options_" . $key]); |
|
| 743 | + unset($_POST["options_".$key]); |
|
| 744 | 744 | } |
| 745 | 745 | } |
| 746 | 746 | $line->fk_product = $lines[$i]->fk_product; |
@@ -748,8 +748,8 @@ discard block |
||
| 748 | 748 | // line with lot |
| 749 | 749 | foreach ($lines[$i]->detail_batch as $detail_batch) { |
| 750 | 750 | $lotStock = new Productbatch($db); |
| 751 | - $batch = "batchl" . $detail_batch->fk_expeditiondet . "_" . $detail_batch->fk_origin_stock; |
|
| 752 | - $qty = "qtyl" . $detail_batch->fk_expeditiondet . '_' . $detail_batch->id; |
|
| 751 | + $batch = "batchl".$detail_batch->fk_expeditiondet."_".$detail_batch->fk_origin_stock; |
|
| 752 | + $qty = "qtyl".$detail_batch->fk_expeditiondet.'_'.$detail_batch->id; |
|
| 753 | 753 | $batch_id = GETPOSTINT($batch); |
| 754 | 754 | $batch_qty = GETPOSTFLOAT($qty); |
| 755 | 755 | if (!empty($batch_id)) { |
@@ -785,8 +785,8 @@ discard block |
||
| 785 | 785 | } |
| 786 | 786 | // add new batch |
| 787 | 787 | $lotStock = new Productbatch($db); |
| 788 | - $batch = "batchl" . $line_id . "_0"; |
|
| 789 | - $qty = "qtyl" . $line_id . "_0"; |
|
| 788 | + $batch = "batchl".$line_id."_0"; |
|
| 789 | + $qty = "qtyl".$line_id."_0"; |
|
| 790 | 790 | $batch_id = GETPOSTINT($batch); |
| 791 | 791 | $batch_qty = GETPOSTFLOAT($qty); |
| 792 | 792 | $lineIdToAddLot = 0; |
@@ -849,8 +849,8 @@ discard block |
||
| 849 | 849 | // line without lot |
| 850 | 850 | if ($lines[$i]->entrepot_id == 0) { |
| 851 | 851 | // single warehouse shipment line or line in several warehouses context but with warehouse not defined |
| 852 | - $stockLocation = "entl" . $line_id; |
|
| 853 | - $qty = "qtyl" . $line_id; |
|
| 852 | + $stockLocation = "entl".$line_id; |
|
| 853 | + $qty = "qtyl".$line_id; |
|
| 854 | 854 | $line->id = $line_id; |
| 855 | 855 | $line->entrepot_id = GETPOSTINT((string) $stockLocation); |
| 856 | 856 | $line->qty = GETPOSTFLOAT($qty); |
@@ -862,8 +862,8 @@ discard block |
||
| 862 | 862 | unset($_POST[$qty]); |
| 863 | 863 | } elseif ($lines[$i]->entrepot_id > 0) { |
| 864 | 864 | // single warehouse shipment line |
| 865 | - $stockLocation = "entl" . $line_id; |
|
| 866 | - $qty = "qtyl" . $line_id; |
|
| 865 | + $stockLocation = "entl".$line_id; |
|
| 866 | + $qty = "qtyl".$line_id; |
|
| 867 | 867 | $line->id = $line_id; |
| 868 | 868 | $line->entrepot_id = GETPOSTINT($stockLocation); |
| 869 | 869 | $line->qty = GETPOSTFLOAT($qty); |
@@ -877,8 +877,8 @@ discard block |
||
| 877 | 877 | // multi warehouse shipment lines |
| 878 | 878 | foreach ($lines[$i]->details_entrepot as $detail_entrepot) { |
| 879 | 879 | if (!$error) { |
| 880 | - $stockLocation = "entl" . $detail_entrepot->line_id; |
|
| 881 | - $qty = "qtyl" . $detail_entrepot->line_id; |
|
| 880 | + $stockLocation = "entl".$detail_entrepot->line_id; |
|
| 881 | + $qty = "qtyl".$detail_entrepot->line_id; |
|
| 882 | 882 | $warehouse = GETPOSTINT($stockLocation); |
| 883 | 883 | if (!empty($warehouse)) { |
| 884 | 884 | $line->id = $detail_entrepot->line_id; |
@@ -896,7 +896,7 @@ discard block |
||
| 896 | 896 | } |
| 897 | 897 | } |
| 898 | 898 | } elseif (!isModEnabled('stock') && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. |
| 899 | - $qty = "qtyl" . $line_id; |
|
| 899 | + $qty = "qtyl".$line_id; |
|
| 900 | 900 | $line->id = $line_id; |
| 901 | 901 | $line->qty = GETPOSTFLOAT($qty); |
| 902 | 902 | $line->entrepot_id = 0; |
@@ -910,7 +910,7 @@ discard block |
||
| 910 | 910 | } |
| 911 | 911 | } else { |
| 912 | 912 | // Product no predefined |
| 913 | - $qty = "qtyl" . $line_id; |
|
| 913 | + $qty = "qtyl".$line_id; |
|
| 914 | 914 | $line->id = $line_id; |
| 915 | 915 | $line->qty = GETPOSTFLOAT($qty); |
| 916 | 916 | $line->entrepot_id = 0; |
@@ -953,11 +953,11 @@ discard block |
||
| 953 | 953 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 954 | 954 | } |
| 955 | 955 | } else { |
| 956 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited |
|
| 956 | + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited |
|
| 957 | 957 | exit(); |
| 958 | 958 | } |
| 959 | 959 | } elseif ($action == 'updateline' && $permissiontoadd && GETPOST('cancel', 'alpha') == $langs->trans("Cancel")) { |
| 960 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited |
|
| 960 | + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited |
|
| 961 | 961 | exit(); |
| 962 | 962 | } elseif ($action == 'confirm_sign' && $confirm == 'yes' && $permissiontoadd) { |
| 963 | 963 | $result = $object->setSignedStatus($user, GETPOSTINT('signed_status'), 0, 'SHIPPING_MODIFY'); |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 980 | 980 | } |
| 981 | 981 | |
| 982 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 982 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 983 | 983 | exit; |
| 984 | 984 | } else { |
| 985 | 985 | $mesg = $object->error; |
@@ -1004,14 +1004,14 @@ discard block |
||
| 1004 | 1004 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 1005 | 1005 | } |
| 1006 | 1006 | |
| 1007 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 1007 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 1008 | 1008 | exit; |
| 1009 | 1009 | } else { |
| 1010 | 1010 | $mesg = $object->error; |
| 1011 | 1011 | } |
| 1012 | 1012 | } |
| 1013 | 1013 | |
| 1014 | - include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php'; |
|
| 1014 | + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; |
|
| 1015 | 1015 | |
| 1016 | 1016 | // Actions to send emails |
| 1017 | 1017 | if (empty($id)) { |
@@ -1021,8 +1021,8 @@ discard block |
||
| 1021 | 1021 | $paramname = 'id'; |
| 1022 | 1022 | $autocopy = 'MAIN_MAIL_AUTOCOPY_SHIPMENT_TO'; |
| 1023 | 1023 | $mode = 'emailfromshipment'; |
| 1024 | - $trackid = 'shi' . $object->id; |
|
| 1025 | - include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
| 1024 | + $trackid = 'shi'.$object->id; |
|
| 1025 | + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
| 1026 | 1026 | } |
| 1027 | 1027 | |
| 1028 | 1028 | |
@@ -1030,7 +1030,7 @@ discard block |
||
| 1030 | 1030 | * View |
| 1031 | 1031 | */ |
| 1032 | 1032 | |
| 1033 | -$title = $object->ref . ' - ' . $langs->trans("Shipment"); |
|
| 1033 | +$title = $object->ref.' - '.$langs->trans("Shipment"); |
|
| 1034 | 1034 | if ($action == 'create2') { |
| 1035 | 1035 | $title = $langs->trans("CreateShipment"); |
| 1036 | 1036 | } |
@@ -1058,7 +1058,7 @@ discard block |
||
| 1058 | 1058 | if ($action == 'create2') { |
| 1059 | 1059 | print load_fiche_titre($langs->trans("CreateShipment"), '', 'dolly'); |
| 1060 | 1060 | |
| 1061 | - print '<br>' . $langs->trans("ShipmentCreationIsDoneFromOrder"); |
|
| 1061 | + print '<br>'.$langs->trans("ShipmentCreationIsDoneFromOrder"); |
|
| 1062 | 1062 | $action = ''; |
| 1063 | 1063 | $id = ''; |
| 1064 | 1064 | $ref = ''; |
@@ -1090,13 +1090,13 @@ discard block |
||
| 1090 | 1090 | $entrepot = new Entrepot($db); |
| 1091 | 1091 | } |
| 1092 | 1092 | |
| 1093 | - print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
|
| 1094 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 1093 | + print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
|
| 1094 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 1095 | 1095 | print '<input type="hidden" name="action" value="add">'; |
| 1096 | - print '<input type="hidden" name="origin" value="' . $origin . '">'; |
|
| 1097 | - print '<input type="hidden" name="origin_id" value="' . $object->id . '">'; |
|
| 1096 | + print '<input type="hidden" name="origin" value="'.$origin.'">'; |
|
| 1097 | + print '<input type="hidden" name="origin_id" value="'.$object->id.'">'; |
|
| 1098 | 1098 | if (GETPOSTINT('entrepot_id')) { |
| 1099 | - print '<input type="hidden" name="entrepot_id" value="' . GETPOSTINT('entrepot_id') . '">'; |
|
| 1099 | + print '<input type="hidden" name="entrepot_id" value="'.GETPOSTINT('entrepot_id').'">'; |
|
| 1100 | 1100 | } |
| 1101 | 1101 | |
| 1102 | 1102 | print dol_get_fiche_head([]); |
@@ -1126,13 +1126,13 @@ discard block |
||
| 1126 | 1126 | print $langs->trans('RefCustomer'); |
| 1127 | 1127 | } |
| 1128 | 1128 | print '</td><td colspan="3">'; |
| 1129 | - print '<input type="text" name="ref_customer" value="' . $object->ref_client . '" />'; |
|
| 1129 | + print '<input type="text" name="ref_customer" value="'.$object->ref_client.'" />'; |
|
| 1130 | 1130 | print '</td>'; |
| 1131 | 1131 | print '</tr>'; |
| 1132 | 1132 | |
| 1133 | 1133 | // Tiers |
| 1134 | - print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans('Company') . '</td>'; |
|
| 1135 | - print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>'; |
|
| 1134 | + print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Company').'</td>'; |
|
| 1135 | + print '<td colspan="3">'.$soc->getNomUrl(1).'</td>'; |
|
| 1136 | 1136 | print '</tr>'; |
| 1137 | 1137 | |
| 1138 | 1138 | // Project |
@@ -1147,16 +1147,16 @@ discard block |
||
| 1147 | 1147 | |
| 1148 | 1148 | $langs->load("projects"); |
| 1149 | 1149 | print '<tr>'; |
| 1150 | - print '<td>' . $langs->trans("Project") . '</td><td colspan="2">'; |
|
| 1150 | + print '<td>'.$langs->trans("Project").'</td><td colspan="2">'; |
|
| 1151 | 1151 | print img_picto('', 'project', 'class="pictofixedwidth"'); |
| 1152 | 1152 | print $formproject->select_projects($soc->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'widthcentpercentminusxx'); |
| 1153 | - print ' <a class="paddingleft" href="' . DOL_URL_ROOT . '/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create&socid=' . $soc->id) . '"><span class="fa fa-plus-circle valignmiddle"></span></a>'; |
|
| 1153 | + print ' <a class="paddingleft" href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle"></span></a>'; |
|
| 1154 | 1154 | print '</td>'; |
| 1155 | 1155 | print '</tr>'; |
| 1156 | 1156 | } |
| 1157 | 1157 | |
| 1158 | 1158 | // Date delivery planned |
| 1159 | - print '<tr><td>' . $langs->trans("DateDeliveryPlanned") . '</td>'; |
|
| 1159 | + print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>'; |
|
| 1160 | 1160 | print '<td colspan="3">'; |
| 1161 | 1161 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
| 1162 | 1162 | $date_delivery = ($date_delivery ? $date_delivery : $object->date_delivery); // $date_delivery comes from GETPOST |
@@ -1165,7 +1165,7 @@ discard block |
||
| 1165 | 1165 | print '</tr>'; |
| 1166 | 1166 | |
| 1167 | 1167 | // Date shipment (sending) |
| 1168 | - print '<tr><td>' . $langs->trans("DateShipping") . '</td>'; |
|
| 1168 | + print '<tr><td>'.$langs->trans("DateShipping").'</td>'; |
|
| 1169 | 1169 | print '<td colspan="3">'; |
| 1170 | 1170 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
| 1171 | 1171 | $date_shipping = ($date_shipping ? $date_shipping : $object->date_shipping); // $date_shipping comes from GETPOST |
@@ -1174,7 +1174,7 @@ discard block |
||
| 1174 | 1174 | print '</tr>'; |
| 1175 | 1175 | |
| 1176 | 1176 | // Note Public |
| 1177 | - print '<tr><td>' . $langs->trans("NotePublic") . '</td>'; |
|
| 1177 | + print '<tr><td>'.$langs->trans("NotePublic").'</td>'; |
|
| 1178 | 1178 | print '<td colspan="3">'; |
| 1179 | 1179 | $doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%'); |
| 1180 | 1180 | print $doleditor->Create(1); |
@@ -1182,7 +1182,7 @@ discard block |
||
| 1182 | 1182 | |
| 1183 | 1183 | // Note Private |
| 1184 | 1184 | if ($object->note_private && !$user->socid) { |
| 1185 | - print '<tr><td>' . $langs->trans("NotePrivate") . '</td>'; |
|
| 1185 | + print '<tr><td>'.$langs->trans("NotePrivate").'</td>'; |
|
| 1186 | 1186 | print '<td colspan="3">'; |
| 1187 | 1187 | $doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%'); |
| 1188 | 1188 | print $doleditor->Create(1); |
@@ -1194,19 +1194,19 @@ discard block |
||
| 1194 | 1194 | print $langs->trans("Weight"); |
| 1195 | 1195 | print '</td><td colspan="3">'; |
| 1196 | 1196 | print img_picto('', 'fa-balance-scale', 'class="pictofixedwidth"'); |
| 1197 | - print '<input name="weight" size="4" value="' . GETPOSTINT('weight') . '"> '; |
|
| 1197 | + print '<input name="weight" size="4" value="'.GETPOSTINT('weight').'"> '; |
|
| 1198 | 1198 | $text = $formproduct->selectMeasuringUnits("weight_units", "weight", (string) GETPOSTINT('weight_units'), 0, 2); |
| 1199 | 1199 | $htmltext = $langs->trans("KeepEmptyForAutoCalculation"); |
| 1200 | 1200 | print $form->textwithpicto($text, $htmltext); |
| 1201 | 1201 | print '</td></tr>'; |
| 1202 | 1202 | // Dim |
| 1203 | 1203 | print '<tr><td>'; |
| 1204 | - print $langs->trans("Width") . ' x ' . $langs->trans("Height") . ' x ' . $langs->trans("Depth"); |
|
| 1204 | + print $langs->trans("Width").' x '.$langs->trans("Height").' x '.$langs->trans("Depth"); |
|
| 1205 | 1205 | print ' </td><td colspan="3">'; |
| 1206 | 1206 | print img_picto('', 'fa-ruler', 'class="pictofixedwidth"'); |
| 1207 | - print '<input name="sizeW" size="4" value="' . GETPOSTINT('sizeW') . '">'; |
|
| 1208 | - print ' x <input name="sizeH" size="4" value="' . GETPOSTINT('sizeH') . '">'; |
|
| 1209 | - print ' x <input name="sizeS" size="4" value="' . GETPOSTINT('sizeS') . '">'; |
|
| 1207 | + print '<input name="sizeW" size="4" value="'.GETPOSTINT('sizeW').'">'; |
|
| 1208 | + print ' x <input name="sizeH" size="4" value="'.GETPOSTINT('sizeH').'">'; |
|
| 1209 | + print ' x <input name="sizeS" size="4" value="'.GETPOSTINT('sizeS').'">'; |
|
| 1210 | 1210 | print ' '; |
| 1211 | 1211 | $text = $formproduct->selectMeasuringUnits("size_units", "size", (string) GETPOSTINT('size_units'), 0, 2); |
| 1212 | 1212 | $htmltext = $langs->trans("KeepEmptyForAutoCalculation"); |
@@ -1214,7 +1214,7 @@ discard block |
||
| 1214 | 1214 | print '</td></tr>'; |
| 1215 | 1215 | |
| 1216 | 1216 | // Delivery method |
| 1217 | - print "<tr><td>" . $langs->trans("DeliveryMethod") . "</td>"; |
|
| 1217 | + print "<tr><td>".$langs->trans("DeliveryMethod")."</td>"; |
|
| 1218 | 1218 | print '<td colspan="3">'; |
| 1219 | 1219 | $expe->fetch_delivery_methods(); |
| 1220 | 1220 | print img_picto('', 'dolly', 'class="pictofixedwidth"'); |
@@ -1225,16 +1225,16 @@ discard block |
||
| 1225 | 1225 | print "</td></tr>\n"; |
| 1226 | 1226 | |
| 1227 | 1227 | // Tracking number |
| 1228 | - print "<tr><td>" . $langs->trans("TrackingNumber") . "</td>"; |
|
| 1228 | + print "<tr><td>".$langs->trans("TrackingNumber")."</td>"; |
|
| 1229 | 1229 | print '<td colspan="3">'; |
| 1230 | 1230 | print img_picto('', 'barcode', 'class="pictofixedwidth"'); |
| 1231 | - print '<input name="tracking_number" size="20" value="' . GETPOST('tracking_number', 'alpha') . '">'; |
|
| 1231 | + print '<input name="tracking_number" size="20" value="'.GETPOST('tracking_number', 'alpha').'">'; |
|
| 1232 | 1232 | print "</td></tr>\n"; |
| 1233 | 1233 | |
| 1234 | 1234 | // Incoterms |
| 1235 | 1235 | if (isModEnabled('incoterm')) { |
| 1236 | 1236 | print '<tr>'; |
| 1237 | - print '<td><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1) . '</label></td>'; |
|
| 1237 | + print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>'; |
|
| 1238 | 1238 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
| 1239 | 1239 | print img_picto('', 'incoterm', 'class="pictofixedwidth"'); |
| 1240 | 1240 | print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : '')); |
@@ -1242,10 +1242,10 @@ discard block |
||
| 1242 | 1242 | } |
| 1243 | 1243 | |
| 1244 | 1244 | // Document model |
| 1245 | - include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; |
|
| 1245 | + include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; |
|
| 1246 | 1246 | $list = ModelePdfExpedition::liste_modeles($db); |
| 1247 | 1247 | if (is_countable($list) && count($list) > 1) { |
| 1248 | - print "<tr><td>" . $langs->trans("DefaultModel") . "</td>"; |
|
| 1248 | + print "<tr><td>".$langs->trans("DefaultModel")."</td>"; |
|
| 1249 | 1249 | print '<td colspan="3">'; |
| 1250 | 1250 | print img_picto('', 'pdf', 'class="pictofixedwidth"'); |
| 1251 | 1251 | print $form->selectarray('model', $list, getDolGlobalString('EXPEDITION_ADDON_PDF'), 0, 0, 0, '', 0, 0, 0, '', 'widthcentpercentminusx'); |
@@ -1254,7 +1254,7 @@ discard block |
||
| 1254 | 1254 | |
| 1255 | 1255 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
| 1256 | 1256 | // $objectsrc is Commande|Facture |
| 1257 | - $objectsav = $object; // Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc. |
|
| 1257 | + $objectsav = $object; // Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc. |
|
| 1258 | 1258 | $object = $expe; |
| 1259 | 1259 | $parameters = array('objectsrc' => isset($objectsrc) ? $objectsrc : '', 'cols' => '3', 'socid' => $socid); |
| 1260 | 1260 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
@@ -1269,22 +1269,22 @@ discard block |
||
| 1269 | 1269 | |
| 1270 | 1270 | $numAsked = count($object->lines); |
| 1271 | 1271 | |
| 1272 | - print '<script type="text/javascript">' . "\n"; |
|
| 1273 | - print 'jQuery(document).ready(function() {' . "\n"; |
|
| 1272 | + print '<script type="text/javascript">'."\n"; |
|
| 1273 | + print 'jQuery(document).ready(function() {'."\n"; |
|
| 1274 | 1274 | print 'jQuery("#autofill").click(function() {'; |
| 1275 | 1275 | $i = 0; |
| 1276 | 1276 | while ($i < $numAsked) { |
| 1277 | - print 'jQuery("#qtyl' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n"; |
|
| 1277 | + print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; |
|
| 1278 | 1278 | if (isModEnabled('productbatch')) { |
| 1279 | - print 'jQuery("#qtyl' . $i . '_' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n"; |
|
| 1279 | + print 'jQuery("#qtyl'.$i.'_'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; |
|
| 1280 | 1280 | } |
| 1281 | 1281 | $i++; |
| 1282 | 1282 | } |
| 1283 | - print 'return false; });' . "\n"; |
|
| 1284 | - print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);' . "\n"; |
|
| 1285 | - print 'return false; });' . "\n"; |
|
| 1286 | - print '});' . "\n"; |
|
| 1287 | - print '</script>' . "\n"; |
|
| 1283 | + print 'return false; });'."\n"; |
|
| 1284 | + print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);'."\n"; |
|
| 1285 | + print 'return false; });'."\n"; |
|
| 1286 | + print '});'."\n"; |
|
| 1287 | + print '</script>'."\n"; |
|
| 1288 | 1288 | |
| 1289 | 1289 | print '<br>'; |
| 1290 | 1290 | |
@@ -1318,26 +1318,26 @@ discard block |
||
| 1318 | 1318 | } |
| 1319 | 1319 | print $langs->trans("Description"); |
| 1320 | 1320 | print '</td>'; |
| 1321 | - print '<td class="center">' . $langs->trans("QtyOrdered") . '</td>'; |
|
| 1322 | - print '<td class="center">' . $langs->trans("QtyShipped") . '</td>'; |
|
| 1323 | - print '<td class="center">' . $langs->trans("QtyToShip"); |
|
| 1321 | + print '<td class="center">'.$langs->trans("QtyOrdered").'</td>'; |
|
| 1322 | + print '<td class="center">'.$langs->trans("QtyShipped").'</td>'; |
|
| 1323 | + print '<td class="center">'.$langs->trans("QtyToShip"); |
|
| 1324 | 1324 | if (empty($conf->productbatch->enabled)) { |
| 1325 | - print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"') . '</a>'; |
|
| 1325 | + print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"').'</a>'; |
|
| 1326 | 1326 | print ' / '; |
| 1327 | 1327 | } else { |
| 1328 | 1328 | print '<br>'; |
| 1329 | 1329 | } |
| 1330 | - print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Reset"), 'eraser') . '</span>'; |
|
| 1330 | + print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Reset"), 'eraser').'</span>'; |
|
| 1331 | 1331 | print '</td>'; |
| 1332 | 1332 | if (isModEnabled('stock')) { |
| 1333 | 1333 | if (empty($conf->productbatch->enabled)) { |
| 1334 | - print '<td class="left">' . $langs->trans("Warehouse") . ' (' . $langs->trans("Stock") . ')</td>'; |
|
| 1334 | + print '<td class="left">'.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')</td>'; |
|
| 1335 | 1335 | } else { |
| 1336 | - print '<td class="left">' . $langs->trans("Warehouse") . ' / ' . $langs->trans("Batch") . ' (' . $langs->trans("Stock") . ')</td>'; |
|
| 1336 | + print '<td class="left">'.$langs->trans("Warehouse").' / '.$langs->trans("Batch").' ('.$langs->trans("Stock").')</td>'; |
|
| 1337 | 1337 | } |
| 1338 | 1338 | } |
| 1339 | 1339 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1340 | - print '<td class="left">' . $langs->trans('StockEntryDate') . '</td>'; |
|
| 1340 | + print '<td class="left">'.$langs->trans('StockEntryDate').'</td>'; |
|
| 1341 | 1341 | } |
| 1342 | 1342 | print "</tr>\n"; |
| 1343 | 1343 | } |
@@ -1375,8 +1375,8 @@ discard block |
||
| 1375 | 1375 | $type = 1; |
| 1376 | 1376 | } |
| 1377 | 1377 | |
| 1378 | - print '<!-- line for order line ' . $line->id . ' -->' . "\n"; |
|
| 1379 | - print '<tr class="oddeven" id="row-' . $line->id . '">' . "\n"; |
|
| 1378 | + print '<!-- line for order line '.$line->id.' -->'."\n"; |
|
| 1379 | + print '<tr class="oddeven" id="row-'.$line->id.'">'."\n"; |
|
| 1380 | 1380 | |
| 1381 | 1381 | $qtyProdCom = $line->qty; |
| 1382 | 1382 | $productChildrenNb = 0; |
@@ -1397,7 +1397,7 @@ discard block |
||
| 1397 | 1397 | //var_dump($product->stock_warehouse[1]); |
| 1398 | 1398 | |
| 1399 | 1399 | print '<td>'; |
| 1400 | - print '<a name="' . $line->id . '"></a>'; // ancre pour retourner sur la ligne |
|
| 1400 | + print '<a name="'.$line->id.'"></a>'; // ancre pour retourner sur la ligne |
|
| 1401 | 1401 | |
| 1402 | 1402 | // Show product and description |
| 1403 | 1403 | $product_static->type = $line->fk_product_type; |
@@ -1410,7 +1410,7 @@ discard block |
||
| 1410 | 1410 | $showdescinproductdesc = getDolGlobalString('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE'); |
| 1411 | 1411 | |
| 1412 | 1412 | $text = $product_static->getNomUrl(1); |
| 1413 | - $text .= ' - ' . (!empty($line->label) ? $line->label : $line->product_label); |
|
| 1413 | + $text .= ' - '.(!empty($line->label) ? $line->label : $line->product_label); |
|
| 1414 | 1414 | $description = ($showdescinproductdesc ? '' : dol_htmlentitiesbr($line->desc)); |
| 1415 | 1415 | $description .= empty($product->stockable_product) ? $langs->trans('StockDisabled') : $langs->trans('StockEnabled'); |
| 1416 | 1416 | print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i); |
@@ -1420,7 +1420,7 @@ discard block |
||
| 1420 | 1420 | |
| 1421 | 1421 | // Add description in form |
| 1422 | 1422 | if ($showdescinproductdesc) { |
| 1423 | - print ($line->desc && $line->desc != $line->product_label) ? '<br>' . dol_htmlentitiesbr($line->desc) : ''; |
|
| 1423 | + print ($line->desc && $line->desc != $line->product_label) ? '<br>'.dol_htmlentitiesbr($line->desc) : ''; |
|
| 1424 | 1424 | } |
| 1425 | 1425 | |
| 1426 | 1426 | print '</td>'; |
@@ -1433,10 +1433,10 @@ discard block |
||
| 1433 | 1433 | } |
| 1434 | 1434 | |
| 1435 | 1435 | if (!empty($line->label)) { |
| 1436 | - $text .= ' <strong>' . $line->label . '</strong>'; |
|
| 1436 | + $text .= ' <strong>'.$line->label.'</strong>'; |
|
| 1437 | 1437 | print $form->textwithtooltip($text, $line->desc, 3, 0, '', (string) $i); |
| 1438 | 1438 | } else { |
| 1439 | - print $text . ' ' . nl2br($line->desc); |
|
| 1439 | + print $text.' '.nl2br($line->desc); |
|
| 1440 | 1440 | } |
| 1441 | 1441 | |
| 1442 | 1442 | // Show range |
@@ -1451,16 +1451,16 @@ discard block |
||
| 1451 | 1451 | } |
| 1452 | 1452 | |
| 1453 | 1453 | // Qty |
| 1454 | - print '<td class="center">' . $line->qty; |
|
| 1455 | - print '<input name="qtyasked' . $indiceAsked . '" id="qtyasked' . $indiceAsked . '" type="hidden" value="' . $line->qty . '">'; |
|
| 1456 | - print '' . $unit_order . '</td>'; |
|
| 1454 | + print '<td class="center">'.$line->qty; |
|
| 1455 | + print '<input name="qtyasked'.$indiceAsked.'" id="qtyasked'.$indiceAsked.'" type="hidden" value="'.$line->qty.'">'; |
|
| 1456 | + print ''.$unit_order.'</td>'; |
|
| 1457 | 1457 | |
| 1458 | 1458 | // Qty already shipped |
| 1459 | 1459 | print '<td class="center">'; |
| 1460 | 1460 | $quantityDelivered = isset($object->expeditions[$line->id]) ? $object->expeditions[$line->id] : ''; |
| 1461 | 1461 | print $quantityDelivered; |
| 1462 | - print '<input name="qtydelivered' . $indiceAsked . '" id="qtydelivered' . $indiceAsked . '" type="hidden" value="' . $quantityDelivered . '">'; |
|
| 1463 | - print '' . $unit_order . '</td>'; |
|
| 1462 | + print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">'; |
|
| 1463 | + print ''.$unit_order.'</td>'; |
|
| 1464 | 1464 | |
| 1465 | 1465 | // Qty to ship |
| 1466 | 1466 | $quantityAsked = $line->qty; |
@@ -1491,19 +1491,19 @@ discard block |
||
| 1491 | 1491 | // Quantity to send |
| 1492 | 1492 | print '<td class="center">'; |
| 1493 | 1493 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES'))) { |
| 1494 | - if (GETPOSTINT('qtyl' . $indiceAsked)) { |
|
| 1495 | - $deliverableQty = GETPOSTINT('qtyl' . $indiceAsked); |
|
| 1494 | + if (GETPOSTINT('qtyl'.$indiceAsked)) { |
|
| 1495 | + $deliverableQty = GETPOSTINT('qtyl'.$indiceAsked); |
|
| 1496 | 1496 | } |
| 1497 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1497 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1498 | 1498 | $qtylValue = $deliverableQty; |
| 1499 | 1499 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
| 1500 | 1500 | $qtylValue = ''; |
| 1501 | 1501 | } |
| 1502 | - print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" class="qtyl right" type="text" size="4" value="' . $qtylValue . '">'; |
|
| 1502 | + print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" class="qtyl right" type="text" size="4" value="'.$qtylValue.'">'; |
|
| 1503 | 1503 | } else { |
| 1504 | 1504 | if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { |
| 1505 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1506 | - print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">'; |
|
| 1505 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1506 | + print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">'; |
|
| 1507 | 1507 | } |
| 1508 | 1508 | |
| 1509 | 1509 | print $langs->trans("NA"); |
@@ -1515,8 +1515,8 @@ discard block |
||
| 1515 | 1515 | print '<td class="left">'; |
| 1516 | 1516 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { // Type of product need stock change ? |
| 1517 | 1517 | // Show warehouse combo list |
| 1518 | - $ent = "entl" . $indiceAsked; |
|
| 1519 | - $idl = "idl" . $indiceAsked; |
|
| 1518 | + $ent = "entl".$indiceAsked; |
|
| 1519 | + $idl = "idl".$indiceAsked; |
|
| 1520 | 1520 | $tmpentrepot_id = is_numeric(GETPOST($ent)) ? GETPOSTINT($ent) : $warehouse_id; |
| 1521 | 1521 | if ($line->fk_product > 0) { |
| 1522 | 1522 | print '<!-- Show warehouse selection -->'; |
@@ -1526,24 +1526,24 @@ discard block |
||
| 1526 | 1526 | $stockMin = 0; |
| 1527 | 1527 | } |
| 1528 | 1528 | if ($productChildrenNb > 0) { |
| 1529 | - print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
| 1529 | + print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
| 1530 | 1530 | } else { |
| 1531 | 1531 | if ($product->stockable_product == Product::ENABLED_STOCK) { |
| 1532 | - print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
| 1532 | + print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
| 1533 | 1533 | } else { |
| 1534 | - print img_warning() . ' ' . $langs->trans('StockDisabled'); |
|
| 1534 | + print img_warning().' '.$langs->trans('StockDisabled'); |
|
| 1535 | 1535 | } |
| 1536 | 1536 | } |
| 1537 | 1537 | |
| 1538 | 1538 | if ($tmpentrepot_id > 0 && $tmpentrepot_id == $warehouse_id) { |
| 1539 | 1539 | //print $stock.' '.$quantityToBeDelivered; |
| 1540 | 1540 | if ($stock < $quantityToBeDelivered) { |
| 1541 | - print ' ' . img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse |
|
| 1541 | + print ' '.img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse |
|
| 1542 | 1542 | } |
| 1543 | 1543 | } |
| 1544 | 1544 | } |
| 1545 | 1545 | } else { |
| 1546 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span><input name="entl' . $indiceAsked . '" id="entl' . $indiceAsked . '" type="hidden" value="0">'; |
|
| 1546 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span><input name="entl'.$indiceAsked.'" id="entl'.$indiceAsked.'" type="hidden" value="0">'; |
|
| 1547 | 1547 | } |
| 1548 | 1548 | print '</td>'; |
| 1549 | 1549 | } |
@@ -1564,9 +1564,9 @@ discard block |
||
| 1564 | 1564 | $img = img_warning($langs->trans("StockTooLow")); |
| 1565 | 1565 | } |
| 1566 | 1566 | print "<tr class=\"oddeven\"><td> -> |
| 1567 | - <a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . " |
|
| 1568 | - </a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td> </td><td> </td> |
|
| 1569 | - <td class=\"center\">" . $value['stock'] . " " . $img . "</td>"; |
|
| 1567 | + <a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." |
|
| 1568 | + </a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> |
|
| 1569 | + <td class=\"center\">" . $value['stock']." ".$img."</td>"; |
|
| 1570 | 1570 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1571 | 1571 | print '<td></td>'; |
| 1572 | 1572 | } //StockEntrydate |
@@ -1596,7 +1596,7 @@ discard block |
||
| 1596 | 1596 | $nbofsuggested++; |
| 1597 | 1597 | } |
| 1598 | 1598 | } |
| 1599 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1599 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1600 | 1600 | if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) { |
| 1601 | 1601 | foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) { // $dbatch is instance of Productbatch |
| 1602 | 1602 | //var_dump($dbatch); |
@@ -1622,7 +1622,7 @@ discard block |
||
| 1622 | 1622 | $deliverableQty = 0; |
| 1623 | 1623 | } |
| 1624 | 1624 | |
| 1625 | - $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
|
| 1625 | + $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
|
| 1626 | 1626 | if (GETPOSTISSET($inputName)) { |
| 1627 | 1627 | $deliverableQty = GETPOST($inputName, 'int'); |
| 1628 | 1628 | } |
@@ -1630,37 +1630,37 @@ discard block |
||
| 1630 | 1630 | $tooltipClass = $tooltipTitle = ''; |
| 1631 | 1631 | if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) { |
| 1632 | 1632 | $tooltipClass = ' classfortooltip'; |
| 1633 | - $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
| 1633 | + $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
| 1634 | 1634 | } else { |
| 1635 | 1635 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
| 1636 | 1636 | } |
| 1637 | 1637 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1638 | 1638 | |
| 1639 | - print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>'; |
|
| 1639 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>'; |
|
| 1640 | 1640 | print '<td colspan="3" ></td><td class="center">'; |
| 1641 | 1641 | $qtylValue = $deliverableQty; |
| 1642 | 1642 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
| 1643 | 1643 | $qtylValue = ''; |
| 1644 | 1644 | } |
| 1645 | - print '<input class="qtyl ' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="' . $qtylValue . '">'; |
|
| 1645 | + print '<input class="qtyl '.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$qtylValue.'">'; |
|
| 1646 | 1646 | print '</td>'; |
| 1647 | 1647 | |
| 1648 | 1648 | print '<!-- Show details of lot -->'; |
| 1649 | 1649 | print '<td class="left">'; |
| 1650 | 1650 | |
| 1651 | - print $staticwarehouse->getNomUrl(0) . ' / '; |
|
| 1651 | + print $staticwarehouse->getNomUrl(0).' / '; |
|
| 1652 | 1652 | |
| 1653 | - print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">'; |
|
| 1653 | + print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">'; |
|
| 1654 | 1654 | |
| 1655 | 1655 | $detail = ''; |
| 1656 | - $detail .= $langs->trans("Batch") . ': ' . $dbatch->batch; |
|
| 1656 | + $detail .= $langs->trans("Batch").': '.$dbatch->batch; |
|
| 1657 | 1657 | if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) { |
| 1658 | - $detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day"); |
|
| 1658 | + $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); |
|
| 1659 | 1659 | } |
| 1660 | 1660 | if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) { |
| 1661 | - $detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day"); |
|
| 1661 | + $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); |
|
| 1662 | 1662 | } |
| 1663 | - $detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty; |
|
| 1663 | + $detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty; |
|
| 1664 | 1664 | $detail .= '<br>'; |
| 1665 | 1665 | print $detail; |
| 1666 | 1666 | |
@@ -1671,18 +1671,18 @@ discard block |
||
| 1671 | 1671 | $subj++; |
| 1672 | 1672 | print '</td>'; |
| 1673 | 1673 | if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1674 | - print '<td>' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>'; //StockEntrydate |
|
| 1674 | + print '<td>'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>'; //StockEntrydate |
|
| 1675 | 1675 | } |
| 1676 | 1676 | print '</tr>'; |
| 1677 | 1677 | } |
| 1678 | 1678 | } else { |
| 1679 | 1679 | print '<!-- Case there is no details of lot at all -->'; |
| 1680 | 1680 | print '<tr class="oddeven"><td colspan="3"></td><td class="center">'; |
| 1681 | - print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="0" disabled="disabled"> '; |
|
| 1681 | + print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0" disabled="disabled"> '; |
|
| 1682 | 1682 | print '</td>'; |
| 1683 | 1683 | |
| 1684 | 1684 | print '<td class="left">'; |
| 1685 | - print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label); |
|
| 1685 | + print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label); |
|
| 1686 | 1686 | print '</td>'; |
| 1687 | 1687 | if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1688 | 1688 | print '<td></td>'; |
@@ -1698,9 +1698,9 @@ discard block |
||
| 1698 | 1698 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1699 | 1699 | print '<td></td>'; |
| 1700 | 1700 | } //StockEntrydate |
| 1701 | - print '</tr>' . "\n"; // end line and start a new one for each warehouse |
|
| 1701 | + print '</tr>'."\n"; // end line and start a new one for each warehouse |
|
| 1702 | 1702 | |
| 1703 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1703 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1704 | 1704 | $subj = 0; |
| 1705 | 1705 | // Define nb of lines suggested for this order line |
| 1706 | 1706 | $nbofsuggested = 0; |
@@ -1724,8 +1724,8 @@ discard block |
||
| 1724 | 1724 | $deliverableQty = min($quantityToBeDelivered, $stock); |
| 1725 | 1725 | $deliverableQty = max(0, $deliverableQty); |
| 1726 | 1726 | // Quantity to send |
| 1727 | - print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>'; |
|
| 1728 | - print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked=' . $indiceAsked . ') -->'; |
|
| 1727 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>'; |
|
| 1728 | + print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked='.$indiceAsked.') -->'; |
|
| 1729 | 1729 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
| 1730 | 1730 | if (isset($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) { |
| 1731 | 1731 | $deliverableQty = min($quantityToBeDelivered, $stock - $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]); |
@@ -1744,14 +1744,14 @@ discard block |
||
| 1744 | 1744 | $tooltipClass = $tooltipTitle = ''; |
| 1745 | 1745 | if (!empty($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) { |
| 1746 | 1746 | $tooltipClass = ' classfortooltip'; |
| 1747 | - $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]; |
|
| 1747 | + $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtySetted[$line->fk_product][intval($warehouse_id)]; |
|
| 1748 | 1748 | } else { |
| 1749 | 1749 | $alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = 0; |
| 1750 | 1750 | } |
| 1751 | 1751 | |
| 1752 | 1752 | $alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = $deliverableQty + $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]; |
| 1753 | 1753 | |
| 1754 | - $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
|
| 1754 | + $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
|
| 1755 | 1755 | if (GETPOSTISSET($inputName)) { |
| 1756 | 1756 | $deliverableQty = GETPOSTINT($inputName); |
| 1757 | 1757 | } |
@@ -1759,11 +1759,11 @@ discard block |
||
| 1759 | 1759 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
| 1760 | 1760 | $qtylValue = ''; |
| 1761 | 1761 | } |
| 1762 | - print '<input class="qtyl' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="text" size="4" value="' . $qtylValue . '">'; |
|
| 1763 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_id . '">'; |
|
| 1762 | + print '<input class="qtyl'.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$qtylValue.'">'; |
|
| 1763 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_id.'">'; |
|
| 1764 | 1764 | } else { |
| 1765 | 1765 | if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { |
| 1766 | - print '<input name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">'; |
|
| 1766 | + print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">'; |
|
| 1767 | 1767 | } |
| 1768 | 1768 | |
| 1769 | 1769 | print $langs->trans("NA"); |
@@ -1775,16 +1775,16 @@ discard block |
||
| 1775 | 1775 | print '<td class="left">'; |
| 1776 | 1776 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
| 1777 | 1777 | if ($product->stockable_product == Product::ENABLED_STOCK || $productChildrenNb > 0) { |
| 1778 | - print $tmpwarehouseObject->getNomUrl(0) . ' '; |
|
| 1778 | + print $tmpwarehouseObject->getNomUrl(0).' '; |
|
| 1779 | 1779 | if ($productChildrenNb <= 0) { |
| 1780 | 1780 | print '<!-- Show details of stock -->'; |
| 1781 | - print '(' . $stock . ')'; |
|
| 1781 | + print '('.$stock.')'; |
|
| 1782 | 1782 | } |
| 1783 | 1783 | } else { |
| 1784 | - print img_warning() . ' ' . $langs->trans('StockDisabled'); |
|
| 1784 | + print img_warning().' '.$langs->trans('StockDisabled'); |
|
| 1785 | 1785 | } |
| 1786 | 1786 | } else { |
| 1787 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>'; |
|
| 1787 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
|
| 1788 | 1788 | } |
| 1789 | 1789 | print '</td>'; |
| 1790 | 1790 | } |
@@ -1812,9 +1812,9 @@ discard block |
||
| 1812 | 1812 | } |
| 1813 | 1813 | print '<tr class"oddeven"><td>'; |
| 1814 | 1814 | print " -> |
| 1815 | - <a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . " |
|
| 1816 | - </a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td> </td><td> </td> |
|
| 1817 | - <td class=\"center\">" . $value['stock'] . " " . $img . "</td>"; |
|
| 1815 | + <a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." |
|
| 1816 | + </a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> |
|
| 1817 | + <td class=\"center\">" . $value['stock']." ".$img."</td>"; |
|
| 1818 | 1818 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1819 | 1819 | print '<td></td>'; |
| 1820 | 1820 | } //StockEntrydate |
@@ -1831,7 +1831,7 @@ discard block |
||
| 1831 | 1831 | print '</tr>'; // end line and start a new one for lot/serial |
| 1832 | 1832 | |
| 1833 | 1833 | $subj = 0; |
| 1834 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1834 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1835 | 1835 | |
| 1836 | 1836 | $tmpwarehouseObject = new Entrepot($db); |
| 1837 | 1837 | $productlotObject = new Productlot($db); |
@@ -1873,7 +1873,7 @@ discard block |
||
| 1873 | 1873 | $deliverableQty = 0; |
| 1874 | 1874 | } |
| 1875 | 1875 | |
| 1876 | - $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
|
| 1876 | + $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
|
| 1877 | 1877 | if (GETPOSTISSET($inputName)) { |
| 1878 | 1878 | $deliverableQty = GETPOSTINT($inputName); |
| 1879 | 1879 | } |
@@ -1881,29 +1881,29 @@ discard block |
||
| 1881 | 1881 | $tooltipClass = $tooltipTitle = ''; |
| 1882 | 1882 | if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) { |
| 1883 | 1883 | $tooltipClass = ' classfortooltip'; |
| 1884 | - $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
| 1884 | + $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
| 1885 | 1885 | } else { |
| 1886 | 1886 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
| 1887 | 1887 | } |
| 1888 | 1888 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1889 | 1889 | |
| 1890 | - print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '><td colspan="3"></td><td class="center">'; |
|
| 1890 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'><td colspan="3"></td><td class="center">'; |
|
| 1891 | 1891 | $qtylValue = $deliverableQty; |
| 1892 | 1892 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
| 1893 | 1893 | $qtylValue = ''; |
| 1894 | 1894 | } |
| 1895 | - print '<input class="qtyl right ' . $tooltipClass . '" title="' . $tooltipTitle . '" name="' . $inputName . '" id="' . $inputName . '" type="text" size="4" value="' . $qtylValue . '">'; |
|
| 1895 | + print '<input class="qtyl right '.$tooltipClass.'" title="'.$tooltipTitle.'" name="'.$inputName.'" id="'.$inputName.'" type="text" size="4" value="'.$qtylValue.'">'; |
|
| 1896 | 1896 | print '</td>'; |
| 1897 | 1897 | |
| 1898 | 1898 | print '<td class="left">'; |
| 1899 | 1899 | |
| 1900 | - print $tmpwarehouseObject->getNomUrl(0) . ' / '; |
|
| 1900 | + print $tmpwarehouseObject->getNomUrl(0).' / '; |
|
| 1901 | 1901 | |
| 1902 | 1902 | print '<!-- Show details of lot -->'; |
| 1903 | - print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">'; |
|
| 1903 | + print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">'; |
|
| 1904 | 1904 | |
| 1905 | 1905 | //print '|'.$line->fk_product.'|'.$dbatch->batch.'|<br>'; |
| 1906 | - print $langs->trans("Batch") . ': '; |
|
| 1906 | + print $langs->trans("Batch").': '; |
|
| 1907 | 1907 | $result = $productlotObject->fetch(0, $line->fk_product, $dbatch->batch); |
| 1908 | 1908 | if ($result > 0) { |
| 1909 | 1909 | print $productlotObject->getNomUrl(1); |
@@ -1911,12 +1911,12 @@ discard block |
||
| 1911 | 1911 | print $langs->trans("TableLotIncompleteRunRepairWithParamStandardEqualConfirmed"); |
| 1912 | 1912 | } |
| 1913 | 1913 | if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) { |
| 1914 | - print ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day"); |
|
| 1914 | + print ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); |
|
| 1915 | 1915 | } |
| 1916 | 1916 | if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) { |
| 1917 | - print ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day"); |
|
| 1917 | + print ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); |
|
| 1918 | 1918 | } |
| 1919 | - print ' (' . $dbatch->qty . ')'; |
|
| 1919 | + print ' ('.$dbatch->qty.')'; |
|
| 1920 | 1920 | $quantityToBeDelivered -= $deliverableQty; |
| 1921 | 1921 | if ($quantityToBeDelivered < 0) { |
| 1922 | 1922 | $quantityToBeDelivered = 0; |
@@ -1925,7 +1925,7 @@ discard block |
||
| 1925 | 1925 | $subj++; |
| 1926 | 1926 | print '</td>'; |
| 1927 | 1927 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1928 | - print '<td class="left">' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>'; |
|
| 1928 | + print '<td class="left">'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>'; |
|
| 1929 | 1929 | } |
| 1930 | 1930 | print '</tr>'; |
| 1931 | 1931 | } |
@@ -1950,9 +1950,9 @@ discard block |
||
| 1950 | 1950 | if ($product->stockable_product == Product::DISABLED_STOCK) { |
| 1951 | 1951 | $disabled = ''; |
| 1952 | 1952 | } |
| 1953 | - print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="0"' . ($disabled ? ' ' . $disabled : '') . '> '; |
|
| 1953 | + print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0"'.($disabled ? ' '.$disabled : '').'> '; |
|
| 1954 | 1954 | if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) { |
| 1955 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">'; |
|
| 1955 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">'; |
|
| 1956 | 1956 | } |
| 1957 | 1957 | } elseif ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
| 1958 | 1958 | $disabled = ''; |
@@ -1962,9 +1962,9 @@ discard block |
||
| 1962 | 1962 | if ($warehouse_selected_id <= 0) { // We did not force a given warehouse, so we won't have no warehouse to change qty. |
| 1963 | 1963 | $disabled = 'disabled="disabled"'; |
| 1964 | 1964 | } |
| 1965 | - print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="' . $quantityToBeDelivered . '"' . ($disabled ? ' ' . $disabled : '') . '> '; |
|
| 1965 | + print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$quantityToBeDelivered.'"'.($disabled ? ' '.$disabled : '').'> '; |
|
| 1966 | 1966 | if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) { |
| 1967 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">'; |
|
| 1967 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">'; |
|
| 1968 | 1968 | } |
| 1969 | 1969 | } else { |
| 1970 | 1970 | print $langs->trans("NA"); |
@@ -1976,20 +1976,20 @@ discard block |
||
| 1976 | 1976 | if ($warehouse_selected_id > 0) { |
| 1977 | 1977 | $warehouseObject = new Entrepot($db); |
| 1978 | 1978 | $warehouseObject->fetch($warehouse_selected_id); |
| 1979 | - print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label); |
|
| 1979 | + print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label); |
|
| 1980 | 1980 | } else { |
| 1981 | 1981 | if ($line->fk_product) { |
| 1982 | 1982 | if ($product->stockable_product == Product::ENABLED_STOCK) { |
| 1983 | - print img_warning() . ' ' . $langs->trans('StockTooLow'); |
|
| 1983 | + print img_warning().' '.$langs->trans('StockTooLow'); |
|
| 1984 | 1984 | } else { |
| 1985 | - print img_warning() . ' ' . $langs->trans('StockDisabled'); |
|
| 1985 | + print img_warning().' '.$langs->trans('StockDisabled'); |
|
| 1986 | 1986 | } |
| 1987 | 1987 | } else { |
| 1988 | 1988 | print ''; |
| 1989 | 1989 | } |
| 1990 | 1990 | } |
| 1991 | 1991 | } else { |
| 1992 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>'; |
|
| 1992 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
|
| 1993 | 1993 | } |
| 1994 | 1994 | print '</td>'; |
| 1995 | 1995 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
@@ -2036,7 +2036,7 @@ discard block |
||
| 2036 | 2036 | } |
| 2037 | 2037 | } |
| 2038 | 2038 | } elseif ($object->id > 0) { |
| 2039 | - '@phan-var-force Expedition $object'; // Need to force it (type overridden earlier) |
|
| 2039 | + '@phan-var-force Expedition $object'; // Need to force it (type overridden earlier) |
|
| 2040 | 2040 | |
| 2041 | 2041 | // Edit and view mode |
| 2042 | 2042 | |
@@ -2076,7 +2076,7 @@ discard block |
||
| 2076 | 2076 | ); |
| 2077 | 2077 | } |
| 2078 | 2078 | $formconfirm = $form->formconfirm( |
| 2079 | - $_SERVER['PHP_SELF'] . '?id=' . $object->id, |
|
| 2079 | + $_SERVER['PHP_SELF'].'?id='.$object->id, |
|
| 2080 | 2080 | $langs->trans('DeleteSending'), |
| 2081 | 2081 | $langs->trans("ConfirmDeleteSending", $object->ref), |
| 2082 | 2082 | 'confirm_delete', |
@@ -2097,7 +2097,7 @@ discard block |
||
| 2097 | 2097 | $title = "DeleteTitleLine"; |
| 2098 | 2098 | $question = "ConfirmDeleteTitleLine"; |
| 2099 | 2099 | } |
| 2100 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2100 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2101 | 2101 | } |
| 2102 | 2102 | |
| 2103 | 2103 | // Confirm validation |
@@ -2111,13 +2111,13 @@ discard block |
||
| 2111 | 2111 | |
| 2112 | 2112 | $text = $langs->trans("ConfirmValidateSending", $numref); |
| 2113 | 2113 | if (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) { |
| 2114 | - $text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementWillBeRecorded") . '.'; |
|
| 2114 | + $text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementWillBeRecorded").'.'; |
|
| 2115 | 2115 | } elseif (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) { |
| 2116 | - $text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementNotYetRecorded") . '.'; |
|
| 2116 | + $text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementNotYetRecorded").'.'; |
|
| 2117 | 2117 | } |
| 2118 | 2118 | |
| 2119 | 2119 | if (isModEnabled('notification')) { |
| 2120 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2120 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2121 | 2121 | $notify = new Notify($db); |
| 2122 | 2122 | $text .= '<br>'; |
| 2123 | 2123 | $text .= $notify->confirmMessage('SHIPPING_VALIDATE', $object->socid, $object); |
@@ -2128,14 +2128,14 @@ discard block |
||
| 2128 | 2128 | |
| 2129 | 2129 | // Confirm cancellation |
| 2130 | 2130 | if ($action == 'cancel') { |
| 2131 | - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1); |
|
| 2131 | + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1); |
|
| 2132 | 2132 | } |
| 2133 | 2133 | |
| 2134 | 2134 | // Confirm sign |
| 2135 | 2135 | if ($action == 'sign') { |
| 2136 | 2136 | $text = $langs->trans('ConfirmSignShipping'); |
| 2137 | 2137 | if (isModEnabled('notification')) { |
| 2138 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2138 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2139 | 2139 | $notify = new Notify($db); |
| 2140 | 2140 | $text .= '<br>'; |
| 2141 | 2141 | $text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object); |
@@ -2145,22 +2145,22 @@ discard block |
||
| 2145 | 2145 | 'type' => 'select', |
| 2146 | 2146 | 'name' => 'signed_status', |
| 2147 | 2147 | 'select_show_empty' => 0, |
| 2148 | - 'label' => '<span class="fieldrequired">' . $langs->trans('SignStatus') . '</span>', |
|
| 2148 | + 'label' => '<span class="fieldrequired">'.$langs->trans('SignStatus').'</span>', |
|
| 2149 | 2149 | 'values' => $object->getSignedStatusLocalisedArray() |
| 2150 | 2150 | ]; |
| 2151 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('SignShipping'), $text, 'confirm_sign', $formquestion, 0, 1); |
|
| 2151 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SignShipping'), $text, 'confirm_sign', $formquestion, 0, 1); |
|
| 2152 | 2152 | } |
| 2153 | 2153 | |
| 2154 | 2154 | // Confirm unsign |
| 2155 | 2155 | if ($action == 'unsign') { |
| 2156 | 2156 | $text = $langs->trans('ConfirmUnsignShipping'); |
| 2157 | 2157 | if (isModEnabled('notification')) { |
| 2158 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2158 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2159 | 2159 | $notify = new Notify($db); |
| 2160 | 2160 | $text .= '<br>'; |
| 2161 | 2161 | $text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object); |
| 2162 | 2162 | } |
| 2163 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnsignShipping'), $text, 'confirm_unsign', '', 0, 1); |
|
| 2163 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('UnsignShipping'), $text, 'confirm_unsign', '', 0, 1); |
|
| 2164 | 2164 | } |
| 2165 | 2165 | |
| 2166 | 2166 | // Call Hook formConfirm |
@@ -2191,13 +2191,13 @@ discard block |
||
| 2191 | 2191 | } |
| 2192 | 2192 | |
| 2193 | 2193 | // Shipment card |
| 2194 | - $linkback = '<a href="' . DOL_URL_ROOT . '/expedition/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
| 2194 | + $linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
| 2195 | 2195 | $morehtmlref = '<div class="refidno">'; |
| 2196 | 2196 | // Ref customer shipment |
| 2197 | 2197 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1); |
| 2198 | - $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); |
|
| 2198 | + $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); |
|
| 2199 | 2199 | // Thirdparty |
| 2200 | - $morehtmlref .= '<br>' . $object->thirdparty->getNomUrl(1); |
|
| 2200 | + $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1); |
|
| 2201 | 2201 | // Project |
| 2202 | 2202 | if (isModEnabled('project')) { |
| 2203 | 2203 | $langs->load("projects"); |
@@ -2205,16 +2205,16 @@ discard block |
||
| 2205 | 2205 | if (0) { // @phpstan-ignore-line Do not change on shipment |
| 2206 | 2206 | $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); |
| 2207 | 2207 | if ($action != 'classify') { |
| 2208 | - $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; |
|
| 2208 | + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> '; |
|
| 2209 | 2209 | } |
| 2210 | - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $objectsrc->socid, (string) $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 2210 | + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $objectsrc->socid, (string) $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 2211 | 2211 | } else { |
| 2212 | 2212 | if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { |
| 2213 | 2213 | $proj = new Project($db); |
| 2214 | 2214 | $proj->fetch($objectsrc->fk_project); |
| 2215 | 2215 | $morehtmlref .= $proj->getNomUrl(1); |
| 2216 | 2216 | if ($proj->title) { |
| 2217 | - $morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>'; |
|
| 2217 | + $morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>'; |
|
| 2218 | 2218 | } |
| 2219 | 2219 | } |
| 2220 | 2220 | } |
@@ -2234,7 +2234,7 @@ discard block |
||
| 2234 | 2234 | // Linked documents |
| 2235 | 2235 | if (!empty($typeobject) && $typeobject == 'commande' && $object->origin_object->id && isModEnabled('order')) { |
| 2236 | 2236 | print '<tr><td>'; |
| 2237 | - print $langs->trans("RefOrder") . '</td>'; |
|
| 2237 | + print $langs->trans("RefOrder").'</td>'; |
|
| 2238 | 2238 | print '<td>'; |
| 2239 | 2239 | print $objectsrc->getNomUrl(1, 'commande'); |
| 2240 | 2240 | print "</td>\n"; |
@@ -2242,7 +2242,7 @@ discard block |
||
| 2242 | 2242 | } |
| 2243 | 2243 | if (!empty($typeobject) && $typeobject == 'propal' && $object->origin_object->id && isModEnabled("propal")) { |
| 2244 | 2244 | print '<tr><td>'; |
| 2245 | - print $langs->trans("RefProposal") . '</td>'; |
|
| 2245 | + print $langs->trans("RefProposal").'</td>'; |
|
| 2246 | 2246 | print '<td>'; |
| 2247 | 2247 | print $objectsrc->getNomUrl(1, 'expedition'); |
| 2248 | 2248 | print "</td>\n"; |
@@ -2250,8 +2250,8 @@ discard block |
||
| 2250 | 2250 | } |
| 2251 | 2251 | |
| 2252 | 2252 | // Date creation |
| 2253 | - print '<tr><td class="titlefieldmiddle">' . $langs->trans("DateCreation") . '</td>'; |
|
| 2254 | - print '<td>' . dol_print_date($object->date_creation, "dayhour") . "</td>\n"; |
|
| 2253 | + print '<tr><td class="titlefieldmiddle">'.$langs->trans("DateCreation").'</td>'; |
|
| 2254 | + print '<td>'.dol_print_date($object->date_creation, "dayhour")."</td>\n"; |
|
| 2255 | 2255 | print '</tr>'; |
| 2256 | 2256 | |
| 2257 | 2257 | // Delivery date planned |
@@ -2260,16 +2260,16 @@ discard block |
||
| 2260 | 2260 | print $langs->trans('DateDeliveryPlanned'); |
| 2261 | 2261 | print '</td>'; |
| 2262 | 2262 | if ($action != 'editdate_livraison') { |
| 2263 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editdate_livraison&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetDeliveryDate'), 1) . '</a></td>'; |
|
| 2263 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>'; |
|
| 2264 | 2264 | } |
| 2265 | 2265 | print '</tr></table>'; |
| 2266 | 2266 | print '</td><td>'; |
| 2267 | 2267 | if ($action == 'editdate_livraison') { |
| 2268 | - print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 2269 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2268 | + print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 2269 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2270 | 2270 | print '<input type="hidden" name="action" value="setdate_livraison">'; |
| 2271 | 2271 | print $form->selectDate($object->date_delivery ? $object->date_delivery : -1, 'liv_', 1, 1, 0, "setdate_livraison", 1, 0); |
| 2272 | - print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">'; |
|
| 2272 | + print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">'; |
|
| 2273 | 2273 | print '</form>'; |
| 2274 | 2274 | } else { |
| 2275 | 2275 | print $object->date_delivery ? dol_print_date($object->date_delivery, 'dayhour') : ' '; |
@@ -2283,16 +2283,16 @@ discard block |
||
| 2283 | 2283 | print $langs->trans('DateShipping'); |
| 2284 | 2284 | print '</td>'; |
| 2285 | 2285 | if ($action != 'editdate_shipping') { |
| 2286 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editdate_shipping&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetShippingDate'), 1) . '</a></td>'; |
|
| 2286 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_shipping&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetShippingDate'), 1).'</a></td>'; |
|
| 2287 | 2287 | } |
| 2288 | 2288 | print '</tr></table>'; |
| 2289 | 2289 | print '</td><td>'; |
| 2290 | 2290 | if ($action == 'editdate_shipping') { |
| 2291 | - print '<form name="setdate_shipping" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 2292 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2291 | + print '<form name="setdate_shipping" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 2292 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2293 | 2293 | print '<input type="hidden" name="action" value="setdate_shipping">'; |
| 2294 | 2294 | print $form->selectDate($object->date_shipping ? $object->date_shipping : -1, 'ship_', 1, 1, 0, "setdate_shipping", 1, 0); |
| 2295 | - print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">'; |
|
| 2295 | + print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">'; |
|
| 2296 | 2296 | print '</form>'; |
| 2297 | 2297 | } else { |
| 2298 | 2298 | print $object->date_shipping ? dol_print_date($object->date_shipping, 'dayhour') : ' '; |
@@ -2306,24 +2306,24 @@ discard block |
||
| 2306 | 2306 | print '</td><td>'; |
| 2307 | 2307 | |
| 2308 | 2308 | if ($action == 'edittrueWeight') { |
| 2309 | - print '<form name="settrueweight" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
|
| 2309 | + print '<form name="settrueweight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
|
| 2310 | 2310 | print '<input name="action" value="settrueWeight" type="hidden">'; |
| 2311 | - print '<input name="id" value="' . $object->id . '" type="hidden">'; |
|
| 2312 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2313 | - print '<input id="trueWeight" name="trueWeight" value="' . $object->trueWeight . '" type="text" class="width50 valignmiddle">'; |
|
| 2311 | + print '<input name="id" value="'.$object->id.'" type="hidden">'; |
|
| 2312 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2313 | + print '<input id="trueWeight" name="trueWeight" value="'.$object->trueWeight.'" type="text" class="width50 valignmiddle">'; |
|
| 2314 | 2314 | print $formproduct->selectMeasuringUnits("weight_units", "weight", (string) $object->weight_units, 0, 2, 'maxwidth125 valignmiddle'); |
| 2315 | - print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="' . $langs->trans("Modify") . '" type="submit">'; |
|
| 2316 | - print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">'; |
|
| 2315 | + print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="'.$langs->trans("Modify").'" type="submit">'; |
|
| 2316 | + print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">'; |
|
| 2317 | 2317 | print '</form>'; |
| 2318 | 2318 | } else { |
| 2319 | 2319 | print $object->trueWeight; |
| 2320 | - print ($object->trueWeight && $object->weight_units != '') ? ' ' . measuringUnitString(0, "weight", $object->weight_units) : ''; |
|
| 2320 | + print ($object->trueWeight && $object->weight_units != '') ? ' '.measuringUnitString(0, "weight", $object->weight_units) : ''; |
|
| 2321 | 2321 | } |
| 2322 | 2322 | |
| 2323 | 2323 | // Calculated |
| 2324 | 2324 | if ($totalWeight > 0) { |
| 2325 | 2325 | if (!empty($object->trueWeight)) { |
| 2326 | - print ' (' . $langs->trans("SumOfProductWeights") . ': '; |
|
| 2326 | + print ' ('.$langs->trans("SumOfProductWeights").': '; |
|
| 2327 | 2327 | } |
| 2328 | 2328 | print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); |
| 2329 | 2329 | if (!empty($object->trueWeight)) { |
@@ -2333,34 +2333,34 @@ discard block |
||
| 2333 | 2333 | print '</td></tr>'; |
| 2334 | 2334 | |
| 2335 | 2335 | // Width |
| 2336 | - print '<tr><td>' . $form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
| 2336 | + print '<tr><td>'.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
| 2337 | 2337 | print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')); |
| 2338 | - print ($object->trueWidth && $object->width_units != '') ? ' ' . measuringUnitString(0, "size", $object->width_units) : ''; |
|
| 2338 | + print ($object->trueWidth && $object->width_units != '') ? ' '.measuringUnitString(0, "size", $object->width_units) : ''; |
|
| 2339 | 2339 | print '</td></tr>'; |
| 2340 | 2340 | |
| 2341 | 2341 | // Height |
| 2342 | - print '<tr><td>' . $form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
| 2342 | + print '<tr><td>'.$form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
| 2343 | 2343 | if ($action == 'edittrueHeight') { |
| 2344 | - print '<form name="settrueHeight" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
|
| 2344 | + print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
|
| 2345 | 2345 | print '<input name="action" value="settrueHeight" type="hidden">'; |
| 2346 | - print '<input name="id" value="' . $object->id . '" type="hidden">'; |
|
| 2347 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2348 | - print '<input id="trueHeight" name="trueHeight" value="' . $object->trueHeight . '" type="text" class="width50">'; |
|
| 2346 | + print '<input name="id" value="'.$object->id.'" type="hidden">'; |
|
| 2347 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2348 | + print '<input id="trueHeight" name="trueHeight" value="'.$object->trueHeight.'" type="text" class="width50">'; |
|
| 2349 | 2349 | print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units, 0, 2); |
| 2350 | - print ' <input class="button smallpaddingimp" name="modify" value="' . $langs->trans("Modify") . '" type="submit">'; |
|
| 2351 | - print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">'; |
|
| 2350 | + print ' <input class="button smallpaddingimp" name="modify" value="'.$langs->trans("Modify").'" type="submit">'; |
|
| 2351 | + print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">'; |
|
| 2352 | 2352 | print '</form>'; |
| 2353 | 2353 | } else { |
| 2354 | 2354 | print $object->trueHeight; |
| 2355 | - print ($object->trueHeight && $object->height_units != '') ? ' ' . measuringUnitString(0, "size", $object->height_units) : ''; |
|
| 2355 | + print ($object->trueHeight && $object->height_units != '') ? ' '.measuringUnitString(0, "size", $object->height_units) : ''; |
|
| 2356 | 2356 | } |
| 2357 | 2357 | |
| 2358 | 2358 | print '</td></tr>'; |
| 2359 | 2359 | |
| 2360 | 2360 | // Depth |
| 2361 | - print '<tr><td>' . $form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
| 2361 | + print '<tr><td>'.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
| 2362 | 2362 | print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')); |
| 2363 | - print ($object->trueDepth && $object->depth_units != '') ? ' ' . measuringUnitString(0, "size", $object->depth_units) : ''; |
|
| 2363 | + print ($object->trueDepth && $object->depth_units != '') ? ' '.measuringUnitString(0, "size", $object->depth_units) : ''; |
|
| 2364 | 2364 | print '</td></tr>'; |
| 2365 | 2365 | |
| 2366 | 2366 | // Volume |
@@ -2379,12 +2379,12 @@ discard block |
||
| 2379 | 2379 | if ($volumeUnit < 50) { |
| 2380 | 2380 | print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no')); |
| 2381 | 2381 | } else { |
| 2382 | - print $calculatedVolume . ' ' . measuringUnitString(0, "volume", $volumeUnit); |
|
| 2382 | + print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit); |
|
| 2383 | 2383 | } |
| 2384 | 2384 | } |
| 2385 | 2385 | if ($totalVolume > 0) { |
| 2386 | 2386 | if ($calculatedVolume) { |
| 2387 | - print ' (' . $langs->trans("SumOfProductVolumes") . ': '; |
|
| 2387 | + print ' ('.$langs->trans("SumOfProductVolumes").': '; |
|
| 2388 | 2388 | } |
| 2389 | 2389 | print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no')); |
| 2390 | 2390 | //if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')'; |
@@ -2397,7 +2397,7 @@ discard block |
||
| 2397 | 2397 | |
| 2398 | 2398 | // Other attributes |
| 2399 | 2399 | //$cols = 2; |
| 2400 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 2400 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 2401 | 2401 | |
| 2402 | 2402 | print '</table>'; |
| 2403 | 2403 | |
@@ -2414,33 +2414,33 @@ discard block |
||
| 2414 | 2414 | print '</td>'; |
| 2415 | 2415 | |
| 2416 | 2416 | if ($action != 'editshipping_method_id' && $permissiontoadd) { |
| 2417 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editshipping_method_id&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetSendingMethod'), 1) . '</a></td>'; |
|
| 2417 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshipping_method_id&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).'</a></td>'; |
|
| 2418 | 2418 | } |
| 2419 | 2419 | print '</tr></table>'; |
| 2420 | 2420 | print '</td><td>'; |
| 2421 | 2421 | if ($action == 'editshipping_method_id') { |
| 2422 | - print '<form name="setshipping_method_id" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 2423 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2422 | + print '<form name="setshipping_method_id" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 2423 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2424 | 2424 | print '<input type="hidden" name="action" value="setshipping_method_id">'; |
| 2425 | 2425 | $object->fetch_delivery_methods(); |
| 2426 | 2426 | print $form->selectarray("shipping_method_id", $object->meths, $object->shipping_method_id, 1, 0, 0, "", 1); |
| 2427 | 2427 | if ($user->admin) { |
| 2428 | 2428 | print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
| 2429 | 2429 | } |
| 2430 | - print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">'; |
|
| 2430 | + print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">'; |
|
| 2431 | 2431 | print '</form>'; |
| 2432 | 2432 | } else { |
| 2433 | 2433 | if ($object->shipping_method_id > 0) { |
| 2434 | 2434 | // Get code using getLabelFromKey |
| 2435 | 2435 | $code = $langs->getLabelFromKey($db, (string) $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); |
| 2436 | - print $langs->trans("SendingMethod" . strtoupper($code)); |
|
| 2436 | + print $langs->trans("SendingMethod".strtoupper($code)); |
|
| 2437 | 2437 | } |
| 2438 | 2438 | } |
| 2439 | 2439 | print '</td>'; |
| 2440 | 2440 | print '</tr>'; |
| 2441 | 2441 | |
| 2442 | 2442 | // Tracking Number |
| 2443 | - print '<tr><td class="titlefieldmiddle">' . $form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
| 2443 | + print '<tr><td class="titlefieldmiddle">'.$form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
| 2444 | 2444 | print $form->editfieldval("TrackingNumber", 'tracking_number', $object->tracking_url, $object, $user->hasRight('expedition', 'creer'), 'safehtmlstring', $object->tracking_number); |
| 2445 | 2445 | print '</td></tr>'; |
| 2446 | 2446 | |
@@ -2451,7 +2451,7 @@ discard block |
||
| 2451 | 2451 | print $langs->trans('IncotermLabel'); |
| 2452 | 2452 | print '<td><td class="right">'; |
| 2453 | 2453 | if ($permissiontoadd) { |
| 2454 | - print '<a class="editfielda" href="' . DOL_URL_ROOT . '/expedition/card.php?id=' . $object->id . '&action=editincoterm&token=' . newToken() . '">' . img_edit() . '</a>'; |
|
| 2454 | + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/expedition/card.php?id='.$object->id.'&action=editincoterm&token='.newToken().'">'.img_edit().'</a>'; |
|
| 2455 | 2455 | } else { |
| 2456 | 2456 | print ' '; |
| 2457 | 2457 | } |
@@ -2461,7 +2461,7 @@ discard block |
||
| 2461 | 2461 | if ($action != 'editincoterm') { |
| 2462 | 2462 | print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); |
| 2463 | 2463 | } else { |
| 2464 | - print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id); |
|
| 2464 | + print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); |
|
| 2465 | 2465 | } |
| 2466 | 2466 | print '</td></tr>'; |
| 2467 | 2467 | } |
@@ -2482,11 +2482,11 @@ discard block |
||
| 2482 | 2482 | // Lines of products |
| 2483 | 2483 | |
| 2484 | 2484 | if ($action == 'editline') { |
| 2485 | - print ' <form name="updateline" id="updateline" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $line_id . '" method="POST"> |
|
| 2486 | - <input type="hidden" name="token" value="' . newToken() . '"> |
|
| 2485 | + print ' <form name="updateline" id="updateline" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$line_id.'" method="POST"> |
|
| 2486 | + <input type="hidden" name="token" value="' . newToken().'"> |
|
| 2487 | 2487 | <input type="hidden" name="action" value="updateline"> |
| 2488 | 2488 | <input type="hidden" name="mode" value=""> |
| 2489 | - <input type="hidden" name="id" value="' . $object->id . '"> |
|
| 2489 | + <input type="hidden" name="id" value="' . $object->id.'"> |
|
| 2490 | 2490 | '; |
| 2491 | 2491 | } |
| 2492 | 2492 | print '<br>'; |
@@ -2500,11 +2500,11 @@ discard block |
||
| 2500 | 2500 | print '<td width="5" class="center linecolnum"> </td>'; |
| 2501 | 2501 | } |
| 2502 | 2502 | // Product/Service |
| 2503 | - print '<td class="linecoldescription" >' . $langs->trans("Products") . '</td>'; |
|
| 2503 | + print '<td class="linecoldescription" >'.$langs->trans("Products").'</td>'; |
|
| 2504 | 2504 | // Qty |
| 2505 | - print '<td class="center linecolqty">' . $langs->trans("QtyOrdered") . '</td>'; |
|
| 2505 | + print '<td class="center linecolqty">'.$langs->trans("QtyOrdered").'</td>'; |
|
| 2506 | 2506 | if ($origin && $origin_id > 0) { |
| 2507 | - print '<td class="center linecolqtyinothershipments">' . $langs->trans("QtyInOtherShipments") . '</td>'; |
|
| 2507 | + print '<td class="center linecolqtyinothershipments">'.$langs->trans("QtyInOtherShipments").'</td>'; |
|
| 2508 | 2508 | } |
| 2509 | 2509 | if ($action == 'editline') { |
| 2510 | 2510 | $editColspan = 3; |
@@ -2514,35 +2514,35 @@ discard block |
||
| 2514 | 2514 | if (empty($conf->productbatch->enabled)) { |
| 2515 | 2515 | $editColspan--; |
| 2516 | 2516 | } |
| 2517 | - print '<td class="center linecoleditlineotherinfo" colspan="' . $editColspan . '">'; |
|
| 2517 | + print '<td class="center linecoleditlineotherinfo" colspan="'.$editColspan.'">'; |
|
| 2518 | 2518 | if ($object->status <= 1) { |
| 2519 | 2519 | print $langs->trans("QtyToShip"); |
| 2520 | 2520 | } else { |
| 2521 | 2521 | print $langs->trans("QtyShipped"); |
| 2522 | 2522 | } |
| 2523 | 2523 | if (isModEnabled('stock')) { |
| 2524 | - print ' - ' . $langs->trans("WarehouseSource"); |
|
| 2524 | + print ' - '.$langs->trans("WarehouseSource"); |
|
| 2525 | 2525 | } |
| 2526 | 2526 | if (isModEnabled('productbatch')) { |
| 2527 | - print ' - ' . $langs->trans("Batch"); |
|
| 2527 | + print ' - '.$langs->trans("Batch"); |
|
| 2528 | 2528 | } |
| 2529 | 2529 | print '</td>'; |
| 2530 | 2530 | } else { |
| 2531 | 2531 | if ($object->status <= 1) { |
| 2532 | - print '<td class="center linecolqtytoship">' . $langs->trans("QtyToShip") . '</td>'; |
|
| 2532 | + print '<td class="center linecolqtytoship">'.$langs->trans("QtyToShip").'</td>'; |
|
| 2533 | 2533 | } else { |
| 2534 | - print '<td class="center linecolqtyshipped">' . $langs->trans("QtyShipped") . '</td>'; |
|
| 2534 | + print '<td class="center linecolqtyshipped">'.$langs->trans("QtyShipped").'</td>'; |
|
| 2535 | 2535 | } |
| 2536 | 2536 | if (isModEnabled('stock')) { |
| 2537 | - print '<td class="left linecolwarehousesource">' . $langs->trans("WarehouseSource") . '</td>'; |
|
| 2537 | + print '<td class="left linecolwarehousesource">'.$langs->trans("WarehouseSource").'</td>'; |
|
| 2538 | 2538 | } |
| 2539 | 2539 | |
| 2540 | 2540 | if (isModEnabled('productbatch')) { |
| 2541 | - print '<td class="left linecolbatch">' . $langs->trans("Batch") . '</td>'; |
|
| 2541 | + print '<td class="left linecolbatch">'.$langs->trans("Batch").'</td>'; |
|
| 2542 | 2542 | } |
| 2543 | 2543 | } |
| 2544 | - print '<td class="center linecolweight">' . $langs->trans("CalculatedWeight") . '</td>'; |
|
| 2545 | - print '<td class="center linecolvolume">' . $langs->trans("CalculatedVolume") . '</td>'; |
|
| 2544 | + print '<td class="center linecolweight">'.$langs->trans("CalculatedWeight").'</td>'; |
|
| 2545 | + print '<td class="center linecolvolume">'.$langs->trans("CalculatedVolume").'</td>'; |
|
| 2546 | 2546 | //print '<td class="center">'.$langs->trans("Size").'</td>'; |
| 2547 | 2547 | if ($object->status == 0) { |
| 2548 | 2548 | print '<td class="linecoledit"></td>'; |
@@ -2577,13 +2577,13 @@ discard block |
||
| 2577 | 2577 | //if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received"; |
| 2578 | 2578 | $sql .= ', p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, p.tosell as product_tosell, p.tobuy as product_tobuy, p.tobatch as product_tobatch'; |
| 2579 | 2579 | $sql .= ', p.description as product_desc'; |
| 2580 | - $sql .= " FROM " . MAIN_DB_PREFIX . "expeditiondet as ed"; |
|
| 2581 | - $sql .= ", " . MAIN_DB_PREFIX . "expedition as e"; |
|
| 2582 | - $sql .= ", " . MAIN_DB_PREFIX . $origin . "det as obj"; |
|
| 2580 | + $sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed"; |
|
| 2581 | + $sql .= ", ".MAIN_DB_PREFIX."expedition as e"; |
|
| 2582 | + $sql .= ", ".MAIN_DB_PREFIX.$origin."det as obj"; |
|
| 2583 | 2583 | //if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid AND obj.rowid = ld.fk_origin_line"; |
| 2584 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON obj.fk_product = p.rowid"; |
|
| 2585 | - $sql .= " WHERE e.entity IN (" . getEntity('expedition') . ")"; |
|
| 2586 | - $sql .= " AND obj.fk_" . $origin . " = " . ((int) $origin_id); |
|
| 2584 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid"; |
|
| 2585 | + $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; |
|
| 2586 | + $sql .= " AND obj.fk_".$origin." = ".((int) $origin_id); |
|
| 2587 | 2587 | $sql .= " AND obj.rowid = ed.fk_elementdet"; |
| 2588 | 2588 | $sql .= " AND ed.fk_expedition = e.rowid"; |
| 2589 | 2589 | //if ($filter) $sql.= $filter; |
@@ -2630,12 +2630,12 @@ discard block |
||
| 2630 | 2630 | } |
| 2631 | 2631 | |
| 2632 | 2632 | if (empty($reshook) && $lines[$i]->product_type != "9") { |
| 2633 | - print '<!-- origin line id = ' . $lines[$i]->origin_line_id . ' -->'; // id of order line |
|
| 2634 | - print '<tr class="oddeven" id="row-' . $lines[$i]->id . '" data-id="' . $lines[$i]->id . '" data-element="' . $lines[$i]->element . '" >'; |
|
| 2633 | + print '<!-- origin line id = '.$lines[$i]->origin_line_id.' -->'; // id of order line |
|
| 2634 | + print '<tr class="oddeven" id="row-'.$lines[$i]->id.'" data-id="'.$lines[$i]->id.'" data-element="'.$lines[$i]->element.'" >'; |
|
| 2635 | 2635 | |
| 2636 | 2636 | // # |
| 2637 | 2637 | if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) { |
| 2638 | - print '<td class="center linecolnum">' . ($i + 1) . '</td>'; |
|
| 2638 | + print '<td class="center linecolnum">'.($i + 1).'</td>'; |
|
| 2639 | 2639 | } |
| 2640 | 2640 | |
| 2641 | 2641 | // Predefined product or service |
@@ -2680,12 +2680,12 @@ discard block |
||
| 2680 | 2680 | $product_static->stockable_product = $lines[$i]->stockable_product; |
| 2681 | 2681 | |
| 2682 | 2682 | $text = $product_static->getNomUrl(1); |
| 2683 | - $text .= ' - ' . $label; |
|
| 2683 | + $text .= ' - '.$label; |
|
| 2684 | 2684 | $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($lines[$i]->description)); |
| 2685 | 2685 | print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i); |
| 2686 | 2686 | print_date_range(!empty($lines[$i]->date_start) ? $lines[$i]->date_start : '', !empty($lines[$i]->date_end) ? $lines[$i]->date_end : ''); |
| 2687 | 2687 | if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { |
| 2688 | - print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>' . dol_htmlentitiesbr($lines[$i]->description) : ''; |
|
| 2688 | + print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>'.dol_htmlentitiesbr($lines[$i]->description) : ''; |
|
| 2689 | 2689 | } |
| 2690 | 2690 | print "</td>\n"; |
| 2691 | 2691 | } else { |
@@ -2697,10 +2697,10 @@ discard block |
||
| 2697 | 2697 | } |
| 2698 | 2698 | |
| 2699 | 2699 | if (!empty($lines[$i]->label)) { |
| 2700 | - $text .= ' <strong>' . $lines[$i]->label . '</strong>'; |
|
| 2700 | + $text .= ' <strong>'.$lines[$i]->label.'</strong>'; |
|
| 2701 | 2701 | print $form->textwithtooltip($text, $lines[$i]->description, 3, 0, '', (string) $i); |
| 2702 | 2702 | } else { |
| 2703 | - print $text . ' ' . nl2br($lines[$i]->description); |
|
| 2703 | + print $text.' '.nl2br($lines[$i]->description); |
|
| 2704 | 2704 | } |
| 2705 | 2705 | |
| 2706 | 2706 | print_date_range($lines[$i]->date_start, $lines[$i]->date_end); |
@@ -2713,7 +2713,7 @@ discard block |
||
| 2713 | 2713 | } |
| 2714 | 2714 | |
| 2715 | 2715 | // Qty ordered |
| 2716 | - print '<td class="center linecolqty">' . $lines[$i]->qty_asked . ' ' . $unit_order . '</td>'; |
|
| 2716 | + print '<td class="center linecolqty">'.$lines[$i]->qty_asked.' '.$unit_order.'</td>'; |
|
| 2717 | 2717 | |
| 2718 | 2718 | // Qty in other shipments (with shipment and warehouse used) |
| 2719 | 2719 | if ($origin && $origin_id > 0) { |
@@ -2734,8 +2734,8 @@ discard block |
||
| 2734 | 2734 | } |
| 2735 | 2735 | $shipment_static->fetch($shipmentline_var['shipment_id']); |
| 2736 | 2736 | $htmltooltip .= $shipment_static->getNomUrl(1, '', 0, 0, 1); |
| 2737 | - $htmltooltip .= ' - ' . $shipmentline_var['qty_shipped']; |
|
| 2738 | - $htmltooltip .= ' - ' . $langs->trans("DateValidation") . ' : ' . (empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour')); |
|
| 2737 | + $htmltooltip .= ' - '.$shipmentline_var['qty_shipped']; |
|
| 2738 | + $htmltooltip .= ' - '.$langs->trans("DateValidation").' : '.(empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour')); |
|
| 2739 | 2739 | /*if (isModEnabled('stock') && $shipmentline_var['warehouse'] > 0) { |
| 2740 | 2740 | $warehousestatic->fetch($shipmentline_var['warehouse']); |
| 2741 | 2741 | $htmltext .= '<br>'.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1); |
@@ -2745,39 +2745,39 @@ discard block |
||
| 2745 | 2745 | $qtyalreadysent += $shipmentline_var['qty_shipped']; |
| 2746 | 2746 | } |
| 2747 | 2747 | if ($j) { |
| 2748 | - $htmltooltip = $langs->trans("QtyInOtherShipments") . '...<br><br>' . $htmltooltip . '<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>'; |
|
| 2748 | + $htmltooltip = $langs->trans("QtyInOtherShipments").'...<br><br>'.$htmltooltip.'<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>'; |
|
| 2749 | 2749 | } |
| 2750 | 2750 | } |
| 2751 | 2751 | } |
| 2752 | - print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip' . $lines[$i]->id); |
|
| 2752 | + print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip'.$lines[$i]->id); |
|
| 2753 | 2753 | print '</td>'; |
| 2754 | 2754 | } |
| 2755 | 2755 | |
| 2756 | 2756 | if ($action == 'editline' && $lines[$i]->id == $line_id) { |
| 2757 | 2757 | // edit mode |
| 2758 | - print '<td colspan="' . $editColspan . '" class="center"><table class="nobordernopadding centpercent">'; |
|
| 2758 | + print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding centpercent">'; |
|
| 2759 | 2759 | if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) { |
| 2760 | 2760 | print '<!-- case edit 1 -->'; |
| 2761 | 2761 | $line = new ExpeditionLigne($db); |
| 2762 | 2762 | foreach ($lines[$i]->detail_batch as $detail_batch) { |
| 2763 | 2763 | print '<tr>'; |
| 2764 | 2764 | // Qty to ship or shipped |
| 2765 | - print '<td><input class="qtyl right" name="qtyl' . $detail_batch->fk_expeditiondet . '_' . $detail_batch->id . '" id="qtyl' . $line_id . '_' . $detail_batch->id . '" type="text" size="4" value="' . $detail_batch->qty . '"></td>'; |
|
| 2765 | + print '<td><input class="qtyl right" name="qtyl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->id.'" id="qtyl'.$line_id.'_'.$detail_batch->id.'" type="text" size="4" value="'.$detail_batch->qty.'"></td>'; |
|
| 2766 | 2766 | // Batch number management |
| 2767 | 2767 | if ($lines[$i]->entrepot_id == 0) { |
| 2768 | 2768 | // only show lot numbers from src warehouse when shipping from multiple warehouses |
| 2769 | 2769 | $line->fetch($detail_batch->fk_expeditiondet); |
| 2770 | 2770 | } |
| 2771 | 2771 | $entrepot_id = !empty($detail_batch->entrepot_id) ? $detail_batch->entrepot_id : $lines[$i]->entrepot_id; |
| 2772 | - print '<td>' . $formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl' . $detail_batch->fk_expeditiondet . '_' . $detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id) . '</td>'; |
|
| 2772 | + print '<td>'.$formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id).'</td>'; |
|
| 2773 | 2773 | print '</tr>'; |
| 2774 | 2774 | } |
| 2775 | 2775 | // add a 0 qty lot row to be able to add a lot |
| 2776 | 2776 | print '<tr>'; |
| 2777 | 2777 | // Qty to ship or shipped |
| 2778 | - print '<td><input class="qtyl" name="qtyl' . $line_id . '_0" id="qtyl' . $line_id . '_0" type="text" size="4" value="0"></td>'; |
|
| 2778 | + print '<td><input class="qtyl" name="qtyl'.$line_id.'_0" id="qtyl'.$line_id.'_0" type="text" size="4" value="0"></td>'; |
|
| 2779 | 2779 | // Batch number management |
| 2780 | - print '<td>' . $formproduct->selectLotStock('', 'batchl' . $line_id . '_0', '', 1, 0, $lines[$i]->fk_product) . '</td>'; |
|
| 2780 | + print '<td>'.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).'</td>'; |
|
| 2781 | 2781 | print '</tr>'; |
| 2782 | 2782 | } elseif (isModEnabled('stock')) { |
| 2783 | 2783 | if ($lines[$i]->fk_product > 0) { |
@@ -2785,13 +2785,13 @@ discard block |
||
| 2785 | 2785 | print '<!-- case edit 2 -->'; |
| 2786 | 2786 | print '<tr>'; |
| 2787 | 2787 | // Qty to ship or shipped |
| 2788 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '">' . $unit_order . '</td>'; |
|
| 2788 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'">'.$unit_order.'</td>'; |
|
| 2789 | 2789 | // Warehouse source |
| 2790 | - print '<td>' . $formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl' . $line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>'; |
|
| 2790 | + print '<td>'.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>'; |
|
| 2791 | 2791 | // Batch number management |
| 2792 | 2792 | print '<td>'; |
| 2793 | 2793 | if (isModEnabled('productbatch')) { |
| 2794 | - print ' - ' . $langs->trans("NA"); |
|
| 2794 | + print ' - '.$langs->trans("NA"); |
|
| 2795 | 2795 | } |
| 2796 | 2796 | print '</td>'; |
| 2797 | 2797 | print '</tr>'; |
@@ -2800,13 +2800,13 @@ discard block |
||
| 2800 | 2800 | foreach ($lines[$i]->details_entrepot as $detail_entrepot) { |
| 2801 | 2801 | print '<tr>'; |
| 2802 | 2802 | // Qty to ship or shipped |
| 2803 | - print '<td><input class="qtyl right" name="qtyl' . $detail_entrepot->line_id . '" id="qtyl' . $detail_entrepot->line_id . '" type="text" size="4" value="' . $detail_entrepot->qty_shipped . '">' . $unit_order . '</td>'; |
|
| 2803 | + print '<td><input class="qtyl right" name="qtyl'.$detail_entrepot->line_id.'" id="qtyl'.$detail_entrepot->line_id.'" type="text" size="4" value="'.$detail_entrepot->qty_shipped.'">'.$unit_order.'</td>'; |
|
| 2804 | 2804 | // Warehouse source |
| 2805 | - print '<td>' . $formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl' . $detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>'; |
|
| 2805 | + print '<td>'.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>'; |
|
| 2806 | 2806 | // Batch number management |
| 2807 | 2807 | print '<td>'; |
| 2808 | 2808 | if (isModEnabled('productbatch')) { |
| 2809 | - print ' - ' . $langs->trans("NA"); |
|
| 2809 | + print ' - '.$langs->trans("NA"); |
|
| 2810 | 2810 | } |
| 2811 | 2811 | print '</td>'; |
| 2812 | 2812 | print '</tr>'; |
@@ -2815,19 +2815,19 @@ discard block |
||
| 2815 | 2815 | print '<!-- case edit 4 -->'; |
| 2816 | 2816 | print '<tr>'; |
| 2817 | 2817 | // Qty to ship or shipped |
| 2818 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>'; |
|
| 2819 | - print '<td><span class="opacitymedium">(' . $langs->trans("Service") . ')</span></td>'; |
|
| 2818 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>'; |
|
| 2819 | + print '<td><span class="opacitymedium">('.$langs->trans("Service").')</span></td>'; |
|
| 2820 | 2820 | print '<td></td>'; |
| 2821 | 2821 | print '</tr>'; |
| 2822 | 2822 | } else { |
| 2823 | 2823 | print '<!-- case edit 5 -->'; |
| 2824 | - print '<tr><td colspan="3">' . $langs->trans("ErrorStockIsNotEnough") . '</td></tr>'; |
|
| 2824 | + print '<tr><td colspan="3">'.$langs->trans("ErrorStockIsNotEnough").'</td></tr>'; |
|
| 2825 | 2825 | } |
| 2826 | 2826 | } else { |
| 2827 | 2827 | print '<!-- case edit 6 -->'; |
| 2828 | 2828 | print '<tr>'; |
| 2829 | 2829 | // Qty to ship or shipped |
| 2830 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '">' . $unit_order . '</td>'; |
|
| 2830 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'">'.$unit_order.'</td>'; |
|
| 2831 | 2831 | // Warehouse source |
| 2832 | 2832 | print '<td></td>'; |
| 2833 | 2833 | // Batch number management |
@@ -2838,7 +2838,7 @@ discard block |
||
| 2838 | 2838 | print '<!-- case edit 7 -->'; |
| 2839 | 2839 | print '<tr>'; |
| 2840 | 2840 | // Qty to ship or shipped |
| 2841 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>'; |
|
| 2841 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>'; |
|
| 2842 | 2842 | // Warehouse source |
| 2843 | 2843 | print '<td></td>'; |
| 2844 | 2844 | // Batch number management |
@@ -2849,13 +2849,13 @@ discard block |
||
| 2849 | 2849 | print '</table></td>'; |
| 2850 | 2850 | } else { |
| 2851 | 2851 | // Qty to ship or shipped |
| 2852 | - print '<td class="linecolqtytoship center">' . $lines[$i]->qty_shipped . ' ' . $unit_order . '</td>'; |
|
| 2852 | + print '<td class="linecolqtytoship center">'.$lines[$i]->qty_shipped.' '.$unit_order.'</td>'; |
|
| 2853 | 2853 | |
| 2854 | 2854 | // Warehouse source |
| 2855 | 2855 | if (isModEnabled('stock')) { |
| 2856 | 2856 | print '<td class="linecolwarehousesource tdoverflowmax200">'; |
| 2857 | 2857 | if ($lines[$i]->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
| 2858 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>'; |
|
| 2858 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
|
| 2859 | 2859 | } elseif ($lines[$i]->entrepot_id > 0 && $lines[$i]->stockable_product == Product::ENABLED_STOCK) { |
| 2860 | 2860 | $warehouse_id = $lines[$i]->entrepot_id; |
| 2861 | 2861 | if (!isset($conf->cache['warehouse'][$warehouse_id])) { |
@@ -2878,10 +2878,10 @@ discard block |
||
| 2878 | 2878 | } else { |
| 2879 | 2879 | $warehouse = $conf->cache['warehouse'][$warehouse_id]; |
| 2880 | 2880 | } |
| 2881 | - $detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped) . '<br>'; |
|
| 2881 | + $detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped).'<br>'; |
|
| 2882 | 2882 | } |
| 2883 | 2883 | } |
| 2884 | - print $form->textwithtooltip(img_picto('', 'object_stock') . ' ' . $langs->trans("DetailWarehouseNumber"), $detail); |
|
| 2884 | + print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans("DetailWarehouseNumber"), $detail); |
|
| 2885 | 2885 | } elseif (count($lines[$i]->detail_children) > 1) { |
| 2886 | 2886 | $detail = ''; |
| 2887 | 2887 | foreach ($lines[$i]->detail_children as $child_product_id => $child_stock_list) { |
@@ -2895,7 +2895,7 @@ discard block |
||
| 2895 | 2895 | } else { |
| 2896 | 2896 | $child_product = $conf->cache['product'][$child_product_id]; |
| 2897 | 2897 | } |
| 2898 | - $child_product_label = $child_product->ref . ' ' . $child_product->label; |
|
| 2898 | + $child_product_label = $child_product->ref.' '.$child_product->label; |
|
| 2899 | 2899 | |
| 2900 | 2900 | // get warehouse from cache |
| 2901 | 2901 | if (!isset($conf->cache['warehouse'][$warehouse_id])) { |
@@ -2906,10 +2906,10 @@ discard block |
||
| 2906 | 2906 | $child_warehouse = $conf->cache['warehouse'][$warehouse_id]; |
| 2907 | 2907 | } |
| 2908 | 2908 | |
| 2909 | - $detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')) . '<br>'; |
|
| 2909 | + $detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')).'<br>'; |
|
| 2910 | 2910 | } |
| 2911 | 2911 | } |
| 2912 | - print $form->textwithtooltip(img_picto('', 'object_stock') . ' ' . $langs->trans('DetailWarehouseNumber'), $detail); |
|
| 2912 | + print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans('DetailWarehouseNumber'), $detail); |
|
| 2913 | 2913 | } |
| 2914 | 2914 | print '</td>'; |
| 2915 | 2915 | } |
@@ -2922,17 +2922,17 @@ discard block |
||
| 2922 | 2922 | if ($lines[$i]->product_tobatch) { |
| 2923 | 2923 | $detail = ''; |
| 2924 | 2924 | foreach ($lines[$i]->detail_batch as $dbatch) { // $dbatch is instance of ExpeditionLineBatch |
| 2925 | - $detail .= $langs->trans("Batch") . ': ' . $dbatch->batch; |
|
| 2925 | + $detail .= $langs->trans("Batch").': '.$dbatch->batch; |
|
| 2926 | 2926 | if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) { |
| 2927 | - $detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day"); |
|
| 2927 | + $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); |
|
| 2928 | 2928 | } |
| 2929 | 2929 | if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) { |
| 2930 | - $detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day"); |
|
| 2930 | + $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); |
|
| 2931 | 2931 | } |
| 2932 | - $detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty; |
|
| 2932 | + $detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty; |
|
| 2933 | 2933 | $detail .= '<br>'; |
| 2934 | 2934 | } |
| 2935 | - print $form->textwithtooltip(img_picto('', 'object_barcode') . ' ' . $langs->trans("DetailBatchNumber"), $detail); |
|
| 2935 | + print $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $detail); |
|
| 2936 | 2936 | } else { |
| 2937 | 2937 | print $langs->trans("NA"); |
| 2938 | 2938 | } |
@@ -2946,7 +2946,7 @@ discard block |
||
| 2946 | 2946 | // Weight |
| 2947 | 2947 | print '<td class="center linecolweight">'; |
| 2948 | 2948 | if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { |
| 2949 | - print $lines[$i]->weight * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "weight", $lines[$i]->weight_units); |
|
| 2949 | + print $lines[$i]->weight * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "weight", $lines[$i]->weight_units); |
|
| 2950 | 2950 | } else { |
| 2951 | 2951 | print ' '; |
| 2952 | 2952 | } |
@@ -2955,7 +2955,7 @@ discard block |
||
| 2955 | 2955 | // Volume |
| 2956 | 2956 | print '<td class="center linecolvolume">'; |
| 2957 | 2957 | if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { |
| 2958 | - print $lines[$i]->volume * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "volume", $lines[$i]->volume_units); |
|
| 2958 | + print $lines[$i]->volume * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units); |
|
| 2959 | 2959 | } else { |
| 2960 | 2960 | print ' '; |
| 2961 | 2961 | } |
@@ -2966,11 +2966,11 @@ discard block |
||
| 2966 | 2966 | |
| 2967 | 2967 | if ($action == 'editline' && $lines[$i]->id == $line_id) { |
| 2968 | 2968 | print '<td class="center" colspan="2" valign="middle">'; |
| 2969 | - print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="' . $langs->trans("Save") . '"><br>'; |
|
| 2970 | - print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="' . $langs->trans("Cancel") . '"><br>'; |
|
| 2969 | + print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'"><br>'; |
|
| 2970 | + print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"><br>'; |
|
| 2971 | 2971 | print '</td>'; |
| 2972 | 2972 | } elseif ($object->status == Expedition::STATUS_DRAFT) { |
| 2973 | - $edit_url = $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=editline&token=' . newToken() . '&lineid=' . $lines[$i]->id; |
|
| 2973 | + $edit_url = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&token='.newToken().'&lineid='.$lines[$i]->id; |
|
| 2974 | 2974 | if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) { |
| 2975 | 2975 | $product_id = $lines[$i]->fk_product; |
| 2976 | 2976 | if (!isset($conf->cache['product'][$product_id])) { |
@@ -2982,16 +2982,16 @@ discard block |
||
| 2982 | 2982 | } |
| 2983 | 2983 | |
| 2984 | 2984 | if ($product->hasFatherOrChild(1)) { |
| 2985 | - $edit_url = dol_buildpath('/expedition/dispatch.php?id=' . $object->id, 1); |
|
| 2985 | + $edit_url = dol_buildpath('/expedition/dispatch.php?id='.$object->id, 1); |
|
| 2986 | 2986 | } |
| 2987 | 2987 | } |
| 2988 | 2988 | |
| 2989 | 2989 | // edit-delete buttons |
| 2990 | 2990 | print '<td class="linecoledit center">'; |
| 2991 | - print '<a class="editfielda reposition" href="' . $edit_url . '">' . img_edit() . '</a>'; |
|
| 2991 | + print '<a class="editfielda reposition" href="'.$edit_url.'">'.img_edit().'</a>'; |
|
| 2992 | 2992 | print '</td>'; |
| 2993 | 2993 | print '<td class="linecoldelete" width="10">'; |
| 2994 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=deleteline&token=' . newToken() . '&lineid=' . $lines[$i]->id . '">' . img_delete() . '</a>'; |
|
| 2994 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&token='.newToken().'&lineid='.$lines[$i]->id.'">'.img_delete().'</a>'; |
|
| 2995 | 2995 | print '</td>'; |
| 2996 | 2996 | |
| 2997 | 2997 | // Display lines extrafields |
@@ -3040,7 +3040,7 @@ discard block |
||
| 3040 | 3040 | // TODO Show also lines ordered but not delivered |
| 3041 | 3041 | |
| 3042 | 3042 | if (empty($num_prod)) { |
| 3043 | - print '<tr><td colspan="8"><span class="opacitymedium">' . $langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")) . '</span></td></tr>'; |
|
| 3043 | + print '<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")).'</span></td></tr>'; |
|
| 3044 | 3044 | } |
| 3045 | 3045 | |
| 3046 | 3046 | print "</table>\n"; |
@@ -3069,21 +3069,21 @@ discard block |
||
| 3069 | 3069 | if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'creer')) |
| 3070 | 3070 | || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'shipping_advance', 'validate')) |
| 3071 | 3071 | ) { |
| 3072 | - print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"] . '?action=valid&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3072 | + print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, ''); |
|
| 3073 | 3073 | } else { |
| 3074 | - print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'] . '#', '', false); |
|
| 3074 | + print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 3075 | 3075 | } |
| 3076 | 3076 | } |
| 3077 | 3077 | |
| 3078 | 3078 | // 0=draft, 1=validated/delivered, 2=closed/delivered |
| 3079 | 3079 | if ($object->status == Expedition::STATUS_VALIDATED && !getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) { |
| 3080 | 3080 | if ($user->hasRight('expedition', 'creer')) { |
| 3081 | - print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"] . '?action=setdraft&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3081 | + print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=setdraft&token='.newToken().'&id='.$object->id, ''); |
|
| 3082 | 3082 | } |
| 3083 | 3083 | } |
| 3084 | 3084 | if ($object->status == Expedition::STATUS_CLOSED) { |
| 3085 | 3085 | if ($user->hasRight('expedition', 'creer')) { |
| 3086 | - print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"] . '?action=reopen&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3086 | + print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, ''); |
|
| 3087 | 3087 | } |
| 3088 | 3088 | } |
| 3089 | 3089 | |
@@ -3091,9 +3091,9 @@ discard block |
||
| 3091 | 3091 | if (empty($user->socid)) { |
| 3092 | 3092 | if ($object->status > 0) { |
| 3093 | 3093 | if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('expedition', 'shipping_advance', 'send')) { |
| 3094 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', ''); |
|
| 3094 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
|
| 3095 | 3095 | } else { |
| 3096 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'] . '#', '', false); |
|
| 3096 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 3097 | 3097 | } |
| 3098 | 3098 | } |
| 3099 | 3099 | } |
@@ -3101,15 +3101,15 @@ discard block |
||
| 3101 | 3101 | // This is just to generate a delivery receipt when option to do this is on |
| 3102 | 3102 | //var_dump($object->linkedObjectsIds['delivery']); |
| 3103 | 3103 | if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED) && $user->hasRight('expedition', 'delivery', 'creer') && empty($object->linkedObjectsIds['delivery'])) { |
| 3104 | - print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"] . '?action=create_delivery&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3104 | + print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"].'?action=create_delivery&token='.newToken().'&id='.$object->id, ''); |
|
| 3105 | 3105 | } |
| 3106 | 3106 | |
| 3107 | 3107 | // Sign (to set to status "Signed" without using the online signature page) |
| 3108 | 3108 | if ($object->status > Expedition::STATUS_DRAFT) { |
| 3109 | 3109 | if ($object->signed_status != Expedition::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) { |
| 3110 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=sign&token=' . newToken() . '">' . $langs->trans("SignShipping") . '</a></div>'; |
|
| 3110 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=sign&token='.newToken().'">'.$langs->trans("SignShipping").'</a></div>'; |
|
| 3111 | 3111 | } else { |
| 3112 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=unsign&token=' . newToken() . '">' . $langs->trans("UnsignShipping") . '</a></div>'; |
|
| 3112 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=unsign&token='.newToken().'">'.$langs->trans("UnsignShipping").'</a></div>'; |
|
| 3113 | 3113 | } |
| 3114 | 3114 | } |
| 3115 | 3115 | |
@@ -3117,7 +3117,7 @@ discard block |
||
| 3117 | 3117 | if (isModEnabled('invoice') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED)) { |
| 3118 | 3118 | if ($user->hasRight('facture', 'creer')) { |
| 3119 | 3119 | if (getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') { |
| 3120 | - print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT . '/compta/facture/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid, ''); |
|
| 3120 | + print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, ''); |
|
| 3121 | 3121 | } |
| 3122 | 3122 | } |
| 3123 | 3123 | } |
@@ -3126,22 +3126,22 @@ discard block |
||
| 3126 | 3126 | if ($object->status == Expedition::STATUS_VALIDATED) { |
| 3127 | 3127 | if ($user->hasRight('expedition', 'creer') && $object->status > 0) { |
| 3128 | 3128 | if (!$object->billed && getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') { |
| 3129 | - print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"] . '?action=classifybilled&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3129 | + print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, ''); |
|
| 3130 | 3130 | } |
| 3131 | - print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"] . '?action=classifyclosed&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3131 | + print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action=classifyclosed&token='.newToken().'&id='.$object->id, ''); |
|
| 3132 | 3132 | } |
| 3133 | 3133 | } |
| 3134 | 3134 | |
| 3135 | 3135 | // Cancel |
| 3136 | 3136 | if ($object->status == Expedition::STATUS_VALIDATED) { |
| 3137 | 3137 | if ($user->hasRight('expedition', 'creer')) { |
| 3138 | - print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"] . '?action=cancel&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', ''); |
|
| 3138 | + print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"].'?action=cancel&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
|
| 3139 | 3139 | } |
| 3140 | 3140 | } |
| 3141 | 3141 | |
| 3142 | 3142 | // Delete |
| 3143 | 3143 | if ($user->hasRight('expedition', 'supprimer')) { |
| 3144 | - print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3144 | + print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
|
| 3145 | 3145 | } |
| 3146 | 3146 | } |
| 3147 | 3147 | |
@@ -3157,9 +3157,9 @@ discard block |
||
| 3157 | 3157 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
| 3158 | 3158 | |
| 3159 | 3159 | $objectref = dol_sanitizeFileName($object->ref); |
| 3160 | - $filedir = $conf->expedition->dir_output . "/sending/" . $objectref; |
|
| 3160 | + $filedir = $conf->expedition->dir_output."/sending/".$objectref; |
|
| 3161 | 3161 | |
| 3162 | - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; |
|
| 3162 | + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; |
|
| 3163 | 3163 | |
| 3164 | 3164 | $genallowed = $user->hasRight('expedition', 'lire'); |
| 3165 | 3165 | $delallowed = $user->hasRight('expedition', 'creer'); |
@@ -3180,8 +3180,8 @@ discard block |
||
| 3180 | 3180 | |
| 3181 | 3181 | if ($object->status != Expedition::STATUS_DRAFT && $useonlinesignature) { |
| 3182 | 3182 | print '<br><!-- Link to sign -->'; |
| 3183 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php'; |
|
| 3184 | - print showOnlineSignatureUrl('expedition', $object->ref, $object) . '<br>'; |
|
| 3183 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; |
|
| 3184 | + print showOnlineSignatureUrl('expedition', $object->ref, $object).'<br>'; |
|
| 3185 | 3185 | } |
| 3186 | 3186 | |
| 3187 | 3187 | print '</div><div class="fichehalfright">'; |
@@ -3189,13 +3189,13 @@ discard block |
||
| 3189 | 3189 | |
| 3190 | 3190 | |
| 3191 | 3191 | // List of actions on element |
| 3192 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
| 3192 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
| 3193 | 3193 | $formactions = new FormActions($db); |
| 3194 | 3194 | |
| 3195 | 3195 | //button to go to messaging from the events box |
| 3196 | 3196 | $MAXEVENT = 10; |
| 3197 | - $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT . '/expedition/messaging.php?id=' . $object->id); |
|
| 3198 | - $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT . '/expedition/agenda.php?id=' . $object->id); |
|
| 3197 | + $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/expedition/messaging.php?id='.$object->id); |
|
| 3198 | + $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/expedition/agenda.php?id='.$object->id); |
|
| 3199 | 3199 | |
| 3200 | 3200 | $somethingshown = $formactions->showactions($object, 'shipping', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter); |
| 3201 | 3201 | |
@@ -3215,10 +3215,10 @@ discard block |
||
| 3215 | 3215 | // Presend form |
| 3216 | 3216 | $modelmail = 'shipping_send'; |
| 3217 | 3217 | $defaulttopic = 'SendShippingRef'; |
| 3218 | - $diroutput = $conf->expedition->dir_output . '/sending'; |
|
| 3219 | - $trackid = 'shi' . $object->id; |
|
| 3218 | + $diroutput = $conf->expedition->dir_output.'/sending'; |
|
| 3219 | + $trackid = 'shi'.$object->id; |
|
| 3220 | 3220 | |
| 3221 | - include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php'; |
|
| 3221 | + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
|
| 3222 | 3222 | } |
| 3223 | 3223 | |
| 3224 | 3224 | // End of page |