From ecea902d50f75fa830bcbb8e89f75423798604a0 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 20 Oct 2026 17:31:06 -0700 Subject: [PATCH] base_school_num changes --- ppPayment.php | 10 +++++----- supplier_orders.post.php | 21 +++++++++++++++------ user_account.form.php | 6 +++--- user_account.payment.detail.report.php | 6 +++--- user_account.php | 2 +- user_account.report.php | 6 +++--- view_docs.php | 2 +- welcome.php | 2 +- 8 files changed, 32 insertions(+), 23 deletions(-) diff --git a/ppPayment.php b/ppPayment.php index 473db21..4fa3e5f 100644 --- a/ppPayment.php +++ b/ppPayment.php @@ -842,7 +842,7 @@ } // Update users record to indicate that there are pending transactions - $query = "update users set trx_status = 'Pending' where school_num = $p_school_num and record_num = $p_user_num"; + $query = "update users set trx_status = 'Pending' where record_num = $p_user_num"; pp_query($query); echo("Pending Payment Status: $P_payment_status\n"); exit(); @@ -876,7 +876,7 @@ } // Update users record to clear the pending status - $query = "update users set trx_status = '' where school_num = $p_school_num and record_num = $p_user_num"; + $query = "update users set trx_status = '' where record_num = $p_user_num"; pp_query($query); echo("Failed Payment Status: $P_payment_status\n"); exit(); @@ -1009,7 +1009,7 @@ // Make activity_log entry - $username = pp_getVal("SELECT userid FROM users WHERE school_num = $p_school_num AND record_num = $p_user_num"); + $username = pp_getVal("SELECT userid FROM users WHERE record_num = $p_user_num"); $activity = "PayPal Payment"; $additional_info = "TRX ID: $P_txn_id\nAmount: " . number_format(abs($amount),2) . "\n"; $curr_time = $ptime; @@ -1020,11 +1020,11 @@ pp_query($query); // Reset user transaction status - $query = "update users set trx_status = NULL where school_num = $p_school_num and record_num = $p_user_num"; + $query = "update users set trx_status = NULL where record_num = $p_user_num"; pp_query($query); // Reset user can_order flag - $query = "update users set can_order = 'Yes' where school_num = $p_school_num and can_order = 'Balance' and record_num = $p_user_num"; + $query = "update users set can_order = 'Yes' where can_order = 'Balance' and record_num = $p_user_num"; pp_query($query); // Update user_paypal_transactions diff --git a/supplier_orders.post.php b/supplier_orders.post.php index 7ba3ad3..ad175ef 100644 --- a/supplier_orders.post.php +++ b/supplier_orders.post.php @@ -73,12 +73,21 @@ fwrite($fp,"\n"); // Set estimated totals to zero -$query = "update supplier_order_header " . - "set estimated_total = 0, " . - "delivery_date = '$delivery_date' " . - "where school_num = $school_num " . - "and schedule_num = $schedule_num " . - "and menu_num = $curr_menu_num"; +if (isset($delivery_date) && strlen($delivery_date) > 0) { + $query = "update supplier_order_header " . + "set estimated_total = 0, " . + "delivery_date = '$delivery_date' " . + "where school_num = $school_num " . + "and schedule_num = $schedule_num " . + "and menu_num = $curr_menu_num"; +} +else { + $query = "update supplier_order_header " . + "set estimated_total = 0 " . + "where school_num = $school_num " . + "and schedule_num = $schedule_num " . + "and menu_num = $curr_menu_num"; +} // db_query("START TRANSACTION"); db_query($query); // db_query("COMMIT"); diff --git a/user_account.form.php b/user_account.form.php index 38d45bd..d5f3a89 100644 --- a/user_account.form.php +++ b/user_account.form.php @@ -224,7 +224,7 @@ include "form.messages.php"; "> "> "> "> 0) $uset = ", user_num = " . $_POST[$ukey]; - $query = "UPDATE user_account SET schedule_num = $val$uset WHERE school_num = $base_school_num AND user_num = $user_num AND record_num = $trx_num"; + $query = "UPDATE user_account SET schedule_num = $val$uset WHERE school_num = $school_num AND user_num = $user_num AND record_num = $trx_num"; db_query($query); } } diff --git a/user_account.report.php b/user_account.report.php index 0a8230d..31273ba 100644 --- a/user_account.report.php +++ b/user_account.report.php @@ -188,7 +188,7 @@ while ($row = db_fetch_array($results)) { "> 0) { // Format school_year value if (date("m",time()) < '12') {