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

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

This commit is contained in:
Jonathan Rosenbaum 2015-01-21 21:47:16 +00:00
parent 69cc2241d2
commit 04c2574c99
2 changed files with 11 additions and 8 deletions

View File

@ -52,10 +52,13 @@ define("CSV_DIRECTORY","csv");
// chown www-data:www-data csv // chown www-data:www-data csv
// chmod 0700 csv // chmod 0700 csv
// Define array mapping for Accounts. Usually Assets since Income is the main type of transaction. // Define array mapping for Accounts. Usually Asset Accounts since Income is generally the main type of transaction.
$gnucash_accounts = array( "Assets:Current Assets:Checking", // Currently three types of accounts are supported: checking, credit, account_receivable
"Assets:Current Assets:PayPal", // checking/credit = transaction has been 1). paid and is 2) cash & check [checking] or a credit card [credit]
"Assets:Account Receivable" // 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 // other constants

View File

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