Пример #1
0
<?php 
        } elseif ($gf[2] == '2') {
            //formula
            eval("\$tfee={$ft['1']}{$gf['3']};");
            ?>
        <td><?php 
            echo number_format($tfee, 2);
            ?>
</td>
<?php 
        } elseif ($gf[2] == '3') {
            //range
            $getr = SelectDataWhere($dbtype, $dbLink, "culture_range", "where\n\t\t\tculture_id={$getengine211['culture_id']} and range_lower<={$ft['1']} and\n\t\t\trange_higher >= {$ft['1']}");
            $numr = NumRows($dbtype, $getr);
            if ($numr == 0) {
                $getr = SelectDataWhere($dbtype, $dbLink, "culture_range", "where\n                        culture_id={$getengine211['culture_id']} and range_lower<={$ft['1']} and\n                        range_higher = '0'");
            }
            $getre = FetchArray($dbtype, $getr);
            if (is_numeric($getre[amt])) {
                ?>
				<td><?php 
                $tfee = $getre[amt];
                echo number_format($getre[amt], 2);
                ?>
</td>
<?php 
            } else {
                eval("\$tfee={$ft['1']}{$getre['amt']};");
                ?>
        <td><?php 
                echo number_format($tfee, 2);
Пример #2
0
              <td align="right" valign="top" class='normal' colspan=4>&nbsp; </td>
            </tr>
	<?php 
//if ($owner_id<>'' and $business_id<>'') {
$ic = 0;
$col1 = 0;
$getreq = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_requirements", "where recstatus='A' and reqindicator='1' and permit_type='Business'");
$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']}>&nbsp \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>";
Пример #3
0
 $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 {
         $gettot = 0;
     }
 } else {
     //get total number of permit released
     $gettotal = SelectDataWhere($dbtype, $dbLink, $permittable, "where released = 1");
     $gettot = NumRows($dbtype, $gettotal);
 }
 $sequence = $getcode[2];
 $sequence = '100000000000' + $sequence;
 $sequence = $sequence + $gettot + 1;
 $sequence = substr($sequence, 1, 11);
 if ($getcode[1] == '1') {
     // check if have date
     $permitnumber = $getcode[0] . "-" . $currdate[year] . "-" . $sequence;
 } else {
     $permitnumber = $getcode[0] . "-" . $sequence;
 }
 if ($permit_type != 'Business') {
     //insert permitcode to $permittable
     $updateit = UpdateQuery($dbtype, $dbLink, $permittable, "{$incode}='{$permitnumber}'", "owner_id={$owner_id}");
Пример #4
0
    $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}'");
        $exist1 = @mysql_num_rows($get);
        if ($exist1 > 0) {
            ?>
				<body onLoad='javascript:alert ("Cannot Delete, Record exist in other table");'></body>
				<?php 
        } else {
            $delrec = DeleteQuery($dbtype, $dbLink, $dtable, "fee_id='{$bbo}'");
            ?>
		        <body onLoad='javascript:alert ("Fee Deleted"); parent.location="index.php?part=4&class_type=Preference&permit=others&selMode=ebpls_notherfees&action_=8&itemEvent=1&data_item=0";'></body>
<?php 
        }
    } else {
        $delrec = UpdateQuery($dbtype, $dbLink, $dtable, "active=0", "fee_id={$owner_id}");
        ?>
		        <body onLoad='javascript:alert ("Fee DeActivated"); parent.location="index.php?part=4&class_type=Preference&permit=others&selMode=ebpls_notherfees&action_=8&itemEvent=1&data_item=0";'></body>
Пример #5
0
        }
        if ($istat == 'ReNew') {
            // || $istat=='Retire') {
            require "includes/penalty.php";
        }
    } else {
        echo "0.00";
        $amt2pay[$si + 1] = 0;
    }
    ?>
</td>


<?php 
    //check if no more line to pay
    $hvl = SelectDataWhere($dbtype, $dbLink, "tempbusnature", "where owner_id = {$owner_id} and\n\t\t\tbusiness_id={$business_id} and linepaid=0");
    $hvl = NumRows($dbtype, $hvl);
    //getpayhistory
    if ($balance == '') {
        $balance = $tabs;
    }
    if ($balance >= 0) {
        //echo $cnthave."-".$gethis."<BR>";
        if ($iswev == 1) {
            //$gethis=1;
        }
        if ($gethis == 0 and $hvl > 0 and $amt2pay[$si + 1] > 0) {
            if ($mayunpaid == 1) {
                $unpaid = 2;
            } else {
                $mayunpaid = 1;
Пример #6
0
?>
</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) {
    $ge = SelectDataWhere($dbtype, $dbLink, "havereq", "where owner_id={$owner_id} and\n                                        active=1 and business_id={$business_id}");
    $ge = NumRows($dbtype, $ge);
    $getreq = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_requirements", "where recstatus='A' and reqindicator=1 and permit_type='Business'");
    $gt = NumRows($dbtype, $getreq);
    $gettag = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_preference", "");
    $getre = FetchArray($dbtype, $gettag);
    $checkapp = mysql_query("select * from ebpls_buss_approve a where\n                \t\t\t\t\t\ta.owner_id='{$owner_id}' and\n                                        a.decision=1 and a.business_id={$business_id}");
    $checka = mysql_num_rows($checkapp);
    if ($checka == 0) {
        $gud = 0;
    } else {
        if ($getre[srequire] == 1) {
            if ($ge == $gt) {
                $gud = 1;
            } else {
                $gud = 0;
            }
        } else {
            $gud = 1;
        }
Пример #7
0
?>
">
<table border =0 width=60% align=center><Br><br>
<tr>
<td> Copy from Line of Business </td>
<td align=center ><?php 
echo get_select_data($dbLink, "fromnat", "ebpls_buss_nature", "natureid", "naturedesc", $fromnat, "true", "naturestatus='A' and natureid<>'{$natureid}' order by naturedesc", "onchange='_FRM.submit();'");
?>
</td>
</tr>
</table>
<table border =0 width=70% align=center><Br>
<?php 
$ic = 0;
$col1 = 0;
$getreq = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_taxfeeother a, ebpls_buss_tfo b", "where a.tfo_id=b.tfoid and a.natureid='{$fromnat}' order by a.mode");
$gt = NumRows($dbtype, $getreq);
while ($ic < $gt) {
    while ($s = FetchArray($dbtype, $getreq)) {
        $ic++;
        if ($col1 == 0) {
            include 'tablecolor-inc.php';
            print "<tr bgcolor='{$varcolor}'>\n";
        }
        if ($s[taxtype] == 1) {
            $lbl = ' (New)';
        }
        if ($s[taxtype] == 2) {
            $lbl = ' (ReNew)';
        }
        if ($s[taxtype] == 3) {
Пример #8
0
        //$updateveches = UpdateQuery($dbtype, $dbLink, 'ebpls_motorized_vehicles', "transaction = '$stat'",
        //"motorized_operator_id = '$owner_id' and retire = '0'");
        if ($linkpro == 'RELEASING') {
            $checkrentype = @mysql_query("select * from ebpls_motorized_penalty where permit_type = '{$permit_type}'");
            $checkrentype1 = @mysql_fetch_assoc($checkrentype);
            if ($checkrentype1['renewaltype'] == '2' and $stat == "ReNew") {
                $updateit = UpdateQuery($dbtype, $dbLink, "ebpls_motorized_vehicles", "retire = '5'", "motorized_operator_id = '{$owner_id}' and retire = '4'");
                $vbnmyear = date('Y');
                $updateit321 = UpdateQuery($dbtype, $dbLink, "ebpls_motorized_vehicles", "retire = '5'", "motorized_operator_id = '{$owner_id}' and retire = '0' and create_ts like '{$vbnmyear}%'");
                $nbvyear = date('Y');
                $updateit = UpdateQuery($dbtype, $dbLink, "ebpls_fees_paid", "active = '0'", "owner_id = '{$owner_id}' and active = '1' and input_date like '{$nbvyear}%'");
            } elseif ($stat == "Transfer/Dropping") {
                $updateit = UpdateQuery($dbtype, $dbLink, "ebpls_motorized_vehicles", "retire = '2', motorized_operator_id = ''", "motorized_operator_id = '{$owner_id}'  and retire = '1'");
                $nbvyear = date('Y');
                $updateit1 = UpdateQuery($dbtype, $dbLink, "ebpls_fees_paid", "active = '0'", "owner_id = '{$owner_id}' and active = '1' and input_date like '{$nbvyear}%'") or die(mysql_error);
                $checkifmore = SelectDataWhere($dbtype, $dbLink, "ebpls_motorized_vehicles", "where motorized_operator_id = '{$owner_id}'");
                $ifmore = mysql_num_rows($checkifmore);
                if ($ifmore > 0) {
                    $nbvyear = date('Y');
                    $updateit1 = UpdateQuery($dbtype, $dbLink, "ebpls_motorized_operator_permit ", " motorized_no_of_units = '{$ifmore}', transaction = 'ReNew', steps = 'For Payment'", "owner_id = '{$owner_id}' and active = '1' and for_year = '{$nbvyear}'") or die(mysql_error);
                }
            }
            ?>
                <body onload="parent.location='index.php?part=4&class_type=Permits&itemID_=3212&owner_id=<?php 
            echo $owner_id;
            ?>
&com=PrintReport&permit_type=<?php 
            echo $permit_type;
            ?>
&stat=<?php 
            echo $stat;
Пример #9
0
echo $getmsg[2];
?>
</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>
Пример #10
0
    }
} elseif ($getpended['renewaltype'] == '2') {
    if ($getpended[backtax] == '1') {
        //BackTax Computation for Scenario 2.... Goodluck sakin!!!!!!
        if ($permit_type == 'Motorized') {
            $getvech = @mysql_query("select * from ebpls_motorized_vehicles where motorized_operator_id = '{$owner_id}' and permit_type = 'Motorized' and retire='4' and paid = '0'");
            $totvech = mysql_num_rows($getvech);
            $totalotherpen = 0;
            $totalotherint = 0;
            $totalotherlate = 0;
            while ($getvec = @mysql_fetch_assoc($getvech)) {
                $getlen = strlen($getvec[motorized_plate_no]);
                $getlastnum = substr($getvec[motorized_plate_no], $getlen - 1, $getlen);
                $nsrenewaldate = "renewaldate{$getlastnum}";
                $nmrenewaldate = $getpended[$nsrenewaldate];
                $totvec = SelectDataWhere($dbtype, $dbLink, "ebpls_motorized_vehicles", "where motorized_operator_id = '{$owner_id}' \n\t\t\t\t\t\tand permit_type='{$permit_type}' and retire=0");
                $totvec1 = NumRows($dbtype, $totvec);
                $anongyearngayon = date('Y');
                $getlastnpaydate = @mysql_query("select * from renew_vehicle where owner_id = '{$owner_id}' and motorized_motor_id = {$getvec['motorized_motor_id']} and date_updated not like '{$anongyearngayon}%' and paid = '1' order by date_updated desc limit 1");
                $checkifnotempty = @mysql_num_rows($getlastnpaydate);
                if ($checkifnotempty == 0) {
                    $getlastnpaydate = @mysql_query("select pay_date as date_updated from temppayment where owner_id = '{$owner_id}' and permit_type = 'Motorized' and pay_date not like '{$anongyearngayon}%' order by pay_date desc limit 1");
                }
                $getlastnpaydate = @mysql_fetch_assoc($getlastnpaydate);
                $getlastnpaydate1 = substr($getlastnpaydate[date_updated], 0, 4);
                $lastpaydateyear = $getlastnpaydate1 + 1;
                $lastpaydateyearys = $getlastnpaydate1 + 1;
                $nyeardiff = $yeartoday - $lastpaydateyear;
                $ngyeardiff = $nyeardiff;
                $xloop = 1;
                $backtaxcompute = 0;
Пример #11
0
<?php

//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;
Пример #12
0
        $clr = 1;
    } elseif ($stat == 'ReNew') {
        $result = InsertQuery($dbtype, $dbLink, "tempbusnature", "", "'', '{$bus_code}', '{$bus_nature}',{$oldlay}, \n\t\t\t{$lay},{$owner_id},{$business_id}, now(), \n\t\t\t0, 1,'','ReNew')");
        $luk = SelectDataWhere($dbtype, $dbLink, $permittable, " \n\t\t\t\towner_id={$owner_id} and \n\t\t\t\tbusiness_id={$business_id} \n\t\t\t\tand active=1 and transaction='ReNew'");
        $luk = NumRows($luk);
        if ($luk == 0) {
            $res = InsertQuery($dbtype, $dbLink, $permittable, "\n\t\t\t\t(business_id, owner_id, for_year,\n\t\t\t\tapplication_date,input_by, transaction, \n\t\t\t\tpaid, steps, pin, active)", "{$business_id}, {$owner_id},'{$currdate['year']}', \n\t\t\t\tnow(), '{$usern}', '{$stat}', \n\t\t\t\t0,'For Assessment', '{$pin}', 1");
        }
        $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\t\tand active=1");
        $clr = 1;
    } elseif ($stat == 'Retire') {
        $wil = InsertQuery($dbtype, $dbLink, "tempbusnature", "", "'', '{$bus_code}', '{$bus_nature}',{$oldlay},\n                        {$lay},{$owner_id}, {$business_id}, now(),\n                        0, 1,2,'Retire'");
        $updatepermit = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise_permit", "pmode='{$pmode}'", "owner_id={$owner_id} and \n\t\t\tbusiness_id={$business_id} order by \n\t\t\tbusiness_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}");
        $luk = SelectDataWhere($dbtype, $dbLink, $permittable, " where \n\t\t\towner_id={$owner_id} and business_id={$business_id}\n                        and active=1 and transaction='Retire'");
        $luk = NumRows($luk);
        if ($luk == 0) {
            $res = InsertQuery($dbtype, $dbLink, $permittable, "(business_id, owner_id, for_year,\n\t\t\tapplication_date,input_by, transaction, \n\t\t\tpaid, steps, pin, active)", "{$business_id},{$owner_id},'{$currdate['year']}', \n\t\t\tnow(), '{$usern}', '{$stat}', \n\t\t\t0,'For Assessment', '{$pin}', 1");
        }
        $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                        and active=1");
        $clr = 1;
    }
    if ($clr == 1) {
        $dt = DeleteQuery($dbtype, $dbLink, "tempassess", "owner_id={$owner_id} and business_id={$business_id}\n\t\t\tand active=1 and transaction='{$stat}'");
        ?>
	<body onLoad='javascript: opener.location.reload(true); window.close()'></body>
<?php 
    }
}
Пример #13
0
&busItem=Occupational";'></body>
	           
				<?php 
                }
            }
        }
    }
    //end if occupational
    /*
    if ($owner_id=='') {
    $owner_id=$id;
    }
    */
    if ($permit_type == 'Occupational' || $permit_type == 'Peddlers') {
        $totalvec = 1;
    }
    //need to add drop command
    $getcnt = SelectDataWhere($dbtype, $dbLink, $temptbl, "where owner_id={$owner_id}");
    $cnts = NumRows($dbtype, $getcnt);
    // $lop=1;
    for ($lop = 1; $lop <= $cnts; $lop++) {
        $gettemp = SelectDataWhere($dbtype, $dbLink, $temptbl, "where  owner_id={$owner_id} limit 1");
        $getfee = FetchArray($dbtype, $gettemp);
        $slash = 'add';
        require_once "includes/stripslash.php";
        //insert fees to main table
        $fee_desc = addslashes($getfee[fee_desc]);
        $insertit = InsertQuery($dbtype, $dbLink, "ebpls_fees_paid", "(owner_id, fee_desc, fee_amount, \n\t\t\t\tmulti_by, permit_type, permit_status,\n\t\t\t\tinput_by, input_date)", "{$owner_id}, '{$fee_desc}', {$getfee['fee_amount']}, \n\t\t\t\t{$totalvec}, '{$permit_type}', '{$status}', \n\t\t\t\t'{$usern}', '{$tdate}'");
        $deltemp = DeleteQuery($dbtype, $dbLink, $temptbl, "owner_id ={$owner_id} and \n\t\t\t\t\tpermit_type='{$permit_type}' limit 1");
    }
}
Пример #14
0
    //$owner_id=$owner_id;
    $owner_first_name = $res[0];
    $owner_middle_name = $res[1];
    $owner_last_name = $res[2];
    if ($tag == 'Occupational' and $permit_type == 'Occupational') {
        //$owner_id = $idcnt;
        require_once "includes/form_add_mtoppermit.html";
        //require_once "includes/form_pay_occu.html";
        $getemp = SelectMultiTable($dbtype, $dbLink, "{$permittable} a, ebpls_business_enterprise b", "a.occ_permit_code,a.occ_permit_application_date, \r\n\t\t\t a.occ_position_applied , b.business_name", "where a.owner_id={$owner_id} and a.business_id=b.business_id");
        $getit = FetchRow($dbtype, $getemp);
        $permit_code = $getit[0];
        $pos_app = $getit[2];
        $permit_date = $getit[1];
        $employer_name = $getit[3];
        require_once "includes/form_pay_midoccu.php";
        require_once "includes/paymtop.php";
    } elseif ($permit_type == 'Peddlers') {
        require_once "includes/form_add_mtoppermit.html";
        $getemp = SelectDataWhere($dbtype, $dbLink, $permittable, "where owner_id={$owner_id}");
        $getit = FetchArray($dbtype, $getemp);
        $merchandise = stripslashes($getit[merchandise_sold]);
        $peddler_bus = stripslashes($getit[peddlers_business_name]);
        $apply = $getit[application_date];
        $permid = $getit[peddlers_permit_id];
        require_once "includes/form_pay_midpeddler.html";
        require_once "includes/paymtop.php";
    } else {
        require_once "includes/form_add_mtoppermit.html";
        require_once "includes/paymtop.php";
    }
}
Пример #15
0
<?php

/* Purpose: Approval processing

Modication History:
2008.05.06 RJC Define undefined to clean up phperror.log
*/
require_once "includes/variables.php";
$PROCESS = isset($PROCESS) ? $PROCESS : '';
//2008.05.06 define undefined
$com = isset($com) ? $com : '';
if ($com != 'approve') {
    // process successful
    if ($PROCESS == 'SAVE' || $PROCESS == 'PAYMENT') {
        $dec_comment = addslashes($dec_comment);
        $getapp = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_approve", "where owner_id = {$owner_id} and \n\t\t\t\t business_id={$business_id}");
        $getnum = NumRows($dbtype, $getapp);
        if ($getnum == 0) {
            $savedata = InsertQuery($dbtype, $dbLink, "ebpls_buss_approve", "", "'',{$owner_id}, {$business_id}, {$decide}, \n\t\t\t\t '{$dec_comment}', '{$stat}'");
        } else {
            $updata = UpdateQuery($dbtype, $dbLink, "ebpls_buss_approve", "decision={$decide},dec_comment='{$dec_comment}', \n\t\t\t\t transaction='{$stat}'", "owner_id = {$owner_id} and business_id={$business_id}");
        }
        if ($decide == 1) {
            $updateit = UpdateQuery($dbtype, $dbLink, $permittable, "steps='For Payment'", "owner_id={$owner_id} and business_id={$business_id}");
        }
        if ($PROCESS == 'PAYMENT' and $decide == 1) {
            ?>
			<body onload="parent.location='index.php?part=4&newpred=<?php 
            echo $newpred;
            ?>
&noregfee=<?php 
Пример #16
0
<?php

if ($totind < $getd['defamt']) {
    $totind = $getd['defamt'];
    $compvalrange = $getd['defamt'];
    $usemin = 'Replaced with Minimum Amount ';
    $compval = $getd['defamt'];
}
$getd['tfodesc'] = addslashes($getd['tfodesc']);
$chkintfo = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_tfo", "where tfodesc='{$getd['tfodesc']}'");
$chkintfo = FetchArray($dbtype, $chkintfo);
if ($chkintfo['taxfeetype'] == 1) {
    $tottax = $tottax + $totind;
}
$getd['tfodesc'] = stripslashes($getd['tfodesc']);
Пример #17
0
        $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 ");
        $gg = NumRows($dbtype, $getown);
        if ($gg > 0) {
            $getown = SelectMultiTable($dbtype, $dbLink, "ebpls_motorized_vehicles a, vehicle_transfer b", "*", " where a.motorized_motor_id ='{$mid}' and a.motorized_motor_id=b.motor_id and\n                         b.new_owner='{$owner_id}'");
            $ff = NumRows($dbtype, $getown);
            $ft = FetchArray($dbtype, $getown);
            if ($ff > 0) {
                //update vehicle
Пример #18
0
     $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');
 $pdf->SetX(15);
 $pdf->Cell(30, 5, 'BASE VALUE/INPUT', 1, 0, 'C');
 $pdf->Cell(45, 5, 'AMOUNT/FORMULA', 1, 0, 'C');
 $pdf->Cell(25, 5, 'TAX DUE', 1, 1, 'C');
 $cnt = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_taxfeeother a, ebpls_buss_tfo c", "where natureid={$getn['0']} and a.taxtype='{$tftype}'\n                         and c.tfoid=a.tfo_id {$tft}");
 $cnt1 = NumRows($dbtype, $cnt);
 //get total count of tax per natureid
 $lop1 = 0;
 $getd1 = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_taxfeeother a,\n                        ebpls_buss_nature b, ebpls_buss_tfo c", "c.tfodesc, a.amtformula, a.taxfeeid, b.naturedesc, a.indicator,\n                        a.basis, a.mode,c.taxfeetype, c.tfoid, a.uom, a.min_amt", "where a.natureid={$getn['0']} and b.natureid={$getn['0']}\n                        and a.taxtype='{$tftype}' and c.tfoid=a.tfo_id\n                        {$tft} order by a.mode asc");
 while ($lop1 < $cnt1) {
     while ($getd = FetchArray($dbtype, $getd1)) {
         $totind = 0;
         $pdf->SetX(15);
         $pdf->Cell(30, 5, $getd['tfodesc'], 1, 0, 'C');
         $pdf->Cell(45, 5, $getd['amtformula'], 1, 0, 'C');
         $show_complex = '';
         $lop1++;
         $getyears = SelectMultiTable($dbtype, $dbLink, "tempassess a,  ebpls_buss_tfo c", "c.or_print,a.date_create,c.tfodesc, c.counter", "where a.tfoid=c.tfoid and a.tfoid = {$getd['tfoid']} and a.active=0 \n\t\t\t\t order by a.date_create desc limit 1");
         $getyr = FetchArray($dbtype, $getyears);
         $bill_date = date('Y') - date('Y', strtotime($getyr[date_create]));
Пример #19
0
<?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>





Пример #20
0
print "<td NOWRAP>&nbsp;{$get_info['6']}&nbsp</td>\n";
print "<td>&nbsp;{$get_info['7']}&nbsp</td>\n";
//              print "<td>&nbsp;$field&nbsp</td>\n";
$staxfee = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_preference", "sassess, predcomp", "");
$prefset = FetchArray($dbtype, $staxfee);
$sassesscomplex = $prefset['sassess'];
// per estab
$predcomp = $prefset['predcomp'];
if ($predcomp == 1) {
    $owner_id = $get_info[0];
    $business_id = $get_info[1];
    $getnat = SelectDataWhere($dbtype, $dbLink, "tempbusnature", " where owner_id={$owner_id} and business_id={$business_id} and active =1\n                                  and transaction='{$get_info['7']}' and date_create like '{$yearnow}%'");
    $cntnat = mysql_num_rows($getnat);
    $getnat = SelectDataWhere($dbtype, $dbLink, "tempbusnature", " where owner_id={$owner_id} and business_id={$business_id} and active =0\n                                  and transaction='{$get_info['7']}' and date_create like '{$yearnow}%'");
    $orignat = mysql_num_rows($getnat);
    $getnat = SelectDataWhere($dbtype, $dbLink, "tempbusnature", " where owner_id={$owner_id} and business_id={$business_id}\n                                  and transaction='{$get_info['7']}' and date_create like '{$yearnow}%'");
    $nat = mysql_num_rows($getnat);
    if ($orignat == '') {
        $orignat = $cntnat;
    }
    if ($orignat < $nat) {
        $newpred = '1';
        $noregfee = 1;
    }
}
$newpred = isset($newpred) ? $newpred : '0';
//2008.05.06
$noregfee = isset($noregfee) ? $noregfee : 0;
print "<td NOWRAP>\n            <a href='index.php?part=4&newpred={$newpred}&noregfee={$noregfee}&class_type=Permits&itemID_=5212&permitid={$get_info['2']}&owner_id={$get_info['0']}&com=approve&permit_type={$tag}&stat={$get_info['7']}&business_id={$get_info['1']}&busItem=Business&istat={$get_info['7']}'> Select </a>&nbsp\n            </td>";
//              }//end while
print "</tr>\n";
Пример #21
0
            $getfee = FetchRow($dbtype, $getfee);
            $ttfee = $ttfee + $getfee[0];
        }
        $getot = SelectDataWhere($dbtype, $dbLink, $fee, " where permit_type='{$stat}' and active=1");
        $getact = SelectMultiTable($dbtype, $dbLink, "fish_activity", "sum(act_fee)", "where owner_id={$owner_id} and transaction='{$stat}' and active = 1");
        $getact = FetchRow($dbtype, $getact);
        $tfee1 = $getact[0];
        $getboat = SelectDataWhere($dbtype, $dbLink, "fish_assess", "where owner_id={$owner_id}");
        while ($getb = FetchArray($dbtype, $getboat)) {
            $getfee = SelectDataWhere($dbtype, $dbLink, "culture_fee", "where culture_id='{$getb['culture_id']}' and\n\t\t    transaction='{$stat}' and active = 1  ");
            $getnum = FetchArray($dbtype, $getfee);
            if ($getnum[fee_type] == '3') {
                $getfee = SelectDataWhere($dbtype, $dbLink, "culture_range", "where culture_id='{$getb['culture_id']}' and\n\t\t             range_lower<{$getb['amt']} and range_higher>={$getb['amt']} ");
                $getnum = NumRows($dbtype, $getfee);
                if ($getnum == 0) {
                    $getfee = SelectDataWhere($dbtype, $dbLink, "culture_range", "where culture_id='{$getb['culture_id']}' and\n                        range_lower<={$getb['amt']} and range_higher=0");
                }
            }
            $getfee1 = FetchArray($dbtype, $getfee);
            $ttfee1 = $ttfee1 + $getfee1[amt];
        }
        ?>
	<table width=60%>
	<tr>
	<td>Fees from Boat Registration</td><td><?php 
        echo number_format($ttfee, 2);
        ?>
</td>
	</tr>
	<tr>
	<td>Fees from Fish Activities</td><td><?php 
Пример #22
0
         $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])) {
             $tfee = $getre[amt];
         } else {
             eval("\$tfee={$ft['1']}{$getre['amt']};");
         }
     }
     $tfee1 = $tfee1 + $tfee;
 }
 $backtaxcompute = $backtaxcompute + $tfee1;
 //Other Permit Fees
 $getot1 = SelectDataWhere($dbtype, $dbLink, "ebpls_fishery_fees", "where permit_type='{$stat}' and active=1");
 $ff = 0;
 while ($getj = FetchArray($dbtype, $getot1)) {
     $otherfee = $getj[fee_amount];
     $ff = $ff + $getj[fee_amount];
 }
 $backtaxcompute = $backtaxcompute + $ff;
 $backtotalfee = $backtaxcompute;
 //Get Surcharge and Interest
 if ($getpen['indicator'] == '1') {
     $backpen = $getpen['rateofpenalty'];
 } elseif ($getpen['indicator'] == '2') {
     eval("\$backpen={$backtotalfee}*{$getpen['rateofpenalty']};");
 }
 $backtaxcompute = $backtaxcompute + $backpen;
 $mpyear = date('Y');
Пример #23
0
}
$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;
}
//getpayhistory
$gethis = SelectDataWhere($dbtype, $dbLink, "ebpls_transaction_payment_or_details", "where trans_id={$owner_id} and payment_id={$business_id} and \n\t\t\t transaction='{$istat}' and payment_part='{$s}+1' and \n\t\t\t or_entry_type<>'CHECK'");
$getc = NumRows($dbtype, $gethis);
$gethis = SelectDataWhere($dbtype, $dbLink, "ebpls_transaction_payment_or_details a, \n\t\t\tebpls_transaction_payment_check b", "where a.trans_id={$owner_id} and a.payment_id={$business_id} \n\t\t\t and a.transaction='{$istat}' and a.payment_part='{$s}+1' \n\t\t\t and a.or_entry_type='CHECK' and b.check_status='CLEARED'\n                         and a.or_no=b.or_no");
$getch = NumRows($dbtype, $gethis);
$gethis = $getc + $getch;
if ($gethis > 0 and $pmode == 'ANNUAL') {
    $grdmt = 0;
    $tabs = 0;
    $grandamt = 0;
    $an = 1;
}
if ($gettag[sassess] != 1) {
    $grdmt = $total_tax_compute + $total_sf_compute + $fee;
    //$grdmt=$fee+$gentax;
    ?>
<table border=0 cellpadding=0 cellspacing=0 width="100%" align = center class=sub>

<td width=25%>&nbsp;</td><td>&nbsp;</td>
Пример #24
0
 if (strtolower($pmode) == 'semi-annual') {
     if ($montoday >= 1 and $montoday <= 6) {
         $ssemcnt = 1;
     } elseif ($montoday >= 7 and $montoday <= 12) {
         $ssemcnt = 2;
     }
     if ($ssemcnt == '1') {
         $getpendedrenewal = $getrenew['semdue1'];
     } elseif ($ssemcnt == '2') {
         $getpendedrenewal = $getrenew['semdue2'];
     }
 }
 if (strtolower($pmode) == 'annual') {
     $getpendedrenewal = $getpended['renewaldate'];
 }
 $getstartdate = SelectDataWhere($dbtype, $dbLink, "ebpls_business_enterprise", "where owner_id = {$owner_id} and business_id={$business_id} and retire=0");
 $getstart = FetchArray($dbtype, $getstartdate);
 $startdate = $getstart[business_start_date];
 $renewaldate = "{$addend}{$getpendedrenewal}";
 $renewaldate = strtotime($renewaldate);
 $renewaldate = date('Y-m-d', $renewaldate);
 $nStartDate = date('Y-m-d', strtotime($startdate));
 //get cash first
 $getcas = SelectMultiTable($dbtype, $dbLink, "ebpls_transaction_payment_or a,\n                        ebpls_transaction_payment_or_details b", "sum(a.total_amount_paid) as cash", "where a.or_no=b.or_no and b.trans_id={$owner_id} and\n                        b.or_entry_type='CASH' and\n                        b.payment_id={$business_id} and b.transaction='{$stat}'");
 $getcash = FetchRow($dbtype, $getcas);
 $getclear = SelectMultiTable($dbtype, $dbLink, "ebpls_transaction_payment_check a,\n                        ebpls_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                        c.transaction='{$istat}' and\n                        c.trans_id={$owner_id} and c.payment_id={$business_id}");
 $totcheck = FetchRow($dbtype, $getclear);
 $taonnatinngayon = date('Y');
 $buwannatinngayon = date('m');
 if (strtolower($pmode) == "quarterly") {
     if ($buwannatinngayon >= 1 and $buwannatinngayon <= 3) {
Пример #25
0
                    $sendthis = "Your Tax Due Is " . $sendthis;
                }
            } 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;
Пример #26
0
 if (strtolower($list_option) == 'capital investment') {
     $totinv = $resulta[cap_inv];
 } else {
     $totinv = $resulta[last_yr];
 }
 $totinv1 = $totinv1 + $totinv;
 $pdf->Cell(30, 5, number_format($totinv, 2), 1, 0, 'R');
 $getlineb = mysql_query("select sum(a.compval) as tax_due \n\t\t\t\tfrom tempassess a where a.owner_id={$resulta['owner_id']} and\n                                a.business_id={$resulta['business_id']} and\n                                a.active=1 and natureid<>'' and taxfeeid<>''");
 $resultb = mysql_fetch_assoc($getlineb);
 $totdue = $resultb[tax_due];
 $gtotdue = $gtotdue + $totdue;
 $dec = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_preference", "");
 $sas = FetchArray($dbtype, $dec);
 $sas = $sas[sassess];
 if ($sas == '') {
     $resultf = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_tfo", "where tfoindicator='1' and tfostatus='A' and taxfeetype<>'1' and \n\t\t\ttfodesc not in (select tfodesc from \n\t\t\tebpls_buss_tfo where tfodesc like 'garbage%')");
     $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={$resulta['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;
         }
         $regfee = $regfee + $getf[6];
         $totfee = $totfee + $getf[6];
         $usemin = '';
     }
     ///garbage fee in place
Пример #27
0
                                        <!--<body onload='javascript:alert("Line Already Added");'></body>--><?php 
                }
            }
        }
    }
    //editline
}
if ($business_id == '') {
    $business_id = 0;
}
//get bus nature
$getnat = SelectDataWhere($dbtype, $dbLink, "tempbusnature", " where owner_id={$owner_id} and business_id={$business_id}\n                                  and active = 1");
while ($getit = FetchArray($dbtype, $getnat)) {
    $getit['bus_nature'] = stripslashes($getit['bus_nature']);
    $bus_code = $getit['bus_code'];
    $getcapinv = SelectDataWhere($dbtype, $dbLink, "tempbusnature", " where owner_id={$owner_id} and business_id={$business_id} and bus_code='{$bus_code}'\n                                  order by tempid asc limit 1");
    $getcapi = FetchArray($dbtype, $getcapinv);
    $ifpaid = $getit['recpaid'];
    $editline = isset($editline) ? $editline : '';
    //2008.05.08
    if ($editline == 'y' and $natcode == $getit['tempid']) {
        ?>
				<tr>
				<td align="left" valign="top" class='normal'>&nbsp;
<?php 
        if ($stat == 'New' || $stat == 'ReNew' and $watdo == '') {
            echo get_select_data_where($dbLink, 'business_nature_code', 'ebpls_buss_nature ', 'natureid', 'naturedesc', $getit['bus_code'], "naturestatus='A' and natureid not in (select bus_code from tempbusnature where business_id='{$business_id}' and owner_id='{$owner_id}' and bus_code<>{$getit['bus_code']} and retire < 1) order by naturedesc");
        } else {
            echo $getit['bus_nature'];
        }
        ?>
Пример #28
0
<tr><td colspan=4 align="center" valign="center" class='header2' width='100%'> Line of Business </td></tr>
<?php 
//get bus nature
$lope = 0;
$gr = 0;
while ($lope < $delayed) {
    ?>
<tr><td></td><td >Gross Sales for <?php 
    echo $yearnow - $delayed + $lope;
    ?>
</td></tr>		
<?php 
    $yearko = $yearnow - $delayed + $lope;
    $yearar = $yearar . ($yearnow - $delayed + $lope) . ",";
    $lope++;
    $getnat = SelectDataWhere($dbtype, $dbLink, "tempbusnature", " where owner_id={$owner_id} and business_id={$business_id}\n                                  and active = 1");
    while ($getit = FetchArray($dbtype, $getnat)) {
        $getit[bus_nature] = stripslashes($getit[bus_nature]);
        //check if have inputted value
        $getinput = mysql_query("select * from ebpls_buss_taxfeeother where\n\t\t\t\t\t\t\t\t\t\t\t\tnatureid = '{$getit['bus_code']}' and basis=3 and taxtype=2");
        $getin = mysql_num_rows($getinput);
        $getwe = mysql_fetch_assoc($getinput);
        ?>
					<tr>
					<td><?php 
        echo $getit[bus_nature];
        ?>
					<input type=hidden name=yearko[<?php 
        echo $gr;
        ?>
] value=<?php 
Пример #29
0
            } else {
                $depval = '';
                $depval1 = '';
            }
            print "<tr><td align =right>Engine Capacity</td><td>&nbsp;\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}> &nbsp;&nbsp;\n                        <input type=text name=rangehigh[{$i}] size=5 value={$getrec['3']} {$depval1}> &nbsp;&nbsp;\n                        <input type=text name=amt[{$i}] size=5 value={$getrec['5']}></td>\n                        </td><td>&nbsp</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 &nbsp;&nbsp; Range High &nbsp;&nbsp; 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 = '';
Пример #30
0
            $datetoday = date("Y-d-m H:i:s");
            $nOccupancy = new EBPLSOccupancy($dbLink, 'false');
            $nOccupancy->setData(OCCUPANCY_TYPE_CODE, $nCode);
            $nOccupancy->setData(OCCUPANCY_TYPE_DESC, $nType);
            $nOccupancy->setData(OCCUPANCY_TYPE_DATE_UPDATED, $datetoday);
            $nOccupancy->setData(UPDATED_BY, $ThUserData[username]);
            $nOccupancy->update($bbo);
            $bbo = "";
            $com = 'edit';
            ?>
                        <body onload='UpRec();'></body>
                        <?php 
        }
    }
} elseif ($confx == 1) {
    $cntrec = SelectDataWhere($dbtype, $dbLink, "ebpls_occupancy_type a, ebpls_business_enterprise b", "where a.occupancy_type_code='{$bbo}' and b.business_occupancy_code=a.occupancy_type_code ");
    $cnt = NumRows($dbtype, $cntrec);
    if ($cnt > 0) {
        ?>
       <body onload='ExistOther();parent.location="index.php?part=4&class_type=Preference&selMode=ebpls_noccupancy&is_desc=ASC";'></body>
<?php 
    } else {
        $deact = DeleteQuery($dbtype, $dbLink, "ebpls_occupancy_type", "occupancy_type_code='{$bbo}'");
        ?>
       <body onload='DelRec();parent.location="index.php?part=4&class_type=Preference&selMode=ebpls_noccupancy&is_desc=ASC";'></body>
<?php 
    }
    $bbo = "";
    $nCode = '';
    $nType = '';
}