Browse Source

Removed rest of PHP SELFs, mapped account to values in conf.

devel
Jonathan Rosenbaum 9 years ago
parent
commit
04c2574c99
  1. 11
      Connections/database_functions.php
  2. 8
      transaction_log.php

11
Connections/database_functions.php

@ -52,10 +52,13 @@ define("CSV_DIRECTORY","csv");
// chown www-data:www-data csv
// chmod 0700 csv
// Define array mapping for Accounts. Usually Assets since Income is the main type of transaction.
$gnucash_accounts = array( "Assets:Current Assets:Checking",
"Assets:Current Assets:PayPal",
"Assets:Account Receivable"
// 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
$gnucash_accounts = array( "Assets:Current Assets:Checking" => "checking",
"Assets:Current Assets:PayPal" => "credit",
"Assets:Account Receivable" => "account_receivable"
);
// other constants

8
transaction_log.php

@ -153,7 +153,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormNew")) {
exit();
}
$LoadPage = $_SERVER['PHP_SELF'] . "?trans_id={$newtrans}";
$LoadPage = "?trans_id={$newtrans}";
header(sprintf("Location: %s", $LoadPage));
} // end Form Submit New Transaction
@ -584,9 +584,9 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
}
if (isset($trans_url)) {
echo "<a href=\"{$_SERVER['PHP_SELF']}?trans_id={$record_trans_id}$trans_url\">edit</a></td>";
echo "<a href=\"?trans_id={$record_trans_id}$trans_url\">edit</a></td>";
} else {
echo "<a href=\"{$_SERVER['PHP_SELF']}?trans_id={$record_trans_id}\">edit</a></td>";
echo "<a href=\"?trans_id={$record_trans_id}\">edit</a></td>";
}
$trans_url = "";
?>
@ -725,7 +725,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
echo "<select id='gnucash_csv_accounts' class='yb_standard' multiple>";
foreach ( $gnucash_accounts as $key => $value ) {
echo "<option value='$value'>$value</option>";
echo "<option value='$value'>$key</option>";
}
echo "</select>";

Loading…
Cancel
Save