mirror of https://github.com/itflow-org/itflow
Feature: Automatically calculate tickert to invoice based off time worked rounded up to the near 15 min mark multiplied by Client Rate, Changed all Price, cost fields to use text field with numeric patterns instead of number fields, set pricing to always display 2 decimal spots
This commit is contained in:
parent
1ccaa936ac
commit
61c9c0c8b9
|
|
@ -26,7 +26,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" min="0" name="opening_balance" placeholder="Opening Balance" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="opening_balance" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="year" placeholder="Enter Year xxxx" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="^[0-9]{4}$" name="year" placeholder="2024" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" name="amount" placeholder="Enter an amount" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="year" placeholder="Enter a year xxxx" value="<?php echo $budget_year; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="^[0-9]{4}$" name="year" placeholder="2024" value="<?php echo $budget_year; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" name="amount" value="<?php echo $budget_amount; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" value="<?php echo number_format($budget_amount,2); ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-clock"></i></span>
|
||||
</div>
|
||||
<input type="number" step="0.01" min="0" class="form-control" name="rate" placeholder="Hourly rate">
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="rate" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-clock"></i></span>
|
||||
</div>
|
||||
<input type="number" step="0.01" min="0" class="form-control" name="rate" placeholder="Hourly rate" value="<?php echo $client_rate; ?>">
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="rate" placeholder="0.00" value="<?php echo $client_rate; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="vlan" placeholder="ex. 20" data-inputmask="'mask': '9999'">
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*" name="vlan" placeholder="ex. 20">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" id="editNetworkVlan" name="vlan" placeholder="ex. 20" data-inputmask="'mask': '9999'">
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*" id="editNetworkVlan" name="vlan" placeholder="ex. 20">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-chair"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="seats" placeholder="Number of seats">
|
||||
<input type="text" inputmode="numeric" pattern="[0-9]*" class="form-control" name="seats" placeholder="Number of seats">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-cube"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="seats" placeholder="Number of seats" value="<?php echo $software_seats; ?>">
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*" name="seats" placeholder="Number of seats" value="<?php echo $software_seats; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
$trip_purpose = nullable_htmlentities($row['trip_purpose']);
|
||||
$trip_source = nullable_htmlentities($row['trip_source']);
|
||||
$trip_destination = nullable_htmlentities($row['trip_destination']);
|
||||
$trip_miles = nullable_htmlentities($row['trip_miles']);
|
||||
$trip_miles = number_format(floatval($row['trip_miles']),1);
|
||||
$trip_user_id = intval($row['trip_user_id']);
|
||||
$round_trip = nullable_htmlentities($row['round_trip']);
|
||||
$client_id = intval($row['trip_client_id']);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" name="amount" placeholder="Enter amount" autofocus required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" name="amount" value="<?php echo $expense_amount; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" value="<?php echo number_format($expense_amount,2); ?>" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" name="amount" value="<?php echo $expense_amount; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="-?[0-9]*\.?[0-9]{0,2}" name="amount" value="<?php echo number_format($expense_amount,2); ?>" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" name="amount" value="-<?php echo $expense_amount; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="-?[0-9]*\.?[0-9]{0,2}" name="amount" value="-<?php echo number_format($expense_amount,2); ?>" placeholder="-0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -743,4 +743,26 @@ function shortenClient($client) {
|
|||
}
|
||||
|
||||
return strtoupper(substr($shortened, 0, 3));
|
||||
}
|
||||
|
||||
function roundUpToNearest15($time) {
|
||||
// Extract hours, minutes, and seconds from the time string
|
||||
list($hours, $minutes, $seconds) = explode(':', $time);
|
||||
|
||||
// Convert everything to seconds for easier calculation
|
||||
$totalSeconds = ($hours * 3600) + ($minutes * 60) + $seconds;
|
||||
|
||||
// Calculate the remainder when divided by 900 seconds (15 minutes)
|
||||
$remainder = $totalSeconds % 900;
|
||||
|
||||
// If there's any remainder, round up to the next 15 minutes
|
||||
if ($remainder > 0) {
|
||||
$totalSeconds += (900 - $remainder);
|
||||
}
|
||||
|
||||
// Convert total seconds to the decimal format
|
||||
$decimalHours = $totalSeconds / 3600;
|
||||
|
||||
// Return the formatted string
|
||||
return number_format($decimalHours, 2);
|
||||
}
|
||||
22
invoice.php
22
invoice.php
|
|
@ -259,7 +259,7 @@ if (isset($_GET['invoice_id'])) {
|
|||
<th class="d-print-none"></th>
|
||||
<th>Item</th>
|
||||
<th>Description</th>
|
||||
<th class="text-center">Qty</th>
|
||||
<th class="text-center">Quantity</th>
|
||||
<th class="text-right">Price</th>
|
||||
<th class="text-right">Tax</th>
|
||||
<th class="text-right">Total</th>
|
||||
|
|
@ -275,7 +275,7 @@ if (isset($_GET['invoice_id'])) {
|
|||
$item_id = intval($row['item_id']);
|
||||
$item_name = nullable_htmlentities($row['item_name']);
|
||||
$item_description = nullable_htmlentities($row['item_description']);
|
||||
$item_quantity = floatval($row['item_quantity']);
|
||||
$item_quantity = number_format(floatval($row['item_quantity']),2);
|
||||
$item_price = floatval($row['item_price']);
|
||||
$item_tax = floatval($row['item_tax']);
|
||||
$item_total = floatval($row['item_total']);
|
||||
|
|
@ -324,12 +324,20 @@ if (isset($_GET['invoice_id'])) {
|
|||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
|
||||
<td></td>
|
||||
<td><input type="text" class="form-control" id="name" name="name" placeholder="Item" required></td>
|
||||
<td><textarea class="form-control" rows="2" id="desc" name="description" placeholder="Description"></textarea></td>
|
||||
<td><input type="number" step="0.01" min="0" class="form-control" style="text-align: center;" id="qty" name="qty" placeholder="QTY"></td>
|
||||
<td><input type="number" step="0.01" class="form-control" style="text-align: right;" id="price" name="price" placeholder="Price (<?php echo $invoice_currency_code; ?>)"></td>
|
||||
<td>
|
||||
<select class="form-control" name="tax_id" required>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Item" required>
|
||||
</td>
|
||||
<td>
|
||||
<textarea class="form-control" rows="2" id="desc" name="description" placeholder="Enter a Description"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" class="form-control" style="text-align: center;" id="qty" name="qty" placeholder="Quantity">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="-?[0-9]*\.?[0-9]{0,2}" style="text-align: right;" id="price" name="price" placeholder="Price (<?php echo $invoice_currency_code; ?>)">
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control select2" name="tax_id" required>
|
||||
<option value="0">No Tax</option>
|
||||
<?php
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" min="0" name="amount" value="<?php echo $balance; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" value="<?php echo number_format($balance,2); ?>" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
<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">
|
||||
<input type="text" class="form-control" name="reference" placeholder="Check #, Trans #, etc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<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" value="<?php echo $item_name; ?>" required>
|
||||
<input type="text" class="form-control" name="name" value="<?php echo $item_name; ?>" placeholder="Enter item name" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -33,12 +33,12 @@
|
|||
<div class="col-sm">
|
||||
|
||||
<div class="form-group">
|
||||
<label>QTY <strong class="text-danger">*</strong></label>
|
||||
<label>Quantity <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-balance-scale"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" min="0" name="qty" value="<?php echo $item_quantity; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="qty" value="<?php echo number_format($item_quantity,2); ?>" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" name="price" value="<?php echo $item_price; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="-?[0-9]*\.?[0-9]{0,2}" name="price" value="<?php echo number_format($item_price,2); ?>" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<div class="input-group">
|
||||
<textarea class="form-control" rows="5" name="description"><?php echo $item_description; ?></textarea>
|
||||
<textarea class="form-control" rows="5" name="description" placeholder="Enter a description"><?php echo $item_description; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ if (isset($_POST['edit_profile'])) {
|
|||
if (isset($_POST['verify'])) {
|
||||
|
||||
require_once("rfc6238.php");
|
||||
$currentcode = sanitizeInput($_POST['code']); //code to validate, for example received from device
|
||||
$currentcode = intval($_POST['code']); //code to validate, for example received from device
|
||||
|
||||
if (TokenAuth6238::verify($session_token, $currentcode)) {
|
||||
$_SESSION['alert_message'] = "VALID!";
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" step="0.01" min="0" class="form-control" name="price" placeholder="Price" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="price" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" step="0.01" min="0" class="form-control" name="price" value="<?php echo $product_price; ?>" required>
|
||||
<input type="text" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" class="form-control" name="price" value="<?php echo $product_price; ?>" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
} else {
|
||||
$product_description_display = "<div style='white-space:pre-line'>$product_description</div>";
|
||||
}
|
||||
$product_price = floatval($row['product_price']);
|
||||
$product_price = number_format(floatval($row['product_price']),2);
|
||||
$product_currency_code = nullable_htmlentities($row['product_currency_code']);
|
||||
$product_created_at = nullable_htmlentities($row['product_created_at']);
|
||||
$category_id = intval($row['category_id']);
|
||||
|
|
|
|||
21
quote.php
21
quote.php
|
|
@ -251,7 +251,7 @@ if (isset($_GET['quote_id'])) {
|
|||
<th class="d-print-none"></th>
|
||||
<th>Item</th>
|
||||
<th>Description</th>
|
||||
<th class="text-center">Qty</th>
|
||||
<th class="text-center">Quantity</th>
|
||||
<th class="text-right">Price</th>
|
||||
<th class="text-right">Tax</th>
|
||||
<th class="text-right">Total</th>
|
||||
|
|
@ -267,7 +267,7 @@ if (isset($_GET['quote_id'])) {
|
|||
$item_id = intval($row['item_id']);
|
||||
$item_name = nullable_htmlentities($row['item_name']);
|
||||
$item_description = nullable_htmlentities($row['item_description']);
|
||||
$item_quantity = floatval($row['item_quantity']);
|
||||
$item_quantity = number_format(floatval($row['item_quantity']),2);
|
||||
$item_price = floatval($row['item_price']);
|
||||
$item_tax = floatval($row['item_tax']);
|
||||
$item_total = floatval($row['item_total']);
|
||||
|
|
@ -319,12 +319,19 @@ if (isset($_GET['quote_id'])) {
|
|||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="quote_id" value="<?php echo $quote_id; ?>">
|
||||
<td></td>
|
||||
<td><input type="text" class="form-control" name="name" id="name" placeholder="Item" required></td>
|
||||
<td><textarea class="form-control" rows="2" name="description" id="desc" placeholder="Description"></textarea></td>
|
||||
<td><input type="number" step="0.01" min="0" class="form-control" id="qty" style="text-align: center;" name="qty" placeholder="QTY"></td>
|
||||
<td><input type="number" step="0.01" class="form-control" id="price" style="text-align: right;" name="price" placeholder="Price (<?php echo $quote_currency_code; ?>)"></td>
|
||||
<td>
|
||||
<select class="form-control" id="tax" name="tax_id" required>
|
||||
<input type="text" class="form-control" name="name" id="name" placeholder="Item" required>
|
||||
</td>
|
||||
<td>
|
||||
<textarea class="form-control" rows="2" name="description" id="desc" placeholder="Enter a Description"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="-?[0-9]*\.?[0-9]{0,2}" id="qty" style="text-align: center;" name="qty" placeholder="Quantity">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="-?[0-9]*\.?[0-9]{0,2}" id="price" style="text-align: right;" name="price" placeholder="Price (<?php echo $quote_currency_code; ?>)"></td>
|
||||
<td>
|
||||
<select class="form-control select2" id="tax" name="tax_id" required>
|
||||
<option value="0">No Tax</option>
|
||||
<?php
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control " name="day" min="1" max="28" placeholder="Enter a day (1-28)" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="(1[0-9]|2[0-8]|[1-9])" name="day" placeholder="Enter a day (1-28)" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" name="amount" placeholder="Enter an amount" autofocus required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control " name="day" min="1" max="28" placeholder="Enter a day (1-28)" value="<?php echo $recurring_expense_day; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="(1[0-9]|2[0-8]|[1-9])" name="day" placeholder="Enter a day (1-28)" value="<?php echo $recurring_expense_day; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" name="amount" value="<?php echo $recurring_expense_amount; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" value="<?php echo number_format($recurring_expense_amount,2); ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ if (isset($_GET['recurring_id'])) {
|
|||
<th class="d-print-none"></th>
|
||||
<th>Item</th>
|
||||
<th>Description</th>
|
||||
<th class="text-center">Qty</th>
|
||||
<th class="text-center">Quantity</th>
|
||||
<th class="text-right">Price</th>
|
||||
<th class="text-right">Tax</th>
|
||||
<th class="text-right">Total</th>
|
||||
|
|
@ -207,7 +207,7 @@ if (isset($_GET['recurring_id'])) {
|
|||
$item_id = intval($row['item_id']);
|
||||
$item_name = nullable_htmlentities($row['item_name']);
|
||||
$item_description = nullable_htmlentities($row['item_description']);
|
||||
$item_quantity = floatval($row['item_quantity']);
|
||||
$item_quantity = number_format(floatval($row['item_quantity']),2);
|
||||
$item_price = floatval($row['item_price']);
|
||||
$item_tax = floatval($row['item_tax']);
|
||||
$item_total = floatval($row['item_total']);
|
||||
|
|
@ -251,10 +251,18 @@ if (isset($_GET['recurring_id'])) {
|
|||
<form action="post.php" method="post">
|
||||
<input type="hidden" name="recurring_id" value="<?php echo $recurring_id; ?>">
|
||||
<td></td>
|
||||
<td><input type="text" class="form-control" id="name" name="name" placeholder="Item" required></td>
|
||||
<td><textarea class="form-control" rows="1" id="desc" name="description" placeholder="Description"></textarea></td>
|
||||
<td><input type="number" step="0.01" min="0" class="form-control" style="text-align: center;" id="qty" name="qty" placeholder="QTY"></td>
|
||||
<td><input type="number" step="0.01" class="form-control" style="text-align: right;" id="price" name="price" placeholder="Price"></td>
|
||||
<td>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Item" required>
|
||||
</td>
|
||||
<td>
|
||||
<textarea class="form-control" rows="2" id="desc" name="description" placeholder="Enter a Description"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" class="form-control" style="text-align: center;" id="qty" name="qty" placeholder="Quantity">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" class="form-control" style="text-align: right;" id="price" name="price" placeholder="Price (<?php echo $recurring_currency_code; ?>)">
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" name="tax_id" required>
|
||||
<option value="0">No Tax</option>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" min="0.00" name="amount" placeholder="Enter an amount" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
<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">
|
||||
<input type="text" class="form-control" name="reference" placeholder="Check #, trans #, etc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" min="0.00" name="amount" value="<?php echo $revenue_amount; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" value="<?php echo $revenue_amount; ?>" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -163,7 +163,7 @@
|
|||
<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" value="<?php echo $revenue_reference; ?>">
|
||||
<input type="text" class="form-control" name="reference" placeholder="Check #, trans #, etc" value="<?php echo $revenue_reference; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
}
|
||||
$revenue_date = nullable_htmlentities($row['revenue_date']);
|
||||
$revenue_payment_method = nullable_htmlentities($row['revenue_payment_method']);
|
||||
$revenue_amount = floatval($row['revenue_amount']);
|
||||
$revenue_amount = number_format(floatval($row['revenue_amount']),2);
|
||||
$revenue_currency_code = nullable_htmlentities($row['revenue_currency_code']);
|
||||
$revenue_created_at = nullable_htmlentities($row['revenue_created_at']);
|
||||
$account_id = intval($row['account_id']);
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
<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="item_name" placeholder="Item" required>
|
||||
<input type="text" class="form-control" name="item_name" placeholder="Item" value="Support [Hourly]" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -141,7 +141,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-balance-scale"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" min="0" name="qty" value="1" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="-?[0-9]*\.?[0-9]{0,2}" name="qty" value="<?php echo roundUpToNearest15($ticket_total_reply_time); ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" min="0" name="price" value="<?php echo $client_rate; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="-?[0-9]*\.?[0-9]{0,2}" name="price" value="<?php echo number_format(roundUpToNearest15($ticket_total_reply_time) * $client_rate,2); ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" min="0" name="amount" placeholder="Amount to transfer" required autofocus>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" placeholder="0.00" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" step="0.01" min="0" name="amount" placeholder="Amount to transfer" value="<?php echo $transfer_amount; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,2}" name="amount" placeholder="0.00" value="<?php echo number_format($transfer_amount,2); ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-bicycle"></i></span>
|
||||
</div>
|
||||
<input type="number" step="0.1" min="0" class="form-control" name="miles" placeholder="Enter miles" required autofocus>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,1}" name="miles" placeholder="0.0" required autofocus>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<input type="checkbox" name="roundtrip" value="1">
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-bicycle"></i></span>
|
||||
</div>
|
||||
<input type="number" step="0.1" min="0" class="form-control" name="miles" value="<?php echo $trip_miles; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,1}" name="miles" value="<?php echo $trip_miles; ?>" placeholder="0.0" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<input type="checkbox" name="roundtrip" value="1" <?php if ($round_trip == 1) { echo "checked"; } ?>>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-bicycle"></i></span>
|
||||
</div>
|
||||
<input type="number" step="0.1" min="0" class="form-control" name="miles" value="<?php echo $trip_miles; ?>" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*\.?[0-9]{0,1}" name="miles" value="<?php echo $trip_miles; ?>" placeholder="0.0" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<input type="checkbox" name="roundtrip" value="1" <?php if ($round_trip == 1) { echo "checked"; } ?>>
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
$trip_purpose = nullable_htmlentities($row['trip_purpose']);
|
||||
$trip_source = nullable_htmlentities($row['trip_source']);
|
||||
$trip_destination = nullable_htmlentities($row['trip_destination']);
|
||||
$trip_miles = floatval($row['trip_miles']);
|
||||
$trip_miles = number_format(floatval($row['trip_miles']),1);
|
||||
$trip_user_id = intval($row['trip_user_id']);
|
||||
$trip_created_at = nullable_htmlentities($row['trip_created_at']);
|
||||
$trip_archived_at = nullable_htmlentities($row['trip_archived_at']);
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ $sql_recent_logs = mysqli_query($mysqli, "SELECT * FROM logs
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="code" placeholder="Verify 2FA Code" required>
|
||||
<input type="text" class="form-control" inputmode="numeric" pattern="[0-9]*" name="code" placeholder="Verify 2FA Code" required>
|
||||
<div class="input-group-append">
|
||||
<button type="submit" name="verify" class="btn btn-success">Verify</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue