Browse Source

Removes hardwired options in shop_log, preps for GnuCash CSV.

devel
Jonathan Rosenbaum 9 years ago
parent
commit
ab87744f46
  1. 4
      Connections/database_functions.php
  2. 4
      js/transaction.js
  3. 3
      shop_log.php

4
Connections/database_functions.php

@ -54,8 +54,8 @@ define("CSV_DIRECTORY","csv");
// Define array mapping for Accounts. Usually Asset Accounts since Income is generally the main type of transaction.
// Currently three types of accounts are supported: checking, credit, account_receivable
// checking/credit = transaction has been 1). paid and is 2) cash & check [checking] or a credit card [credit]
// account_receivable = there is an account receivable invoice and it has been paid
// checking/credit = transaction has been 1) paid and is 2) cash & check [checking] or a credit card [credit] and 3) deposited
// account_receivable = there is an 1). account receivable invoice and it has been 2) paid and 3) deposited
$gnucash_accounts = array( "Assets:Current Assets:Checking" => "checking",
"Assets:Current Assets:PayPal" => "credit",
"Assets:Account Receivable" => "account_receivable"

4
js/transaction.js

@ -147,6 +147,8 @@ $(function() {
}
});
// SELECT transaction_id, IF(amount > 0, "yes", "no") AS "deposited", date FROM transaction_log WHERE transaction_type= "Deposit";
// deposit range is based on year, but need to go back to past year if deposits included.
// gnucash deposit range slider
$('#gnucash_csv_range').noUiSlider({
start: [ 20, 30 ],
@ -155,6 +157,7 @@ $(function() {
'max': 40
}
});
// gnucash account multi-select
$("#gnucash_csv_accounts").chosen({
placeholder_text_multiple: "Select Accounts",
@ -163,6 +166,7 @@ $(function() {
$("[name='gnucash_csv_year']").chosen();
// null or real number
function payment_result(result) {
if (result == null) {

3
shop_log.php

@ -182,8 +182,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormEdit")) {
<td colspan="6"><table border="0" cellspacing="0" cellpadding="1">
<tbody><tr>
<td width="125"><div align="right">Project:</div></td>
<td><select name="project">
<option value="" selected="selected"></option>\n<option value="Bike Building">Bike Building</option>\n<option value="Computers">Computers</option>\n<option value="Inventory">Inventory</option>\n<option value="Organization">Organization</option>\n<option value="Website">Website</option>\n</select></td>
<td><?php list_projects_collective('project'); ?></td>
</tr>
<tr>
<td><div align="right">Comment:</div></td>

Loading…
Cancel
Save