Browse Source

Closes #67.

devel
Jonathan Rosenbaum 7 years ago
parent
commit
46be9fa887
  1. 5
      js/transaction.js
  2. 11
      transaction_log.php

5
js/transaction.js

@ -1515,11 +1515,14 @@ $(function() {
} }
} }
// Assuming local time is correct and synchronized with mysql time d.toLocaleDateString().replace(/\//g,'-')
var current_date_time = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " " + d.toLocaleTimeString().split(' ')[0];
var current_transaction = var current_transaction =
{ {
transaction_id: transaction_id, transaction_id: transaction_id,
date_startstorage: $("#date_startstorage").val(), date_startstorage: $("#date_startstorage").val(),
date: date, date: current_date_time,
transaction_type: $("#transaction_type").val(), transaction_type: $("#transaction_type").val(),
original_price: original_price, original_price: original_price,
amount: price, amount: price,

11
transaction_log.php

@ -699,13 +699,15 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
$sql = mysql_query($query, $YBDB) or die(mysql_error()); $sql = mysql_query($query, $YBDB) or die(mysql_error());
$result = mysql_fetch_assoc($sql); $result = mysql_fetch_assoc($sql);
if ( $history[$key]->original_price ) { if ( $history[$key]->original_price ) {
$title = "Sold By: " . $result['full_name']. "\r\n" . $title = "Date: " . $history[$key]->date. "\r\n" .
"Sold By: " . $result['full_name']. "\r\n" .
"Original Price: " . $history[$key]->original_price . "\r\n" . "Original Price: " . $history[$key]->original_price . "\r\n" .
"Paid: " . $history[$key]->amount . "\r\n" . "Paid: " . $history[$key]->amount . "\r\n" .
"Redeemed Hours: " . floatval($history[$key]->redeemed_hours); "Redeemed Hours: " . floatval($history[$key]->redeemed_hours);
echo "title='" . $title . "'"; echo "title='" . $title . "'";
} else { } else {
$title = "Transaction Performed By: " . $result['full_name']; $title = "Date: " . $history[$key]->date. "\r\n" .
"Transaction Performed By: " . $result['full_name'];
echo "title='" . $title . "'"; echo "title='" . $title . "'";
} }
} }
@ -874,11 +876,12 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
echo "<td td style='vertical-align:inherit;'><input id='gnucash_csv_submit' type='submit' name='Submit' /></td></tr></table></form>"; echo "<td td style='vertical-align:inherit;'><input id='gnucash_csv_submit' type='submit' name='Submit' /></td></tr></table></form>";
?> ?>
</td> </td>
</tr> </tr>
</table> </table>
<p>&nbsp;</p>
<?php include("include_footer.html"); ?> <?php include("include_footer.html"); ?>
<?php <?php
mysql_free_result($Recordset1); mysql_free_result($Recordset1);
?> ?>
Loading…
Cancel
Save