mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-22 17:03:22 -05:00
Removes a bug where Payment Type label became hidden.
1). Relates an on load selector with hide() that has been preempted by the new error validation. But will watch to make sure new bugs haven't been introduced.
This commit is contained in:
parent
b01649d369
commit
2175ab18e4
@ -85,7 +85,7 @@ $(function() {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
// paid or not?
|
// paid or not?
|
||||||
$(":checked").parent("td").prev().children().hide();
|
//$(":checked").parent("td").prev().children().hide(); // with validation testing this seems to be unnecessary
|
||||||
$(".paid").click(function() {
|
$(".paid").click(function() {
|
||||||
|
|
||||||
if (open_shop == "no_shop") { return false; }
|
if (open_shop == "no_shop") { return false; }
|
||||||
@ -453,7 +453,7 @@ $(function() {
|
|||||||
var transaction_id = $("input[name='transaction_id']").val();
|
var transaction_id = $("input[name='transaction_id']").val();
|
||||||
var sold_to = $("[name='sold_to']");
|
var sold_to = $("[name='sold_to']");
|
||||||
var sold_by = $("[name='sold_by']");
|
var sold_by = $("[name='sold_by']");
|
||||||
var payment_type = $("input[name='payment_type']");
|
//var payment_type = $("input[name='payment_type']");
|
||||||
var amount = $("#amount");
|
var amount = $("#amount");
|
||||||
var description = $("#description");
|
var description = $("#description");
|
||||||
var quantity = $("#quantity");
|
var quantity = $("#quantity");
|
||||||
@ -497,7 +497,8 @@ $(function() {
|
|||||||
// sold_by error
|
// sold_by error
|
||||||
err2 = error_handler(sold_by.val(), sold_by_error, "no_selection", "*Required",e);
|
err2 = error_handler(sold_by.val(), sold_by_error, "no_selection", "*Required",e);
|
||||||
|
|
||||||
// for storage transactions don't check for payment_type and payment until there is an actual date
|
// for storage transactions don't check for payment_type and payment until there is an actual date
|
||||||
|
var payment_type = $("input[name='payment_type']"); // payment_type variable needs to be kept within scope
|
||||||
var payment_type_result;
|
var payment_type_result;
|
||||||
if ( date.val() != "0000-00-00" && date.val() != "") {
|
if ( date.val() != "0000-00-00" && date.val() != "") {
|
||||||
|
|
||||||
@ -548,7 +549,7 @@ $(function() {
|
|||||||
transaction_error.text("Correct errors below");
|
transaction_error.text("Correct errors below");
|
||||||
} else {
|
} else {
|
||||||
transaction_error.hide();
|
transaction_error.hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// error handler for edited transactions
|
// error handler for edited transactions
|
||||||
@ -601,7 +602,7 @@ $(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// what type of payment? cash, credit or check?
|
// what type of payment? cash, credit or check?
|
||||||
payment_type.click(function() {
|
$("input[name='payment_type']").click(function() {
|
||||||
if ($(this).prop("checked")) {
|
if ($(this).prop("checked")) {
|
||||||
$.post("json/transaction.php",{ payment_type: this.value, transaction_id: $("input[name='transaction_id']").val() } );
|
$.post("json/transaction.php",{ payment_type: this.value, transaction_id: $("input[name='transaction_id']").val() } );
|
||||||
|
|
||||||
|
@ -476,7 +476,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
|
|||||||
<?php if($row_Recordset3['show_payment']) { ?>
|
<?php if($row_Recordset3['show_payment']) { ?>
|
||||||
<tr id="payment_type">
|
<tr id="payment_type">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>Payment Type:</label></td>
|
<td><label for="payment_type" id="payment_type_label">Payment Type:</label></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" name="payment_type" value="cash"
|
<input type="radio" name="payment_type" value="cash"
|
||||||
<?php if ($row_Recordset2['payment_type'] == "cash") { echo " checked"; } ?> >
|
<?php if ($row_Recordset2['payment_type'] == "cash") { echo " checked"; } ?> >
|
||||||
|
Loading…
x
Reference in New Issue
Block a user