mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-22 08:53:23 -05:00
Improvements to the transaction UI.
This commit is contained in:
parent
d2332719a0
commit
203708dad2
@ -30,7 +30,11 @@ function generate_list($querySQL,$list_value,$list_text, $form_name, $default_va
|
|||||||
$default_delimiter = '';
|
$default_delimiter = '';
|
||||||
|
|
||||||
// if a form name is supplied HTML listbox code is inserted
|
// if a form name is supplied HTML listbox code is inserted
|
||||||
if($form_name <> "none"){echo "<select name=\"$form_name\">";}
|
if($form_name == "transaction_type"){
|
||||||
|
echo "<select class=\"yb_standard\" name=\"$form_name\">";
|
||||||
|
} elseif($form_name <> "none"){
|
||||||
|
echo "<select name=\"$form_name\">";
|
||||||
|
}
|
||||||
|
|
||||||
echo "\n";
|
echo "\n";
|
||||||
do {
|
do {
|
||||||
|
@ -22,7 +22,9 @@ function resetTimer()
|
|||||||
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||||
<title>YBDB</title>
|
<title>YBDB</title>
|
||||||
<link href="css_yb_standard.css" rel="stylesheet" type="text/css" />
|
<link href="css/css_yb_standard.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="css/transactions.css" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
<script src="js/jquery-2.1.1.js"></script>
|
<script src="js/jquery-2.1.1.js"></script>
|
||||||
<script src="js/transaction.js"></script>
|
<script src="js/transaction.js"></script>
|
||||||
|
|
||||||
|
@ -17,4 +17,15 @@ $(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// make tabbing more predictable
|
||||||
|
$("input[name='shop_id']").attr("tabindex",1);
|
||||||
|
$("select[name='transaction_type']").attr("tabindex",2);
|
||||||
|
$("input[name='date']").attr("tabindex",3);
|
||||||
|
$("input[name='amount']").attr("tabindex",4)
|
||||||
|
$("input[name='quantity']").attr("tabindex",5)
|
||||||
|
$("textarea[name='description']").attr("tabindex",6)
|
||||||
|
$("select[name='sold_to']").attr("tabindex",8)
|
||||||
|
$("select[name='sold_by']").attr("tabindex",9)
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
@ -51,7 +51,12 @@ $editFormAction = $_SERVER['PHP_SELF'] . "?shop_date=$shop_date&shop_id=$shop_id
|
|||||||
$editFormAction_no_shopid = $_SERVER['PHP_SELF'] . "?shop_date=$shop_date";
|
$editFormAction_no_shopid = $_SERVER['PHP_SELF'] . "?shop_date=$shop_date";
|
||||||
|
|
||||||
mysql_select_db($database_YBDB, $YBDB);
|
mysql_select_db($database_YBDB, $YBDB);
|
||||||
$query_Recordset1 = "SELECT shops.shop_id, date, DAYNAME(date) as day ,shop_location, shop_type, ip_address, IF(date = curdate(),1,0) as CanEdit, COUNT(shop_visit_id) AS num_visitors, ROUND(SUM(HOUR(SUBTIME( TIME(time_out), TIME(time_in))) + MINUTE(SUBTIME( TIME(time_out), TIME(time_in)))/60)) AS total_hours FROM shops LEFT JOIN shop_hours ON shops.shop_id = shop_hours.shop_id WHERE date <= '{$shop_date}' {$shop_dayname} GROUP BY shop_id ORDER BY date DESC , shop_id DESC LIMIT 0, $record_count;";
|
$query_Recordset1 = "SELECT shops.shop_id, date, DAYNAME(date) as day ,shop_location, shop_type, ip_address, IF(date = curdate(),1,0)
|
||||||
|
AS CanEdit, COUNT(shop_visit_id) AS num_visitors, ROUND(SUM(HOUR(SUBTIME( TIME(time_out), TIME(time_in)))
|
||||||
|
+ MINUTE(SUBTIME( TIME(time_out), TIME(time_in)))/60)) AS total_hours
|
||||||
|
FROM shops LEFT JOIN shop_hours ON shops.shop_id = shop_hours.shop_id
|
||||||
|
WHERE date <= '{$shop_date}' {$shop_dayname} GROUP BY shop_id
|
||||||
|
ORDER BY date DESC , shop_id DESC LIMIT 0, $record_count;";
|
||||||
$Recordset1 = mysql_query($query_Recordset1, $YBDB) or die(mysql_error());
|
$Recordset1 = mysql_query($query_Recordset1, $YBDB) or die(mysql_error());
|
||||||
//$row_Recordset1 = mysql_fetch_assoc($Recordset1); //Wait to fetch until do loop
|
//$row_Recordset1 = mysql_fetch_assoc($Recordset1); //Wait to fetch until do loop
|
||||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
|
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
|
||||||
|
@ -197,11 +197,13 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
|
|||||||
|
|
||||||
<?php include("include_header.html"); ?>
|
<?php include("include_header.html"); ?>
|
||||||
|
|
||||||
<input type="hidden" name="cancel_return" value="http://ybdb.austinyellowbike.org/transaction_log.php?error=transactioncanceled" />
|
<input type="hidden" name="cancel_return" value="http://positivespin.org/ybdb/transaction_log.php?error=transactioncanceled" />
|
||||||
<table border="0" cellpadding="1" cellspacing="0">
|
<table border="0" cellpadding="1" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" valign="bottom"><?php echo $error_message ?> </td>
|
<td align="left" valign="bottom"><?php echo $error_message ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<!-- All elements of edit transaction contained in this row -->
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<table border="1" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC">
|
<table border="1" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC">
|
||||||
@ -248,35 +250,39 @@ FROM transaction_log WHERE transaction_id = $trans_id; ";
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<!-- The actual row for edit transactions -->
|
||||||
<tr bgcolor="#CCCC33">
|
<tr bgcolor="#CCCC33">
|
||||||
|
|
||||||
|
<!-- the column for the edit transactions form -->
|
||||||
<td colspan="7">
|
<td colspan="7">
|
||||||
<form method="post" name="FormEdit" action="<?php echo $editFormAction; ?>">
|
<form method="post" name="FormEdit" action="<?php echo $editFormAction; ?>">
|
||||||
<table border="0" cellspacing="0" cellpadding="1">
|
<table border="0" cellspacing="0" cellpadding="1">
|
||||||
<tr>
|
|
||||||
<td colspan="3"><strong>Edit Transaction:
|
<td></td><td></td>
|
||||||
<input type="submit" name="EditSubmit" value="Save" >
|
<td>
|
||||||
<input type="submit" name="EditSubmit" value="Close" >
|
<input type="submit" name="EditSubmit" value="Save" align="right">
|
||||||
<input type="submit" name="EditSubmit" value="Delete" >
|
<input type="submit" name="EditSubmit" value="Close">
|
||||||
</strong> Save before using paypal ->></td>
|
<input type="submit" name="EditSubmit" value="Delete">
|
||||||
|
<!-- Save before using paypal ->> -->
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr><td width="10"> </td>
|
<tr><td> </td>
|
||||||
<td width="130">Transaction ID: </td>
|
<td><label>Transaction ID:</label></td>
|
||||||
<td><?php echo $row_Recordset2['transaction_id']; ?><em><?php echo $row_Recordset3['message_transaction_id']; ?></em></em></td>
|
<td><?php echo $row_Recordset2['transaction_id']; ?><em><?php echo $row_Recordset3['message_transaction_id']; ?></em></em></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td width="10"> </td>
|
<tr><td> </td>
|
||||||
<td width="130">ShopID: </td>
|
<td><label>ShopID:</label> </td>
|
||||||
<td><input name="shop_id" type="text" id="amount" value="<?php echo $row_Recordset2['shop_id']; ?>" size="6" /></td>
|
<td><input name="shop_id" type="text" id="amount" value="<?php echo $row_Recordset2['shop_id']; ?>" size="6" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php ?>
|
<?php ?>
|
||||||
<tr><td> </td><td>Select Type:</td>
|
<tr><td> </td><td><label>Select Type:</label></td>
|
||||||
<td><?php list_transaction_types('transaction_type',$row_Recordset2['transaction_type'] ); ?></td>
|
<td><?php list_transaction_types('transaction_type',$row_Recordset2['transaction_type'] ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php //date_startstorage ==============================================================
|
<?php //date_startstorage ==============================================================
|
||||||
if($row_Recordset3['show_startdate']){?>
|
if($row_Recordset3['show_startdate']){?>
|
||||||
<tr><td> </td>
|
<tr><td> </td>
|
||||||
<td>Storage Start Date:</td>
|
<td><label>Storage Start Date:</label></td>
|
||||||
<td><input name="date_startstorage" type="text" id="date_startstorage" value="<?php
|
<td><input name="date_startstorage" type="text" id="date_startstorage" value="<?php
|
||||||
echo $row_Recordset2['date_startstorage_day']; ?>" size="10" maxlength="10" />
|
echo $row_Recordset2['date_startstorage_day']; ?>" size="10" maxlength="10" />
|
||||||
<em>YYYY-MM-DD</em></td>
|
<em>YYYY-MM-DD</em></td>
|
||||||
@ -284,7 +290,7 @@ FROM transaction_log WHERE transaction_id = $trans_id; ";
|
|||||||
<?php } //end if storage | start of date ================================================
|
<?php } //end if storage | start of date ================================================
|
||||||
?>
|
?>
|
||||||
<tr><td> </td>
|
<tr><td> </td>
|
||||||
<td><?php echo $row_Recordset3['fieldname_date']; ?>:</td>
|
<td><label><?php echo $row_Recordset3['fieldname_date']; ?>:</label></td>
|
||||||
<td><input name="date" type="text" id="date" value="<?php echo $row_Recordset2['date_day']; ?>" size="10" maxlength="10" />
|
<td><input name="date" type="text" id="date" value="<?php echo $row_Recordset2['date_day']; ?>" size="10" maxlength="10" />
|
||||||
<em>YYYY-MM-DD
|
<em>YYYY-MM-DD
|
||||||
<SCRIPT>
|
<SCRIPT>
|
||||||
@ -299,26 +305,35 @@ FROM transaction_log WHERE transaction_id = $trans_id; ";
|
|||||||
</tr>
|
</tr>
|
||||||
<?php if($row_Recordset3['show_amount']){ ?>
|
<?php if($row_Recordset3['show_amount']){ ?>
|
||||||
<tr><td> </td>
|
<tr><td> </td>
|
||||||
<td>Amount:</td>
|
<td><label>Price:</label></td>
|
||||||
<td>$ <input name="amount" type="text" id="amount" value="<?php echo $row_Recordset2['format_amount']; ?>" size="6" /></td>
|
<td><input name="amount" type="text" id="amount" value="<?php echo $row_Recordset2['format_amount']; ?>" size="6" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } // end if show amount
|
<?php } // end if show amount
|
||||||
if($row_Recordset3['community_bike']){ //community bike will allow a quantity to be selected for Yellow Bikes and Kids Bikes?>
|
if($row_Recordset3['community_bike']){ //community bike will allow a quantity to be selected for Yellow Bikes and Kids Bikes?>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td valign="top">Quantity:</td>
|
<td valign="top"><label>Quantity:</label></td>
|
||||||
<td><input name="quantity" type="text" id="quantity" value="<?php echo $row_Recordset2['quantity']; ?>" size="3" maxlength="3" /></td>
|
<td><input name="quantity" type="text" id="quantity" value="<?php echo $row_Recordset2['quantity']; ?>" size="3" maxlength="3" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } // end if show quanitiy for community bikes
|
<?php } // end if show quanitiy for community bikes
|
||||||
if($row_Recordset3['show_description']){ ?>
|
if($row_Recordset3['show_description']){ ?>
|
||||||
<tr><td> </td>
|
<tr><td> </td>
|
||||||
<td valign="top"><?php echo $row_Recordset3['fieldname_description']; ?>:</td>
|
<td valign="top"><label><?php echo $row_Recordset3['fieldname_description']; ?>:</label></td>
|
||||||
<td><textarea name="description" cols="45" rows="2"><?php echo $row_Recordset2['description']; ?></textarea></td>
|
<td><textarea name="description" cols="45" rows="2"><?php echo $row_Recordset2['description']; ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td><label>Payment Type:</label></td>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="payment_type" value="cash">Cash
|
||||||
|
<input type="radio" name="payment_type" value="credit">Credit Card
|
||||||
|
<input type="radio" name="payment_type" value="check">Check
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<?php } // end if show_description
|
<?php } // end if show_description
|
||||||
if($row_Recordset3['show_soldto_location']){ // if location show row?>
|
if($row_Recordset3['show_soldto_location']){ // if location show row?>
|
||||||
<tr><td> </td>
|
<tr><td> </td>
|
||||||
<td><?php echo $row_Recordset3['fieldname_soldto']; ?>:</td>
|
<td><label><?php echo $row_Recordset3['fieldname_soldto']; ?>:</label></td>
|
||||||
<td><?php
|
<td><?php
|
||||||
if($row_Recordset3['show_soldto_location']){
|
if($row_Recordset3['show_soldto_location']){
|
||||||
list_donation_locations_withheader('sold_to', $row_Recordset2['sold_to']);
|
list_donation_locations_withheader('sold_to', $row_Recordset2['sold_to']);
|
||||||
@ -329,7 +344,7 @@ FROM transaction_log WHERE transaction_id = $trans_id; ";
|
|||||||
} ?></td>
|
} ?></td>
|
||||||
</tr> <?php } //end if show location row ?>
|
</tr> <?php } //end if show location row ?>
|
||||||
<tr><td> </td>
|
<tr><td> </td>
|
||||||
<td><?php echo $row_Recordset3['fieldname_soldby']; ?>:</td>
|
<td><label><?php echo $row_Recordset3['fieldname_soldby']; ?>:</label></td>
|
||||||
<td><?php if(current_shop_by_ip()>0) list_current_coordinators_select('sold_by', $row_Recordset2['sold_by']); else list_contacts_coordinators('sold_by', $row_Recordset2['sold_by']);
|
<td><?php if(current_shop_by_ip()>0) list_current_coordinators_select('sold_by', $row_Recordset2['sold_by']); else list_contacts_coordinators('sold_by', $row_Recordset2['sold_by']);
|
||||||
//list_contacts_coordinators('sold_by', $row_Recordset2['sold_by']);
|
//list_contacts_coordinators('sold_by', $row_Recordset2['sold_by']);
|
||||||
//list_current_coordinators_select('sold_by', $row_Recordset2['sold_by']);
|
//list_current_coordinators_select('sold_by', $row_Recordset2['sold_by']);
|
||||||
@ -342,6 +357,8 @@ FROM transaction_log WHERE transaction_id = $trans_id; ";
|
|||||||
<input type="hidden" name="db_date_startstorage" value="<?php echo $row_Recordset2['date_startstorage']; ?>">
|
<input type="hidden" name="db_date_startstorage" value="<?php echo $row_Recordset2['date_startstorage']; ?>">
|
||||||
<input type="hidden" name="db_date" value="<?php echo $row_Recordset2['date']; ?>">
|
<input type="hidden" name="db_date" value="<?php echo $row_Recordset2['date']; ?>">
|
||||||
</form></td>
|
</form></td>
|
||||||
|
|
||||||
|
<!-- PayPal column for edit transactions -->
|
||||||
<td colspan="1" align="right" valign="top">
|
<td colspan="1" align="right" valign="top">
|
||||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||||
<input type="hidden" name="cmd" value="_xclick" />
|
<input type="hidden" name="cmd" value="_xclick" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user