Show client info on view page, don't show info items that are blank
This commit is contained in:
parent
9eb42dbee4
commit
1879a80151
@ -44,18 +44,52 @@ $machine = new Machine($machineid);
|
|||||||
<div class="col-sm-6 mb-3">
|
<div class="col-sm-6 mb-3">
|
||||||
<h6>Device Info:</h6>
|
<h6>Device Info:</h6>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
|
<?php
|
||||||
|
if (!empty($machine->getClientID())) {
|
||||||
|
$client = Clients::getClient($machine->getClientID());
|
||||||
|
?>
|
||||||
|
<div class="list-group-item">
|
||||||
|
<b><?php $Strings->get("Client"); ?></b>: <?php echo htmlspecialchars($client->getName()); ?>
|
||||||
|
<br />
|
||||||
|
<div class="ml-3">
|
||||||
|
<?php if (!empty($client->getPhone())) { ?>
|
||||||
|
<b>Phone:</b> <?php echo $client->getPhone(); ?>
|
||||||
|
<br />
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (!empty($client->getBillingAddress())) { ?>
|
||||||
|
<b>Billing address:</b><br><?php echo str_replace("\n", "\n<br>", htmlspecialchars($client->getBillingAddress())); ?>
|
||||||
|
<br />
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (!empty($client->getMailingAddress())) { ?>
|
||||||
|
<b>Mailing address:</b><br><?php echo str_replace("\n", "\n<br>", htmlspecialchars($client->getMailingAddress())); ?>
|
||||||
|
<?php } ?>
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php if (!empty($machine->getOS())) { ?>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<b><?php $Strings->get("OS/Software"); ?></b>: <?php echo htmlspecialchars($machine->getOS()); ?>
|
<b><?php $Strings->get("OS/Software"); ?></b>: <?php echo htmlspecialchars($machine->getOS()); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (!empty($machine->getSerial())) { ?>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<b><?php $Strings->get("Serial"); ?></b>: <?php echo htmlspecialchars($machine->getSerial()); ?>
|
<b><?php $Strings->get("Serial"); ?></b>: <?php echo htmlspecialchars($machine->getSerial()); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (!empty($machine->getManufacturer())) { ?>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<b><?php $Strings->get("Manufacturer"); ?></b>: <?php echo htmlspecialchars($machine->getManufacturer()); ?>
|
<b><?php $Strings->get("Manufacturer"); ?></b>: <?php echo htmlspecialchars($machine->getManufacturer()); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (!empty($machine->getModel())) { ?>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<b><?php $Strings->get("Model"); ?></b>: <?php echo htmlspecialchars($machine->getModel()); ?>
|
<b><?php $Strings->get("Model"); ?></b>: <?php echo htmlspecialchars($machine->getModel()); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (!empty($machine->getCondition())) { ?>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<b><?php $Strings->get("Condition"); ?></b>: <?php
|
<b><?php $Strings->get("Condition"); ?></b>: <?php
|
||||||
$val = $machine->getCondition();
|
$val = $machine->getCondition();
|
||||||
@ -80,9 +114,12 @@ $machine = new Machine($machineid);
|
|||||||
echo " ($val/10)";
|
echo " ($val/10)";
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (!empty($machine->getPrice())) { ?>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<b><?php $Strings->get("Price"); ?></b>: $<?php echo number_format($machine->getPrice(), 2); ?>
|
<b><?php $Strings->get("Price"); ?></b>: $<?php echo number_format($machine->getPrice(), 2); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($machine->getPrivateNotes())) {
|
if (!empty($machine->getPrivateNotes())) {
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user