mirror of
https://github.com/itflow-org/itflow
synced 2026-07-23 00:40:45 +00:00
Replace Function roundToNearest15() with roundToNearest15Min()
This commit is contained in:
@@ -272,7 +272,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 roundToNearest15($ticket_total_reply_time); ?>" required>
|
||||
<input type="text" class="form-control" inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name="qty" value="<?php echo roundToNearest15Min($ticket_total_reply_time); ?>" required>
|
||||
</div>
|
||||
<small class="form-text text-muted">
|
||||
Based off Ticket time spent <strong><?= $ticket_total_reply_time ?></strong> in 15 Min Increments rounded up.
|
||||
|
||||
@@ -278,7 +278,7 @@ function roundUpToNearestMultiple($n, $increment = 1000)
|
||||
return (int) ($increment * ceil($n / $increment));
|
||||
}
|
||||
|
||||
function roundToNearest15($time)
|
||||
function roundToNearest15Min($time)
|
||||
{
|
||||
// Validate the input time format
|
||||
if (!preg_match('/^(\d{2}):(\d{2}):(\d{2})$/', $time, $matches)) {
|
||||
|
||||
Reference in New Issue
Block a user