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

Fixes a bug where storage transactions don't show up in searches if NULL.

1.  Also adds a configuration for a directory to write/download csv files from.
2.  Including directions for the above.
This commit is contained in:
Jonathan Rosenbaum 2015-01-13 05:56:03 +00:00
parent bf2527e1cf
commit e168381a05
3 changed files with 21 additions and 3 deletions

View File

@ -39,10 +39,20 @@ define("TIMEZONE", "America/New_York");
*/ */
define("NONSHOP",0); define("NONSHOP",0);
// How many transactions do you want shown // How many transactions do you want shown by default
define("NUMBER_OF_TRANSACTIONS", 11); define("NUMBER_OF_TRANSACTIONS", 11);
// Define csv directory (see directions below for creating it)
define("CSV_DIRECTORY","csv");
// Make a directory to store csv accounting files. Currently used for GnuCash format.
// Assuming the root of the website, and directory is called csv, and a Debian-based distribution:
// mkdir csv
// chown www-data:www-data csv
// chmod 0700 csv
//constants // other constants
define("PAGE_START_SHOP", "/start_shop.php"); define("PAGE_START_SHOP", "/start_shop.php");
define("PAGE_SHOP_LOG", "/shop_log.php"); define("PAGE_SHOP_LOG", "/shop_log.php");
define("PAGE_EDIT_CONTACT", "/contact_add_edit.php"); define("PAGE_EDIT_CONTACT", "/contact_add_edit.php");

View File

@ -266,6 +266,14 @@ $(function() {
} }
}); });
// If storage date is NULL, update to 0000-00-00 on save
$("#save_transaction").click(function() {
if ( !$("#date").val().length ) {
$("#date").val("0000-00-00");
}
});
} // end testing for storage presentation } // end testing for storage presentation

View File

@ -352,7 +352,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
<td></td><td></td> <td></td><td></td>
<td> <td>
<input type="submit" name="EditSubmit" value="Save" align="right"> <input id="save_transaction" type="submit" name="EditSubmit" value="Save" align="right">
<input type="submit" name="EditSubmit" value="Close"> <input type="submit" name="EditSubmit" value="Close">
<input type="submit" name="EditSubmit" value="Delete"> <input type="submit" name="EditSubmit" value="Delete">
<!-- Save before using paypal ->> --> <!-- Save before using paypal ->> -->