@@ -475,7 +475,9 @@ |
||
| 475 | 475 | // single value |
| 476 | 476 | $sqlwhere[] = $key . " = " . intval($value); |
| 477 | 477 | } elseif (is_array($value)) { |
| 478 | - if (empty($value)) continue; |
|
| 478 | + if (empty($value)) { |
|
| 479 | + continue; |
|
| 480 | + } |
|
| 479 | 481 | $sqlwhere[] = $key . ' IN (' . $this->db->sanitize(implode(',', array_map('intval', $value))) . ')'; |
| 480 | 482 | } |
| 481 | 483 | continue; |
@@ -300,8 +300,9 @@ discard block |
||
| 300 | 300 | print '<table class="nobordernopadding" width="100%"><tr><td>'; |
| 301 | 301 | print $langs->trans('DefaultPaymentMode'); |
| 302 | 302 | print '</td>'; |
| 303 | -if ($action != 'editmode') |
|
| 303 | +if ($action != 'editmode') { |
|
| 304 | 304 | print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>'; |
| 305 | +} |
|
| 305 | 306 | print '</tr></table>'; |
| 306 | 307 | print '</td><td>'; |
| 307 | 308 | |
@@ -406,8 +407,9 @@ discard block |
||
| 406 | 407 | } |
| 407 | 408 | |
| 408 | 409 | print '<td class="right">'; |
| 409 | - if ($bankaccountstatic->id) |
|
| 410 | - print $bankaccountstatic->getNomUrl(1, 'transactions'); |
|
| 410 | + if ($bankaccountstatic->id) { |
|
| 411 | + print $bankaccountstatic->getNomUrl(1, 'transactions'); |
|
| 412 | + } |
|
| 411 | 413 | print '</td>'; |
| 412 | 414 | } |
| 413 | 415 | print '<td class="right nowrap amountcard">'.price($objp->amount)."</td>\n"; |
@@ -3936,9 +3936,12 @@ |
||
| 3936 | 3936 | |
| 3937 | 3937 | $parameters = array(); |
| 3938 | 3938 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 3939 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 3940 | - if (empty($reshook)) |
|
| 3941 | - $object->formAddObjectLine(1, $societe, $mysoc); |
|
| 3939 | + if ($reshook < 0) { |
|
| 3940 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 3941 | + } |
|
| 3942 | + if (empty($reshook)) { |
|
| 3943 | + $object->formAddObjectLine(1, $societe, $mysoc); |
|
| 3944 | + } |
|
| 3942 | 3945 | } |
| 3943 | 3946 | } |
| 3944 | 3947 | |
@@ -2750,7 +2750,9 @@ discard block |
||
| 2750 | 2750 | $sql.= ' WHERE cd.fk_contrat = c.rowid'; |
| 2751 | 2751 | $sql.= " AND date_format(cd.date_fin_validite, '%Y-%m-%d') <= date_format('".$this->db->idate($enddatetoscan)."', '%Y-%m-%d')"; |
| 2752 | 2752 | $sql.= " AND cd.statut = 4"; |
| 2753 | - if ($thirdparty_id > 0) $sql.=" AND c.fk_soc = ".((int) $thirdparty_id); |
|
| 2753 | + if ($thirdparty_id > 0) { |
|
| 2754 | + $sql.=" AND c.fk_soc = ".((int) $thirdparty_id); |
|
| 2755 | + } |
|
| 2754 | 2756 | //print $sql; |
| 2755 | 2757 | |
| 2756 | 2758 | $resql = $this->db->query($sql); |
@@ -2798,7 +2800,10 @@ discard block |
||
| 2798 | 2800 | |
| 2799 | 2801 | $someinvoicenotpaid=0; |
| 2800 | 2802 | foreach ($object->linkedObjects['facture'] as $idinvoice => $invoice) { |
| 2801 | - if ($invoice->statut == Facture::STATUS_DRAFT) continue; // Draft invoice are not invoice not paid |
|
| 2803 | + if ($invoice->statut == Facture::STATUS_DRAFT) { |
|
| 2804 | + continue; |
|
| 2805 | + } |
|
| 2806 | + // Draft invoice are not invoice not paid |
|
| 2802 | 2807 | |
| 2803 | 2808 | if (empty($invoice->paye)) { |
| 2804 | 2809 | $someinvoicenotpaid++; |
@@ -71,8 +71,12 @@ discard block |
||
| 71 | 71 | $offset = $limit * $page; |
| 72 | 72 | $pageprev = $page - 1; |
| 73 | 73 | $pagenext = $page + 1; |
| 74 | -if (!$sortfield) $sortfield = "cr.date_sync"; |
|
| 75 | -if (!$sortorder) $sortorder = "DESC"; |
|
| 74 | +if (!$sortfield) { |
|
| 75 | + $sortfield = "cr.date_sync"; |
|
| 76 | +} |
|
| 77 | +if (!$sortorder) { |
|
| 78 | + $sortorder = "DESC"; |
|
| 79 | +} |
|
| 76 | 80 | |
| 77 | 81 | |
| 78 | 82 | // Initialize technical objects |
@@ -223,7 +227,9 @@ discard block |
||
| 223 | 227 | |
| 224 | 228 | $parameters = array(); |
| 225 | 229 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
| 226 | -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 230 | +if ($reshook < 0) { |
|
| 231 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 232 | +} |
|
| 227 | 233 | if (empty($reshook)) { |
| 228 | 234 | // Selection of new fields |
| 229 | 235 | include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
@@ -326,14 +332,20 @@ discard block |
||
| 326 | 332 | $sql .= $hookmanager->resPrint; |
| 327 | 333 | $sql .= ' FROM '.MAIN_DB_PREFIX.'multicurrency_rate as cr '; |
| 328 | 334 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."multicurrency AS m ON cr.fk_multicurrency = m.rowid"; |
| 329 | -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); |
|
| 335 | +if ($sall) { |
|
| 336 | + $sql .= natural_search(array_keys($fieldstosearchall), $sall); |
|
| 337 | +} |
|
| 330 | 338 | if ($search_date_sync && $search_date_sync_end ) { |
| 331 | 339 | $sql .= " AND (cr.date_sync BETWEEN '".$db->idate($search_date_sync)."' AND '".$db->idate($search_date_sync_end)."')"; |
| 332 | 340 | } elseif ($search_date_sync && !$search_date_sync_end) { |
| 333 | 341 | $sql .= natural_search('cr.date_sync', $db->idate($search_date_sync)); |
| 334 | 342 | } |
| 335 | -if ($search_rate) $sql .= natural_search('cr.rate', $search_rate); |
|
| 336 | -if ($search_code) $sql .= natural_search('m.code', $search_code); |
|
| 343 | +if ($search_rate) { |
|
| 344 | + $sql .= natural_search('cr.rate', $search_rate); |
|
| 345 | +} |
|
| 346 | +if ($search_code) { |
|
| 347 | + $sql .= natural_search('m.code', $search_code); |
|
| 348 | +} |
|
| 337 | 349 | $sql .= " WHERE m.code <> '".$db->escape($conf->currency)."'"; |
| 338 | 350 | |
| 339 | 351 | // Add where from hooks |
@@ -383,10 +395,18 @@ discard block |
||
| 383 | 395 | $param .= "&sall=".urlencode($sall); |
| 384 | 396 | } |
| 385 | 397 | |
| 386 | - if ($search_date_sync) $param = "&search_date_sync=".$search_date_sync; |
|
| 387 | - if ($search_date_sync_end) $param="&search_date_sync_end=".$search_date_sync_end; |
|
| 388 | - if ($search_rate) $param = "&search_rate=".urlencode($search_rate); |
|
| 389 | - if ($search_code != '') $param.="&search_code=".urlencode($search_code); |
|
| 398 | + if ($search_date_sync) { |
|
| 399 | + $param = "&search_date_sync=".$search_date_sync; |
|
| 400 | + } |
|
| 401 | + if ($search_date_sync_end) { |
|
| 402 | + $param="&search_date_sync_end=".$search_date_sync_end; |
|
| 403 | + } |
|
| 404 | + if ($search_rate) { |
|
| 405 | + $param = "&search_rate=".urlencode($search_rate); |
|
| 406 | + } |
|
| 407 | + if ($search_code != '') { |
|
| 408 | + $param.="&search_code=".urlencode($search_code); |
|
| 409 | + } |
|
| 390 | 410 | |
| 391 | 411 | // Add $param from extra fields |
| 392 | 412 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
@@ -529,7 +549,9 @@ discard block |
||
| 529 | 549 | print '<td class="tdoverflowmax200">'; |
| 530 | 550 | print $obj->date_sync; |
| 531 | 551 | print "</td>\n"; |
| 532 | - if (!$i) $totalarray['nbfield']++; |
|
| 552 | + if (!$i) { |
|
| 553 | + $totalarray['nbfield']++; |
|
| 554 | + } |
|
| 533 | 555 | } |
| 534 | 556 | |
| 535 | 557 | // code |
@@ -539,7 +561,9 @@ discard block |
||
| 539 | 561 | print ' - <span class="opacitymedium">'.$obj->name.'</span>'; |
| 540 | 562 | print "</td>\n"; |
| 541 | 563 | |
| 542 | - if (! $i) $totalarray['nbfield']++; |
|
| 564 | + if (! $i) { |
|
| 565 | + $totalarray['nbfield']++; |
|
| 566 | + } |
|
| 543 | 567 | } |
| 544 | 568 | |
| 545 | 569 | // rate |
@@ -547,7 +571,9 @@ discard block |
||
| 547 | 571 | print '<td class="tdoverflowmax200">'; |
| 548 | 572 | print $obj->rate; |
| 549 | 573 | print "</td>\n"; |
| 550 | - if (! $i) $totalarray['nbfield']++; |
|
| 574 | + if (! $i) { |
|
| 575 | + $totalarray['nbfield']++; |
|
| 576 | + } |
|
| 551 | 577 | } |
| 552 | 578 | |
| 553 | 579 | // rate indirect |
@@ -555,7 +581,9 @@ discard block |
||
| 555 | 581 | print '<td class="tdoverflowmax200">'; |
| 556 | 582 | print $obj->rate_indirect; |
| 557 | 583 | print "</td>\n"; |
| 558 | - if (! $i) $totalarray['nbfield']++; |
|
| 584 | + if (! $i) { |
|
| 585 | + $totalarray['nbfield']++; |
|
| 586 | + } |
|
| 559 | 587 | } |
| 560 | 588 | |
| 561 | 589 | |
@@ -1938,9 +1938,12 @@ |
||
| 1938 | 1938 | |
| 1939 | 1939 | $parameters = array(); |
| 1940 | 1940 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 1941 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 1942 | - if (empty($reshook)) |
|
| 1943 | - $object->formAddObjectLine($dateSelector, $soc, $mysoc); |
|
| 1941 | + if ($reshook < 0) { |
|
| 1942 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 1943 | + } |
|
| 1944 | + if (empty($reshook)) { |
|
| 1945 | + $object->formAddObjectLine($dateSelector, $soc, $mysoc); |
|
| 1946 | + } |
|
| 1944 | 1947 | } |
| 1945 | 1948 | } |
| 1946 | 1949 | |
@@ -176,8 +176,12 @@ discard block |
||
| 176 | 176 | if (!empty($idprod) && isModEnabled('workstation')) { |
| 177 | 177 | $product = new Product($db); |
| 178 | 178 | $res = $product->fetch($idprod); |
| 179 | - if ($res > 0 && $product->type == Product::TYPE_SERVICE) $fk_default_workstation = $product->fk_default_workstation; |
|
| 180 | - if (empty($fk_unit)) $fk_unit = $product->fk_unit; |
|
| 179 | + if ($res > 0 && $product->type == Product::TYPE_SERVICE) { |
|
| 180 | + $fk_default_workstation = $product->fk_default_workstation; |
|
| 181 | + } |
|
| 182 | + if (empty($fk_unit)) { |
|
| 183 | + $fk_unit = $product->fk_unit; |
|
| 184 | + } |
|
| 181 | 185 | } |
| 182 | 186 | |
| 183 | 187 | if ($qty == '') { |
@@ -615,9 +619,12 @@ discard block |
||
| 615 | 619 | |
| 616 | 620 | $parameters = array(); |
| 617 | 621 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 618 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 619 | - if (empty($reshook)) |
|
| 620 | - $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl'); |
|
| 622 | + if ($reshook < 0) { |
|
| 623 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 624 | + } |
|
| 625 | + if (empty($reshook)) { |
|
| 626 | + $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl'); |
|
| 627 | + } |
|
| 621 | 628 | } |
| 622 | 629 | } |
| 623 | 630 | |
@@ -662,9 +669,12 @@ discard block |
||
| 662 | 669 | // Add services form |
| 663 | 670 | $parameters = array(); |
| 664 | 671 | $reshook = $hookmanager->executeHooks('formAddObjectServiceLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 665 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 666 | - if (empty($reshook)) |
|
| 667 | - $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl'); |
|
| 672 | + if ($reshook < 0) { |
|
| 673 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 674 | + } |
|
| 675 | + if (empty($reshook)) { |
|
| 676 | + $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl'); |
|
| 677 | + } |
|
| 668 | 678 | } |
| 669 | 679 | } |
| 670 | 680 | } |
@@ -781,7 +781,9 @@ discard block |
||
| 781 | 781 | $line->import_key = $import_key; |
| 782 | 782 | $line->position = $rankToUse; |
| 783 | 783 | |
| 784 | - if (!empty($fk_unit)) $line->fk_unit = $fk_unit; |
|
| 784 | + if (!empty($fk_unit)) { |
|
| 785 | + $line->fk_unit = $fk_unit; |
|
| 786 | + } |
|
| 785 | 787 | |
| 786 | 788 | |
| 787 | 789 | if (is_array($array_options) && count($array_options) > 0) { |
@@ -1475,8 +1477,9 @@ discard block |
||
| 1475 | 1477 | $workstation = new Workstation($this->db); |
| 1476 | 1478 | $res = $workstation->fetch($tmpproduct->fk_default_workstation); |
| 1477 | 1479 | |
| 1478 | - if ($res > 0) $line->total_cost = price2num($qtyhourforline * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT'); |
|
| 1479 | - else { |
|
| 1480 | + if ($res > 0) { |
|
| 1481 | + $line->total_cost = price2num($qtyhourforline * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT'); |
|
| 1482 | + } else { |
|
| 1480 | 1483 | $this->error = $workstation->error; |
| 1481 | 1484 | return -3; |
| 1482 | 1485 | } |
@@ -1540,7 +1543,9 @@ discard block |
||
| 1540 | 1543 | if (!empty($this->lines)) { |
| 1541 | 1544 | foreach ($this->lines as $line) { |
| 1542 | 1545 | if (!empty($line->childBom)) { |
| 1543 | - foreach ($line->childBom as $childBom) $childBom->getNetNeeds($TNetNeeds, $line->qty*$qty); |
|
| 1546 | + foreach ($line->childBom as $childBom) { |
|
| 1547 | + $childBom->getNetNeeds($TNetNeeds, $line->qty*$qty); |
|
| 1548 | + } |
|
| 1544 | 1549 | } else { |
| 1545 | 1550 | if (empty($TNetNeeds[$line->fk_product])) { |
| 1546 | 1551 | $TNetNeeds[$line->fk_product] = 0; |
@@ -1595,7 +1600,9 @@ discard block |
||
| 1595 | 1600 | return; |
| 1596 | 1601 | } |
| 1597 | 1602 | |
| 1598 | - if (empty($bom_id)) $bom_id=$this->id; |
|
| 1603 | + if (empty($bom_id)) { |
|
| 1604 | + $bom_id=$this->id; |
|
| 1605 | + } |
|
| 1599 | 1606 | |
| 1600 | 1607 | $sql = 'SELECT l.fk_bom, b.label |
| 1601 | 1608 | FROM '.MAIN_DB_PREFIX.'bom_bomline l |
@@ -203,7 +203,9 @@ discard block |
||
| 203 | 203 | $moline->fk_default_workstation = $tmpproduct->fk_default_workstation; |
| 204 | 204 | } |
| 205 | 205 | $moline->disable_stock_change = ($tmpproduct->type == Product::TYPE_SERVICE ? 1 : 0); |
| 206 | - if ($conf->global->PRODUCT_USE_UNITS) $moline->fk_unit = $tmpproduct->fk_unit; |
|
| 206 | + if ($conf->global->PRODUCT_USE_UNITS) { |
|
| 207 | + $moline->fk_unit = $tmpproduct->fk_unit; |
|
| 208 | + } |
|
| 207 | 209 | } |
| 208 | 210 | |
| 209 | 211 | $resultline = $moline->create($user, false); // Never use triggers here |
@@ -814,7 +816,9 @@ discard block |
||
| 814 | 816 | // Qty |
| 815 | 817 | print '<td class="right">'.$langs->trans("Qty").'</td>'; |
| 816 | 818 | // Unit |
| 817 | - if ($conf->global->PRODUCT_USE_UNITS) print '<td class="right">' . $langs->trans("Unit") . '</td>'; |
|
| 819 | + if ($conf->global->PRODUCT_USE_UNITS) { |
|
| 820 | + print '<td class="right">' . $langs->trans("Unit") . '</td>'; |
|
| 821 | + } |
|
| 818 | 822 | // Cost price |
| 819 | 823 | if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) { |
| 820 | 824 | print '<td class="right">'.$langs->trans("UnitCost").'</td>'; |
@@ -1244,7 +1248,9 @@ discard block |
||
| 1244 | 1248 | print '<td class="right"><input type="text" class="width50 right" id="qtytoconsume-' . $line->id . '-' . $i . '" name="qty-' . $line->id . '-' . $i . '" value="' . $preselected . '" ' . $disable . '></td>'; |
| 1245 | 1249 | |
| 1246 | 1250 | // Unit |
| 1247 | - if ($conf->global->PRODUCT_USE_UNITS) print '<td></td>'; |
|
| 1251 | + if ($conf->global->PRODUCT_USE_UNITS) { |
|
| 1252 | + print '<td></td>'; |
|
| 1253 | + } |
|
| 1248 | 1254 | |
| 1249 | 1255 | // Cost |
| 1250 | 1256 | if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) { |
@@ -1367,7 +1373,9 @@ discard block |
||
| 1367 | 1373 | // Qty |
| 1368 | 1374 | print '<td class="right">'.$langs->trans("Qty").'</td>'; |
| 1369 | 1375 | /// Unit |
| 1370 | - if ($conf->global->PRODUCT_USE_UNITS) print '<td class="right">'.$langs->trans("Unit").'</td>'; |
|
| 1376 | + if ($conf->global->PRODUCT_USE_UNITS) { |
|
| 1377 | + print '<td class="right">'.$langs->trans("Unit").'</td>'; |
|
| 1378 | + } |
|
| 1371 | 1379 | // Cost price |
| 1372 | 1380 | if ($permissiontoupdatecost) { |
| 1373 | 1381 | if (empty($bomcostupdated)) { |
@@ -1418,7 +1426,9 @@ discard block |
||
| 1418 | 1426 | // Qty |
| 1419 | 1427 | print '<td class="right"><input type="text" name="qtytoadd" value="1" class="width50 right"></td>'; |
| 1420 | 1428 | //Unit |
| 1421 | - if ($conf->global->PRODUCT_USE_UNITS) print '<td></td>'; |
|
| 1429 | + if ($conf->global->PRODUCT_USE_UNITS) { |
|
| 1430 | + print '<td></td>'; |
|
| 1431 | + } |
|
| 1422 | 1432 | // Cost price |
| 1423 | 1433 | if ($permissiontoupdatecost) { |
| 1424 | 1434 | print '<td></td>'; |
@@ -1483,7 +1493,9 @@ discard block |
||
| 1483 | 1493 | // Qty |
| 1484 | 1494 | print '<td class="right">'.$line->qty.'</td>'; |
| 1485 | 1495 | // Unit |
| 1486 | - if ($conf->global->PRODUCT_USE_UNITS) print '<td class="right">'.measuringUnitString($line->fk_unit, '', '', 1).'</td>'; |
|
| 1496 | + if ($conf->global->PRODUCT_USE_UNITS) { |
|
| 1497 | + print '<td class="right">'.measuringUnitString($line->fk_unit, '', '', 1).'</td>'; |
|
| 1498 | + } |
|
| 1487 | 1499 | // Cost price |
| 1488 | 1500 | if ($permissiontoupdatecost) { |
| 1489 | 1501 | // Defined $manufacturingcost |
@@ -1580,7 +1592,9 @@ discard block |
||
| 1580 | 1592 | // Qty |
| 1581 | 1593 | print '<td></td>'; |
| 1582 | 1594 | // Unit |
| 1583 | - if ($conf->global->PRODUCT_USE_UNITS) print '<td></td>'; |
|
| 1595 | + if ($conf->global->PRODUCT_USE_UNITS) { |
|
| 1596 | + print '<td></td>'; |
|
| 1597 | + } |
|
| 1584 | 1598 | // Cost price |
| 1585 | 1599 | if ($permissiontoupdatecost) { |
| 1586 | 1600 | print '<td></td>'; |
@@ -1631,7 +1645,9 @@ discard block |
||
| 1631 | 1645 | // Qty |
| 1632 | 1646 | print '<td class="right"><input type="text" class="width50 right" id="qtytoproduce-'.$line->id.'-'.$i.'" name="qtytoproduce-'.$line->id.'-'.$i.'" value="'.$preselected.'"></td>'; |
| 1633 | 1647 | //Unit |
| 1634 | - if ($conf->global->PRODUCT_USE_UNITS) print '<td class="right"></td>'; |
|
| 1648 | + if ($conf->global->PRODUCT_USE_UNITS) { |
|
| 1649 | + print '<td class="right"></td>'; |
|
| 1650 | + } |
|
| 1635 | 1651 | // Cost |
| 1636 | 1652 | if ($permissiontoupdatecost) { |
| 1637 | 1653 | // Defined $manufacturingcost |
@@ -1688,7 +1704,10 @@ discard block |
||
| 1688 | 1704 | print '</td>'; |
| 1689 | 1705 | |
| 1690 | 1706 | print '<td align="right" class="splitall">'; |
| 1691 | - if (($action == 'consumeorproduce' || $action == 'consumeandproduceall') && $tmpproduct->status_batch == 2) print img_picto($langs->trans('SplitAllQuantity'), 'split.png', 'class="splitbutton splitallbutton field-error-icon" onClick="addDispatchLine('.$line->id.', \'batch\', \'alltoproduce\')"'); // |
|
| 1707 | + if (($action == 'consumeorproduce' || $action == 'consumeandproduceall') && $tmpproduct->status_batch == 2) { |
|
| 1708 | + print img_picto($langs->trans('SplitAllQuantity'), 'split.png', 'class="splitbutton splitallbutton field-error-icon" onClick="addDispatchLine('.$line->id.', \'batch\', \'alltoproduce\')"'); |
|
| 1709 | + } |
|
| 1710 | + // |
|
| 1692 | 1711 | print '</td>'; |
| 1693 | 1712 | } else { |
| 1694 | 1713 | print '<td></td>'; |