Skip to content

Commit

Permalink
Add option to print the BOM from the entry screen
Browse files Browse the repository at this point in the history
Files changed in commit:
BOMs.php
On branch master
  • Loading branch information
timschofield committed Dec 8, 2018
1 parent 1460b29 commit cb5754b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions BOMs.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function DisplayBOMItems($UltimateParent, $Parent, $Component, $Level) {

echo '<form method="post" action="', htmlspecialchars(basename(__FILE__), ENT_QUOTES, 'UTF-8'), '?SelectedParent=', urlencode($SelectedParent), '">';
echo '<input type="hidden" name="FormID" value="', $_SESSION['FormID'], '" />';
echo '<table>
echo '<table class="noprint">
<tr>
<th colspan="3">
<input style="float:left" type="submit" name="Previous" value="<<', _('Previous'), '" />
Expand Down Expand Up @@ -368,7 +368,7 @@ function DisplayBOMItems($UltimateParent, $Parent, $Component, $Level) {
<img src="', $RootPath, '/css/', $_SESSION['Theme'], '/images/maintenance.png" title="', _('Search'), '" alt="" /> ', _('Component Details'), '
</p>';

echo '<table>';
echo '<table class="noprint">';
if (isset($_GET['Edit'])) {
$SQL = "SELECT bom.loccode,
effectiveafter,
Expand Down Expand Up @@ -799,7 +799,7 @@ function DisplayBOMItems($UltimateParent, $Parent, $Component, $Level) {
$DbgMsg = _('The SQL used to retrieve description of the parent part was');
$Result = DB_query($SQL, $ErrMsg, $DbgMsg);
if (DB_num_rows($Result) > 0) {
echo '<table>
echo '<table class="noprint">
<tr>
<th>', _('Assembly parent items'), ' : ';
$i = 0;
Expand Down Expand Up @@ -878,7 +878,10 @@ function DisplayBOMItems($UltimateParent, $Parent, $Component, $Level) {
echo '<input type="hidden" name="SelectedParent" value="', $SelectedParent, '" />';
echo '<table>';
echo '<tr>
<th colspan="16"><b>', $SelectedParent, ' - ', $MyRow[0], ' (', $MBdesc, ') </b></th>
<th colspan="15"><b>', $SelectedParent, ' - ', $MyRow[0], ' (', $MBdesc, ') </b></th>
<th>
<img src="', $RootPath, '/css/', $_SESSION['Theme'], '/images/printer.png" class="PrintIcon noprint" title="', _('Print'), '" alt="', _('Print'), '" onclick="window.print();" />
</th>
</tr>';

$BOMTree = array();
Expand Down Expand Up @@ -920,14 +923,14 @@ function DisplayBOMItems($UltimateParent, $Parent, $Component, $Level) {
}
}
echo '</table>
<input type="submit" name="renumber" value="Re-Sequence the BOM" />
<input type="submit" class="noprint" name="renumber" value="Re-Sequence the BOM" />
</form>';

if (!isset($SelectedComponent)) {
echo '<form action="', htmlspecialchars(basename(__FILE__), ENT_QUOTES, 'UTF-8'), '" method="post">';
echo '<input type="hidden" name="FormID" value="', $_SESSION['FormID'], '" />';

echo '<table>
echo '<table class="noprint">
<tr>
<th colspan="2">', _('Select new component for BOM'), '</th>
</tr>';
Expand Down Expand Up @@ -973,7 +976,7 @@ function DisplayBOMItems($UltimateParent, $Parent, $Component, $Level) {
</field>
</table>
<input type="hidden" name="SelectedParent" value="', $SelectedParent, '" />
<div class="centre">
<div class="centre noprint">
<input type="submit" name="ComponentSearch" value="', _('Search Now'), '" />
</div>
</form>';
Expand Down

0 comments on commit cb5754b

Please sign in to comment.