Use Short echo tags across the code

This commit is contained in:
johnnyq
2026-07-28 18:47:52 -04:00
parent 0031438bce
commit b3f959ac55
355 changed files with 3113 additions and 3113 deletions

View File

@@ -19,7 +19,7 @@ ob_start();
<div class="modal-body">
<?php if ($client_id) { ?>
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="client_id" value="<?= $client_id ?>">
<?php }else{ ?>
<div class="form-group">
@@ -37,7 +37,7 @@ ob_start();
$client_id_select = intval($row['client_id']);
$client_name = escapeHtml($row['client_name']);
?>
<option value="<?php echo $client_id_select; ?>"><?php echo "$client_name"; ?></option>
<option value="<?= $client_id_select ?>"><?= "$client_name" ?></option>
<?php
}
@@ -73,7 +73,7 @@ ob_start();
$category_id = intval($row['category_id']);
$category_name = escapeHtml($row['category_name']);
?>
<option value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
<option value="<?= $category_id ?>"><?= $category_name ?></option>
<?php
}
@@ -94,7 +94,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
</div>
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?php echo date("Y-m-d"); ?>" required>
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?= date("Y-m-d") ?>" required>
</div>
</div>

View File

@@ -41,12 +41,12 @@
?>
<tr>
<td>
<a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>">
<span class="badge badge-pill <?php echo $ticket_status_class?> p-3"><?php echo "$ticket_prefix$ticket_number"; ?></span>
<a href="ticket.php?ticket_id=<?= $ticket_id ?>">
<span class="badge badge-pill <?= $ticket_status_class ?> p-3"><?= "$ticket_prefix$ticket_number" ?></span>
</a>
</td>
<td><?php echo $ticket_subject ?></td>
<td><a href='ticket.php?ticket_id=<?php echo $ticket_id?>&invoice_id=<?php echo $invoice_id?>#addInvoiceFromTicketModal'>
<td><?= $ticket_subject ?></td>
<td><a href='ticket.php?ticket_id=<?= $ticket_id ?>&invoice_id=<?= $invoice_id ?>#addInvoiceFromTicketModal'>
<i class="fas fa-fw fa-plus-circle"></i></td>
</tr>
<?php } ?>

View File

@@ -37,7 +37,7 @@ ob_start();
$category_id = intval($row['category_id']);
$category_name = escapeHtml($row['category_name']);
?>
<option value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
<option value="<?= $category_id ?>"><?= $category_name ?></option>
<?php
}

View File

@@ -21,14 +21,14 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-copy mr-2"></i>Copying invoice: <strong><?php echo "$invoice_prefix$invoice_number"; ?></strong> - <?php echo $client_name; ?></h5>
<h5 class="modal-title"><i class="fas fa-fw fa-copy mr-2"></i>Copying invoice: <strong><?= "$invoice_prefix$invoice_number" ?></strong> - <?= $client_name ?></h5>
<button type="button" class="close text-white" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
<input type="hidden" name="invoice_id" value="<?= $invoice_id ?>">
<div class="modal-body">
@@ -38,7 +38,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
</div>
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?php echo date("Y-m-d"); ?>" required>
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?= date("Y-m-d") ?>" required>
</div>
</div>

View File

@@ -27,14 +27,14 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-file-invoice mr-2"></i>Editing invoice: <strong><?php echo "$invoice_prefix$invoice_number"; ?></strong> - <?php echo $client_name; ?></h5>
<h5 class="modal-title"><i class="fas fa-fw fa-file-invoice mr-2"></i>Editing invoice: <strong><?= "$invoice_prefix$invoice_number" ?></strong> - <?= $client_name ?></h5>
<button type="button" class="close text-white" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
<input type="hidden" name="invoice_id" value="<?= $invoice_id ?>">
<div class="modal-body" <?php if (lookupUserPermission('module_sales') <= 1) { echo 'inert'; } ?>>
@@ -44,7 +44,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
</div>
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?php echo $invoice_date; ?>" required>
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?= $invoice_date ?>" required>
</div>
</div>
@@ -54,7 +54,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-calendar-alt"></i></span>
</div>
<input type="date" class="form-control" name="due" max="2999-12-31" value="<?php echo $invoice_due; ?>" required>
<input type="date" class="form-control" name="due" max="2999-12-31" value="<?= $invoice_due ?>" required>
</div>
</div>
@@ -75,7 +75,7 @@ ob_start();
?>
<option <?php if ($category_id == $category_id_select) {
echo "selected";
} ?> value="<?php echo $category_id_select; ?>"><?php echo $category_name_select; ?></option>
} ?> value="<?= $category_id_select ?>"><?= $category_name_select ?></option>
<?php
}
@@ -96,7 +96,7 @@ ob_start();
<div class='input-group-prepend'>
<span class='input-group-text'><i class='fa fa-fw fa-dollar-sign'></i></span>
</div>
<input type='text' class='form-control' inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name='invoice_discount' placeholder='0.00' value="<?php echo number_format($invoice_discount, 2, '.', ''); ?>">
<input type='text' class='form-control' inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name='invoice_discount' placeholder='0.00' value="<?= number_format($invoice_discount, 2, '.', '') ?>">
</div>
</div>
@@ -106,7 +106,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-comment"></i></span>
</div>
<input type="text" class="form-control" name="scope" placeholder="Quick description" maxlength="255" value="<?php echo $invoice_scope; ?>">
<input type="text" class="form-control" name="scope" placeholder="Quick description" maxlength="255" value="<?= $invoice_scope ?>">
</div>
</div>

View File

@@ -24,15 +24,15 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-edit mr-2"></i>Editing Line Item: <strong><?php echo $item_name; ?></strong></h5>
<h5 class="modal-title"><i class="fas fa-fw fa-edit mr-2"></i>Editing Line Item: <strong><?= $item_name ?></strong></h5>
<button type="button" class="close text-white" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<input type="hidden" name="item_id" value="<?php echo $item_id; ?>">
<input type="hidden" name="product_id" value="<?php echo $product_id; ?>">
<input type="hidden" name="item_id" value="<?= $item_id ?>">
<input type="hidden" name="product_id" value="<?= $product_id ?>">
<div class="modal-body">
<div class="form-group">
@@ -41,7 +41,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-box"></i></span>
</div>
<input type="text" class="form-control" name="name" maxlength="200" value="<?php echo $item_name; ?>" placeholder="Enter item name" required>
<input type="text" class="form-control" name="name" maxlength="200" value="<?= $item_name ?>" placeholder="Enter item name" required>
</div>
</div>
@@ -53,7 +53,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-balance-scale"></i></span>
</div>
<input type="text" class="form-control" inputmode="decimal" pattern="[0-9]*\.?[0-9]{0,2}" name="qty" value="<?php echo number_format($item_quantity, 2); ?>" placeholder="0.00" required>
<input type="text" class="form-control" inputmode="decimal" pattern="[0-9]*\.?[0-9]{0,2}" name="qty" value="<?= number_format($item_quantity, 2) ?>" placeholder="0.00" required>
</div>
</div>
</div>
@@ -65,7 +65,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
</div>
<input type="text" class="form-control" inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name="price" value="<?php echo number_format($item_price, 2, '.', ''); ?>" placeholder="0.00" required>
<input type="text" class="form-control" inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name="price" value="<?= number_format($item_price, 2, '.', '') ?>" placeholder="0.00" required>
</div>
</div>
</div>
@@ -74,7 +74,7 @@ ob_start();
<div class="form-group">
<label>Description</label>
<div class="input-group">
<textarea class="form-control" rows="5" name="description" placeholder="Enter a description"><?php echo $item_description; ?></textarea>
<textarea class="form-control" rows="5" name="description" placeholder="Enter a description"><?= $item_description ?></textarea>
</div>
</div>
@@ -93,7 +93,7 @@ ob_start();
$tax_name = escapeHtml($row['tax_name']);
$tax_percent = floatval($row['tax_percent']);
?>
<option <?php if ($tax_id_select == $tax_id) { echo "selected"; } ?> value="<?php echo $tax_id_select; ?>"><?php echo "$tax_name $tax_percent%"; ?></option>
<option <?php if ($tax_id_select == $tax_id) { echo "selected"; } ?> value="<?= $tax_id_select ?>"><?= "$tax_name $tax_percent%" ?></option>
<?php
}
?>

View File

@@ -9,10 +9,10 @@
</div>
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
<input type="hidden" name="invoice_id" value="<?= $invoice_id ?>">
<div class="modal-body">
<div class="form-group">
<textarea class="form-control" rows="8" name="note" placeholder="Enter some notes"><?php echo $invoice_note; ?></textarea>
<textarea class="form-control" rows="8" name="note" placeholder="Enter some notes"><?= $invoice_note ?></textarea>
</div>
</div>
<div class="modal-footer">

View File

@@ -40,8 +40,8 @@ ob_start();
<div class="modal-header bg-dark">
<h5 class="modal-title text-white">
<i class="fa fa-fw fa-credit-card mr-2"></i>Payments for <?php echo "$invoice_prefix$invoice_number"; ?>
<span class="p-2 ml-2 badge badge-<?php echo $invoice_badge_color; ?>"><?php echo $invoice_status; ?></span>
<i class="fa fa-fw fa-credit-card mr-2"></i>Payments for <?= "$invoice_prefix$invoice_number" ?>
<span class="p-2 ml-2 badge badge-<?= $invoice_badge_color ?>"><?= $invoice_status ?></span>
</h5>
<button type="button" class="close text-white" data-dismiss="modal">
<span>&times;</span>
@@ -97,17 +97,17 @@ ob_start();
<?php if (lookupUserPermission("module_sales") >= 2) { ?>
<a class="ajax-modal" href="#"
data-modal-size = "lg"
data-modal-url = "modals/payment/payment_edit.php?id=<?php echo $payment_id; ?>">
<?php echo $payment_date; ?>
data-modal-url = "modals/payment/payment_edit.php?id=<?= $payment_id ?>">
<?= $payment_date ?>
</a>
<?php } else { ?>
<?php echo $payment_date; ?>
<?= $payment_date ?>
<?php } ?>
</td>
<td class="text-right text-monospace"><?php echo numfmt_format_currency($currency_format, $payment_amount, $payment_currency_code); ?></td>
<td><?php echo $payment_method; ?></td>
<td><?php echo $payment_reference_display; ?></td>
<td><?php echo "$account_archived_display$account_name"; ?></td>
<td class="text-right text-monospace"><?= numfmt_format_currency($currency_format, $payment_amount, $payment_currency_code) ?></td>
<td><?= $payment_method ?></td>
<td><?= $payment_reference_display ?></td>
<td><?= "$account_archived_display$account_name" ?></td>
</tr>
<?php
@@ -129,15 +129,15 @@ ob_start();
<table class="table table-sm table-borderless mb-0">
<tr>
<td>Invoice Total:</td>
<td class="text-right text-monospace"><?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?></td>
<td class="text-right text-monospace"><?= numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code) ?></td>
</tr>
<tr>
<td>Amount Paid:</td>
<td class="text-right text-monospace"><?php echo numfmt_format_currency($currency_format, $amount_paid, $invoice_currency_code); ?></td>
<td class="text-right text-monospace"><?= numfmt_format_currency($currency_format, $amount_paid, $invoice_currency_code) ?></td>
</tr>
<tr class="text-bold">
<td>Balance:</td>
<td class="text-right text-monospace"><?php echo numfmt_format_currency($currency_format, $balance, $invoice_currency_code); ?></td>
<td class="text-right text-monospace"><?= numfmt_format_currency($currency_format, $balance, $invoice_currency_code) ?></td>
</tr>
</table>
</div>
@@ -145,7 +145,7 @@ ob_start();
</div>
<div class="modal-footer">
<a href="invoice.php?client_id=<?php echo $client_id; ?>&invoice_id=<?php echo $invoice_id; ?>" class="btn btn-primary text-bold">
<a href="invoice.php?client_id=<?= $client_id ?>&invoice_id=<?= $invoice_id ?>" class="btn btn-primary text-bold">
<i class="fa fa-fw fa-file-invoice-dollar mr-2"></i>Open Invoice
</a>
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Close</button>