if ($strPassStatus == "NP") { $qryUpdate = "update cs_transactiondetails set nopasscomments = '{$strNoPassReason}' where transactionId={$iTransactionId}"; } } } if ($qryUpdate != "") { //print($qryUpdate); if (!mysql_query($qryUpdate, $cnn_cs)) { print mysql_errno() . ": " . mysql_error() . "<BR>"; print "Can not execute query pass update query"; exit; } } if ($strPassStatus != "" && $strPassStatus != $db_passstatus) { if ($strPassStatus == "PA") { if ($str_payment_type == "C" && $strBillingDate == $strCurrentDateTime && func_is_auto_approved($cnn_cs, $iCompanyId)) { $qryUpdate = "update cs_transactiondetails set status = 'A',approvaldate = '{$strCurrentDateTime}',passStatus = '{$strPassStatus}' where transactionId={$iTransactionId}"; } else { $qryUpdate = "update cs_transactiondetails set passStatus = '{$strPassStatus}' where transactionId={$iTransactionId}"; } } else { $return_insertId = func_transaction_updatenew($iTransactionId, $cnn_cs); $passcount = $db_passcount + 1; if ($strPassStatus == "NP" && $db_passcount >= 1) { $qryUpdate = "update cs_transactiondetails set passStatus = 'ND',pass_count=" . $passcount . " where transactionId={$return_insertId}"; } else { $qryUpdate = "update cs_transactiondetails set passStatus = '{$strPassStatus}',pass_count=" . $passcount . " where transactionId={$return_insertId}"; } } if ($qryUpdate != "") { if (!mysql_query($qryUpdate, $cnn_cs)) {
if ($str_nopass == "Y") { if ($str_status_code != "NP") { continue; } } } $str_exists_query = "select checkorcard,billingDate from cs_transactiondetails where voiceAuthorizationno='{$str_voice_id}' and userid = {$i_company_id}"; if (!($rstSelect = mysql_query($str_exists_query, $cnn_cs))) { dieLog(mysql_errno() . ": " . mysql_error() . "<BR>"); } if (mysql_num_rows($rstSelect) > 0) { $str_payment_type = mysql_result($rstSelect, 0, 0); $str_billing_date = mysql_result($rstSelect, 0, 1); $str_query = "update cs_transactiondetails set "; if ($str_status_code == "PA") { if ($str_payment_type == "C" && func_is_auto_approved($cnn_cs, $i_company_id)) { if ($str_billing_date == $str_current_date) { $str_query .= "status = 'A',approvaldate = '{$str_current_date}',"; } } } if ($str_status_code == "NP") { if ($arr_voice_ids != "") { for ($i_loop1 = 0; $i_loop1 < count($arr_voice_ids); $i_loop1++) { if ($arr_voice_ids[$i_loop1] == $str_voice_id) { $str_comments = Trim($arr_comments[$i_loop1]); if (strpos($str_comments, "|") == 0) { $str_comments = substr($str_comments, 1); } //print($str_comments."<br>"); break;