Fix editing payment amount not accepting different number of cents than initial value
This commit is contained in:
parent
6ff37d1350
commit
a8440792a3
@ -96,6 +96,7 @@ if (!empty($_GET['id']) && $database->has('payments', ['paymentid' => $_GET['id'
|
|||||||
"name" => "amount",
|
"name" => "amount",
|
||||||
"type" => "number",
|
"type" => "number",
|
||||||
"maxlength" => 5,
|
"maxlength" => 5,
|
||||||
|
"step" => "0.01",
|
||||||
"value" => $data["amount"],
|
"value" => $data["amount"],
|
||||||
"width" => 2,
|
"width" => 2,
|
||||||
"error" => "Enter a dollar amount."
|
"error" => "Enter a dollar amount."
|
||||||
@ -106,6 +107,7 @@ if (!empty($_GET['id']) && $database->has('payments', ['paymentid' => $_GET['id'
|
|||||||
"name" => "amountpaid",
|
"name" => "amountpaid",
|
||||||
"type" => "number",
|
"type" => "number",
|
||||||
"maxlength" => 5,
|
"maxlength" => 5,
|
||||||
|
"step" => "0.01",
|
||||||
"value" => $data["amountpaid"],
|
"value" => $data["amountpaid"],
|
||||||
"width" => 2,
|
"width" => 2,
|
||||||
"error" => "Enter a dollar amount."
|
"error" => "Enter a dollar amount."
|
||||||
@ -165,6 +167,13 @@ if (!empty($_GET['id']) && $database->has('payments', ['paymentid' => $_GET['id'
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
|
if (!empty($item['step'])) {
|
||||||
|
?>
|
||||||
|
step="<?php echo htmlspecialchars($item['step']); ?>"
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
if (!empty($item['value'])) {
|
if (!empty($item['value'])) {
|
||||||
?>
|
?>
|
||||||
value="<?php echo htmlspecialchars($item['value']); ?>"
|
value="<?php echo htmlspecialchars($item['value']); ?>"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user