From 796c1f6ebbf4c8e7128d90704a4e412abf17e846 Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Sat, 20 Dec 2014 02:27:44 +0000 Subject: [PATCH] A few changes before implementing jquery, and move sql to sql dir. --- .../MySQL_Structure.sql | 0 transaction_log.php | 24 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) rename MySQL_Structure.sql => sql/MySQL_Structure.sql (100%) diff --git a/MySQL_Structure.sql b/sql/MySQL_Structure.sql similarity index 100% rename from MySQL_Structure.sql rename to sql/MySQL_Structure.sql diff --git a/transaction_log.php b/transaction_log.php index 8ccf5f3..524e90e 100644 --- a/transaction_log.php +++ b/transaction_log.php @@ -5,7 +5,6 @@ require_once('Connections/database_functions.php'); $page_edit_contact = PAGE_EDIT_CONTACT; $page_individual_history_log = INDIVIDUAL_HISTORY_LOG; - //transaction ID if($_GET['trans_id']>0){ $trans_id = $_GET['trans_id']; @@ -87,6 +86,7 @@ $editFormAction = $_SERVER['PHP_SELF']; //Form Submit New Transaction=================================================================== if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormNew")) { + $trans_type = $_POST['transaction_type']; $shop_id = current_shop_by_ip(); @@ -131,13 +131,15 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormNew")) { } // end Form Submit New Transaction //Form Edit Record =============================================================================== -if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormEdit") && ($_POST["EditSubmit"] == "Update")) { - +if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormEdit") && ($_POST["EditSubmit"] == "Submit")) { + + //Error Correction $sold_to = (($_POST['sold_to'] == 'no_selection') ? 1268 : $_POST['sold_to'] ); $sold_by = (($_POST['sold_by'] == 'no_selection') ? 1268 : $_POST['sold_by'] ); $date_startstorage = date_update_wo_timestamp($_POST['date_startstorage'], $_POST['db_date_startstorage']); $date = date_update_wo_timestamp($_POST['date'], $_POST['db_date']); + $description = (($_POST['description'] == "") ? "No Description" : $_POST['description'] ); $updateSQL = sprintf("UPDATE transaction_log SET transaction_type=%s, date_startstorage=%s, date=%s, amount=%s, quantity=%s, description=%s, sold_to=%s, sold_by=%s, shop_id=%s WHERE transaction_id=%s", GetSQLValueString($_POST['transaction_type'], "text"), @@ -145,13 +147,14 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormEdit") && ($_PO GetSQLValueString($date, "date"), GetSQLValueString($_POST['amount'], "double"), GetSQLValueString($_POST['quantity'], "int"), - GetSQLValueString($_POST['description'], "text"), + GetSQLValueString($description, "text"), GetSQLValueString($sold_to, "int"), GetSQLValueString($sold_by, "int"), GetSQLValueString($_POST['shop_id'], "int"), GetSQLValueString($_POST['transaction_id'], "int")); //"2006-10-12 18:15:00" + mysql_select_db($database_YBDB, $YBDB); $Result1 = mysql_query($updateSQL, $YBDB) or die(mysql_error()); @@ -250,10 +253,10 @@ FROM transaction_log WHERE transaction_id = $trans_id; "; + Submit before using paypal ->> @@ -356,12 +359,12 @@ FROM transaction_log WHERE transaction_id = $trans_id; "; - - @@ -376,8 +379,9 @@ FROM transaction_log WHERE transaction_id = $trans_id; "; - + + @@ -389,7 +393,7 @@ FROM transaction_log WHERE transaction_id = $trans_id; "; - +
Edit Transaction: - + - Update before using paypal ->>
 

Start New Transaction:
    Select Type: +

Start New Transaction:
    Select Type:

Description Patron Edit SoldPaid
  edit"; ?>