Current File : /home/inlingua/public_html/faridabad/icentex/pg/ingl_invoice_payment.form.php |
<?php
// Created on: 10-05-2013
// Include header
include "header_in.php";
?>
<h3 class='pa-nor-navbar'><a href='index.php'>Home</a> >> <a href='ingl_invoice_payment.select.php'>ingl_invoice_payment</a> >> ingl_invoice_payment</h3>
<?php
echo $succFailMesg;
// Show result of a form submission?
if ($showResult == "Y")
{ echo "<br><a href='ingl_invoice_payment.select.php'>Back</a><br>";
// Include footer
include "footer_fd.php";
return;
}
?>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script language="javascript">
<!--
function validate1(form)
{
if (form.payment_mode.value=="")
{ alert("Select Payment Mode First.");
form.payment_mode.focus(); return false;
}
if (form.recNo.value=="")
{ alert("recNo cannot be blank. Please enter it.");
form.recNo.focus(); return false;
}
return true;
}
-->
</script>
<?php
if($dbObject->getDbField('invice_no')=="0" || $dbObject->getDbField('invice_no')=="")
{
echo"There is some problem";
die();
}
?>
<script language="javascript">
$(function() {
$('#datepicker3').datepicker({
changeMonth: true,
changeYear: true
});
});
$(function() {
$('#datepicker4').datepicker({
changeMonth: true,
changeYear: true
});
});
</script>
<?php
if(isset($_GET['invice_no']))
{
$Sqlqurey="Select course_id from ingl_invoice_detail where main_id=".$_GET['invice_no']." limit 1";
$result=mysqli_query($conn,$Sqlqurey);
$Course_id=mysql_fetch_row($result);
//echo "<tr><td>Reg. Id</td><td>$nsbp<b>". $Course_id[0]."</b></td>";
}
?>
<form id='aForm' method='post' action='ingl_invoice_payment.main.php' onsubmit="return validate(this)">
<input type='hidden' name='recNo' class='required' value="<?php echo $dbObject->getDbField('recNo');?>">
<input type='hidden' name='kV' value="<?php echo $_REQUEST['kV'];?>">
<input type='hidden' name='invice_no' value="<?php echo $dbObject->getDbField('invice_no');?>" size='11' maxlength='11'>
<table border='0' class='pa-nor'>
<tr><td><b>Reg. Id</b></td><td><?php echo "<b>".$Course_id[0]."</b>"; ?></td></tr>
<tr><td><b>Product</b></td>
<td id="prodcat"><?php
$subprodcat_array=array();
$subprodcat= new dbHandler();
$subprodcat->connect();
$query_subprodcat="select recNo,bill_details from ingl_billing_main WHERE `recNo` in (select product_id FROM ingl_invoice_detail WHERE `main_id` =".$_GET['invice_no']." ) order by bill_details";
$result_subprodcat=$subprodcat->select($query_subprodcat);
while($data_subprodcat=$subprodcat->SelectNext($result_subprodcat))
{
$subprodcat_array[''.$data_subprodcat[recNo].'']=$data_subprodcat['bill_details'];
}
$subprodcat_selected=$numP['product_id'];
$subprodcat_extra='style="width:130px; class="nodupli" onchange="displaystudentbal(this.value,'.$_GET['invice_no'].');"';
//$subprodcat_extra='style="width:130px; class="nodupli" ';
echo select_drop($subprodcat_array,'product_id','-- Select Product --',0,$subprodcat_selected,$subprodcat_extra);
//print_r($customer_array);
?>
</td>
<td id="baltd" style="display:none;"><h6>Remaning Balance</h6><strong id="Bal">500.00</strong></td>
</tr>
<tr valign='top'><td>Date</td><td><input type='text' name='createDate' id="datepicker3" value="<?php echo $dbObject->getDbField('createDate');?>" size='10' maxlength='10'></td><td></td></tr>
<tr valign='top'><td>Amount Received</td><td><input type='text' name='amount' value="<?php echo $dbObject->getDbField('amount');?>" size='10' maxlength='10'></td><td></td></tr>
<tr valign='top'><td>Payment Mode</td><td>
<select name="payment_mode" id="payment_mode">
<option value="" >---SELECT---</option>
<option value="Cash" <?php if($dbObject->getDbField('payment_mode')=="Cash") echo"selected"; ?>>Cash</option>
<option value="Cheque" <?php if($dbObject->getDbField('payment_mode')=="Cheque") echo"selected"; ?>>Cheque</option>
<option value="Card" <?php if($dbObject->getDbField('payment_mode')=="Card") echo"selected"; ?>>Card</option>
<option value="Net Banking" <?php if($dbObject->getDbField('payment_mode')=="Net Banking") echo"selected"; ?>>Net Banking</option>
</select>
</td><td></td></tr>
<tr valign='top'><td id="cheque_card">Cheque No</td><td><input type='text' name='cheque_no' value="<?php echo $dbObject->getDbField('cheque_no');?>" size='20' maxlength='250'></td><td></td></tr>
<tr valign='top'><td colspan='2'><span id="cheque_card_name">Cheque in favour of:</span><br><textarea wrap='virtual' rows='3' cols='50' name='favour_of'><?php echo $dbObject->getDbField('favour_of');?></textarea></td><td></td></tr>
<tr><td colspan='3'><input type='submit' name='aC' value='<?php echo $currentMode;?>'></td></tr>
</table>
</form>
<script>
$(function() {
$('#aForm').validate({
errorPlacement: function(error, element)
{ error.appendTo( element.parent("td").next("td") );
}
});
});
$("#payment_mode").change(function(){
//alert($(this).val());
if($(this).val()=="Card"){
$("#cheque_card").html("Transaction Id");
$("#cheque_card_name").html("Card Details");
}
if($(this).val()=="Cheque"){
$("#cheque_card").html("Cheque No");
$("#cheque_card_name").html("Cheque in favour of:");
}
if($(this).val()=="Net Banking"){
$("#cheque_card").html("Transaction Id");
$("#cheque_card_name").html("Details:");
}
});
$( document ).ready(function() {
if($("#payment_mode").val()=="Card"){
$("#cheque_card").html("Transaction Id");
$("#cheque_card_name").html("Card Details");
}
if($("#payment_mode").val()=="Cheque"){
$("#cheque_card").html("Cheque No");
$("#cheque_card_name").html("Cheque in favour of:");
}
if($("#payment_mode").val()=="Net Banking"){
$("#cheque_card").html("Transaction Id");
$("#cheque_card_name").html("Details:");
}
});
</script>
<?php
// Include footer
include "footer_in.php";
?>