@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | $stockLocation = "ent1".$i."_0"; |
| 274 | 274 | $qty = "qtyl".$i; |
| 275 | 275 | |
| 276 | - $is_batch_or_serial=0; |
|
| 276 | + $is_batch_or_serial = 0; |
|
| 277 | 277 | if (!empty($objectsrc->lines[$i]->fk_product)) { |
| 278 | 278 | $resultFetch = $product->fetch($objectsrc->lines[$i]->fk_product, '', '', '', 1, 1, 1); |
| 279 | 279 | if ($resultFetch < 0) { |
@@ -299,9 +299,9 @@ discard block |
||
| 299 | 299 | //var_dump($sub_qty[$j]['id_batch']); |
| 300 | 300 | |
| 301 | 301 | //var_dump($qty);var_dump($batch);var_dump($sub_qty[$j]['q']);var_dump($sub_qty[$j]['id_batch']); |
| 302 | - if ($is_batch_or_serial==2 && $sub_qty[$j]['q']>1) { |
|
| 302 | + if ($is_batch_or_serial == 2 && $sub_qty[$j]['q'] > 1) { |
|
| 303 | 303 | setEventMessages($langs->trans("TooManyQtyForSerialNumber", $product->ref, ''), null, 'errors'); |
| 304 | - $totalqty=0; |
|
| 304 | + $totalqty = 0; |
|
| 305 | 305 | break 2; |
| 306 | 306 | } |
| 307 | 307 | $j++; |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | |
| 351 | 351 | // check qty shipped not greater than ordered |
| 352 | 352 | if (getDolGlobalInt("MAIN_DONT_SHIP_MORE_THAN_ORDERED") && $subtotalqty > $objectsrc->lines[$i]->qty) { |
| 353 | - setEventMessages($langs->trans("ErrorTooMuchShipped", $i+1), null, 'errors'); |
|
| 353 | + setEventMessages($langs->trans("ErrorTooMuchShipped", $i + 1), null, 'errors'); |
|
| 354 | 354 | $error++; |
| 355 | 355 | continue; |
| 356 | 356 | } |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | setEventMessages($line->error, $line->errors, 'errors'); |
| 679 | 679 | $error++; |
| 680 | 680 | } else { |
| 681 | - $update_done=true; |
|
| 681 | + $update_done = true; |
|
| 682 | 682 | } |
| 683 | 683 | } else { |
| 684 | 684 | setEventMessages($lotStock->error, $lotStock->errors, 'errors'); |
@@ -722,7 +722,7 @@ discard block |
||
| 722 | 722 | setEventMessages($line->error, $line->errors, 'errors'); |
| 723 | 723 | $error++; |
| 724 | 724 | } else { |
| 725 | - $update_done=true; |
|
| 725 | + $update_done = true; |
|
| 726 | 726 | } |
| 727 | 727 | } else { |
| 728 | 728 | setEventMessages($line->error, $line->errors, 'errors'); |
@@ -741,7 +741,7 @@ discard block |
||
| 741 | 741 | setEventMessages($object->error, $object->errors, 'errors'); |
| 742 | 742 | $error++; |
| 743 | 743 | } else { |
| 744 | - $update_done=true; |
|
| 744 | + $update_done = true; |
|
| 745 | 745 | } |
| 746 | 746 | } |
| 747 | 747 | } else { |
@@ -793,7 +793,7 @@ discard block |
||
| 793 | 793 | setEventMessages($line->error, $line->errors, 'errors'); |
| 794 | 794 | $error++; |
| 795 | 795 | } else { |
| 796 | - $update_done=true; |
|
| 796 | + $update_done = true; |
|
| 797 | 797 | } |
| 798 | 798 | } |
| 799 | 799 | unset($_POST[$stockLocation]); |
@@ -809,7 +809,7 @@ discard block |
||
| 809 | 809 | setEventMessages($line->error, $line->errors, 'errors'); |
| 810 | 810 | $error++; |
| 811 | 811 | } else { |
| 812 | - $update_done=true; |
|
| 812 | + $update_done = true; |
|
| 813 | 813 | } |
| 814 | 814 | unset($_POST[$qty]); |
| 815 | 815 | } |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | setEventMessages($line->error, $line->errors, 'errors'); |
| 824 | 824 | $error++; |
| 825 | 825 | } else { |
| 826 | - $update_done=true; |
|
| 826 | + $update_done = true; |
|
| 827 | 827 | } |
| 828 | 828 | unset($_POST[$qty]); |
| 829 | 829 | } |
@@ -1454,7 +1454,7 @@ discard block |
||
| 1454 | 1454 | if (empty($conf->productbatch->enabled) || !$product->hasbatch()) { |
| 1455 | 1455 | print '<!-- Case warehouse not already known and product does not need lot -->'; |
| 1456 | 1456 | print '<td></td><td></td>'; |
| 1457 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1457 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>'; //StockEntrydate |
|
| 1458 | 1458 | print '</tr>'."\n"; // end line and start a new one for each warehouse |
| 1459 | 1459 | |
| 1460 | 1460 | print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
@@ -1539,7 +1539,7 @@ discard block |
||
| 1539 | 1539 | $quantityToBeDelivered = 0; |
| 1540 | 1540 | } |
| 1541 | 1541 | $subj++; |
| 1542 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1542 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>'; //StockEntrydate |
|
| 1543 | 1543 | print "</tr>\n"; |
| 1544 | 1544 | } |
| 1545 | 1545 | } |
@@ -1559,7 +1559,7 @@ discard block |
||
| 1559 | 1559 | <a href=\"".DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." |
| 1560 | 1560 | </a> (".$value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> |
| 1561 | 1561 | <td class=\"center\">".$value['stock']." ".$img."</td>"; |
| 1562 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1562 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>'; //StockEntrydate |
|
| 1563 | 1563 | print "</tr>"; |
| 1564 | 1564 | } |
| 1565 | 1565 | } |
@@ -1567,7 +1567,7 @@ discard block |
||
| 1567 | 1567 | } else { |
| 1568 | 1568 | print '<!-- Case warehouse not already known and product need lot -->'; |
| 1569 | 1569 | print '<td></td><td></td>'; |
| 1570 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1570 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>'; //StockEntrydate |
|
| 1571 | 1571 | print '</tr>'; // end line and start a new one for lot/serial |
| 1572 | 1572 | |
| 1573 | 1573 | $subj = 0; |
@@ -1580,7 +1580,7 @@ discard block |
||
| 1580 | 1580 | $nbofsuggested = 0; |
| 1581 | 1581 | foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) { |
| 1582 | 1582 | if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) { |
| 1583 | - $nbofsuggested+=count($stock_warehouse->detail_batch); |
|
| 1583 | + $nbofsuggested += count($stock_warehouse->detail_batch); |
|
| 1584 | 1584 | } |
| 1585 | 1585 | } |
| 1586 | 1586 | |
@@ -1621,11 +1621,11 @@ discard block |
||
| 1621 | 1621 | $tooltipClass = ' classfortooltip'; |
| 1622 | 1622 | $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1623 | 1623 | } else { |
| 1624 | - $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0 ; |
|
| 1624 | + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
|
| 1625 | 1625 | } |
| 1626 | 1626 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1627 | 1627 | |
| 1628 | - print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ?'oddeven' : '').'><td colspan="3"></td><td class="center">'; |
|
| 1628 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'><td colspan="3"></td><td class="center">'; |
|
| 1629 | 1629 | print '<input class="qtyl '.$tooltipClass.'" title="'.$tooltipTitle.'" name="'.$inputName.'" id="'.$inputName.'" type="text" size="4" value="'.$deliverableQty.'">'; |
| 1630 | 1630 | print '</td>'; |
| 1631 | 1631 | |
@@ -1703,7 +1703,7 @@ discard block |
||
| 1703 | 1703 | print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
| 1704 | 1704 | } |
| 1705 | 1705 | print '</td>'; |
| 1706 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1706 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>'; //StockEntrydate |
|
| 1707 | 1707 | print '</tr>'; |
| 1708 | 1708 | } |
| 1709 | 1709 | } |
@@ -1854,7 +1854,7 @@ discard block |
||
| 1854 | 1854 | $morehtmlref = '<div class="refidno">'; |
| 1855 | 1855 | // Ref customer shipment |
| 1856 | 1856 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1); |
| 1857 | - $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); |
|
| 1857 | + $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); |
|
| 1858 | 1858 | // Thirdparty |
| 1859 | 1859 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1); |
| 1860 | 1860 | // Project |
@@ -2389,7 +2389,7 @@ discard block |
||
| 2389 | 2389 | // only show lot numbers from src warehouse when shipping from multiple warehouses |
| 2390 | 2390 | $line->fetch($detail_batch->fk_expeditiondet); |
| 2391 | 2391 | } |
| 2392 | - $entrepot_id = !empty($detail_batch->entrepot_id)?$detail_batch->entrepot_id:$lines[$i]->entrepot_id; |
|
| 2392 | + $entrepot_id = !empty($detail_batch->entrepot_id) ? $detail_batch->entrepot_id : $lines[$i]->entrepot_id; |
|
| 2393 | 2393 | 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>'; |
| 2394 | 2394 | print '</tr>'; |
| 2395 | 2395 | } |
@@ -2620,7 +2620,7 @@ discard block |
||
| 2620 | 2620 | || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('expedition', 'shipping_advance', 'validate'))) { |
| 2621 | 2621 | print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, ''); |
| 2622 | 2622 | } else { |
| 2623 | - print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 2623 | + print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 2624 | 2624 | } |
| 2625 | 2625 | } |
| 2626 | 2626 | |
@@ -2642,7 +2642,7 @@ discard block |
||
| 2642 | 2642 | if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('expedition', 'shipping_advance', 'send')) { |
| 2643 | 2643 | print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
| 2644 | 2644 | } else { |
| 2645 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 2645 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 2646 | 2646 | } |
| 2647 | 2647 | } |
| 2648 | 2648 | } |
@@ -1163,7 +1163,9 @@ discard block |
||
| 1163 | 1163 | print '<td class="left">'.$langs->trans("Warehouse").' / '.$langs->trans("Batch").' ('.$langs->trans("Stock").')</td>'; |
| 1164 | 1164 | } |
| 1165 | 1165 | } |
| 1166 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td class="left">'.$langs->trans('StockEntryDate').'</td>'; |
|
| 1166 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) { |
|
| 1167 | + print '<td class="left">'.$langs->trans('StockEntryDate').'</td>'; |
|
| 1168 | + } |
|
| 1167 | 1169 | print "</tr>\n"; |
| 1168 | 1170 | } |
| 1169 | 1171 | |
@@ -1352,7 +1354,10 @@ discard block |
||
| 1352 | 1354 | } |
| 1353 | 1355 | print '</td>'; |
| 1354 | 1356 | } |
| 1355 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>'; //StockEntrydate |
|
| 1357 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) { |
|
| 1358 | + print '<td></td>'; |
|
| 1359 | + } |
|
| 1360 | + //StockEntrydate |
|
| 1356 | 1361 | print "</tr>\n"; |
| 1357 | 1362 | |
| 1358 | 1363 | // Show subproducts of product |
@@ -1370,7 +1375,10 @@ discard block |
||
| 1370 | 1375 | <a href=\"".DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." |
| 1371 | 1376 | </a> (".$value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> |
| 1372 | 1377 | <td class=\"center\">".$value['stock']." ".$img."</td>"; |
| 1373 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>'; //StockEntrydate |
|
| 1378 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) { |
|
| 1379 | + print '<td></td>'; |
|
| 1380 | + } |
|
| 1381 | + //StockEntrydate |
|
| 1374 | 1382 | print "</tr>"; |
| 1375 | 1383 | } |
| 1376 | 1384 | } |
@@ -1378,7 +1386,10 @@ discard block |
||
| 1378 | 1386 | } else { |
| 1379 | 1387 | // Product need lot |
| 1380 | 1388 | print '<td></td><td></td>'; |
| 1381 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>'; //StockEntrydate |
|
| 1389 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) { |
|
| 1390 | + print '<td></td>'; |
|
| 1391 | + } |
|
| 1392 | + //StockEntrydate |
|
| 1382 | 1393 | print '</tr>'; // end line and start a new one for lot/serial |
| 1383 | 1394 | print '<!-- Case product need lot -->'; |
| 1384 | 1395 | |
@@ -1445,7 +1456,10 @@ discard block |
||
| 1445 | 1456 | print '<td class="left">'; |
| 1446 | 1457 | print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label); |
| 1447 | 1458 | print '</td>'; |
| 1448 | - if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) print '<td></td>'; //StockEntrydate |
|
| 1459 | + if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
|
| 1460 | + print '<td></td>'; |
|
| 1461 | + } |
|
| 1462 | + //StockEntrydate |
|
| 1449 | 1463 | print '</tr>'; |
| 1450 | 1464 | } |
| 1451 | 1465 | } |
@@ -1454,7 +1468,10 @@ discard block |
||
| 1454 | 1468 | if (empty($conf->productbatch->enabled) || !$product->hasbatch()) { |
| 1455 | 1469 | print '<!-- Case warehouse not already known and product does not need lot -->'; |
| 1456 | 1470 | print '<td></td><td></td>'; |
| 1457 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1471 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) { |
|
| 1472 | + print '<td></td>'; |
|
| 1473 | + } |
|
| 1474 | + //StockEntrydate |
|
| 1458 | 1475 | print '</tr>'."\n"; // end line and start a new one for each warehouse |
| 1459 | 1476 | |
| 1460 | 1477 | print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
@@ -1494,7 +1511,9 @@ discard block |
||
| 1494 | 1511 | $deliverableQty = min($quantityToBeDelivered, $stock); |
| 1495 | 1512 | } |
| 1496 | 1513 | |
| 1497 | - if ($deliverableQty < 0) $deliverableQty = 0; |
|
| 1514 | + if ($deliverableQty < 0) { |
|
| 1515 | + $deliverableQty = 0; |
|
| 1516 | + } |
|
| 1498 | 1517 | |
| 1499 | 1518 | $tooltip = ''; |
| 1500 | 1519 | if (!empty($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) { |
@@ -1539,7 +1558,10 @@ discard block |
||
| 1539 | 1558 | $quantityToBeDelivered = 0; |
| 1540 | 1559 | } |
| 1541 | 1560 | $subj++; |
| 1542 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1561 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) { |
|
| 1562 | + print '<td></td>'; |
|
| 1563 | + } |
|
| 1564 | + //StockEntrydate |
|
| 1543 | 1565 | print "</tr>\n"; |
| 1544 | 1566 | } |
| 1545 | 1567 | } |
@@ -1559,7 +1581,10 @@ discard block |
||
| 1559 | 1581 | <a href=\"".DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." |
| 1560 | 1582 | </a> (".$value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> |
| 1561 | 1583 | <td class=\"center\">".$value['stock']." ".$img."</td>"; |
| 1562 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1584 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) { |
|
| 1585 | + print '<td></td>'; |
|
| 1586 | + } |
|
| 1587 | + //StockEntrydate |
|
| 1563 | 1588 | print "</tr>"; |
| 1564 | 1589 | } |
| 1565 | 1590 | } |
@@ -1567,7 +1592,10 @@ discard block |
||
| 1567 | 1592 | } else { |
| 1568 | 1593 | print '<!-- Case warehouse not already known and product need lot -->'; |
| 1569 | 1594 | print '<td></td><td></td>'; |
| 1570 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1595 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) { |
|
| 1596 | + print '<td></td>'; |
|
| 1597 | + } |
|
| 1598 | + //StockEntrydate |
|
| 1571 | 1599 | print '</tr>'; // end line and start a new one for lot/serial |
| 1572 | 1600 | |
| 1573 | 1601 | $subj = 0; |
@@ -1609,7 +1637,9 @@ discard block |
||
| 1609 | 1637 | $deliverableQty = min($quantityToBeDelivered, $batchStock); |
| 1610 | 1638 | } |
| 1611 | 1639 | |
| 1612 | - if ($deliverableQty < 0) $deliverableQty = 0; |
|
| 1640 | + if ($deliverableQty < 0) { |
|
| 1641 | + $deliverableQty = 0; |
|
| 1642 | + } |
|
| 1613 | 1643 | |
| 1614 | 1644 | $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
| 1615 | 1645 | if (GETPOSTISSET($inputName)) { |
@@ -1703,7 +1733,10 @@ discard block |
||
| 1703 | 1733 | print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
| 1704 | 1734 | } |
| 1705 | 1735 | print '</td>'; |
| 1706 | - if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) print '<td></td>';//StockEntrydate |
|
| 1736 | + if (!empty($conf->global->SHIPPING_DISPLAY_STOCK_ENTRY_DATE)) { |
|
| 1737 | + print '<td></td>'; |
|
| 1738 | + } |
|
| 1739 | + //StockEntrydate |
|
| 1707 | 1740 | print '</tr>'; |
| 1708 | 1741 | } |
| 1709 | 1742 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $socid = $user->socid; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | -$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known |
|
| 83 | +$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known |
|
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | |
@@ -764,7 +764,7 @@ discard block |
||
| 764 | 764 | |
| 765 | 765 | // Qty remains to ship |
| 766 | 766 | print '<td class="center">'; |
| 767 | - if ($type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)|| !empty($conf->global->SHIPMENT_SUPPORTS_SERVICES)) { |
|
| 767 | + if ($type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES) || !empty($conf->global->SHIPMENT_SUPPORTS_SERVICES)) { |
|
| 768 | 768 | $toBeShipped[$objp->fk_product] = $objp->qty - $qtyAlreadyShipped; |
| 769 | 769 | $toBeShippedTotal += $toBeShipped[$objp->fk_product]; |
| 770 | 770 | print $toBeShipped[$objp->fk_product]; |
@@ -52,29 +52,29 @@ discard block |
||
| 52 | 52 | $context_default = 'bookkeepingbyaccountlist'; |
| 53 | 53 | } |
| 54 | 54 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : $context_default; |
| 55 | -$search_date_startyear = GETPOST('search_date_startyear', 'int'); |
|
| 56 | -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); |
|
| 57 | -$search_date_startday = GETPOST('search_date_startday', 'int'); |
|
| 58 | -$search_date_endyear = GETPOST('search_date_endyear', 'int'); |
|
| 59 | -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
|
| 60 | -$search_date_endday = GETPOST('search_date_endday', 'int'); |
|
| 55 | +$search_date_startyear = GETPOST('search_date_startyear', 'int'); |
|
| 56 | +$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); |
|
| 57 | +$search_date_startday = GETPOST('search_date_startday', 'int'); |
|
| 58 | +$search_date_endyear = GETPOST('search_date_endyear', 'int'); |
|
| 59 | +$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
|
| 60 | +$search_date_endday = GETPOST('search_date_endday', 'int'); |
|
| 61 | 61 | $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); |
| 62 | 62 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 63 | 63 | $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); |
| 64 | -$search_date_export_startyear = GETPOST('search_date_export_startyear', 'int'); |
|
| 65 | -$search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int'); |
|
| 66 | -$search_date_export_startday = GETPOST('search_date_export_startday', 'int'); |
|
| 67 | -$search_date_export_endyear = GETPOST('search_date_export_endyear', 'int'); |
|
| 68 | -$search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int'); |
|
| 69 | -$search_date_export_endday = GETPOST('search_date_export_endday', 'int'); |
|
| 64 | +$search_date_export_startyear = GETPOST('search_date_export_startyear', 'int'); |
|
| 65 | +$search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int'); |
|
| 66 | +$search_date_export_startday = GETPOST('search_date_export_startday', 'int'); |
|
| 67 | +$search_date_export_endyear = GETPOST('search_date_export_endyear', 'int'); |
|
| 68 | +$search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int'); |
|
| 69 | +$search_date_export_endday = GETPOST('search_date_export_endday', 'int'); |
|
| 70 | 70 | $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); |
| 71 | 71 | $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); |
| 72 | -$search_date_validation_startyear = GETPOST('search_date_validation_startyear', 'int'); |
|
| 73 | -$search_date_validation_startmonth = GETPOST('search_date_validation_startmonth', 'int'); |
|
| 74 | -$search_date_validation_startday = GETPOST('search_date_validation_startday', 'int'); |
|
| 75 | -$search_date_validation_endyear = GETPOST('search_date_validation_endyear', 'int'); |
|
| 76 | -$search_date_validation_endmonth = GETPOST('search_date_validation_endmonth', 'int'); |
|
| 77 | -$search_date_validation_endday = GETPOST('search_date_validation_endday', 'int'); |
|
| 72 | +$search_date_validation_startyear = GETPOST('search_date_validation_startyear', 'int'); |
|
| 73 | +$search_date_validation_startmonth = GETPOST('search_date_validation_startmonth', 'int'); |
|
| 74 | +$search_date_validation_startday = GETPOST('search_date_validation_startday', 'int'); |
|
| 75 | +$search_date_validation_endyear = GETPOST('search_date_validation_endyear', 'int'); |
|
| 76 | +$search_date_validation_endmonth = GETPOST('search_date_validation_endmonth', 'int'); |
|
| 77 | +$search_date_validation_endday = GETPOST('search_date_validation_endday', 'int'); |
|
| 78 | 78 | $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear); |
| 79 | 79 | $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear); |
| 80 | 80 | $search_import_key = GETPOST("search_import_key", 'alpha'); |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | } else { |
| 305 | 305 | $filter['t.numero_compte>='] = $search_accountancy_code_start; |
| 306 | 306 | } |
| 307 | - $param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start); |
|
| 307 | + $param .= '&search_accountancy_code_start='.urlencode($search_accountancy_code_start); |
|
| 308 | 308 | } |
| 309 | 309 | if (!empty($search_accountancy_code_end)) { |
| 310 | 310 | if ($type == 'sub') { |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | } else { |
| 313 | 313 | $filter['t.numero_compte<='] = $search_accountancy_code_end; |
| 314 | 314 | } |
| 315 | - $param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end); |
|
| 315 | + $param .= '&search_accountancy_code_end='.urlencode($search_accountancy_code_end); |
|
| 316 | 316 | } |
| 317 | 317 | if (!empty($search_label_account)) { |
| 318 | 318 | $filter['t.label_compte'] = $search_label_account; |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | } |
| 491 | 491 | |
| 492 | 492 | if (!$error) { |
| 493 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
| 493 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
| 494 | 494 | exit(); |
| 495 | 495 | } |
| 496 | 496 | } elseif ($massaction == 'letteringmanual') { |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | setEventMessages('', $lettering->errors, 'errors'); |
| 501 | 501 | } else { |
| 502 | 502 | setEventMessages($langs->trans('AccountancyOneLetteringModifiedSuccessfully'), array(), 'mesgs'); |
| 503 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
| 503 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
| 504 | 504 | exit(); |
| 505 | 505 | } |
| 506 | 506 | } elseif ($action == 'unletteringauto' && $confirm == "yes") { |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | if (!$error) { |
| 524 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
| 524 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
| 525 | 525 | exit(); |
| 526 | 526 | } |
| 527 | 527 | } elseif ($action == 'unletteringmanual' && $confirm == "yes") { |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | setEventMessages('', $lettering->errors, 'errors'); |
| 532 | 532 | } else { |
| 533 | 533 | setEventMessages($langs->trans('AccountancyOneUnletteringModifiedSuccessfully'), array(), 'mesgs'); |
| 534 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
| 534 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
| 535 | 535 | exit(); |
| 536 | 536 | } |
| 537 | 537 | } |
@@ -638,10 +638,10 @@ discard block |
||
| 638 | 638 | // List of mass actions available |
| 639 | 639 | $arrayofmassactions = array(); |
| 640 | 640 | if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accounting', 'mouvements', 'creer')) { |
| 641 | - $arrayofmassactions['letteringauto'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringAuto'); |
|
| 642 | - $arrayofmassactions['preunletteringauto'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringAuto'); |
|
| 643 | - $arrayofmassactions['letteringmanual'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringManual'); |
|
| 644 | - $arrayofmassactions['preunletteringmanual'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringManual'); |
|
| 641 | + $arrayofmassactions['letteringauto'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans('LetteringAuto'); |
|
| 642 | + $arrayofmassactions['preunletteringauto'] = img_picto('', 'uncheck', 'class="pictofixedwidth"').$langs->trans('UnletteringAuto'); |
|
| 643 | + $arrayofmassactions['letteringmanual'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans('LetteringManual'); |
|
| 644 | + $arrayofmassactions['preunletteringmanual'] = img_picto('', 'uncheck', 'class="pictofixedwidth"').$langs->trans('UnletteringManual'); |
|
| 645 | 645 | } |
| 646 | 646 | if ($user->hasRight('accounting', 'mouvements', 'supprimer')) { |
| 647 | 647 | $arrayofmassactions['predeletebookkeepingwriting'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); |
@@ -674,11 +674,11 @@ discard block |
||
| 674 | 674 | if (empty($reshook)) { |
| 675 | 675 | $newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param); |
| 676 | 676 | if ($type == 'sub') { |
| 677 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
| 678 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?type=sub&' . $url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
| 677 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
| 678 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?type=sub&'.$url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
| 679 | 679 | } else { |
| 680 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
| 681 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?type=sub&' . $url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
| 680 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
| 681 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?type=sub&'.$url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
| 682 | 682 | } |
| 683 | 683 | $newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?action=create'); |
| 684 | 684 | } |
@@ -755,8 +755,8 @@ discard block |
||
| 755 | 755 | } else { |
| 756 | 756 | $stringforfirstkey .= ' CTL +'; |
| 757 | 757 | } |
| 758 | -$moreforfilter .= ' <a id="previous_account" accesskey="p" title="' . $stringforfirstkey . ' p" class="classfortooltip" href="#"><i class="fa fa-chevron-left"></i></a>'; |
|
| 759 | -$moreforfilter .= ' <a id="next_account" accesskey="n" title="' . $stringforfirstkey . ' n" class="classfortooltip" href="#"><i class="fa fa-chevron-right"></i></a>'; |
|
| 758 | +$moreforfilter .= ' <a id="previous_account" accesskey="p" title="'.$stringforfirstkey.' p" class="classfortooltip" href="#"><i class="fa fa-chevron-left"></i></a>'; |
|
| 759 | +$moreforfilter .= ' <a id="next_account" accesskey="n" title="'.$stringforfirstkey.' n" class="classfortooltip" href="#"><i class="fa fa-chevron-right"></i></a>'; |
|
| 760 | 760 | $moreforfilter .= <<<SCRIPT |
| 761 | 761 | <script type="text/javascript"> |
| 762 | 762 | jQuery(document).ready(function() { |
@@ -961,7 +961,7 @@ discard block |
||
| 961 | 961 | $i = 0; |
| 962 | 962 | |
| 963 | 963 | $totalarray = array(); |
| 964 | -$totalarray['val'] = array (); |
|
| 964 | +$totalarray['val'] = array(); |
|
| 965 | 965 | $totalarray['nbfield'] = 0; |
| 966 | 966 | $total_debit = 0; |
| 967 | 967 | $total_credit = 0; |
@@ -983,8 +983,8 @@ discard block |
||
| 983 | 983 | } |
| 984 | 984 | //if (empty($accountg)) $accountg = '-'; |
| 985 | 985 | |
| 986 | - $colspan = 0; // colspan before field 'label of operation' |
|
| 987 | - $colspanend = 0; // colspan after debit/credit |
|
| 986 | + $colspan = 0; // colspan before field 'label of operation' |
|
| 987 | + $colspanend = 0; // colspan after debit/credit |
|
| 988 | 988 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 989 | 989 | $colspan++; |
| 990 | 990 | } |
@@ -1009,9 +1009,9 @@ discard block |
||
| 1009 | 1009 | if (isset($displayed_account_number)) { |
| 1010 | 1010 | print '<tr class="liste_total">'; |
| 1011 | 1011 | if ($type == 'sub') { |
| 1012 | - print '<td class="right" colspan="' . $colspan . '">' . $langs->trans("TotalForAccount") . ' ' . length_accounta($displayed_account_number) . ':</td>'; |
|
| 1012 | + print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("TotalForAccount").' '.length_accounta($displayed_account_number).':</td>'; |
|
| 1013 | 1013 | } else { |
| 1014 | - print '<td class="right" colspan="' . $colspan . '">' . $langs->trans("TotalForAccount") . ' ' . length_accountg($displayed_account_number) . ':</td>'; |
|
| 1014 | + print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("TotalForAccount").' '.length_accountg($displayed_account_number).':</td>'; |
|
| 1015 | 1015 | } |
| 1016 | 1016 | print '<td class="nowrap right">'.price(price2num($sous_total_debit, 'MT')).'</td>'; |
| 1017 | 1017 | print '<td class="nowrap right">'.price(price2num($sous_total_credit, 'MT')).'</td>'; |
@@ -1038,7 +1038,7 @@ discard block |
||
| 1038 | 1038 | |
| 1039 | 1039 | // Show the break account |
| 1040 | 1040 | print '<tr class="trforbreak">'; |
| 1041 | - print '<td colspan="'.($totalarray['nbfield'] ? $totalarray['nbfield'] : count($arrayfields)+1).'" class="tdforbreak">'; |
|
| 1041 | + print '<td colspan="'.($totalarray['nbfield'] ? $totalarray['nbfield'] : count($arrayfields) + 1).'" class="tdforbreak">'; |
|
| 1042 | 1042 | if ($type == 'sub') { |
| 1043 | 1043 | if ($line->subledger_account != "" && $line->subledger_account != '-1') { |
| 1044 | 1044 | print empty($line->subledger_label) ? '<span class="error">'.$langs->trans("Unknown").'</span>' : $line->subledger_label; |
@@ -1046,9 +1046,9 @@ discard block |
||
| 1046 | 1046 | print length_accounta($line->subledger_account); |
| 1047 | 1047 | } else { |
| 1048 | 1048 | // Should not happen: subledger account must be null or a non empty value |
| 1049 | - print '<span class="error">' . $langs->trans("Unknown"); |
|
| 1049 | + print '<span class="error">'.$langs->trans("Unknown"); |
|
| 1050 | 1050 | if ($line->subledger_label) { |
| 1051 | - print ' (' . $line->subledger_label . ')'; |
|
| 1051 | + print ' ('.$line->subledger_label.')'; |
|
| 1052 | 1052 | $htmltext = 'EmptyStringForSubledgerAccountButSubledgerLabelDefined'; |
| 1053 | 1053 | } else { |
| 1054 | 1054 | $htmltext = 'EmptyStringForSubledgerAccountAndSubledgerLabel'; |
@@ -1058,9 +1058,9 @@ discard block |
||
| 1058 | 1058 | } |
| 1059 | 1059 | } else { |
| 1060 | 1060 | if ($line->numero_compte != "" && $line->numero_compte != '-1') { |
| 1061 | - print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte); |
|
| 1061 | + print length_accountg($line->numero_compte).' : '.$object->get_compte_desc($line->numero_compte); |
|
| 1062 | 1062 | } else { |
| 1063 | - print '<span class="error">' . $langs->trans("Unknown") . '</span>'; |
|
| 1063 | + print '<span class="error">'.$langs->trans("Unknown").'</span>'; |
|
| 1064 | 1064 | } |
| 1065 | 1065 | } |
| 1066 | 1066 | print '</td>'; |
@@ -1083,7 +1083,7 @@ discard block |
||
| 1083 | 1083 | if (in_array($line->id, $arrayofselected)) { |
| 1084 | 1084 | $selected = 1; |
| 1085 | 1085 | } |
| 1086 | - print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />'; |
|
| 1086 | + print '<input id="cb'.$line->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$line->id.'"'.($selected ? ' checked="checked"' : '').' />'; |
|
| 1087 | 1087 | } |
| 1088 | 1088 | print '</td>'; |
| 1089 | 1089 | if (!$i) { |
@@ -1179,7 +1179,7 @@ discard block |
||
| 1179 | 1179 | } elseif ($line->doc_type == 'bank') { |
| 1180 | 1180 | print $objectstatic->getNomUrl(1); |
| 1181 | 1181 | $bank_ref = strstr($line->doc_ref, '-'); |
| 1182 | - print " " . $bank_ref; |
|
| 1182 | + print " ".$bank_ref; |
|
| 1183 | 1183 | } else { |
| 1184 | 1184 | print $line->doc_ref; |
| 1185 | 1185 | } |
@@ -1281,7 +1281,7 @@ discard block |
||
| 1281 | 1281 | if (in_array($line->id, $arrayofselected)) { |
| 1282 | 1282 | $selected = 1; |
| 1283 | 1283 | } |
| 1284 | - print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />'; |
|
| 1284 | + print '<input id="cb'.$line->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$line->id.'"'.($selected ? ' checked="checked"' : '').' />'; |
|
| 1285 | 1285 | } |
| 1286 | 1286 | print '</td>'; |
| 1287 | 1287 | if (!$i) { |
@@ -1015,7 +1015,9 @@ discard block |
||
| 1015 | 1015 | } |
| 1016 | 1016 | print '<td class="nowrap right">'.price(price2num($sous_total_debit, 'MT')).'</td>'; |
| 1017 | 1017 | print '<td class="nowrap right">'.price(price2num($sous_total_credit, 'MT')).'</td>'; |
| 1018 | - if ($colspanend > 0) print '<td colspan="'.$colspanend.'"></td>'; |
|
| 1018 | + if ($colspanend > 0) { |
|
| 1019 | + print '<td colspan="'.$colspanend.'"></td>'; |
|
| 1020 | + } |
|
| 1019 | 1021 | print '</tr>'; |
| 1020 | 1022 | // Show balance of last shown account |
| 1021 | 1023 | $balance = $sous_total_debit - $sous_total_credit; |
@@ -1032,7 +1034,9 @@ discard block |
||
| 1032 | 1034 | print price(price2num($sous_total_credit - $sous_total_debit, 'MT')); |
| 1033 | 1035 | print '</td>'; |
| 1034 | 1036 | } |
| 1035 | - if ($colspanend > 0) print '<td colspan="'.$colspanend.'"></td>'; |
|
| 1037 | + if ($colspanend > 0) { |
|
| 1038 | + print '<td colspan="'.$colspanend.'"></td>'; |
|
| 1039 | + } |
|
| 1036 | 1040 | print '</tr>'; |
| 1037 | 1041 | } |
| 1038 | 1042 | |
@@ -1303,7 +1307,9 @@ discard block |
||
| 1303 | 1307 | print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("TotalForAccount").' '.$accountg.':</td>'; |
| 1304 | 1308 | print '<td class="nowrap right">'.price(price2num($sous_total_debit, 'MT')).'</td>'; |
| 1305 | 1309 | print '<td class="nowrap right">'.price(price2num($sous_total_credit, 'MT')).'</td>'; |
| 1306 | - if ($colspanend > 0) print '<td colspan="'.$colspanend.'"></td>'; |
|
| 1310 | + if ($colspanend > 0) { |
|
| 1311 | + print '<td colspan="'.$colspanend.'"></td>'; |
|
| 1312 | + } |
|
| 1307 | 1313 | print '</tr>'; |
| 1308 | 1314 | // Show balance of last shown account |
| 1309 | 1315 | $balance = $sous_total_debit - $sous_total_credit; |
@@ -1320,7 +1326,9 @@ discard block |
||
| 1320 | 1326 | print price(price2num($sous_total_credit - $sous_total_debit, 'MT')); |
| 1321 | 1327 | print '</td>'; |
| 1322 | 1328 | } |
| 1323 | - if ($colspanend > 0) print '<td colspan="'.$colspanend.'"></td>'; |
|
| 1329 | + if ($colspanend > 0) { |
|
| 1330 | + print '<td colspan="'.$colspanend.'"></td>'; |
|
| 1331 | + } |
|
| 1324 | 1332 | print '</tr>'; |
| 1325 | 1333 | } |
| 1326 | 1334 | |
@@ -56,18 +56,18 @@ discard block |
||
| 56 | 56 | public $fk_product; |
| 57 | 57 | |
| 58 | 58 | // Properties of the lot |
| 59 | - public $lotid; // ID in table of the details of properties of each lots |
|
| 59 | + public $lotid; // ID in table of the details of properties of each lots |
|
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * @var int|string |
| 63 | 63 | * @deprecated |
| 64 | 64 | */ |
| 65 | - public $sellby = ''; // dlc |
|
| 65 | + public $sellby = ''; // dlc |
|
| 66 | 66 | /** |
| 67 | 67 | * @var int|string |
| 68 | 68 | * @deprecated |
| 69 | 69 | */ |
| 70 | - public $eatby = ''; // dmd/dluo |
|
| 70 | + public $eatby = ''; // dmd/dluo |
|
| 71 | 71 | |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -101,15 +101,15 @@ discard block |
||
| 101 | 101 | // Insert request |
| 102 | 102 | $sql = "INSERT INTO ".$this->db->prefix()."product_batch ("; |
| 103 | 103 | $sql .= "fk_product_stock,"; |
| 104 | - $sql .= "sellby,"; // no more used |
|
| 105 | - $sql .= "eatby,"; // no more used |
|
| 104 | + $sql .= "sellby,"; // no more used |
|
| 105 | + $sql .= "eatby,"; // no more used |
|
| 106 | 106 | $sql .= "batch,"; |
| 107 | 107 | $sql .= "qty,"; |
| 108 | 108 | $sql .= "import_key"; |
| 109 | 109 | $sql .= ") VALUES ("; |
| 110 | 110 | $sql .= " ".(!isset($this->fk_product_stock) ? 'NULL' : $this->fk_product_stock).","; |
| 111 | - $sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").","; // no more used |
|
| 112 | - $sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").","; // no more used |
|
| 111 | + $sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").","; // no more used |
|
| 112 | + $sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").","; // no more used |
|
| 113 | 113 | $sql .= " ".(!isset($this->batch) ? 'NULL' : "'".$this->db->escape($this->batch)."'").","; |
| 114 | 114 | $sql .= " ".(!isset($this->qty) ? 'NULL' : $this->qty).","; |
| 115 | 115 | $sql .= " ".(!isset($this->import_key) ? 'NULL' : "'".$this->db->escape($this->import_key)."'"); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $sql .= " pl.eatby,"; |
| 160 | 160 | $sql .= " pl.sellby"; |
| 161 | 161 | $sql .= " FROM ".$this->db->prefix()."product_batch as t"; |
| 162 | - $sql .= " INNER JOIN ".$this->db->prefix()."product_stock w on t.fk_product_stock = w.rowid"; // llx_product_stock is a parent table so this link does NOT generate duplicate record |
|
| 162 | + $sql .= " INNER JOIN ".$this->db->prefix()."product_stock w on t.fk_product_stock = w.rowid"; // llx_product_stock is a parent table so this link does NOT generate duplicate record |
|
| 163 | 163 | $sql .= " LEFT JOIN ".$this->db->prefix()."product_lot as pl on pl.fk_product = w.fk_product and pl.batch = t.batch"; |
| 164 | 164 | $sql .= " WHERE t.rowid = ".((int) $id); |
| 165 | 165 | |
@@ -422,8 +422,8 @@ discard block |
||
| 422 | 422 | |
| 423 | 423 | $this->tms = $this->db->jdate($obj->tms); |
| 424 | 424 | $this->fk_product_stock = $obj->fk_product_stock; |
| 425 | - $this->sellby = $this->db->jdate($obj->sellby); // deprecated. do no tuse this data. |
|
| 426 | - $this->eatby = $this->db->jdate($obj->eatby); // deprecated. do not use this data. |
|
| 425 | + $this->sellby = $this->db->jdate($obj->sellby); // deprecated. do no tuse this data. |
|
| 426 | + $this->eatby = $this->db->jdate($obj->eatby); // deprecated. do not use this data. |
|
| 427 | 427 | $this->batch = $obj->batch; |
| 428 | 428 | $this->qty = $obj->qty; |
| 429 | 429 | $this->import_key = $obj->import_key; |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | } |
| 493 | 493 | if ($fk_product > 0) { $sql .= "pl.eatby ASC, pl.sellby ASC, "; } |
| 494 | 494 | $sql .= "t.eatby ASC, t.sellby ASC "; |
| 495 | - $sql .= ", t.qty ".(empty($conf->global->DO_NOT_TRY_TO_DEFRAGMENT_STOCKS_WAREHOUSE)?'ASC':'DESC'); // Note : qty ASC is important for expedition card, to avoid stock fragmentation |
|
| 495 | + $sql .= ", t.qty ".(empty($conf->global->DO_NOT_TRY_TO_DEFRAGMENT_STOCKS_WAREHOUSE) ? 'ASC' : 'DESC'); // Note : qty ASC is important for expedition card, to avoid stock fragmentation |
|
| 496 | 496 | |
| 497 | 497 | dol_syslog("productbatch::findAll", LOG_DEBUG); |
| 498 | 498 | |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | // Some properties of the lot |
| 519 | - $tmp->lotid = $obj->lotid; // ID in table of the details of properties of each lots |
|
| 519 | + $tmp->lotid = $obj->lotid; // ID in table of the details of properties of each lots |
|
| 520 | 520 | $tmp->sellby = $dbs->jdate($obj->sellby ? $obj->sellby : $obj->oldsellby); |
| 521 | 521 | $tmp->eatby = $dbs->jdate($obj->eatby ? $obj->eatby : $obj->oldeatby); |
| 522 | 522 | |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | // Validation |
| 278 | 278 | $idwarehouse = GETPOST('idwarehouse', 'int'); |
| 279 | 279 | $result = $object->valid($user); |
| 280 | - if ( $result > 0 && ! empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) ) { |
|
| 280 | + if ($result > 0 && !empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) { |
|
| 281 | 281 | $result = $object->closeProposal($user, $object::STATUS_SIGNED); |
| 282 | 282 | } |
| 283 | 283 | if ($result >= 0) { |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | } elseif (GETPOST('statut', 'int') == $object::STATUS_SIGNED || GETPOST('statut', 'int') == $object::STATUS_NOTSIGNED) { |
| 705 | 705 | $locationTarget = ''; |
| 706 | 706 | // prevent browser refresh from closing proposal several times |
| 707 | - if ($object->statut == $object::STATUS_VALIDATED || ( ! empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) && $object->statut == $object::STATUS_DRAFT)) { |
|
| 707 | + if ($object->statut == $object::STATUS_VALIDATED || (!empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) && $object->statut == $object::STATUS_DRAFT)) { |
|
| 708 | 708 | $db->begin(); |
| 709 | 709 | |
| 710 | 710 | $result = $object->closeProposal($user, GETPOST('statut', 'int'), GETPOST('note_private', 'restricthtml')); |
@@ -713,7 +713,7 @@ discard block |
||
| 713 | 713 | $error++; |
| 714 | 714 | } else { |
| 715 | 715 | // Needed if object linked modified by trigger (because linked objects can't be fetched two times : linkedObjectsFullLoaded) |
| 716 | - $locationTarget = DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id; |
|
| 716 | + $locationTarget = DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id; |
|
| 717 | 717 | } |
| 718 | 718 | |
| 719 | 719 | $deposit = null; |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | !$error && GETPOST('statut', 'int') == $object::STATUS_SIGNED && GETPOST('generate_deposit', 'alpha') == 'on' |
| 725 | 725 | && !empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && $user->hasRight('facture', 'creer') |
| 726 | 726 | ) { |
| 727 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 727 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 728 | 728 | |
| 729 | 729 | $date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int')); |
| 730 | 730 | $forceFields = array(); |
@@ -737,7 +737,7 @@ discard block |
||
| 737 | 737 | |
| 738 | 738 | if ($deposit) { |
| 739 | 739 | setEventMessage('DepositGenerated'); |
| 740 | - $locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id; |
|
| 740 | + $locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id; |
|
| 741 | 741 | } else { |
| 742 | 742 | $error++; |
| 743 | 743 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -765,7 +765,7 @@ discard block |
||
| 765 | 765 | } |
| 766 | 766 | |
| 767 | 767 | if ($locationTarget) { |
| 768 | - header('Location: ' . $locationTarget); |
|
| 768 | + header('Location: '.$locationTarget); |
|
| 769 | 769 | exit; |
| 770 | 770 | } |
| 771 | 771 | } else { |
@@ -925,11 +925,11 @@ discard block |
||
| 925 | 925 | // Define margin |
| 926 | 926 | $margin_rate = (GETPOST('marginforalllines') ? GETPOST('marginforalllines') : 0); |
| 927 | 927 | foreach ($object->lines as &$line) { |
| 928 | - $subprice = price2num($line->pa_ht * (1 + $margin_rate/100), 'MU'); |
|
| 928 | + $subprice = price2num($line->pa_ht * (1 + $margin_rate / 100), 'MU'); |
|
| 929 | 929 | $prod = new Product($db); |
| 930 | 930 | $prod->fetch($line->fk_product); |
| 931 | 931 | if ($prod->price_min > $subprice) { |
| 932 | - $price_subprice = price($subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
|
| 932 | + $price_subprice = price($subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
|
| 933 | 933 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
| 934 | 934 | setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
| 935 | 935 | } |
@@ -1044,7 +1044,7 @@ discard block |
||
| 1044 | 1044 | $pu_ttc_devise = 0; |
| 1045 | 1045 | $price_min = 0; |
| 1046 | 1046 | $price_min_ttc = 0; |
| 1047 | - $tva_npr=0; |
|
| 1047 | + $tva_npr = 0; |
|
| 1048 | 1048 | $price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT'); |
| 1049 | 1049 | |
| 1050 | 1050 | $db->begin(); |
@@ -1103,8 +1103,8 @@ discard block |
||
| 1103 | 1103 | if (count($prodcustprice->lines) > 0) { |
| 1104 | 1104 | $pu_ht = price($prodcustprice->lines[0]->price); |
| 1105 | 1105 | $pu_ttc = price($prodcustprice->lines[0]->price_ttc); |
| 1106 | - $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 1107 | - $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 1106 | + $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 1107 | + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 1108 | 1108 | $price_base_type = $prodcustprice->lines[0]->price_base_type; |
| 1109 | 1109 | /*$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx); |
| 1110 | 1110 | if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
@@ -1202,8 +1202,8 @@ discard block |
||
| 1202 | 1202 | } |
| 1203 | 1203 | |
| 1204 | 1204 | //If text set in desc is the same as product description (as now it's preloaded) whe add it only one time |
| 1205 | - if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
| 1206 | - $product_desc=''; |
|
| 1205 | + if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
| 1206 | + $product_desc = ''; |
|
| 1207 | 1207 | } |
| 1208 | 1208 | |
| 1209 | 1209 | if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { |
@@ -1690,7 +1690,7 @@ discard block |
||
| 1690 | 1690 | } |
| 1691 | 1691 | |
| 1692 | 1692 | // Actions to build doc |
| 1693 | - $upload_dir = !empty($conf->propal->multidir_output[$object->entity])?$conf->propal->multidir_output[$object->entity]:$conf->propal->dir_output; |
|
| 1693 | + $upload_dir = !empty($conf->propal->multidir_output[$object->entity]) ? $conf->propal->multidir_output[$object->entity] : $conf->propal->dir_output; |
|
| 1694 | 1694 | $permissiontoadd = $usercancreate; |
| 1695 | 1695 | include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
| 1696 | 1696 | } |
@@ -1842,7 +1842,7 @@ discard block |
||
| 1842 | 1842 | print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; |
| 1843 | 1843 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 1844 | 1844 | print '<input type="hidden" name="action" value="add">'; |
| 1845 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 1845 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 1846 | 1846 | print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
| 1847 | 1847 | if ($origin != 'project' && $originid) { |
| 1848 | 1848 | print '<input type="hidden" name="origin" value="'.$origin.'">'; |
@@ -1865,7 +1865,7 @@ discard block |
||
| 1865 | 1865 | |
| 1866 | 1866 | // Ref customer |
| 1867 | 1867 | print '<tr class="field_ref_client"><td class="titlefieldcreate">'.$langs->trans('RefCustomer').'</td><td class="valuefieldcreate">'; |
| 1868 | - print '<input type="text" name="ref_client" value="'.(!empty($ref_client)?$ref_client:GETPOST('ref_client')).'"></td>'; |
|
| 1868 | + print '<input type="text" name="ref_client" value="'.(!empty($ref_client) ? $ref_client : GETPOST('ref_client')).'"></td>'; |
|
| 1869 | 1869 | print '</tr>'; |
| 1870 | 1870 | |
| 1871 | 1871 | // Third party |
@@ -2040,7 +2040,7 @@ discard block |
||
| 2040 | 2040 | print '<tr class="field_currency">'; |
| 2041 | 2041 | print '<td class="titlefieldcreate">'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; |
| 2042 | 2042 | print '<td class="valuefieldcreate maxwidthonsmartphone">'; |
| 2043 | - print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany'))?GETPOST('multicurrency_code'):$currency_code), 'multicurrency_code', 0); |
|
| 2043 | + print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ?GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0); |
|
| 2044 | 2044 | print '</td></tr>'; |
| 2045 | 2045 | } |
| 2046 | 2046 | |
@@ -2231,7 +2231,7 @@ discard block |
||
| 2231 | 2231 | if (empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) { |
| 2232 | 2232 | $formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">'.$langs->trans("CloseAs").'</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED))); |
| 2233 | 2233 | } |
| 2234 | - $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
| 2234 | + $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
| 2235 | 2235 | |
| 2236 | 2236 | if (getDolGlobalInt('PROPOSAL_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) { |
| 2237 | 2237 | // This is a hidden option: |
@@ -2241,7 +2241,7 @@ discard block |
||
| 2241 | 2241 | $deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id); |
| 2242 | 2242 | |
| 2243 | 2243 | if (!empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && $user->hasRight('facture', 'creer')) { |
| 2244 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 2244 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 2245 | 2245 | |
| 2246 | 2246 | $object->fetchObjectLinked(); |
| 2247 | 2247 | |
@@ -2323,7 +2323,7 @@ discard block |
||
| 2323 | 2323 | 'type' => 'onecolumn', |
| 2324 | 2324 | 'value' => ' |
| 2325 | 2325 | <script> |
| 2326 | - let signedValue = ' . $object::STATUS_SIGNED . '; |
|
| 2326 | + let signedValue = ' . $object::STATUS_SIGNED.'; |
|
| 2327 | 2327 | |
| 2328 | 2328 | $(document).ready(function() { |
| 2329 | 2329 | $("[name=generate_deposit]").change(function () { |
@@ -2373,7 +2373,7 @@ discard block |
||
| 2373 | 2373 | if (empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) { |
| 2374 | 2374 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
| 2375 | 2375 | } else { |
| 2376 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
| 2376 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?statut=3&id='.$object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
| 2377 | 2377 | } |
| 2378 | 2378 | } elseif ($action == 'delete') { |
| 2379 | 2379 | // Confirm delete |
@@ -2412,8 +2412,8 @@ discard block |
||
| 2412 | 2412 | $nbMandated = 0; |
| 2413 | 2413 | foreach ($object->lines as $line) { |
| 2414 | 2414 | $res = $line->fetch_product(); |
| 2415 | - if ($res > 0 ) { |
|
| 2416 | - if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) { |
|
| 2415 | + if ($res > 0) { |
|
| 2416 | + if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
|
| 2417 | 2417 | $nbMandated++; |
| 2418 | 2418 | break; |
| 2419 | 2419 | } |
@@ -2448,7 +2448,7 @@ discard block |
||
| 2448 | 2448 | $morehtmlref = '<div class="refidno">'; |
| 2449 | 2449 | // Ref customer |
| 2450 | 2450 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1); |
| 2451 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2451 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2452 | 2452 | // Thirdparty |
| 2453 | 2453 | $morehtmlref .= '<br><span class="hideonsmartphone">'.$langs->trans('ThirdParty').' : </span>'.$soc->getNomUrl(1, 'customer'); |
| 2454 | 2454 | if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $soc->id > 0) { |
@@ -2836,46 +2836,46 @@ discard block |
||
| 2836 | 2836 | print '<table class="border tableforfield centpercent">'; |
| 2837 | 2837 | |
| 2838 | 2838 | print '<tr>'; |
| 2839 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 2840 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 2839 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 2840 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 2841 | 2841 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2842 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2842 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2843 | 2843 | } |
| 2844 | 2844 | print '</tr>'; |
| 2845 | 2845 | |
| 2846 | 2846 | print '<tr>'; |
| 2847 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 2848 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 2847 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 2848 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 2849 | 2849 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2850 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2850 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2851 | 2851 | } |
| 2852 | 2852 | print '</tr>'; |
| 2853 | 2853 | |
| 2854 | 2854 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 2855 | 2855 | print '<tr>'; |
| 2856 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 2857 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 2856 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 2857 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 2858 | 2858 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2859 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2859 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2860 | 2860 | } |
| 2861 | 2861 | print '</tr>'; |
| 2862 | 2862 | |
| 2863 | 2863 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 2864 | 2864 | print '<tr>'; |
| 2865 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 2866 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 2865 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 2866 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 2867 | 2867 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2868 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2868 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2869 | 2869 | } |
| 2870 | 2870 | print '</tr>'; |
| 2871 | 2871 | } |
| 2872 | 2872 | } |
| 2873 | 2873 | |
| 2874 | 2874 | print '<tr>'; |
| 2875 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 2876 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 2875 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 2876 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 2877 | 2877 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2878 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2878 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2879 | 2879 | } |
| 2880 | 2880 | print '</tr>'; |
| 2881 | 2881 | |
@@ -2994,7 +2994,7 @@ discard block |
||
| 2994 | 2994 | } |
| 2995 | 2995 | |
| 2996 | 2996 | // ReOpen |
| 2997 | - if ( (( !empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) { |
|
| 2997 | + if (((!empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) { |
|
| 2998 | 2998 | print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#reopen').'"'; |
| 2999 | 2999 | print '>'.$langs->trans('ReOpen').'</a>'; |
| 3000 | 3000 | } |
@@ -3069,8 +3069,8 @@ discard block |
||
| 3069 | 3069 | } else { |
| 3070 | 3070 | // Set not signed (close) |
| 3071 | 3071 | if ($object->statut == Propal::STATUS_DRAFT && $usercanclose) { |
| 3072 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&token='.newToken().'&action=closeas&token='.newToken() . (empty($conf->global->MAIN_JUMP_TAG) ? '' : '#close') . '"'; |
|
| 3073 | - print '>' . $langs->trans('SetRefusedAndClose') . '</a>'; |
|
| 3072 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=closeas&token='.newToken().(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#close').'"'; |
|
| 3073 | + print '>'.$langs->trans('SetRefusedAndClose').'</a>'; |
|
| 3074 | 3074 | } |
| 3075 | 3075 | } |
| 3076 | 3076 | |
@@ -977,8 +977,8 @@ discard block |
||
| 977 | 977 | $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; |
| 978 | 978 | if (empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { |
| 979 | 979 | $sql .= ", ".(empty($this->vat_reverse_charge) ? '0' : '1'); |
| 980 | - $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; |
|
| 981 | - $sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'"; |
|
| 980 | + $sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'"; |
|
| 981 | + $sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'"; |
|
| 982 | 982 | } |
| 983 | 983 | $sql .= ")"; |
| 984 | 984 | |
@@ -1262,7 +1262,7 @@ discard block |
||
| 1262 | 1262 | if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) { |
| 1263 | 1263 | $langs->loadLangs(array("errors", 'compta')); |
| 1264 | 1264 | $error++; |
| 1265 | - $this->errors[] = $langs->trans('CustomerAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
| 1265 | + $this->errors[] = $langs->trans('CustomerAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
| 1266 | 1266 | } |
| 1267 | 1267 | } |
| 1268 | 1268 | |
@@ -1270,7 +1270,7 @@ discard block |
||
| 1270 | 1270 | if (!empty($conf->global->SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_MANDATORY) && (!isset($vallabel) || trim($vallabel) === '')) { |
| 1271 | 1271 | $langs->loadLangs(array("errors", 'compta')); |
| 1272 | 1272 | $error++; |
| 1273 | - $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
| 1273 | + $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
| 1274 | 1274 | } |
| 1275 | 1275 | } elseif ($key == 'ACCOUNTANCY_CODE_SUPPLIER' && !empty($this->fournisseur)) { |
| 1276 | 1276 | // Check for unicity |
@@ -1278,7 +1278,7 @@ discard block |
||
| 1278 | 1278 | if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) { |
| 1279 | 1279 | $langs->loadLangs(array("errors", 'compta')); |
| 1280 | 1280 | $error++; |
| 1281 | - $this->errors[] = $langs->trans('SupplierAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
| 1281 | + $this->errors[] = $langs->trans('SupplierAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
| 1282 | 1282 | } |
| 1283 | 1283 | } |
| 1284 | 1284 | |
@@ -1286,7 +1286,7 @@ discard block |
||
| 1286 | 1286 | if (!empty($conf->global->SOCIETE_ACCOUNTANCY_CODE_SUPPLIER_MANDATORY) && (!isset($vallabel) || trim($vallabel) === '')) { |
| 1287 | 1287 | $langs->loadLangs(array("errors", 'compta')); |
| 1288 | 1288 | $error++; |
| 1289 | - $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
| 1289 | + $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
| 1290 | 1290 | } |
| 1291 | 1291 | } |
| 1292 | 1292 | } |
@@ -1345,7 +1345,7 @@ discard block |
||
| 1345 | 1345 | $this->fax = trim($this->fax); |
| 1346 | 1346 | $this->fax = preg_replace("/\s/", "", $this->fax); |
| 1347 | 1347 | $this->fax = preg_replace("/\./", "", $this->fax); |
| 1348 | - $this->email = trim($this->email); |
|
| 1348 | + $this->email = trim($this->email); |
|
| 1349 | 1349 | $this->url = $this->url ?clean_url($this->url, 0) : ''; |
| 1350 | 1350 | $this->note_private = trim($this->note_private); |
| 1351 | 1351 | $this->note_public = trim($this->note_public); |
@@ -1362,7 +1362,7 @@ discard block |
||
| 1362 | 1362 | |
| 1363 | 1363 | $this->tva_assuj = trim($this->tva_assuj); |
| 1364 | 1364 | $this->tva_intra = dol_sanitizeFileName($this->tva_intra, ''); |
| 1365 | - $this->vat_reverse_charge = empty($this->vat_reverse_charge) ? '0' : '1'; |
|
| 1365 | + $this->vat_reverse_charge = empty($this->vat_reverse_charge) ? '0' : '1'; |
|
| 1366 | 1366 | if (empty($this->status)) { |
| 1367 | 1367 | $this->status = 0; |
| 1368 | 1368 | } |
@@ -1517,7 +1517,7 @@ discard block |
||
| 1517 | 1517 | $sql .= ",tva_assuj = ".($this->tva_assuj != '' ? "'".$this->db->escape($this->tva_assuj)."'" : "null"); |
| 1518 | 1518 | $sql .= ",tva_intra = '".$this->db->escape($this->tva_intra)."'"; |
| 1519 | 1519 | if (empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { |
| 1520 | - $sql .= ",vat_reverse_charge = " . ($this->vat_reverse_charge != '' ? "'" . $this->db->escape($this->vat_reverse_charge) . "'" : 0); |
|
| 1520 | + $sql .= ",vat_reverse_charge = ".($this->vat_reverse_charge != '' ? "'".$this->db->escape($this->vat_reverse_charge)."'" : 0); |
|
| 1521 | 1521 | } |
| 1522 | 1522 | $sql .= ",status = ".((int) $this->status); |
| 1523 | 1523 | |
@@ -1578,8 +1578,8 @@ discard block |
||
| 1578 | 1578 | $sql .= ",supplier_order_min_amount= ".($this->supplier_order_min_amount != '' ? $this->supplier_order_min_amount : 'null'); |
| 1579 | 1579 | $sql .= ",fk_prospectlevel='".$this->db->escape($this->fk_prospectlevel)."'"; |
| 1580 | 1580 | if (empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { |
| 1581 | - $sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'"; |
|
| 1582 | - $sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'"; |
|
| 1581 | + $sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'"; |
|
| 1582 | + $sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'"; |
|
| 1583 | 1583 | if ($customer) { |
| 1584 | 1584 | $sql .= ", code_compta = ".(!empty($this->code_compta_client) ? "'".$this->db->escape($this->code_compta_client)."'" : "null"); |
| 1585 | 1585 | } |
@@ -1937,7 +1937,7 @@ discard block |
||
| 1937 | 1937 | $this->code_client = $obj->code_client; |
| 1938 | 1938 | $this->code_fournisseur = $obj->code_fournisseur; |
| 1939 | 1939 | |
| 1940 | - $this->code_compta = $obj->code_compta; // For backward compatibility |
|
| 1940 | + $this->code_compta = $obj->code_compta; // For backward compatibility |
|
| 1941 | 1941 | $this->code_compta_client = $obj->code_compta; |
| 1942 | 1942 | $this->code_compta_fournisseur = $obj->code_compta_fournisseur; |
| 1943 | 1943 | |
@@ -1954,7 +1954,7 @@ discard block |
||
| 1954 | 1954 | $this->vat_reverse_charge = 0; |
| 1955 | 1955 | } |
| 1956 | 1956 | |
| 1957 | - $this->status = $obj->status; |
|
| 1957 | + $this->status = $obj->status; |
|
| 1958 | 1958 | |
| 1959 | 1959 | // Local Taxes |
| 1960 | 1960 | $this->localtax1_assuj = $obj->localtax1_assuj; |
@@ -1981,7 +1981,7 @@ discard block |
||
| 1981 | 1981 | |
| 1982 | 1982 | $this->mode_reglement_id = $obj->mode_reglement; |
| 1983 | 1983 | $this->cond_reglement_id = $obj->cond_reglement; |
| 1984 | - $this->deposit_percent = $obj->deposit_percent; |
|
| 1984 | + $this->deposit_percent = $obj->deposit_percent; |
|
| 1985 | 1985 | $this->transport_mode_id = $obj->transport_mode; |
| 1986 | 1986 | $this->mode_reglement_supplier_id = $obj->mode_reglement_supplier; |
| 1987 | 1987 | $this->cond_reglement_supplier_id = $obj->cond_reglement_supplier; |
@@ -2517,10 +2517,10 @@ discard block |
||
| 2517 | 2517 | $reparray[$i]['firstname'] = $obj->firstname; |
| 2518 | 2518 | $reparray[$i]['email'] = $obj->email; |
| 2519 | 2519 | $reparray[$i]['phone'] = $obj->office_phone; |
| 2520 | - $reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone |
|
| 2520 | + $reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone |
|
| 2521 | 2521 | $reparray[$i]['office_fax'] = $obj->office_fax; |
| 2522 | - $reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile |
|
| 2523 | - $reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile |
|
| 2522 | + $reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile |
|
| 2523 | + $reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile |
|
| 2524 | 2524 | $reparray[$i]['job'] = $obj->job; |
| 2525 | 2525 | $reparray[$i]['statut'] = $obj->status; // deprecated |
| 2526 | 2526 | $reparray[$i]['status'] = $obj->status; |
@@ -2726,7 +2726,7 @@ discard block |
||
| 2726 | 2726 | $datas['status'] = ' '.$this->getLibStatut(5); |
| 2727 | 2727 | } |
| 2728 | 2728 | if (isset($this->client) && isset($this->fournisseur)) { |
| 2729 | - $datas['type'] = ' ' . $this->getTypeUrl(1); |
|
| 2729 | + $datas['type'] = ' '.$this->getTypeUrl(1); |
|
| 2730 | 2730 | } |
| 2731 | 2731 | $datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag(dol_string_nohtmltag($this->name)); |
| 2732 | 2732 | if (!empty($this->name_alias) && empty($noaliasinname)) { |
@@ -2790,9 +2790,9 @@ discard block |
||
| 2790 | 2790 | } |
| 2791 | 2791 | // show categories for this record only in ajax to not overload lists |
| 2792 | 2792 | if (!$nofetch && isModEnabled('categorie') && $this->client) { |
| 2793 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
| 2793 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
| 2794 | 2794 | $form = new Form($this->db); |
| 2795 | - $datas['categories_customer'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1); |
|
| 2795 | + $datas['categories_customer'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1); |
|
| 2796 | 2796 | } |
| 2797 | 2797 | if (!empty($this->code_fournisseur) && $this->fournisseur) { |
| 2798 | 2798 | $datas['suppliercode'] = '<br><b>'.$langs->trans('SupplierCode').':</b> '.$this->code_fournisseur; |
@@ -2803,9 +2803,9 @@ discard block |
||
| 2803 | 2803 | } |
| 2804 | 2804 | // show categories for this record only in ajax to not overload lists |
| 2805 | 2805 | if (!$nofetch && isModEnabled('categorie') && $this->fournisseur) { |
| 2806 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
| 2806 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
| 2807 | 2807 | $form = new Form($this->db); |
| 2808 | - $datas['categories_supplier'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1); |
|
| 2808 | + $datas['categories_supplier'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1); |
|
| 2809 | 2809 | } |
| 2810 | 2810 | |
| 2811 | 2811 | $datas['divclose'] = '</div>'; |
@@ -2928,7 +2928,7 @@ discard block |
||
| 2928 | 2928 | $label = $langs->trans("ShowCompany"); |
| 2929 | 2929 | $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
| 2930 | 2930 | } |
| 2931 | - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
| 2931 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
| 2932 | 2932 | $linkclose .= $dataparams.' class="'.$classfortooltip.' refurl valignmiddle"'; |
| 2933 | 2933 | $target_value = array('_self', '_blank', '_parent', '_top'); |
| 2934 | 2934 | if (in_array($target, $target_value)) { |
@@ -3573,7 +3573,7 @@ discard block |
||
| 3573 | 3573 | global $conf; |
| 3574 | 3574 | |
| 3575 | 3575 | if (!empty($conf->global->SOCIETE_CODECOMPTA_ADDON)) { |
| 3576 | - $module=$conf->global->SOCIETE_CODECOMPTA_ADDON; |
|
| 3576 | + $module = $conf->global->SOCIETE_CODECOMPTA_ADDON; |
|
| 3577 | 3577 | $res = false; |
| 3578 | 3578 | $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); |
| 3579 | 3579 | foreach ($dirsociete as $dirroot) { |
@@ -3696,7 +3696,7 @@ discard block |
||
| 3696 | 3696 | global $langs; |
| 3697 | 3697 | |
| 3698 | 3698 | if ($company_id > 0) { |
| 3699 | - $sql = "SELECT parent FROM " . MAIN_DB_PREFIX . "societe WHERE rowid = ".((int) $company_id); |
|
| 3699 | + $sql = "SELECT parent FROM ".MAIN_DB_PREFIX."societe WHERE rowid = ".((int) $company_id); |
|
| 3700 | 3700 | $resql = $this->db->query($sql); |
| 3701 | 3701 | if ($resql) { |
| 3702 | 3702 | if ($obj = $this->db->fetch_object($resql)) { |
@@ -4345,7 +4345,7 @@ discard block |
||
| 4345 | 4345 | |
| 4346 | 4346 | if ($member->morphy == 'mor') { |
| 4347 | 4347 | if (empty($socname)) { |
| 4348 | - $socname = $member->company? $member->company : $member->societe; |
|
| 4348 | + $socname = $member->company ? $member->company : $member->societe; |
|
| 4349 | 4349 | } |
| 4350 | 4350 | if (!empty($fullname) && empty($socalias)) { |
| 4351 | 4351 | $socalias = $fullname; |
@@ -4541,7 +4541,7 @@ discard block |
||
| 4541 | 4541 | $this->forme_juridique_code = getDolGlobalString('MAIN_INFO_SOCIETE_FORME_JURIDIQUE'); |
| 4542 | 4542 | $this->email = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL'); |
| 4543 | 4543 | $this->default_lang = getDolGlobalString('MAIN_LANG_DEFAULT', 'auto'); |
| 4544 | - $this->logo =getDolGlobalString('MAIN_INFO_SOCIETE_LOGO'); |
|
| 4544 | + $this->logo = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO'); |
|
| 4545 | 4545 | $this->logo_small = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO_SMALL'); |
| 4546 | 4546 | $this->logo_mini = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO_MINI'); |
| 4547 | 4547 | $this->logo_squarred = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO_SQUARRED'); |
@@ -5041,7 +5041,7 @@ discard block |
||
| 5041 | 5041 | dol_print_error($this->db, $companybankaccount->error, $companybankaccount->errors); |
| 5042 | 5042 | } |
| 5043 | 5043 | $result = $companybankaccount->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); |
| 5044 | - $this->last_main_doc=$companybankaccount->last_main_doc; |
|
| 5044 | + $this->last_main_doc = $companybankaccount->last_main_doc; |
|
| 5045 | 5045 | } else { |
| 5046 | 5046 | // Positionne le modele sur le nom du modele a utiliser |
| 5047 | 5047 | if (!dol_strlen($modele)) { |
@@ -5422,7 +5422,7 @@ discard block |
||
| 5422 | 5422 | global $langs, $hookmanager, $user, $action; |
| 5423 | 5423 | |
| 5424 | 5424 | $error = 0; |
| 5425 | - $soc_origin = new Societe($this->db); // The thirdparty that we will delete |
|
| 5425 | + $soc_origin = new Societe($this->db); // The thirdparty that we will delete |
|
| 5426 | 5426 | |
| 5427 | 5427 | if (!$error && $soc_origin->fetch($soc_origin_id) < 1) { |
| 5428 | 5428 | $this->error = $langs->trans('ErrorRecordNotFound'); |
@@ -79,18 +79,18 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | |
| 81 | 81 | $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int')); |
| 82 | -$ref = GETPOST('ref', 'alpha'); |
|
| 83 | -$socid = GETPOST('socid', 'int'); |
|
| 84 | -$action = GETPOST('action', 'aZ09'); |
|
| 85 | -$cancel = GETPOST('cancel', 'alpha'); |
|
| 86 | -$confirm = GETPOST('confirm', 'alpha'); |
|
| 82 | +$ref = GETPOST('ref', 'alpha'); |
|
| 83 | +$socid = GETPOST('socid', 'int'); |
|
| 84 | +$action = GETPOST('action', 'aZ09'); |
|
| 85 | +$cancel = GETPOST('cancel', 'alpha'); |
|
| 86 | +$confirm = GETPOST('confirm', 'alpha'); |
|
| 87 | 87 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 88 | 88 | |
| 89 | -$lineid = GETPOST('lineid', 'int'); |
|
| 90 | -$contactid = GETPOST('contactid', 'int'); |
|
| 91 | -$projectid = GETPOST('projectid', 'int'); |
|
| 92 | -$origin = GETPOST('origin', 'alpha'); |
|
| 93 | -$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility |
|
| 89 | +$lineid = GETPOST('lineid', 'int'); |
|
| 90 | +$contactid = GETPOST('contactid', 'int'); |
|
| 91 | +$projectid = GETPOST('projectid', 'int'); |
|
| 92 | +$origin = GETPOST('origin', 'alpha'); |
|
| 93 | +$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility |
|
| 94 | 94 | $rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1; |
| 95 | 95 | |
| 96 | 96 | |
@@ -115,26 +115,26 @@ discard block |
||
| 115 | 115 | $extrafields->fetch_name_optionals_label($object->table_element); |
| 116 | 116 | |
| 117 | 117 | // Load object |
| 118 | -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once |
|
| 118 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once |
|
| 119 | 119 | |
| 120 | 120 | // Permissions / Rights |
| 121 | -$usercanread = $user->hasRight("commande", "lire"); |
|
| 122 | -$usercancreate = $user->hasRight("commande", "creer"); |
|
| 123 | -$usercandelete = $user->hasRight("commande", "supprimer"); |
|
| 121 | +$usercanread = $user->hasRight("commande", "lire"); |
|
| 122 | +$usercancreate = $user->hasRight("commande", "creer"); |
|
| 123 | +$usercandelete = $user->hasRight("commande", "supprimer"); |
|
| 124 | 124 | |
| 125 | 125 | // Advanced permissions |
| 126 | -$usercanclose = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'close'))); |
|
| 127 | -$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'validate'))); |
|
| 128 | -$usercancancel = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'annuler'))); |
|
| 129 | -$usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'send')); |
|
| 130 | -$usercangeneretedoc = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'generetedoc')); |
|
| 126 | +$usercanclose = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'close'))); |
|
| 127 | +$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'validate'))); |
|
| 128 | +$usercancancel = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'annuler'))); |
|
| 129 | +$usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'send')); |
|
| 130 | +$usercangeneretedoc = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'generetedoc')); |
|
| 131 | 131 | |
| 132 | 132 | $usermustrespectpricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); |
| 133 | 133 | $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer')); |
| 134 | 134 | |
| 135 | -$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php |
|
| 136 | -$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 137 | -$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 135 | +$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php |
|
| 136 | +$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 137 | +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 138 | 138 | |
| 139 | 139 | |
| 140 | 140 | $error = 0; |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | $action = ''; |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once |
|
| 180 | + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once |
|
| 181 | 181 | |
| 182 | - include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
| 182 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
| 183 | 183 | |
| 184 | - include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once |
|
| 184 | + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once |
|
| 185 | 185 | |
| 186 | 186 | // Action clone object |
| 187 | 187 | if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | $pu_ht = ''; |
| 666 | 666 | $pu_ttc = ''; |
| 667 | 667 | $pu_ht_devise = ''; |
| 668 | - $pu_ttc_devise = ''; |
|
| 668 | + $pu_ttc_devise = ''; |
|
| 669 | 669 | |
| 670 | 670 | if (GETPOST('price_ht') !== '') { |
| 671 | 671 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
@@ -809,8 +809,8 @@ discard block |
||
| 809 | 809 | if (count($prodcustprice->lines) > 0) { |
| 810 | 810 | $pu_ht = price($prodcustprice->lines[0]->price); |
| 811 | 811 | $pu_ttc = price($prodcustprice->lines[0]->price_ttc); |
| 812 | - $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 813 | - $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 812 | + $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 813 | + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 814 | 814 | $price_base_type = $prodcustprice->lines[0]->price_base_type; |
| 815 | 815 | $tva_tx = $prodcustprice->lines[0]->tva_tx; |
| 816 | 816 | if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
@@ -909,8 +909,8 @@ discard block |
||
| 909 | 909 | } |
| 910 | 910 | |
| 911 | 911 | //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time |
| 912 | - if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
| 913 | - $product_desc=''; |
|
| 912 | + if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
| 913 | + $product_desc = ''; |
|
| 914 | 914 | } |
| 915 | 915 | |
| 916 | 916 | if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { |
@@ -1333,7 +1333,7 @@ discard block |
||
| 1333 | 1333 | GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms) |
| 1334 | 1334 | && isModEnabled('facture') && $user->hasRight('facture', 'creer') |
| 1335 | 1335 | ) { |
| 1336 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 1336 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 1337 | 1337 | |
| 1338 | 1338 | $date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int')); |
| 1339 | 1339 | $forceFields = array(); |
@@ -1346,7 +1346,7 @@ discard block |
||
| 1346 | 1346 | |
| 1347 | 1347 | if ($deposit) { |
| 1348 | 1348 | setEventMessage('DepositGenerated'); |
| 1349 | - $locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id; |
|
| 1349 | + $locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id; |
|
| 1350 | 1350 | } else { |
| 1351 | 1351 | $error++; |
| 1352 | 1352 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1354,7 +1354,7 @@ discard block |
||
| 1354 | 1354 | } |
| 1355 | 1355 | |
| 1356 | 1356 | // Define output language |
| 1357 | - if (! $error) { |
|
| 1357 | + if (!$error) { |
|
| 1358 | 1358 | $db->commit(); |
| 1359 | 1359 | |
| 1360 | 1360 | if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { |
@@ -1382,7 +1382,7 @@ discard block |
||
| 1382 | 1382 | } |
| 1383 | 1383 | |
| 1384 | 1384 | if ($locationTarget) { |
| 1385 | - header('Location: ' . $locationTarget); |
|
| 1385 | + header('Location: '.$locationTarget); |
|
| 1386 | 1386 | exit; |
| 1387 | 1387 | } |
| 1388 | 1388 | } else { |
@@ -1575,7 +1575,7 @@ discard block |
||
| 1575 | 1575 | include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; |
| 1576 | 1576 | |
| 1577 | 1577 | // Actions to build doc |
| 1578 | - $upload_dir = !empty($conf->commande->multidir_output[$object->entity])?$conf->commande->multidir_output[$object->entity]:$conf->commande->dir_output; |
|
| 1578 | + $upload_dir = !empty($conf->commande->multidir_output[$object->entity]) ? $conf->commande->multidir_output[$object->entity] : $conf->commande->dir_output; |
|
| 1579 | 1579 | $permissiontoadd = $usercancreate; |
| 1580 | 1580 | include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
| 1581 | 1581 | |
@@ -1805,7 +1805,7 @@ discard block |
||
| 1805 | 1805 | print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; |
| 1806 | 1806 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 1807 | 1807 | print '<input type="hidden" name="action" value="add">'; |
| 1808 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 1808 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 1809 | 1809 | print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">'; |
| 1810 | 1810 | print '<input type="hidden" name="origin" value="'.$origin.'">'; |
| 1811 | 1811 | print '<input type="hidden" name="originid" value="'.$originid.'">'; |
@@ -1872,7 +1872,7 @@ discard block |
||
| 1872 | 1872 | // Contacts (ask contact only if thirdparty already defined). |
| 1873 | 1873 | print "<tr><td>".$langs->trans("DefaultContact").'</td><td>'; |
| 1874 | 1874 | print img_picto('', 'contact', 'class="pictofixedwidth"'); |
| 1875 | - print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, !empty($srccontactslist)?$srccontactslist:"", '', 1, 'maxwidth200 widthcentpercentminusx'); |
|
| 1875 | + print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, !empty($srccontactslist) ? $srccontactslist : "", '', 1, 'maxwidth200 widthcentpercentminusx'); |
|
| 1876 | 1876 | print '</td></tr>'; |
| 1877 | 1877 | |
| 1878 | 1878 | // Ligne info remises tiers |
@@ -1941,14 +1941,14 @@ discard block |
||
| 1941 | 1941 | require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
| 1942 | 1942 | $formproduct = new FormProduct($db); |
| 1943 | 1943 | print '<tr><td>'.$langs->trans('Warehouse').'</td><td>'; |
| 1944 | - print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses((GETPOSTISSET('warehouse_id')?GETPOST('warehouse_id'):$warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); |
|
| 1944 | + print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses((GETPOSTISSET('warehouse_id') ?GETPOST('warehouse_id') : $warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); |
|
| 1945 | 1945 | print '</td></tr>'; |
| 1946 | 1946 | } |
| 1947 | 1947 | |
| 1948 | 1948 | // Source / Channel - What trigger creation |
| 1949 | 1949 | print '<tr><td>'.$langs->trans('Channel').'</td><td>'; |
| 1950 | 1950 | print img_picto('', 'question', 'class="pictofixedwidth"'); |
| 1951 | - $form->selectInputReason((GETPOSTISSET('demand_reason_id')?GETPOST('demand_reason_id'):$demand_reason_id), 'demand_reason_id', '', 1, 'maxwidth200 widthcentpercentminusx'); |
|
| 1951 | + $form->selectInputReason((GETPOSTISSET('demand_reason_id') ?GETPOST('demand_reason_id') : $demand_reason_id), 'demand_reason_id', '', 1, 'maxwidth200 widthcentpercentminusx'); |
|
| 1952 | 1952 | print '</td></tr>'; |
| 1953 | 1953 | |
| 1954 | 1954 | // TODO How record was recorded OrderMode (llx_c_input_method) |
@@ -1958,7 +1958,7 @@ discard block |
||
| 1958 | 1958 | $langs->load("projects"); |
| 1959 | 1959 | print '<tr>'; |
| 1960 | 1960 | print '<td>'.$langs->trans("Project").'</td><td>'; |
| 1961 | - print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (GETPOSTISSET('projectid')?GETPOST('projectid'):$projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx'); |
|
| 1961 | + print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (GETPOSTISSET('projectid') ?GETPOST('projectid') : $projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx'); |
|
| 1962 | 1962 | print ' <a 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" title="'.$langs->trans("AddProject").'"></span></a>'; |
| 1963 | 1963 | print '</td>'; |
| 1964 | 1964 | print '</tr>'; |
@@ -1983,7 +1983,7 @@ discard block |
||
| 1983 | 1983 | // Other attributes |
| 1984 | 1984 | $parameters = array(); |
| 1985 | 1985 | if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { |
| 1986 | - $parameters['objectsrc'] = $objectsrc; |
|
| 1986 | + $parameters['objectsrc'] = $objectsrc; |
|
| 1987 | 1987 | } |
| 1988 | 1988 | $parameters['socid'] = $socid; |
| 1989 | 1989 | |
@@ -2018,7 +2018,7 @@ discard block |
||
| 2018 | 2018 | print '<tr>'; |
| 2019 | 2019 | print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>'; |
| 2020 | 2020 | print '<td class="maxwidthonsmartphone">'; |
| 2021 | - print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany'))?GETPOST('multicurrency_code'):$currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx'); |
|
| 2021 | + print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ?GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx'); |
|
| 2022 | 2022 | print '</td></tr>'; |
| 2023 | 2023 | } |
| 2024 | 2024 | |
@@ -2200,14 +2200,14 @@ discard block |
||
| 2200 | 2200 | $nbMandated = 0; |
| 2201 | 2201 | foreach ($object->lines as $line) { |
| 2202 | 2202 | $res = $line->fetch_product(); |
| 2203 | - if ($res > 0 ) { |
|
| 2204 | - if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) { |
|
| 2203 | + if ($res > 0) { |
|
| 2204 | + if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
|
| 2205 | 2205 | $nbMandated++; |
| 2206 | 2206 | break; |
| 2207 | 2207 | } |
| 2208 | 2208 | } |
| 2209 | 2209 | } |
| 2210 | - if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 2210 | + if ($nbMandated > 0) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 2211 | 2211 | |
| 2212 | 2212 | if (getDolGlobalInt('SALE_ORDER_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) { |
| 2213 | 2213 | // This is a hidden option: |
@@ -2217,7 +2217,7 @@ discard block |
||
| 2217 | 2217 | $deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id); |
| 2218 | 2218 | |
| 2219 | 2219 | if (!empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && $user->hasRight('facture', 'creer')) { |
| 2220 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 2220 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 2221 | 2221 | |
| 2222 | 2222 | $object->fetchObjectLinked(); |
| 2223 | 2223 | |
@@ -2428,7 +2428,7 @@ discard block |
||
| 2428 | 2428 | $morehtmlref = '<div class="refidno">'; |
| 2429 | 2429 | // Ref customer |
| 2430 | 2430 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1); |
| 2431 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2431 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2432 | 2432 | // Thirdparty |
| 2433 | 2433 | $morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer'); |
| 2434 | 2434 | if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { |
@@ -2751,55 +2751,55 @@ discard block |
||
| 2751 | 2751 | |
| 2752 | 2752 | $alert = ''; |
| 2753 | 2753 | if (!empty($conf->global->ORDER_MANAGE_MIN_AMOUNT) && $object->total_ht < $object->thirdparty->order_min_amount) { |
| 2754 | - $alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount)); |
|
| 2754 | + $alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount)); |
|
| 2755 | 2755 | } |
| 2756 | 2756 | |
| 2757 | 2757 | print '<tr>'; |
| 2758 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 2759 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2758 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 2759 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2760 | 2760 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2761 | 2761 | // Multicurrency Amount HT |
| 2762 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2762 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2763 | 2763 | } |
| 2764 | 2764 | print '</tr>'; |
| 2765 | 2765 | |
| 2766 | 2766 | print '<tr>'; |
| 2767 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 2768 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2767 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 2768 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2769 | 2769 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2770 | 2770 | // Multicurrency Amount VAT |
| 2771 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2771 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2772 | 2772 | } |
| 2773 | 2773 | print '</tr>'; |
| 2774 | 2774 | |
| 2775 | 2775 | // Amount Local Taxes |
| 2776 | 2776 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 2777 | 2777 | print '<tr>'; |
| 2778 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 2779 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2778 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 2779 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2780 | 2780 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2781 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2781 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2782 | 2782 | } |
| 2783 | 2783 | print '</tr>'; |
| 2784 | 2784 | |
| 2785 | 2785 | // Amount Local Taxes |
| 2786 | 2786 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 2787 | 2787 | print '<tr>'; |
| 2788 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 2789 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2788 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 2789 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2790 | 2790 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2791 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2791 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2792 | 2792 | } |
| 2793 | 2793 | print '</tr>'; |
| 2794 | 2794 | } |
| 2795 | 2795 | } |
| 2796 | 2796 | |
| 2797 | 2797 | print '<tr>'; |
| 2798 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 2799 | - print '<td class="valuefield nowrap right amountcard">' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td>'; |
|
| 2798 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 2799 | + print '<td class="valuefield nowrap right amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>'; |
|
| 2800 | 2800 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2801 | 2801 | // Multicurrency Amount TTC |
| 2802 | - print '<td class="valuefield nowrap right amountcard">' . price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2802 | + print '<td class="valuefield nowrap right amountcard">'.price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2803 | 2803 | } |
| 2804 | 2804 | print '</tr>'."\n"; |
| 2805 | 2805 | |
@@ -2913,7 +2913,7 @@ discard block |
||
| 2913 | 2913 | if ($usercansend) { |
| 2914 | 2914 | print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
| 2915 | 2915 | } else { |
| 2916 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 2916 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 2917 | 2917 | } |
| 2918 | 2918 | } |
| 2919 | 2919 | } |
@@ -2982,7 +2982,7 @@ discard block |
||
| 2982 | 2982 | }*/ |
| 2983 | 2983 | } else { |
| 2984 | 2984 | $langs->load("errors"); |
| 2985 | - print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 2985 | + print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 2986 | 2986 | } |
| 2987 | 2987 | } |
| 2988 | 2988 | |
@@ -3034,7 +3034,7 @@ discard block |
||
| 3034 | 3034 | if ($numshipping == 0) { |
| 3035 | 3035 | print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
| 3036 | 3036 | } else { |
| 3037 | - print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 3037 | + print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 3038 | 3038 | } |
| 3039 | 3039 | } |
| 3040 | 3040 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $result = restrictedArea($user, 'fournisseur', $object, 'commande_fournisseur', 'commande', 'fk_soc', 'rowid', $isdraft); |
| 138 | 138 | |
| 139 | 139 | // Common permissions |
| 140 | -$usercanread = ($user->hasRight("fournisseur", "commande", "lire") || $user->hasRight("supplier_order", "lire")); |
|
| 140 | +$usercanread = ($user->hasRight("fournisseur", "commande", "lire") || $user->hasRight("supplier_order", "lire")); |
|
| 141 | 141 | $usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
| 142 | 142 | $usercandelete = (($user->hasRight("fournisseur", "commande", "supprimer") || $user->hasRight("supplier_order", "supprimer")) || ($usercancreate && isset($object->statut) && $object->statut == $object::STATUS_DRAFT)); |
| 143 | 143 | |
@@ -145,9 +145,9 @@ discard block |
||
| 145 | 145 | $usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight("fournisseur", "supplier_order_advance", "validate"))); |
| 146 | 146 | |
| 147 | 147 | // Additional area permissions |
| 148 | -$usercanapprove = $user->hasRight("fournisseur", "commande", "approuver"); |
|
| 149 | -$usercanapprovesecond = $user->hasRight("fournisseur", "commande", "approve2"); |
|
| 150 | -$usercanorder = $user->hasRight("fournisseur", "commande", "commander"); |
|
| 148 | +$usercanapprove = $user->hasRight("fournisseur", "commande", "approuver"); |
|
| 149 | +$usercanapprovesecond = $user->hasRight("fournisseur", "commande", "approve2"); |
|
| 150 | +$usercanorder = $user->hasRight("fournisseur", "commande", "commander"); |
|
| 151 | 151 | if (empty($conf->reception->enabled)) { |
| 152 | 152 | $usercanreceive = $user->hasRight("fournisseur", "commande", "receptionner"); |
| 153 | 153 | } else { |
@@ -156,8 +156,8 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | // Permissions for includes |
| 158 | 158 | $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php |
| 159 | -$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 160 | -$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php |
|
| 159 | +$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 160 | +$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php |
|
| 161 | 161 | $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
| 162 | 162 | |
| 163 | 163 | // Project permission |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | if (empty($reshook)) { |
| 183 | - $backurlforlist = DOL_URL_ROOT.'/fourn/commande/list.php'.($socid > 0 ? '?socid='.((int) $socid) : ''); |
|
| 183 | + $backurlforlist = DOL_URL_ROOT.'/fourn/commande/list.php'.($socid > 0 ? '?socid='.((int) $socid) : ''); |
|
| 184 | 184 | |
| 185 | 185 | if (empty($backtopage) || ($cancel && empty($id))) { |
| 186 | 186 | if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | $idprod = GETPOST('idprod', 'int'); |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 438 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 439 | 439 | |
| 440 | 440 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
| 441 | 441 | $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | |
| 554 | 554 | //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time |
| 555 | 555 | if (trim($product_desc) == trim($desc) && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
| 556 | - $product_desc=''; |
|
| 556 | + $product_desc = ''; |
|
| 557 | 557 | } |
| 558 | 558 | |
| 559 | 559 | if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { |
@@ -1240,7 +1240,7 @@ discard block |
||
| 1240 | 1240 | $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); |
| 1241 | 1241 | $object->fk_account = GETPOST('fk_account', 'int'); |
| 1242 | 1242 | $object->note_private = GETPOST('note_private', 'restricthtml'); |
| 1243 | - $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
| 1243 | + $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
| 1244 | 1244 | $object->delivery_date = $datelivraison; |
| 1245 | 1245 | $object->fk_incoterms = GETPOST('incoterm_id', 'int'); |
| 1246 | 1246 | $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); |
@@ -1629,7 +1629,7 @@ discard block |
||
| 1629 | 1629 | $cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0)); |
| 1630 | 1630 | $mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); |
| 1631 | 1631 | $fk_account = (!empty($objectsrc->fk_account) ? $objectsrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0)); |
| 1632 | - $availability_id = (!empty($objectsrc->availability_id) ? $objectsrc->availability_id : (!empty($soc->availability_id) ? $soc->availability_id : 0)); |
|
| 1632 | + $availability_id = (!empty($objectsrc->availability_id) ? $objectsrc->availability_id : (!empty($soc->availability_id) ? $soc->availability_id : 0)); |
|
| 1633 | 1633 | $shipping_method_id = (!empty($objectsrc->shipping_method_id) ? $objectsrc->shipping_method_id : (!empty($soc->shipping_method_id) ? $soc->shipping_method_id : 0)); |
| 1634 | 1634 | $demand_reason_id = (!empty($objectsrc->demand_reason_id) ? $objectsrc->demand_reason_id : (!empty($soc->demand_reason_id) ? $soc->demand_reason_id : 0)); |
| 1635 | 1635 | //$remise_percent = (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_supplier_percent) ? $soc->remise_supplier_percent : 0)); |
@@ -1749,7 +1749,7 @@ discard block |
||
| 1749 | 1749 | // Payment term |
| 1750 | 1750 | print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>'; |
| 1751 | 1751 | print img_picto('', 'payment', 'class="pictofixedwidth"'); |
| 1752 | - print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') && GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); |
|
| 1752 | + print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') && GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); |
|
| 1753 | 1753 | print '</td></tr>'; |
| 1754 | 1754 | |
| 1755 | 1755 | // Payment mode |
@@ -1999,7 +1999,7 @@ discard block |
||
| 1999 | 1999 | 'morecss' => 'minwidth300' |
| 2000 | 2000 | ) |
| 2001 | 2001 | ); |
| 2002 | - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1); |
|
| 2002 | + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1); |
|
| 2003 | 2003 | } |
| 2004 | 2004 | |
| 2005 | 2005 | // Confirmation of cancellation |
@@ -2052,7 +2052,7 @@ discard block |
||
| 2052 | 2052 | $morehtmlref = '<div class="refidno">'; |
| 2053 | 2053 | // Ref supplier |
| 2054 | 2054 | $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', 0, 1); |
| 2055 | - $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2055 | + $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2056 | 2056 | // Thirdparty |
| 2057 | 2057 | $morehtmlref .= '<br>'; |
| 2058 | 2058 | if (!empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && !empty($usercancreate) && $action == 'edit_thirdparty') { |
@@ -2338,40 +2338,40 @@ discard block |
||
| 2338 | 2338 | |
| 2339 | 2339 | print '<tr>'; |
| 2340 | 2340 | // Amount HT |
| 2341 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 2342 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2341 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 2342 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2343 | 2343 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2344 | 2344 | // Multicurrency Amount HT |
| 2345 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2345 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2346 | 2346 | } |
| 2347 | 2347 | print '</tr>'; |
| 2348 | 2348 | |
| 2349 | 2349 | print '<tr>'; |
| 2350 | 2350 | // Amount VAT |
| 2351 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 2352 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2351 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 2352 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2353 | 2353 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2354 | 2354 | // Multicurrency Amount VAT |
| 2355 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2355 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2356 | 2356 | } |
| 2357 | 2357 | print '</tr>'; |
| 2358 | 2358 | |
| 2359 | 2359 | // Amount Local Taxes |
| 2360 | 2360 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 2361 | 2361 | print '<tr>'; |
| 2362 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 2363 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2362 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 2363 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2364 | 2364 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2365 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2365 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2366 | 2366 | } |
| 2367 | 2367 | print '</tr>'; |
| 2368 | 2368 | |
| 2369 | 2369 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 2370 | 2370 | print '<tr>'; |
| 2371 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 2372 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2371 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 2372 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2373 | 2373 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2374 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2374 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2375 | 2375 | } |
| 2376 | 2376 | print '</tr>'; |
| 2377 | 2377 | } |
@@ -2379,16 +2379,16 @@ discard block |
||
| 2379 | 2379 | |
| 2380 | 2380 | $alert = ''; |
| 2381 | 2381 | if (!empty($conf->global->ORDER_MANAGE_MIN_AMOUNT) && $object->total_ht < $object->thirdparty->supplier_order_min_amount) { |
| 2382 | - $alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->supplier_order_min_amount)); |
|
| 2382 | + $alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->supplier_order_min_amount)); |
|
| 2383 | 2383 | } |
| 2384 | 2384 | |
| 2385 | 2385 | print '<tr>'; |
| 2386 | 2386 | // Amount TTC |
| 2387 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 2388 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . $alert . '</td>'; |
|
| 2387 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 2388 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).$alert.'</td>'; |
|
| 2389 | 2389 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2390 | 2390 | // Multicurrency Amount TTC |
| 2391 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2391 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2392 | 2392 | } |
| 2393 | 2393 | print '</tr>'; |
| 2394 | 2394 | |
@@ -2715,7 +2715,7 @@ discard block |
||
| 2715 | 2715 | $action = 'presend'; |
| 2716 | 2716 | } |
| 2717 | 2717 | |
| 2718 | - if ($action != 'createorder' && $action != 'presend' ) { |
|
| 2718 | + if ($action != 'createorder' && $action != 'presend') { |
|
| 2719 | 2719 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
| 2720 | 2720 | |
| 2721 | 2721 | // Generated documents |
@@ -682,8 +682,9 @@ discard block |
||
| 682 | 682 | $newlang = ''; |
| 683 | 683 | if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { |
| 684 | 684 | $newlang = $object->thirdparty->default_lang; |
| 685 | - if (GETPOST('lang_id', 'aZ09')) |
|
| 686 | - $newlang = GETPOST('lang_id', 'aZ09'); |
|
| 685 | + if (GETPOST('lang_id', 'aZ09')) { |
|
| 686 | + $newlang = GETPOST('lang_id', 'aZ09'); |
|
| 687 | + } |
|
| 687 | 688 | } |
| 688 | 689 | if (!empty($newlang)) { |
| 689 | 690 | $outputlangs = new Translate("", $conf); |
@@ -2461,9 +2462,12 @@ discard block |
||
| 2461 | 2462 | |
| 2462 | 2463 | $parameters = array(); |
| 2463 | 2464 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 2464 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 2465 | - if (empty($reshook)) |
|
| 2466 | - $object->formAddObjectLine(1, $societe, $mysoc); |
|
| 2465 | + if ($reshook < 0) { |
|
| 2466 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 2467 | + } |
|
| 2468 | + if (empty($reshook)) { |
|
| 2469 | + $object->formAddObjectLine(1, $societe, $mysoc); |
|
| 2470 | + } |
|
| 2467 | 2471 | } |
| 2468 | 2472 | } |
| 2469 | 2473 | print '</table>'; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // General $Variables |
| 83 | -$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility |
|
| 83 | +$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility |
|
| 84 | 84 | $ref = GETPOST('ref', 'alpha'); |
| 85 | 85 | $socid = GETPOST('socid', 'int'); |
| 86 | 86 | $action = GETPOST('action', 'aZ09'); |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | $error++; |
| 1011 | 1011 | } |
| 1012 | 1012 | |
| 1013 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 1013 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 1014 | 1014 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOST('date_pointoftaxmonth', 'int'), GETPOST('date_pointoftaxday', 'int'), GETPOST('date_pointoftaxyear', 'int'), 'tzserver'); |
| 1015 | 1015 | |
| 1016 | 1016 | // Replacement invoice |
@@ -1042,7 +1042,7 @@ discard block |
||
| 1042 | 1042 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
| 1043 | 1043 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
| 1044 | 1044 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
| 1045 | - $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
| 1045 | + $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
| 1046 | 1046 | $object->fk_project = GETPOST('projectid', 'int'); |
| 1047 | 1047 | $object->cond_reglement_id = GETPOST('cond_reglement_id', 'int'); |
| 1048 | 1048 | $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); |
@@ -1103,9 +1103,9 @@ discard block |
||
| 1103 | 1103 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
| 1104 | 1104 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
| 1105 | 1105 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
| 1106 | - $object->model_pdf = GETPOST('model'); |
|
| 1106 | + $object->model_pdf = GETPOST('model'); |
|
| 1107 | 1107 | $object->fk_project = GETPOST('projectid', 'int'); |
| 1108 | - $object->cond_reglement_id = 0; // No payment term for a credit note |
|
| 1108 | + $object->cond_reglement_id = 0; // No payment term for a credit note |
|
| 1109 | 1109 | $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); |
| 1110 | 1110 | $object->fk_account = GETPOST('fk_account', 'int'); |
| 1111 | 1111 | //$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); |
@@ -1412,7 +1412,7 @@ discard block |
||
| 1412 | 1412 | $object->note_public = trim(GETPOST('note_public', 'restricthtml')); |
| 1413 | 1413 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
| 1414 | 1414 | $object->ref_client = GETPOST('ref_client'); |
| 1415 | - $object->ref_customer = GETPOST('ref_client'); |
|
| 1415 | + $object->ref_customer = GETPOST('ref_client'); |
|
| 1416 | 1416 | $object->model_pdf = GETPOST('model'); |
| 1417 | 1417 | $object->fk_project = GETPOST('projectid', 'int'); |
| 1418 | 1418 | $object->cond_reglement_id = (GETPOST('type') == 3 ? 1 : GETPOST('cond_reglement_id')); |
@@ -2048,7 +2048,7 @@ discard block |
||
| 2048 | 2048 | |
| 2049 | 2049 | // Set if we used free entry or predefined product |
| 2050 | 2050 | $predef = ''; |
| 2051 | - $product_desc =(GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); |
|
| 2051 | + $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); |
|
| 2052 | 2052 | |
| 2053 | 2053 | $price_ht = ''; |
| 2054 | 2054 | $price_ht_devise = ''; |
@@ -2243,8 +2243,8 @@ discard block |
||
| 2243 | 2243 | } |
| 2244 | 2244 | |
| 2245 | 2245 | //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time |
| 2246 | - if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
| 2247 | - $product_desc=''; |
|
| 2246 | + if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
| 2247 | + $product_desc = ''; |
|
| 2248 | 2248 | } |
| 2249 | 2249 | |
| 2250 | 2250 | if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { |
@@ -2543,7 +2543,7 @@ discard block |
||
| 2543 | 2543 | // Define special_code for special lines |
| 2544 | 2544 | $special_code = GETPOST('special_code', 'int'); |
| 2545 | 2545 | if ($special_code == 3) { |
| 2546 | - $special_code = 0; // Options should not exists on invoices |
|
| 2546 | + $special_code = 0; // Options should not exists on invoices |
|
| 2547 | 2547 | } |
| 2548 | 2548 | |
| 2549 | 2549 | $line = new FactureLigne($db); |
@@ -3153,8 +3153,8 @@ discard block |
||
| 3153 | 3153 | //$remise_absolue = (!empty($expesrc->remise_absolue) ? $expesrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0)); |
| 3154 | 3154 | |
| 3155 | 3155 | if (isModEnabled('multicurrency')) { |
| 3156 | - $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
| 3157 | - $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
| 3156 | + $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
| 3157 | + $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
| 3158 | 3158 | } |
| 3159 | 3159 | |
| 3160 | 3160 | //Replicate extrafields |
@@ -3250,7 +3250,7 @@ discard block |
||
| 3250 | 3250 | print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">'; |
| 3251 | 3251 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 3252 | 3252 | print '<input type="hidden" name="action" id="formtocreateaction" value="add">'; |
| 3253 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 3253 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 3254 | 3254 | if ($soc->id > 0) { |
| 3255 | 3255 | print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n"; |
| 3256 | 3256 | } |
@@ -3926,7 +3926,7 @@ discard block |
||
| 3926 | 3926 | print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; |
| 3927 | 3927 | print '<td colspan="2" class="maxwidthonsmartphone">'; |
| 3928 | 3928 | print img_picto('', 'currency', 'class="pictofixedwidth"'); |
| 3929 | - print $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany'))?GETPOST('multicurrency_code'):$currency_code), 'multicurrency_code'); |
|
| 3929 | + print $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ?GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code'); |
|
| 3930 | 3930 | print '</td></tr>'; |
| 3931 | 3931 | } |
| 3932 | 3932 | |
@@ -4293,14 +4293,14 @@ discard block |
||
| 4293 | 4293 | $nbMandated = 0; |
| 4294 | 4294 | foreach ($object->lines as $line) { |
| 4295 | 4295 | $res = $line->fetch_product(); |
| 4296 | - if ($res > 0 ) { |
|
| 4297 | - if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) { |
|
| 4296 | + if ($res > 0) { |
|
| 4297 | + if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
|
| 4298 | 4298 | $nbMandated++; |
| 4299 | 4299 | break; |
| 4300 | 4300 | } |
| 4301 | 4301 | } |
| 4302 | 4302 | } |
| 4303 | - if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 4303 | + if ($nbMandated > 0) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 4304 | 4304 | |
| 4305 | 4305 | |
| 4306 | 4306 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); |
@@ -4492,7 +4492,7 @@ discard block |
||
| 4492 | 4492 | } |
| 4493 | 4493 | // Ref customer |
| 4494 | 4494 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1); |
| 4495 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 4495 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 4496 | 4496 | // Thirdparty |
| 4497 | 4497 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer'); |
| 4498 | 4498 | if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { |
@@ -4921,40 +4921,40 @@ discard block |
||
| 4921 | 4921 | } |
| 4922 | 4922 | print '<tr>'; |
| 4923 | 4923 | // Amount HT |
| 4924 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 4925 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 4924 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 4925 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 4926 | 4926 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 4927 | 4927 | // Multicurrency Amount HT |
| 4928 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 4928 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 4929 | 4929 | } |
| 4930 | 4930 | print '</tr>'; |
| 4931 | 4931 | |
| 4932 | 4932 | print '<tr>'; |
| 4933 | 4933 | // Amount VAT |
| 4934 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 4935 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 4934 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 4935 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 4936 | 4936 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 4937 | 4937 | // Multicurrency Amount VAT |
| 4938 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 4938 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 4939 | 4939 | } |
| 4940 | 4940 | print '</tr>'; |
| 4941 | 4941 | |
| 4942 | 4942 | // Amount Local Taxes |
| 4943 | 4943 | if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) { |
| 4944 | 4944 | print '<tr>'; |
| 4945 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 4946 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 4945 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 4946 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 4947 | 4947 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 4948 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 4948 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 4949 | 4949 | } |
| 4950 | 4950 | print '</tr>'; |
| 4951 | 4951 | |
| 4952 | 4952 | if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) { |
| 4953 | 4953 | print '<tr>'; |
| 4954 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 4955 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 4954 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 4955 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 4956 | 4956 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 4957 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 4957 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 4958 | 4958 | } |
| 4959 | 4959 | print '</tr>'; |
| 4960 | 4960 | } |
@@ -5016,11 +5016,11 @@ discard block |
||
| 5016 | 5016 | |
| 5017 | 5017 | print '<tr>'; |
| 5018 | 5018 | // Amount TTC |
| 5019 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 5020 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 5019 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 5020 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 5021 | 5021 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 5022 | 5022 | // Multicurrency Amount TTC |
| 5023 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 5023 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 5024 | 5024 | } |
| 5025 | 5025 | print '</tr>'; |
| 5026 | 5026 | |
@@ -5419,7 +5419,7 @@ discard block |
||
| 5419 | 5419 | print '</td>'; |
| 5420 | 5420 | print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'; |
| 5421 | 5421 | //print (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code).' '; |
| 5422 | - print price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).'</td><td> </td></tr>'; |
|
| 5422 | + print price(price2num($object->multicurrency_tx * $resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).'</td><td> </td></tr>'; |
|
| 5423 | 5423 | } |
| 5424 | 5424 | |
| 5425 | 5425 | // Retained warranty : usualy use on construction industry |
@@ -5670,7 +5670,7 @@ discard block |
||
| 5670 | 5670 | $langs->load("contracts"); |
| 5671 | 5671 | |
| 5672 | 5672 | if ($usercancreatecontract) { |
| 5673 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>'; |
|
| 5673 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>'; |
|
| 5674 | 5674 | } |
| 5675 | 5675 | } |
| 5676 | 5676 | } |