Browse Source

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.
devel
Jonathan Rosenbaum 10 years ago
parent
commit
e168381a05
  1. 14
      Connections/database_functions.php
  2. 8
      js/transaction.js
  3. 2
      transaction_log.php

14
Connections/database_functions.php

@ -39,10 +39,20 @@ define("TIMEZONE", "America/New_York");
*/
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 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_SHOP_LOG", "/shop_log.php");
define("PAGE_EDIT_CONTACT", "/contact_add_edit.php");

8
js/transaction.js

@ -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

2
transaction_log.php

@ -352,7 +352,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
<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="Delete">
<!-- Save before using paypal ->> -->

Loading…
Cancel
Save