mirror of
https://github.com/itflow-org/itflow
synced 2026-08-16 04:25:13 +00:00
Use Short echo tags across the code
This commit is contained in:
@@ -71,7 +71,7 @@ ob_start();
|
||||
$balance = $opening_balance + $total_payments + $total_revenues - $total_expenses;
|
||||
|
||||
?>
|
||||
<option <?php if ($config_default_expense_account == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><div class="float-left"><?php echo $account_name; ?></div><div class="float-right"> [$<?php echo number_format($balance, 2); ?>]</div></option>
|
||||
<option <?php if ($config_default_expense_account == $account_id) { echo "selected"; } ?> value="<?= $account_id ?>"><div class="float-left"><?= $account_name ?></div><div class="float-right"> [$<?= number_format($balance, 2) ?>]</div></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
@@ -95,7 +95,7 @@ ob_start();
|
||||
$vendor_id = intval($row['vendor_id']);
|
||||
$vendor_name = escapeHtml($row['vendor_name']);
|
||||
?>
|
||||
<option value="<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></option>
|
||||
<option value="<?= $vendor_id ?>"><?= $vendor_name ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
@@ -140,7 +140,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
|
||||
}
|
||||
@@ -156,7 +156,7 @@ ob_start();
|
||||
</div>
|
||||
|
||||
<?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 col-md">
|
||||
|
||||
@@ -52,7 +52,7 @@ ob_start();
|
||||
$balance = $opening_balance + $total_payments + $total_revenues - $total_expenses;
|
||||
|
||||
?>
|
||||
<option <?php if ($config_default_expense_account == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><div class="float-left"><?php echo $account_name; ?></div><div class="float-right"> [$<?php echo number_format($balance, 2); ?>]</div></option>
|
||||
<option <?php if ($config_default_expense_account == $account_id) { echo "selected"; } ?> value="<?= $account_id ?>"><div class="float-left"><?= $account_name ?></div><div class="float-right"> [$<?= number_format($balance, 2) ?>]</div></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -42,7 +42,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
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ ob_start();
|
||||
$client_id = intval($row['client_id']);
|
||||
$client_name = escapeHtml($row['client_name']);
|
||||
?>
|
||||
<option value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
||||
<option value="<?= $client_id ?>"><?= $client_name ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -57,7 +57,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="amount" value="<?php echo number_format($expense_amount, 2, '.', ''); ?>" placeholder="0.00" required>
|
||||
<input type="text" class="form-control" inputmode="decimal" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" value="<?= number_format($expense_amount, 2, '.', '') ?>" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -94,7 +94,7 @@ ob_start();
|
||||
|
||||
$balance = $opening_balance + $total_payments + $total_revenues - $total_expenses;
|
||||
?>
|
||||
<option <?php if ($expense_account_id == $account_id_select) { echo "selected"; } ?> value="<?php echo $account_id_select; ?>"><?php echo $account_name_select; ?> [$<?php echo number_format($balance, 2); ?>]</option>
|
||||
<option <?php if ($expense_account_id == $account_id_select) { echo "selected"; } ?> value="<?= $account_id_select ?>"><?= $account_name_select ?> [$<?= number_format($balance, 2) ?>]</option>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ ob_start();
|
||||
$vendor_id_select = intval($row['vendor_id']);
|
||||
$vendor_name_select = escapeHtml($row['vendor_name']);
|
||||
?>
|
||||
<option <?php if ($expense_vendor_id == $vendor_id_select) { ?> selected <?php } ?> value="<?php echo $vendor_id_select; ?>"><?php echo $vendor_name_select; ?></option>
|
||||
<option <?php if ($expense_vendor_id == $vendor_id_select) { ?> selected <?php } ?> value="<?= $vendor_id_select ?>"><?= $vendor_name_select ?></option>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ ob_start();
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description <strong class="text-danger">*</strong></label>
|
||||
<textarea class="form-control" rows="6" name="description" placeholder="Enter a description" required><?php echo $expense_description; ?></textarea>
|
||||
<textarea class="form-control" rows="6" name="description" placeholder="Enter a description" required><?= $expense_description ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -139,7 +139,7 @@ ob_start();
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-file-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="reference" placeholder="Enter a reference" maxlength="200" value="<?php echo $expense_reference; ?>">
|
||||
<input type="text" class="form-control" name="reference" placeholder="Enter a reference" maxlength="200" value="<?= $expense_reference ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -159,7 +159,7 @@ ob_start();
|
||||
$category_id_select = intval($row['category_id']);
|
||||
$category_name_select = escapeHtml($row['category_name']);
|
||||
?>
|
||||
<option <?php if ($expense_category_id == $category_id_select) { ?> selected <?php } ?> value="<?php echo $category_id_select; ?>"><?php echo $category_name_select; ?></option>
|
||||
<option <?php if ($expense_category_id == $category_id_select) { ?> selected <?php } ?> value="<?= $category_id_select ?>"><?= $category_name_select ?></option>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ ob_start();
|
||||
</div>
|
||||
|
||||
<?php if (isset($_GET['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 col-md">
|
||||
@@ -187,7 +187,7 @@ ob_start();
|
||||
$client_id_select = intval($row['client_id']);
|
||||
$client_name_select = escapeHtml($row['client_name']);
|
||||
?>
|
||||
<option <?php if ($client_id == $client_id_select) { echo "selected"; } ?> value="<?php echo $client_id_select; ?>"><?php echo $client_name_select; ?></option>
|
||||
<option <?php if ($client_id == $client_id_select) { echo "selected"; } ?> value="<?= $client_id_select ?>"><?= $client_name_select ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ ob_start();
|
||||
|
||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||
<input type="hidden" name="expense_id" value="<?php echo $expense_id; ?>">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<input type="hidden" name="expense_id" value="<?= $expense_id ?>">
|
||||
|
||||
<div class="form-row">
|
||||
|
||||
@@ -55,7 +55,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 $expense_date; ?>" required>
|
||||
<input type="date" class="form-control" name="date" max="2999-12-31" value="<?= $expense_date ?>" required>
|
||||
</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="amount" value="<?php echo number_format($expense_amount, 2, '.', ''); ?>" placeholder="0.00" required>
|
||||
<input type="text" class="form-control" inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name="amount" value="<?= number_format($expense_amount, 2, '.', '') ?>" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -108,7 +108,7 @@ ob_start();
|
||||
$balance = $opening_balance + $total_payments + $total_revenues - $total_expenses;
|
||||
|
||||
?>
|
||||
<option <?php if ($expense_account_id == $account_id_select) { ?> selected <?php } ?> value="<?php echo $account_id_select; ?>"><?php echo "$account_archived_display$account_name_select"; ?> [$<?php echo number_format($balance, 2); ?>]</option>
|
||||
<option <?php if ($expense_account_id == $account_id_select) { ?> selected <?php } ?> value="<?= $account_id_select ?>"><?= "$account_archived_display$account_name_select" ?> [$<?= number_format($balance, 2) ?>]</option>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ ob_start();
|
||||
$vendor_id_select = intval($row['vendor_id']);
|
||||
$vendor_name_select = escapeHtml($row['vendor_name']);
|
||||
?>
|
||||
<option <?php if ($expense_vendor_id == $vendor_id_select) { ?> selected <?php } ?> value="<?php echo $vendor_id_select; ?>"><?php echo $vendor_name_select; ?></option>
|
||||
<option <?php if ($expense_vendor_id == $vendor_id_select) { ?> selected <?php } ?> value="<?= $vendor_id_select ?>"><?= $vendor_name_select ?></option>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ ob_start();
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description <strong class="text-danger">*</strong></label>
|
||||
<textarea class="form-control" rows="6" name="description" placeholder="Enter a description" required><?php echo $expense_description; ?></textarea>
|
||||
<textarea class="form-control" rows="6" name="description" placeholder="Enter a description" required><?= $expense_description ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -156,7 +156,7 @@ ob_start();
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-file-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="reference" placeholder="Enter a reference" maxlength="200" value="<?php echo $expense_reference; ?>">
|
||||
<input type="text" class="form-control" name="reference" placeholder="Enter a reference" maxlength="200" value="<?= $expense_reference ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -176,7 +176,7 @@ ob_start();
|
||||
$category_id_select = intval($row['category_id']);
|
||||
$category_name_select = escapeHtml($row['category_name']);
|
||||
?>
|
||||
<option <?php if ($expense_category_id == $category_id_select) { ?> selected <?php } ?> value="<?php echo $category_id_select; ?>"><?php echo $category_name_select; ?></option>
|
||||
<option <?php if ($expense_category_id == $category_id_select) { ?> selected <?php } ?> value="<?= $category_id_select ?>"><?= $category_name_select ?></option>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ ob_start();
|
||||
</div>
|
||||
|
||||
<?php if (isset($_GET['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 col-md">
|
||||
@@ -210,7 +210,7 @@ ob_start();
|
||||
$client_id_select = intval($row['client_id']);
|
||||
$client_name_select = escapeHtml($row['client_name']);
|
||||
?>
|
||||
<option <?php if ($client_id == $client_id_select) { echo "selected"; } ?> value="<?php echo $client_id_select; ?>"><?php echo $client_name_select; ?></option>
|
||||
<option <?php if ($client_id == $client_id_select) { echo "selected"; } ?> value="<?= $client_id_select ?>"><?= $client_name_select ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
@@ -230,9 +230,9 @@ ob_start();
|
||||
|
||||
<?php if (!empty($expense_receipt)) { ?>
|
||||
<hr>
|
||||
<a class="text-secondary" href="<?php echo "../uploads/expenses/$expense_receipt"; ?>"
|
||||
download="<?php echo "$expense_date-$vendor_name-$category_name-$expense_id.pdf" ?>">
|
||||
<i class="fa fa-fw fa-2x fa-file-pdf text-secondary"></i> <?php echo "$expense_date-$vendor_name-$category_name-$expense_id.pdf" ?>
|
||||
<a class="text-secondary" href="<?= "../uploads/expenses/$expense_receipt" ?>"
|
||||
download="<?= "$expense_date-$vendor_name-$category_name-$expense_id.pdf" ?>">
|
||||
<i class="fa fa-fw fa-2x fa-file-pdf text-secondary"></i> <?= "$expense_date-$vendor_name-$category_name-$expense_id.pdf" ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ ob_start();
|
||||
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<input type="hidden" name="account" value="<?php echo $expense_account_id; ?>">
|
||||
<input type="hidden" name="vendor" value="<?php echo $expense_vendor_id; ?>">
|
||||
<input type="hidden" name="category" value="<?php echo $expense_category_id; ?>">
|
||||
<input type="hidden" name="account" value="<?= $expense_account_id ?>">
|
||||
<input type="hidden" name="vendor" value="<?= $expense_vendor_id ?>">
|
||||
<input type="hidden" name="category" value="<?= $expense_category_id ?>">
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
@@ -62,14 +62,14 @@ 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="amount" value="-<?php echo number_format($expense_amount, 2, '.', ''); ?>" placeholder="-0.00" required>
|
||||
<input type="text" class="form-control" inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name="amount" value="-<?= number_format($expense_amount, 2, '.', '') ?>" placeholder="-0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<textarea class="form-control" rows="6" name="description" placeholder="Enter a description" required>Refund: <?php echo $expense_description; ?></textarea>
|
||||
<textarea class="form-control" rows="6" name="description" placeholder="Enter a description" required>Refund: <?= $expense_description ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -78,7 +78,7 @@ ob_start();
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-file-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="reference" placeholder="Enter a reference" maxlength="200" value="<?php echo $expense_reference; ?>">
|
||||
<input type="text" class="form-control" name="reference" placeholder="Enter a reference" maxlength="200" value="<?= $expense_reference ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user