//ini_set('display_startup_errors',1);
//ini_set('display_errors',1);
error_reporting(0);
if ($_POST['account_nbr'] != "")
{
$today = date('d-m-y');
include 'dp_conn.php';
$curr_year = "2015";
$account_in = $_POST['account_nbr'];
//echo $account_in;
//query to get current balance due
$stmt90 = oci_parse($taxconn, "select account_nbr, bus_name, bus_address, bus_city_state, bus_zipcode, net_asmt_char, penalty_char, nvl(reconciled,'N') reconciled, nvl(net_asmt_char,0) + nvl(total_direct,0) + nvl(total_payments,0) + nvl(penalty_char,0) bal_due from taxdbl.un_accounts where year = '$curr_year' and account_nbr = '$account_in' and nvl(del_rec,'N') != 'Y' and nvl(exempt_flag,'N') != 'Y' and business_type in (1,21) and Nvl(attached,'N') != 'Y'");
oci_define_by_name($stmt90, "ACCOUNT_NBR", $account_nbr);
oci_define_by_name($stmt90, "BUS_NAME", $bus_name);
oci_define_by_name($stmt90, "BUS_ADDRESS", $bus_address);
oci_define_by_name($stmt90, "BUS_CITY_STATE", $bus_city_state);
oci_define_by_name($stmt90, "BUS_ZIPCODE", $bus_zipcode);
oci_define_by_name($stmt90, "RECONCILED", $reconciled);
oci_define_by_name($stmt90, "NET_ASMT_CHAR", $net_asmt_char);
oci_define_by_name($stmt90, "TOTAL_DIRECT", $total_direct);
oci_define_by_name($stmt90, "TOTAL_PAYMENTS", $total_payments);
oci_define_by_name($stmt90, "PENALTY_CHAR", $penalty_char);
oci_define_by_name($stmt90, "BAL_DUE", $bal_due);
oci_execute($stmt90);
while (OCIFetch($stmt90)) {
}
oci_free_statement($stmt90);
$account_nbr_in = $account_nbr;
$net_asmt_char_in = $net_asmt_char;
$penalty_char_in = $penalty_char;
//echo $net_asmt_char_in;
//echo $penalty_char_in;
//pull due date to see if interest needs to be added
$stmt91 = oci_parse($taxconn, "select to_date(description,'DD-MON-YYYY') as DUE_DATE from taxdbl.un_list_table where TTYPE = 12 and CODE = 1");
oci_define_by_name($stmt91, "DUE_DATE", $date_due);
oci_execute($stmt91);
while (OCIFetch($stmt91)) {
}
oci_free_statement($stmt91);
$due_date = $date_due;
$year_in = $curr_year;
//echo "$today > $due_date";
//if ($today <= $due_date) // if filing after due date - charge interest
//{
//echo "In Interest Calc
";
$stid = oci_parse($taxconn, 'begin TAX.UNSEC_INET.CALC_INTEREST(:year_in,:account_nbr_in,:net_asmt_char_in,:penalty_char_in,:interest_out); end;');
oci_bind_by_name($stid, ':year_in', $year_in);
oci_bind_by_name($stid, ':account_nbr_in', $account_nbr_in);
oci_bind_by_name($stid, ':net_asmt_char_in', $net_asmt_char_in);
oci_bind_by_name($stid, ':penalty_char_in', $penalty_char_in);
oci_bind_by_name($stid, ':interest_out', $interest_out, 20);
oci_execute($stid);
//}
//Check if account has delinquent tax due.
$stid = oci_parse($taxconn, 'begin TAX.UNSEC_INET.UN_IS_DELQ(:account_nbr_in,:delq_amt,:orig_bus_type); end;');
oci_bind_by_name($stid, ':account_nbr_in', $account_nbr_in);
oci_bind_by_name($stid, ':delq_amt', $delq_amt1, 20);
oci_bind_by_name($stid, ':orig_bus_type', $orig_bus_type, 2);
oci_execute($stid);
oci_free_statement($stid);
//echo $orig_bus_type;
if (isset($delq_amt1) > 0)
{
//Get Deliquent Info
$account_nbr_in = $account_nbr;
$payment_date = $today;
$stid = oci_parse($taxconn, 'begin TAX.UNSEC_INET.UN_GRAND_TOTAL_DUE(:account_nbr_in,:orig_bus_type,:payment_date,:general_tax_total,:direct_charge_total,:penalty_total,:interest_total,:grand_total); end;');
oci_bind_by_name($stid, ':account_nbr_in', $account_nbr_in);
oci_bind_by_name($stid, ':orig_bus_type', $orig_bus_type);
oci_bind_by_name($stid, ':payment_date', $payment_date);
oci_bind_by_name($stid, ':general_tax_total', $general_tax_total, 20);
oci_bind_by_name($stid, ':direct_charge_total', $direct_charge_total, 20);
oci_bind_by_name($stid, ':penalty_total', $penalty_total, 20);
oci_bind_by_name($stid, ':interest_total', $interest_total, 20);
oci_bind_by_name($stid, ':grand_total', $delq_total, 20);
oci_execute($stid);
oci_free_statement($stid);
if (isset($delq_total) == ""){
$delq_total = 0;
}
}else{
$delq_total = 0;
}
if ($orig_bus_type == 71 or $orig_bus_type == 73 or $orig_bus_type == 77)
{
$delq_total = 0;
}
$balance_due = $bal_due + $delq_total + $interest_out;
}
?>
Weber County Assessor's Office
include 'head.php';
include 'nav.php';
?>
Pay for your Personal Property Taxes
if ($reconciled == "Y")
{
?>
$balance_due =round($balance_due, 2);
echo "Account #: $account_nbr ";
echo "Business Name: $bus_name ";
echo "Business Address: $bus_address $bus_city_state, $bus_zipcode ";
echo "Balance Due: $balance_due";
echo "";
?> |
}
elseif ($reconciled == "N")
{
?>
The Business filing for this account has not been received by the Assessor's Office. Please Contact us at: 801-399-8572
|
}
?>
|
|
|
include 'right_nav.php'; ?>
|
include 'footer.php'; ?>