Browse Source

Returns directory and filename for GnuCash csv

devel
Jonathan Rosenbaum 9 years ago
parent
commit
76ad12e4a3
  1. 4
      js/transaction.js
  2. 3
      json/transaction.php

4
js/transaction.js

@ -400,7 +400,9 @@ $(function() {
// send values for processing individual csv files for each selected account type // send values for processing individual csv files for each selected account type
if (gnucash_accounts) { if (gnucash_accounts) {
$.each(gnucash_accounts, function(k,v) { $.each(gnucash_accounts, function(k,v) {
$.post("json/transaction.php",{ gnucash_account_type: v, transaction_range: transaction_range}); $.post("json/transaction.php",{ gnucash_account_type: v, transaction_range: transaction_range}, function(data) {
});
}); });
} }
}); });

3
json/transaction.php

@ -233,6 +233,7 @@ $csv_directory = CSV_DIRECTORY;
fwrite($csv_file, $gnucash_csv_file); fwrite($csv_file, $gnucash_csv_file);
fclose($csv_file); fclose($csv_file);
echo $file;
// download file to browser // download file to browser
/* /*
header('Content-Description: File Transfer'); header('Content-Description: File Transfer');
@ -271,6 +272,8 @@ $csv_directory = CSV_DIRECTORY;
fwrite($csv_file, $gnucash_csv_file); fwrite($csv_file, $gnucash_csv_file);
fclose($csv_file); fclose($csv_file);
echo $file;
} }
} // Create csv file(s) for GnuCash } // Create csv file(s) for GnuCash

Loading…
Cancel
Save