1
0
mirror of https://github.com/fspc/Yellow-Bike-Database.git synced 2025-02-22 17:03:22 -05:00

If Patron isn't logged in but sold_to will validate correctly.

This commit is contained in:
Jonathan Rosenbaum 2015-01-27 22:08:02 +00:00
parent caedba99cc
commit c813ea5eec

View File

@ -484,17 +484,18 @@ $(function() {
var err1 = 0, err2 = 0, err3 = 0, err4 = 0, err5 = 0, err6 = 0, err7 = 0, err8 = 0;
// sold_to error
if ( !$("#anonymous").prop("checked") ) {
err1 = error_handler(sold_to.val(), sold_to_error, "no_selection", "*Required   ",e);
} else if ( $("#anonymous").prop("checked") ) {
sold_to_error.hide();
}
if ( !$("[name='sold_to']").is("span") ) { // Patron already performed transaction and isn't logged in
if ( !$("#anonymous").prop("checked") ) {
err1 = error_handler(sold_to.val(), sold_to_error, "no_selection", "*Required   ",e);
} else if ( $("#anonymous").prop("checked") ) {
sold_to_error.hide();
}
}
// sold_by error
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
console.log("Date: " + date.val());
// for storage transactions don't check for payment_type and payment until there is an actual date
var payment_type_result;
if ( date.val() != "0000-00-00" && date.val() != "") {