<table border=0 cellspacing=1 cellpadding=1 width=100%><br> <tr> <td align="center" valign="top" class='header2' colspan=4 > Approval Decision</td> </tr> </table> <br> <table border=0 cellspacing=1 cellpadding=1 width='90%' align=center> <tr> </tr> <tr> <?php $getapp = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_approve", "where owner_id = {$owner_id} and \n\t\t\t\t\t business_id={$business_id}"); $getit = FetchRow($dbtype, $getapp); $getnum = NumRows($dbtype, $getapp); if ($getit[3] == 0 and $getit[3] != '') { $decsel = 'selected'; } else { $appsel = 'selected'; } ?> <td> Application Status: </td> <td> <select name=decide> <option value=1 <?php echo $appsel; ?> >Approved</option>
if ($mtopsearch == 'SEARCH') { //search existing require_once "includes/release_search.php"; } elseif ($com == 'PrintReport') { //verify if already have a permit code if ($permit_type != 'Business') { $vericode = SelectMultiTable($dbtype, $dbLink, $permittable, "released,{$incode}", "where owner_id = {$owner_id} and active=1 limit 1"); } else { $vericode = SelectMultiTable($dbtype, $dbLink, $permittable, "released,{$incode}", "where owner_id = {$owner_id} and \n\t\t\t business_id={$business_id} and active = 1 limit 1"); } $veri = FetchRow($dbtype, $vericode); if ($veri[0] == '0' || $veri[0] == '') { //assign new code //get format of permit $getcod = SelectMultiTable($dbtype, $dbLink, "permit_templates", "permit_header, permit_date, permit_sequence", "where permit_type='{$permit_type}'"); $getcode = FetchRow($dbtype, $getcod); //check if have other permit last year //get setting $rr = mysql_query("select * from ebpls_buss_preference"); $rt = mysql_fetch_assoc($rr); $ry = $rt["iReset"]; if ($ry == '1') { $getpyr = mysql_query("select * from {$permittable} order by {$incode} desc"); $gt = mysql_fetch_assoc($getpyr); $anoba = $gt["for_year"]; if ($anoba == date('Y')) { //get total number of permit released $curyr = date('Y'); $gettotal = SelectDataWhere($dbtype, $dbLink, $permittable, "where released = 1 and for_year = '{$curyr}'"); $gettot = NumRows($dbtype, $gettotal); } else {
require_once "includes/variables.php"; require 'setup/setting.php'; //$dbLink =Open($dbtype,$connecttype,$dbhost,$dbuser,$dbpass); $max_resultsr = $thIntPageLimit; $pagemulti = $page; $ascdesc1 = isset($ascdesc1) ? $ascdesc1 : 'asc'; //2008.05.06 $reftype = isset($reftype) ? $reftype : ''; if ($pagemulti == '') { $pagemulti = 1; } $myrow = $pagemulti * $max_resultsr - $max_resultsr; // Perform MySQL query on only the current page number's result //$result = mysql_query($searchsql)or die (mysql_error()); $result = Query1($dbtype, $dbLink, $searchsql); while ($get_info = FetchRow($dbtype, $result)) { // Build your formatted results here. if ($itemID_ == 1221) { include 'includes/bizlinks.php'; } elseif ($itemID_ == 4212) { include 'includes/asslinks.php'; } elseif ($itemID_ == 2212) { include 'includes/paylinks.php'; } elseif ($itemID_ == 3212) { include 'includes/rellinks.php'; } elseif ($itemID_ == 5212) { include 'includes/applinks.php'; } else { if ($selMode == ebpls_nbusiness) { include 'includes/eNature-inc.php'; }
<!-- <html> <head> <link rel="stylesheet" href="stylesheets/default.css" type="text/css"/> </head> <body> <br> <div align='center'> <?php if ($owner_id == '') { $owner_id = 0; } $getemp = SelectMultiTable($dbtype, $dbLink, $permittable, "occ_permit_code, occ_permit_application_date,\r\n occ_position_applied, occ_employer,occ_employer_trade_name,\r\n occ_employer_lot_no, occ_employer_street, business_id", "where owner_id={$owner_id} and active=1"); $getit = FetchRow($dbtype, $getemp); $permit_code = $getit[0]; $pos_app = $getit[2]; $permit_date = $getit[1]; $employer_name = $getit[3]; $trade_name = $getit[4]; $street = $getit[6]; $lot_no = $getit[5]; ?> <form name="_FRM" method="POST" action="index.php?part=1221&owner_id=<?php echo $owner_id; ?> &permit_type=Occupational&stat=<?php echo $status; ?> &create=No&addfee=Add">--> <form method=post action ='index.php?part=4&class_type=Permits&itemID_=1221&addfee=Add&owner_id=<?php
$gt = NumRows($dbtype, $getreq); while ($ic < $gt) { while ($getr = FetchRow($dbtype, $getreq)) { $ic++; if ($col1 == 0) { include 'tablecolor-inc.php'; print "<tr bgcolor='{$varcolor}'>\n"; } $check1 = SelectDataWhere($dbtype, $dbLink, "havereq", " where owner_id={$owner_id}\n \tand business_id={$business_id} \n\t\t\t\t\tand reqid={$getr['0']}"); $hreq = NumRows($dbtype, $check1); if ($hreq == 0) { $insertreq = InsertQuery($dbtype, $dbLink, "havereq", "", "'', {$getr['0']}, {$owner_id}, {$business_id},0"); $ch = 'UNCHECKED'; $gethr[4] = 0; } else { $gethr = FetchRow($dbtype, $check1); if ($gethr[4] == 1) { $ch = 'CHECKED'; } else { $ch = 'UNCHECKED'; } } $getr[1] = stripslashes($getr[1]); print "\t\n\t\t\t\t<td align=right width=5%><input type=hidden name=colre[{$ic}] \n\t\t\t\tvalue={$getr['0']}>  \n\t\t\t\t<input type=checkbox name=x[{$ic}] {$ch}></td><td align=left width=23%>{$getr['1']}\n\t\t\t\t</td>"; $col1 = $col1 + 1; $arr_id[$i++] = $ic; if ($col1 > 1) { print "</tr><tr>"; $col1 = 0; } }
echo $get_info[4]; ?> &permit_type=<?php echo $permit_type; ?> &stat=<?php echo $stat; ?> ");'>Re-Print OR</a></div></td> <?php } print "</tr>\n"; } //end while $getpay = SelectMultiTable($dbtype, $dbLink, "temppayment", "sum(payamt)", "where owner_id = {$owner_id} and permit_type='{$permit_type}' \n\t\t\t and permit_status='{$stat}' and pay_date like '{$getyearnow}%'"); $totalpaid = FetchRow($dbtype, $getpay); $totalpaidnf = number_format($totalpaid[0], 2); ?> <tr><td> </td><td> </td><td> </td><td> </td></tr> <tr><td>Total : </td> <td align=right> <?php echo $totalpaidnf; ?> </td> <?php $hj = $totalpaid[0]; $amtchange = $hj - $totalpay; if ($amtchange < 0) { print "<td></td>\n"; } else { print "<td></td>\n";
$htag = 'Assessment'; $com = 'approve'; require "includes/headerassess.php"; require "includes/assessment.php"; } } //$grandamt = $total_tax_compute + $total_sf_compute + $fee; //echo "$total_tax_compute + $total_sf_compute + $fee"; //echo $grandamt; //$ttax=$grandamt+$totfee; $totfee = round($totfee, 2); $ttax = $grandamt - $totfee; $gid = SelectDataWhere($dbtype, $dbLink, "bus_grandamt", "where business_id={$business_id} and active = 0 and\n owner_id={$owner_id} order by gid desc limit 1"); $haveexist = NumRows($dbtype, $gid); if ($haveexist != 0) { $mt = FetchRow($dbtype, $gid); $grdmt = $mt[3]; } else { $grdmt = $grandamt + $totfee; } $tabs = abs($grdmt - $totalpaidtax); if ($grdmt == '0.00') { $grdmt = $grandamt; } $gettag = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_preference", ""); $gettag = FetchArray($dbtype, $gettag); if ($gettag[sassess] == '') { $grdmt = $ota - $add2fee + $totfee; $tabs = abs($grdmt - $totalpaidtax); $grandamt = $grdmt; }
<?php //matinding nakakahilong sql $ff = "("; $outamt = ''; $compsql = SelectMultiTable($dbtype, $dbLink, "tempassess a, ebpls_buss_taxfeeother b,\r\n ebpls_buss_complex c", "a.multi, a.amt, a.formula, c.coptr, c.addons,a.compval", "where a.natureid = b.natureid and \r\n\t\t\ta.taxfeeid = b.taxfeeid and a.taxfeeid = c.taxfeeid1 and \r\n\t\t\tb.taxfeeid = c.taxfeeid1 and a.tfoid = b.tfoid and \r\n\t\t\ta.tfoid = c.tfoid and b.tfoid = c.tfoid and \r\n\t\t\ta.natureid = b.natureid and b.natureid = c.natureid \r\n\t\t\tand a.natureid = c.natureid and\r\n\t\t\tc.taxfeeid={$taxfeeid} and a.active=1\r\n and a.transaction='{$stat}' and owner_id = {$owner_id} \r\n\t\t\tand business_id = {$business_id}\r\n\t\t\torder by compid asc"); while ($comp = FetchRow($dbtype, $compsql)) { if (is_numeric($comp[2])) { $formula = "((" . $comp[0] . "*" . $comp[2] . "))" . $comp[3] . $comp[4]; } else { $formula = "((" . $comp[0] . $comp[2] . $comp[3] . $comp[4]; } $outamt = $outamt . $formula; } $cfr = $fr . $ff . $outamt; //."))"; // eval ("\$totind=$fr$ff$outamt));"); // echo $cfr; //count "(" ")" $sop = substr_count($cfr, '('); $scp = substr_count($cfr, ')'); if ($sop > $scp) { $looper = $scp; $addcp = ''; while ($looper < $sop) { $addcp = $addcp . ')'; $looper++; } } eval("\$totind={$cfr}{$addcp};"); // echo $totind;
</textarea> </td> </tr> </table> <table border=1 align=center width=600<br><br> <tr> <td align=center>Keyword</td><td align=center>Message</td><td></td> </tr> <?php if ($submitbt == 'Search') { $sms = SelectDataWhere($dbtype, $dbLink, "sms_message", "where keyword like '{$keyword}%'"); } else { $sms = SelectDataWhere($dbtype, $dbLink, "sms_message", ""); } while ($msg = FetchRow($dbtype, $sms)) { $msg[1] = stripslashes($msg[1]); $msg[2] = stripslashes($msg[2]); ?> <tr> <td><input type=hidden name=msgid value=<?php echo $msg[0]; ?> > <?php echo $msg[1]; ?> </td> <td> <?php echo $msg[2];
//Module that saves information to table bus_grandamt //if ($itemID_ == "4212") { $yearfornow = date('Y'); if (strtolower($pmode) == 'quarterly') { $paympart = $qtrcnt; } if (strtolower($pmode) == 'semi-annual') { $paympart = $semcnt; } if (strtolower($pmode) == 'annual') { $paympart = '1'; } if ($ramt2 == 0) { $getgh = SelectDataWhere($dbtype, $dbLink, "bus_grandamt", "where owner_id = '{$owner_id}' and business_id = '{$business_id}' and transaction='{$stat}' and ts = '{$yearfornow}' and paymode = '{$pmode}' and paypart = '{$paympart}'"); $getghg = FetchRow($dbtype, $getgh); $nghigh = $getghg[3]; } else { $nghigh = 0; } $updatebus = UpdateQuery($dbtype, $dbLink, "bus_grandamt", "active = 0", "owner_id = '{$owner_id}' and business_id='{$business_id}' and ts != '{$yearfornow}'"); if ($nghigh <= 0) { $ramt2 = round($ramt2, 2); $buspen = round($buspen, 2); $busint = round($busint, 2); $nbacktax = round($nbacktax, 2); $divtax = round($divtax, 2); $totalexptax = round($totalexptax, 2); //if ($) { // $nbacktax = 0; //}
'"> <?php } else { ?> <body onload='javascript: alert("Cannot Process. No Payment Is Made");'></body> <?php $nopayment = '1'; require_once "includes/payform.php"; } } else { $tfee = SelectMultiTable($dbtype, $dbLink, "ebpls_fees_paid", "sum(fee_amount)* multi_by", "where owner_id = {$owner_id} and\n permit_type='{$permit_type}'"); $totalfee = FetchRow($dbtype, $tfee); $totpay = $totalfee[0]; $totchnge = SelectMultiTable($dbtype, $dbLink, "temppayment", "sum(payamt)", "where owner_id = {$owner_id} \n\t\t\t\t and permit_type='{$permit_type}' and status=1\n and permit_status='{$stat}'"); $amtchange = FetchRow($dbtype, $totchnge); $ort = SelectDataWhere($dbtype, $dbLink, "temppayment", "where owner_id = {$owner_id} and permit_type='{$permit_type}' \n\t\t\t\t and status=1 and permit_status='{$stat}'"); $ort = FetchArray($dbtype, $ort); $totpaid = $amtchange[0]; $amtchange = $totpay - $amtchange[0]; $orno = $ort[or_no]; //please populate ACCOUNT CODES $getmax = SelectDataWhere($dbtype, $dbLink, "ebpls_transaction_payment_or", ""); $or = NumRows($dbtype, $getmax); $or = $or + 1; $trans_id = $owner_id; $payment_code = $orno; $payment_id = 0; $tax_fee_code = 'taxcode'; $account_code = 'acntcode'; $account_desc = 'acnt desc';
// culture_fee where culture_type like '$culture_type%' // order by $watfld $orderbyasde") or die ("new".mysql_error()); require 'setup/setting.php'; $max_resultsr = $thIntPageLimit; $pagemulti = $page; if ($pagemulti == '') { $pagemulti = 1; } $reccnt = NumRows($dbtype, $resultr); if ($reccnt == 0) { ?> <body onload='alert("No Record Found");'></body> <?php } $norow = $pagemulti * $max_resultsr - $max_resultsr; while ($getit = FetchRow($dbtype, $resultr)) { $getengine = @mysql_query("select * from ebpls_fish_description where fish_id = '{$getit['0']}'"); $getengine1 = @mysql_fetch_assoc($getengine); $norow++; include 'tablecolor-inc.php'; print "<tr bgcolor='{$varcolor}'>\n"; if ($getit[5] == 1) { $ft = "Constant"; } elseif ($getit[5] == 2) { $ft = "Formula"; } else { $ft = "Range"; } print "<td> {$norow}</td>\n"; print "<td>{$getengine1['fish_desc']}</td><td>{$getit['1']}</td><td>{$getit['2']}</td><td>{$ft}</td>\n\t<td><a href='index.php?part=4&class_type=Preference&selMode=ebpls_nfishcfees&action_=8&permit_type=Fishery&com=Edit&boat_type={$getit['4']}&trans={$getit['2']}&updateit=1' class='subnavwhite'>\n\tEdit</a>"; ?>
$permit_type = 'Business'; include "includes/variables.php"; include "lib/multidbconnection.php"; $dbLink = Open($dbtype, $connecttype, $dbhost, $dbuser, $dbpass, $dbname); $permittable = 'ebpls_business_enterprise_permit'; //--- get connection from DB //$dbLink = get_db_connection(); global $ThUserData; $getbus = SelectDataWhere($dbtype, $dbLink, "tempbusnature", "where tempid={$tempid}"); $getbu = FetchRow($dbtype, $getbus); $owner_id = $getbu[5]; $business_id = $getbu[6]; $bus_code = $getbu[1]; $bus_nature = $getbu[2]; $getp = SelectDataWhere($dbtype, $dbLink, $permittable, "where owner_id ={$owner_id} \n\t\t\tand business_id ={$business_id} and active = 1"); $getp = FetchRow($dbtype, $getp); $pin = $getp[14]; if ($pin == '') { $pin = $genpin; } ?> <form action="upline.php" method=post> <script language='Javascript' src='javascripts/default.js'></script> <script language="Javascript"> function CheckIt(x) { var msgTitle = "Payment\n"; if(isNaN(x.value)) { alert( msgTitle + "Please input a valid amount!");
if ($getd[5] == 3) { $xv = 0; } else { $xv = $getn[3]; } } $getrange = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_taxrange", "rangeamount, rangelow", "where taxfeeid={$getd['2']} and rangelow = {$xv}\r\n\t\t\t\tand rangestatus='A'"); $haveex = NumRows($dbtype, $getrange); if ($haveex != 1) { $getrange = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_taxrange", "rangeamount", "where taxfeeid={$getd['2']} and rangelow <= {$xv} and\r\n rangehigh >= {$xv} and rangestatus='A'"); $lookrange = NumRows($dbtype, $getrange); if ($lookrange == 0 || $lookrange == '') { $getrange = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_taxrange", "rangeamount", "where taxfeeid={$getd['2']} and rangestatus='A' \r\n\t\t\t\t\t\t order by rangeid desc limit 1"); } } $range = FetchRow($dbtype, $getrange); if (is_numeric($range[0])) { $totind = $range[0]; $rtag = 'range'; $compvalrange = $totind; } else { $getd[1] = $range[0]; eval("\$totind={$d}({$xv}{$range['0']};"); $compvalrange = $totind; } } else { $indi = 0; $xv = 1; $totind = $getd[1]; $rtag = ''; }
,0,0,'<?php echo $getcheck[13]; ?> ')"><font color=blue>View Payment Details</font></a> <?php } ?> </td> <tr> <?php $totscheck = $totscheck + $getcheck[3]; $s++; } } $getclear = SelectMultiTable($dbtype, $dbLink, "ebpls_transaction_payment_check a, \n\t\t\tebpls_transaction_payment_or b,\n ebpls_transaction_payment_or_details c", "sum(a.check_amount)", "where a.or_no=b.or_no and a.or_no=c.or_no and b.or_no=c.or_no and\n c.or_entry_type='CHECK' and a.check_status='CLEARED' and\n\t\t\tc.transaction='{$istat}' and\n c.trans_id={$owner_id} and c.payment_id={$business_id}"); $totcheck = FetchRow($dbtype, $getclear); print "<tr><br></tr>"; $totchecknf = number_format($totscheck, 2); print "<tr><td></td><td></td><td align=right>Total Check Payment:</td><td align=right>{$totchecknf}</td></tr>"; $totpay = $totcash + $totscheck; ?> </table> <table border =0 align=left class=sub> <tr><td></td><td>Total Payments Made:</td><td><font color=red><b>Php <?php echo number_format($totpay, 2); ?> <b></font></td><td></td> </table> <?php if ($bpar == 1 || $ulev == 6 || $ulev == 7 and $totpay > 0) {
$dec = FetchArray($dbtype, $dec); $dec = $dec[sdecimal]; if ($dec != '1') { $is_dec = '(int)'; } else { $is_dec = ''; } $df = 0; //get naturecode if ($stat == 'Retire') { $retstr = "and a.retire=2"; } else { $retstr = ''; } $getnat = SelectMultiTable($dbtype, $dbLink, "tempbusnature a, ebpls_buss_nature b", "a.bus_code, b.naturedesc, a.cap_inv, a.last_yr, a.transaction,a.linepaid", "where owner_id={$owner_id} and business_id={$business_id} \n\t\t\tand a.bus_code=b.natureid and active = 1 {$retstr}"); while ($getn = FetchRow($dbtype, $getnat)) { $stt = $stat; if ($stt == 'New') { $tftype = 1; } elseif ($stt == 'ReNew') { $tftype = 2; } elseif ($stt == 'Retire') { $tftype = 3; } //print labels $pdf->SetX(15); $pdf->Cell(30, 5, 'LINE OF BUSINESS : ', 0, 0, 'L'); $pdf->SetX(45); $pdf->Cell(75, 5, $getn[1], 1, 1, 'L'); $pdf->SetX(15); $pdf->Cell(30, 5, 'TAXES/FEES', 0, 1, 'L');
<?php require_once "includes/variables.php"; include "lib/multidbconnection.php"; $dbLink = Open($dbtype, $connecttype, $dbhost, $dbuser, $dbpass, $dbname); $wil2 = UpdateQuery($dbtype, $dbLink, "tempbusnature", "retire=1", "owner_id={$owner_id} and\n business_id={$business_id} and\n active=1 and transaction='Retire'"); $updatebusnature = UpdateQuery($dbtype, $dbLink, "tempbusnature", "active=0", "owner_id={$owner_id} and\n business_id={$business_id} and transaction='Retire'"); $chkretire = SelectDataWhere($dbtype, $dbLink, "tempbusnature", "where owner_id={$owner_id} and\n business_id={$business_id} and active=1"); $chkretire = FetchRow($dbtype, $chkretire); if ($chkretire == 0) { $updateretire = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise", "retire=1, business_retirement_date=now()", "owner_id={$owner_id} and business_id={$business_id}"); $ubp = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterpr1ise_permit", "active = 0", "owner_id = {$owner_id} and\n business_id = {$business_id}"); } else { //deact all permit $ubp = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise_permit", "active = 0", "owner_id = {$owner_id} and \n\t business_id = {$business_id}"); //active 1 $updatepermit = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise_permit", "active=1", "owner_id={$owner_id} and business_id={$business_id}\n and transaction<>'Retire' order by business_permit_id desc limit 1"); //change pmode back to orig -- ang orig sa bicol ay baboy $getpmode = SelectDataWhere($dbtype, $dbLink, "ebpls_business_enterprise_permit", "where owner_id={$owner_id} and business_id={$business_id}\n and pmode<>'' order by business_permit_id desc limit 1"); $pmode = FetchArray($dbtype, $getpmode); $pmode = $pmode[pmode]; $updatepmode = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise", "business_payment_mode = '{$pmode}'", "owner_id={$owner_id} and business_id={$business_id}"); } ?> <body onload="parent.location='index.php?part=4&class_type=Permits&permit_type=Business&busItem=Business&itemID_=2212&mtopsearch=SEARCH'";></body>
$getboat = SelectDataWhere($dbtype, $dbLink, "fish_boat", "where owner_id={$owner_id}"); while ($getb = FetchRow($dbtype, $getboat)) { $getfee = SelectDataWhere($dbtype, $dbLink, "boat_fee", "where boat_type='{$getb['4']}' and\n\t\t\t\t\t\trange_lower<={$getb['5']} and range_higher>={$getb['5']} and\n\t\t\t\t\t\ttransaction='Renew' and active = 1"); $getnum = NumRows($dbtype, $getfee); if ($getnum == 0) { $getfee = SelectDataWhere($dbtype, $dbLink, "boat_fee", "where boat_type='{$getb['4']}' and\n\t\t\t\t\t\t\trange_lower<={$getb['5']} and range_higher=0 and\n\t\t\t\t\t\t\ttransaction='Renew' and active = 1"); } $getfee1 = FetchArray($dbtype, $getfee); $backtaxcompute = $backtaxcompute + $getfee1[amt]; } //Fish Activity Fees $rt = SelectMultiTable($dbtype, $dbLink, "culture_fee a, fish_assess b", "a.culture_type, b.amt, b.ass_id, b.culture_id", "where a.culture_id = b.culture_id and b.owner_id = '{$owner_id}'"); $tfee1 = 0; while ($ft = FetchRow($dbtype, $rt)) { $getfee = SelectDataWhere($dbtype, $dbLink, "culture_fee", "where culture_id='{$ft['3']}'"); $gf = FetchRow($dbtype, $getfee); if ($gf[2] == '1') { //constant $tfee = $gf[4]; } elseif ($gf[2] == '2') { //formula eval("\$tfee={$ft['1']}{$gf['3']};"); } elseif ($gf[2] == '3') { //range $getr = SelectDataWhere($dbtype, $dbLink, "culture_range", "where\n\t\t\t\t\t\t\tculture_id={$ft['3']} and range_lower<={$ft['1']} and\n\t\t\t\t\t\t\trange_higher >= {$ft['1']}"); $numr = NumRows($dbtype, $getr); if ($numr == 0) { $getr = SelectDataWhere($dbtype, $dbLink, "culture_range", "where\n\t\t\t\t\t\t\t\tculture_id={$ft['3']} and range_lower<={$ft['1']} and\n\t\t\t\t\t\t\t\trange_higher = '0'"); } $getre = FetchArray($dbtype, $getr); if (is_numeric($getre[amt])) {
} else { $result = UpdateQuery($dbtype, $dbLink, $dtable, "fee_desc='{$feedesc}', fee_amount = {$feeamount}, lastupdatedby='{$usern}',\n\t\t\t lastupdated=now(), permit_type='{$ptype}'", "fee_id = '{$owner_id}'"); } $feet = ""; $owner_id = ""; $feedesc = ""; $feeamount = ""; $ptype = ""; $com = ""; ?> <body onLoad='javascript:UpRec();'></body> <?php } } elseif ($com == 'Edit') { $get = SelectDataWhere($dbtype, $dbLink, $dtable, "where fee_id ={$owner_id}"); $getr = FetchRow($dbtype, $get); $feedesc = stripslashes($getr[1]); $feeamount = $getr[2]; if ($permit_type != 'Motorized') { $ptype = $getr[3]; } else { $ptype = $getr[5]; $MFees = $getr[7]; } require_once "includes/form_mtop.php"; } elseif ($com == 'Delete') { if ($com1 == 'act') { $get = SelectDataWhere($dbtype, $dblink, $dtable, "where fee_id = '{$bbo}'"); $get1 = @mysql_fetch_assoc($get); $desc = $get1[fee_desc]; $exist = SelectDataWhere($dbtype, $dblink, 'ebpls_fess_paid', "where fee_desc = '{$desc}'");
<?php $stsearch = SelectMultiTable($dbtype, $dbLink, "ebpls_business_enterprise", "business_category_code", "where owner_id={$owner_id} and \n\t\t business_id={$business_id}"); $stsearch = FetchRow($dbtype, $stsearch); $ndsearch = SelectMultiTable($dbtype, $dbLink, "ebpls_business_category", "tax_exemption", "where business_category_code='{$stsearch['0']}'"); $ndsearch = FetchRow($dbtype, $ndsearch); //echo $totexempt; //$totexempt=$grandamt-$notexempt; $Exemption = 0; $Exemption = $tottax * ($ndsearch[0] / 100); if ($Exemption > 0) { if ($itemID_ == 4212) { ?> <tr><td width=100></td> <td></td><td align=right>Tax :</td><td align=right> <?php $taxamt = number_format($grandamt - $nyotfee, 2); print "{$taxamt} </td></tr>"; $alignment = 'right'; $Pesosign = 'Php '; } else { $alignment = 'right'; } print "<tr><td width=100></td>"; if ($itemID_ != 2212) { print " <td></td>"; // } // if ($itemID_<>2212) { $alignment = 'right'; $Pesosign = ''; } if ($itemID_ == 2212) {
</td> </tr> --> <?php } ?> <tr> <td> </td><td>Total Amount Due</td><td align=right><?php echo number_format($totalpaymentsked, 2); ?> </td><td> </td></tr> <?php //echo $totalpaymentsked."=="; $chkinmayor = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_tfo", "tfodesc", "where tfodesc like '%mayor%'"); $chkinmayor = FetchRow($dbtype, $chkinmayor); ?> </table> <script language='Javascript' src='javascripts/default.js'></script> <script language="Javascript"> function PaymentCommand(cmd,amt,paymde,paypart,or,natid,pens,recno,feeline) { var trans_id var x,y,w,h trans_id = document._FRM.trans_id.value; // center on screen if ( cmd == 'CASH' ) { w = 400 h = screen.height - 100 } else if ( cmd == 'CHECK' ) {
,<?php echo $ppart; ?> ,<?php echo $getn[0]; ?> ,'','',<?php echo $feecomputeline; ?> )"> Check</a> </td> </tr> <?php } else { $getorn = SelectMultiTable($dbtype, $dbLink, "ebpls_transaction_payment_or a,\n ebpls_transaction_payment_or_details b", "a.or_no, b.or_entry_type", "where b.trans_id={$owner_id} and b.payment_id={$business_id} and\n\t\t\tb.nat_id={$getn['0']} and b.linepaid=1 and a.or_no=b.or_no \n\t\t\tand a.trans_id=b.trans_id"); $getorn = FetchRow($dbtype, $getorn); ?> <td></td><td align=right></td> <td align=right> <a class=subnavwhite href="ebplsreceipt.php?owner_id=<?php echo $owner_id; ?> &business_id=<?php echo $business_id; ?> &or_no=<?php echo $getorn[0]; ?> &cmd=<?php echo $getorn[1]; ?>
} } elseif ($keyword == 'duedate') { $business_id = $getstat[2]; $owner_id = $getstat[1]; $getdue = SelectMultiTable($dbtype, $dbLink, 'ebpls_business_enterprise', "business_payment_mode", "where owner_id='{$owner_id}' and business_id='{$business_id}'"); $getit = FetchRow($dbtype, $getdue); $getdue1 = SelectDataWhere($dbtype, $dbLink, 'ebpls_buss_penalty1', ""); $getnow = Fetcharray($dbtype, $getdue1); echo $getit[0]; if (strtolower($getit[0]) == 'quarterly') { $sendthis = "Due date for 1st Q is {$getnow['qtrdue1']},2nd Q is {$getnow['qtrdue2']}, 3rd Q is {$getnow['qtrdue3']},4th Q is {$getnow['qtrdue4']}"; } elseif (strtolower($getit[0]) == 'semi-annual') { $sendthis = "Due date for 1st sem is {$getnow['semdue1']},2nd sem is {$getnow['semdue2']}"; } elseif (strtolower($getit[0]) == 'annual') { $getdue1 = SelectDataWhere($dbtype, $dbLink, 'ebpls_buss_penalty', ""); $getnow = FetchRow($dbtype, $getdue); $sendthis = "Due date for this year is {$getnow['renewaldate']}"; } } elseif ($keyword == 'req') { } } } //send it $res = InsertQuery($dbtype, $dbLink, "sms_send", "", "'','{$cellnum}','{$sendthis}',1,now()"); $res = InsertQuery($dbtype, $dbLink, "sms_archive", "", "'','{$cellnum}','{$sendthis}',1,now()"); //flush $delsms = DeleteQuery($dbtype, $dbLink, "sms", "smsid<>0 order by smsid asc limit 1"); } if ($sendthis != '') { echo "Message:" . $sendthis . " has been sent to " . $celnum; } else {
$result = InsertQuery($dbtype, $dbLink, "tempassess", "(assid, owner_id, business_id, natureid, taxfeeid, \n\t\t\tmulti, amt, formula, compval, tfoid,active, transaction,date_create)", "{$varx},{$owner_id}, {$business_id},{$getn['0']},\n\t {$getd['taxfeeid']},{$basis},0,'{$getd['amtformula']}',{$compval},\n\t\t {$getd['tfoid']},1, '{$stat}','{$inputdate}'"); } $varx++; // end assessment sana ok } } } } $gettag = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_preference", ""); $gettag = FetchArray($dbtype, $gettag); if ($gettag[sassess] == '' and $yearnow1 != $currentyearna) { $currentyearna = $yearnow1; $resultf = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_tfo", "where tfoindicator='1' and tfostatus='A' and taxfeetype<>'1' "); $cntfee = NumRows($dbtype, $resultf); $feetype = 1; while ($getf = FetchRow($dbtype, $resultf)) { $getex = SelectMultiTable($dbtype, $dbLink, "ebpls_business_enterprise a, \n\t\t\tfee_exempt b, ebpls_buss_tfo c", "a.*", "where a.business_id={$business_id} and\n a.business_category_code=b.business_category_code and\n c.tfoid={$getf['0']} and b.tfoid={$getf['0']} and\n b.active=1"); $getfeex = NumRows($dbtype, $getex); if ($getfeex > 0) { $exemptedfee = $exemptedfee + $getf[6]; $usemin = 'Fee Exempted '; $getf[6] = 0; } $havegar = strpos(strtolower($getf[1]), 'garbage'); if ($g_zone == 0) { if ($havegar > -1) { $exemptedfee = $exemptedfee + $getd[amtformula]; $usemin = 'Not in Garbage Zone '; $rtag = ''; $getf[6] = 0; $totind = 0;
$getbus = SelectDataWhere($dbtype, $dbLink, "tempbusnature", "where tempid={$tempid}"); $getbu = FetchRow($dbtype, $getbus); $owner_id = $getbu[5]; $business_id = $getbu[6]; $bus_code = $getbu[1]; $bus_nature = $getbu[2]; $oldlay = $getbu[4]; $wil = InsertQuery($dbtype, $dbLink, "tempbusnature", "", "'', '{$bus_code}', '{$bus_nature}',{$oldlay},\n \t {$lastyr},{$owner_id}, {$business_id}, now(),\n \t 0, 1,2,'Retire','0'"); $updatepermit = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise_permit", "pmode='{$pmode}'", "owner_id={$owner_id} and\n \t business_id={$business_id} order by\n \t business_permit_id desc limit 1"); $wil3 = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise", "business_payment_mode='Annual'", "owner_id={$owner_id} and business_id={$business_id}"); $wil = UpdateQuery($dbtype, $dbLink, "tempbusnature", "active=0", "tempid={$tempid}"); $bp = UpdateQuery($dbtype, $dbLink, $permittable, "active=0", "owner_id={$owner_id} and business_id={$business_id}\n \t and active=1"); } else { /*-------------- reneew */ $getbus = SelectDataWhere($dbtype, $dbLink, "tempbusnature", "where tempid={$tempid}"); $getbu = FetchRow($dbtype, $getbus); $owner_id = $getbu[5]; $business_id = $getbu[6]; $bus_code = $getbu[1]; $bus_nature = $getbu[2]; $oldlay = $getbu[4]; $result = InsertQuery($dbtype, $dbLink, "tempbusnature", "", "'', '{$bus_code}', '{$bus_nature}',{$oldlay},\n \t \t{$lastyr},{$owner_id},{$business_id}, now(),\n\t \t0, 1,'','ReNew','0'"); $wil = UpdateQuery($dbtype, $dbLink, "tempbusnature", "active=0", "tempid={$tempid}"); } //if retire or renew } else { //wattodo //#################################################3 $check = SelectDataWhere($dbtype, $dbLink, $tempbiz, "where bus_code='{$_idx}' and business_id={$business_id}\n and owner_id={$owner_id} and tempid<>'{$savenat}'"); $checkit = NumRows($dbtype, $check); if ($checkit == 0) {
$route = ''; $ltype = ''; $bcolor = ''; $ltoreg = ''; $cro = ''; $owner_id = $ownerID; } else { $buttag = 'Save'; $buttag1 = 'Cancel'; } require_once "includes/form_add_mtoppermit.html"; require_once "includes/form_add_middlepermit.php"; require_once "includes/mtop.php"; } elseif ($com == 'Delete' || $com == 'Drop') { $getown = SelectMultiTable($dbtype, $dbLink, $owner, "owner_first_name, owner_middle_name,\n owner_last_name, owner_gender", " where owner_id={$owner_id}"); $res = FetchRow($dbtype, $getown); $owner_first_name = $res[0]; $owner_middle_name = $res[1]; $owner_last_name = $res[2]; $owner_gender = $res[3]; $buttag = 'Add'; $buttag1 = 'Clear'; $verdel = SelectDataWhere($dbtype, $dbLink, $vehicle, "where motorized_motor_id={$mid}"); $getver = FetchArray($dbtype, $verdel); $stat1 = $getver[status]; $owner_id = $ownerID; require_once "includes/form_add_mtoppermit.html"; require_once "includes/form_add_middlepermit.php"; if ($com == 'Delete') { //search history $getown = SelectMultiTable($dbtype, $dbLink, "ebpls_motorized_vehicles a, vehicle_transfer b", "motorized_motor_id", " where a.motorized_motor_id ='{$mid}' and a.motorized_motor_id=b.motor_id ");
print "<tr><td align =right>Engine Capacity</td><td> \n\t\t\t<input type=hidden name=feeid[{$i}] value={$getrec['0']}>\n <input type=text name=rangelow[{$i}] size=5 value={$getrec['2']} {$depval}> \n <input type=text name=rangehigh[{$i}] size=5 value={$getrec['3']} {$depval1}> \n <input type=text name=amt[{$i}] size=5 value={$getrec['5']}></td>\n </td><td> </td>\n </tr>"; $depval = ''; $depval1 = ''; $i++; } } } if ($addrange == 'Add Range') { if ($updateit == 1) { $ftag = 'Update'; $chkread = 'hidden'; $cntrec = SelectDataWhere($dbtype, $dbLink, "boat_fee", "where boat_type='{$boat_type}'\n\t\t\tand transaction='{$trans}' order by fee_id"); $cnt = NumRows($dbtype, $cntrec); print "<tr><td></td><td><br>Range Low Range High Amount</td><td></td></tr>"; while ($i < $cnt) { while ($getrec = FetchRow($dbtype, $cntrec)) { $boat_type = $getrec[1]; $no_range = $cnt; $uom = $getrec[4]; $ptype = $getrec[6]; if ($i == '0') { $depval = 'readonly'; } elseif ($i == $cnt - 1) { $depval1 = 'readonly'; } else { $depval = ''; $depval1 = ''; } print "<tr><td align =right>Engine Capacity</td><td> \n\t\t\t<input type=hidden name=feeid[{$i}] value={$getrec['0']}>\n <input type=text name=rangelow[{$i}] size=5 value={$getrec['2']} {$depval}> \n <input type=text name=rangehigh[{$i}] size=5 value={$getrec['3']} {$depval1}> \n <input type=text name=amt[{$i}] size=5 value={$getrec['5']}></td>\n </td><td> </td>\n </tr>"; $depval = ''; $depval1 = '';
require 'ebpls-php-lib/html2pdf_lib/fpdf.php'; $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', '', 10); $pdf->Cell(50, 48, 'Control #' . $getit[8], '0', '2', 'R'); $pdf->Cell(50, 7, $tdate, '0', '2', 'R'); //current date $pdf->Cell(35, 7, $getlgu[4], '0', '2'); //municipality $pdf->Cell(35, 7, $getit[9], '0', '2'); //payor $pdf->Cell(50, 10, 'Payment For ' . $permit_type . ' Permit', '0', '2'); //space $nc = 0; while ($nc < 8) { while ($getb = FetchRow($dbtype, $getbus)) { $pdf->Cell(75, 5, $getb[0], '0', '0'); //desc $Tot = $getb[1] * $getb[2]; $pdf->Cell(75, 5, number_format($Tot, 2), '0', '1'); //amount } $nc++; } $getotheram = mysql_query("select * from ebpls_other_penalty_amount where permit_id = '{$getit['0']}'"); $getotham = mysql_fetch_assoc($getotheram); if ($getotham[amount] != "" or $getotham[amount] != 0) { $pdf->Cell(75, 5, 'Surcharge/Interest', '0', '0'); //desc $pdf->Cell(75, 5, number_format($getotham[amount], 2), '0', '1'); //amouna
$updatebusgran = mysql_query("update bus_grandamt set totpenamt = '{$buspen}', si = '{$busint}' where owner_id = '{$owner_id}' and business_id = '{$business_id}' and ts = '{$lastpaydatey}' and paypart = '{$nx}'"); $nx = $nx + 1; } } $lastpaydateyr = $lastpaydateyr + 1; } //End of Surcharge/Interest for Back Tax $backtaks = SelectMultiTable($dbtype, $dbLink, "bus_grandamt", "sum(grandamt), sum(totpenamt), sum(si), sum(penamt)", "where owner_id={$owner_id} and business_id='{$business_id}' and ts = '{$lastpaydatey}' and active = 0\r\n\torder by gid desc"); $bt = SelectMultiTable($dbtype, $dbLink, "ebpls_transaction_payment_or_details a,\r\n\tebpls_transaction_payment_or b", "b.total_amount_paid,a.ts", "where a.trans_id={$owner_id} and a.payment_id={$business_id} \r\n\tand a.trans_id = b.trans_id and a.or_no=b.or_no\r\n\tand a.or_entry_type<>'CHECK' and ts like '{$lastpaydatey}%'"); while ($getche = FetchRow($dbtype, $bt)) { $getch = $getche[0] + $getch; } $totbak = $getch; $getch = 0; $bt = SelectMultiTable($dbtype, $dbLink, "ebpls_transaction_payment_or_details a, \r\n\tebpls_transaction_payment_check b", "b.check_amount,a.ts", "where a.trans_id={$owner_id} and a.payment_id={$business_id} \r\n\tand a.or_entry_type='CHECK' and b.check_status='CLEARED'\r\n\tand a.or_no=b.or_no and ts like '{$lastpaydatey}%'"); while ($getche = FetchRow($dbtype, $bt)) { $getch = $getche[0] + $getch; } $totbak = $totbak + $getch; if ($istat == 'Retire') { $backtaks = SelectMultiTable($dbtype, $dbLink, "bus_grandamt", "sum(grandamt), sum(totpenamt), sum(si), sum(penamt)", "where owner_id={$owner_id} and business_id='{$business_id}' and ts = '{$lastpaydatey}' \r\n\t\tand active = 0 order by gid desc"); } else { $backtaks = SelectMultiTable($dbtype, $dbLink, "bus_grandamt", "sum(grandamt), sum(totpenamt), sum(si), sum(penamt)", "where owner_id={$owner_id} and business_id='{$business_id}' and ts = '{$lastpaydatey}' and active = 0\r\n\t\torder by gid desc"); } $backtaks1 = mysql_fetch_row($backtaks); if ($backtaks1[0] == '') { $notpaid = 0; } else { $baktax1 = $backtaks1[0]; $baktax2 = $backtaks1[1]; $baktax3 = $backtaks1[2];
<?php require_once "lib/ebpls.lib.php"; require_once "lib/ebpls.utils.php"; require_once "ebpls-php-lib/utils/ebpls.search.funcs.php"; //--- get connection from DB global $ThUserData; //$permit_type = 'Business'; require_once "includes/variables.php"; include_once "lib/multidbconnection.php"; $dbLink = Open($dbtype, $connecttype, $dbhost, $dbuser, $dbpass, $dbname); $result = SelectMultiTable($dbtype, $dbLink, "{$owner}, ebpls_business_enterprise", " concat({$owner}.owner_first_name,' ', {$owner}.owner_middle_name, \r\n\t\t\t' ', {$owner}.owner_last_name) as full,\r\n ebpls_business_enterprise.business_name, \r\n\t\t\tebpls_business_enterprise.business_payment_mode", "where {$owner}.owner_id={$owner_id} and \r\n\t\t\tebpls_business_enterprise.owner_id={$owner_id} and\r\n ebpls_business_enterprise.business_id={$business_id}"); $list = FetchRow($dbtype, $result); ?> <link rel="stylesheet" href="stylesheets/default.css" type="text/css"/> <script language='Javascript' src='javascripts/default.js'></script> <div align="CENTER"> <!---// start of the table //--> <br> <table border=0 cellspacing=0 cellpadding=0 width='90%'> <tr><td align="center" valign="center" class='titleblue' width='90%'> Assessment for <?php echo ucfirst($permit_type); ?> Permit</td></tr> <tr><td align="center" valign="center" class='normal' height=10> </td></tr> <tr> <td align="center" valign="center" class='normal'> <form name="_FRM" method="POST" action='index.php?part=4&class_type=Permits&itemID_=4212&owner_id=<?php echo $owner_id; ?>