$acd_term = AcademicTermPeriod::model()->findByPk($data['fees_academic_period_id']);
        $field1 = '-';
        $field2 = '-';
        $field3 = '-';
        $field4 = '-';
        $field5 = 'CASH';
        if ($data['fees_payment_method_id'] == 1) {
            $cash_amt = FeesPaymentCash::model()->findByPk($data['fees_payment_cash_cheque_id']);
            $amount = $cash_amt->fees_payment_cash_amount;
        } else {
            $cash_amt = FeesPaymentCheque::model()->findByPk($data['fees_payment_cash_cheque_id']);
            $amount = $cash_amt->fees_payment_cheque_amount;
            $field1 = $cash_amt->fees_payment_cheque_number;
            $date = date_create($cash_amt->fees_payment_cheque_date);
            $field2 = date_format($date, 'd-m-Y');
            $bank_name = BankMaster::model()->findByPk($cash_amt->fees_payment_cheque_bank);
            $field3 = $bank_name->bank_short_name;
            $field4 = $cash_amt->fees_payment_cheque_branch;
            $field5 = 'CHEQUE';
        }
        //case receipt
        ?>
	
<div id="firstlayer">
       <div class="part1">
            <!------------------------header part--------------------->
	    <div class="headerpart1">
              <div class="receipt-logo">
			<?php 
        $test = Yii::app()->user->getState('org_id');
        if (isset($test)) {
             $payable1 = $payable;
             //$out = $payable - $var;
         }
         $out = $payable - $var;
         $ch_num = FeesPaymentCheque::model()->findByPk($f->fees_payment_cash_cheque_id)->fees_payment_cheque_number;
         echo "<tr class=" . $class . ">";
         echo "<td>" . $i . "</td>";
         echo "<td>" . AcademicTermPeriod::model()->findByPk($f->fees_academic_period_id)->academic_term_period . "</td>";
         echo "<td>" . AcademicTerm::model()->findByPk($f->fees_academic_term_id)->academic_term_name . "</td>";
         echo "<td>" . FeesPaymentMethod::model()->findByPk($f->fees_payment_method_id)->fees_payment_method_name . "</td>";
         //echo "<td>".FeesMaster::model()->findByPk($f->fees_payment_master_id)->fees_master_total."</td>";
         echo "<td>" . $payable1 . "</td>";
         $chqmodel = FeesPaymentCheque::model()->findByPk($f->fees_payment_cash_cheque_id);
         echo "<td>" . $chqmodel->fees_payment_cheque_amount . "</td>";
         //$var += FeesPaymentCheque::model()->findByPk($f->fees_payment_cash_cheque_id)->fees_payment_cheque_amount;
         $bank_model = BankMaster::model()->findByPk($chqmodel->fees_payment_cheque_bank);
         $bank_name = $bank_model->bank_short_name;
         $bank_branch = $bank_model->bank_short_name;
         $date = $f->fees_received_date;
         $new_date = date("d-m-Y", strtotime($date));
         echo "<td>" . $new_date . "</td>";
         echo "<td>" . $bank_name . "</td>";
         echo "<td>" . $bank_branch . "</td>";
         echo "<td>" . $ch_num . "</td>";
         echo "<td>" . FeesReceipt::model()->findByPk($f->fees_receipt_id)->fees_receipt_number . "</td>";
         ++$temp;
         $i += 1;
         $flag = 1;
     }
 }
 if ($temp != 0 && $flag == 1) {
     $cash_id = $list['fees_payment_cash_cheque_id'];
     $amunt = FeesPaymentCash::model()->findByPk($cash_id)->fees_payment_cash_amount;
     $final_total += $amunt;
     $type = "Cash";
     echo '<td>' . $type . '</td>';
     echo '<td>-</td>';
     echo '<td>-</td>';
     echo '<td>' . $rec_no . '</td>';
     echo '<td>' . $amunt . '</td>';
 } else {
     $cheque_id = $list['fees_payment_cash_cheque_id'];
     $cheque_status = "Return cheque";
     $amunt1 = FeesPaymentCheque::model()->findByPk($cheque_id)->fees_payment_cheque_amount;
     $status = FeesPaymentCheque::model()->findByPk($cheque_id)->fees_payment_cheque_status;
     $chno = FeesPaymentCheque::model()->findByPk($cheque_id)->fees_payment_cheque_number;
     $bank = BankMaster::model()->findByPk(FeesPaymentCheque::model()->findByPk($cheque_id)->fees_payment_cheque_bank)->bank_full_name;
     if ($status == 0) {
         $final_total += $amunt1;
         $type = "Cheque";
         echo '<td>' . $type . '</td>';
         echo '<td>' . $bank . '</td>';
         echo '<td>' . $chno . '</td>';
         echo '<td>' . $rec_no . '</td>';
         echo '<td>' . $amunt1 . '</td>';
     } else {
         echo '<td>' . $cheque_status . '</td>';
         echo '<td>' . $bank . '</td>';
         echo '<td>' . $chno . '</td>';
         echo '<td>' . $rec_no . '</td>';
         echo '<td>' . $amunt1 . '</td>';
     }
예제 #4
0
echo $form->error($model, 'payment_type');
?>
	</div>
	<div class="row">
		<?php 
echo $form->labelEx($model, 'bank_master_id');
?>
		<?php 
if ($model->scenario == 'update') {
    if ($model->payment_type == 'રોકડ') {
        echo $form->dropDownList($model, 'bank_master_id', CHtml::listData(BankMaster::model()->findAll(), 'id', 'bank_name'), array('empty' => '-------Select Bank-------', 'disabled' => 'true'));
    } else {
        echo $form->dropDownList($model, 'bank_master_id', CHtml::listData(BankMaster::model()->findAll(), 'id', 'bank_name'), array('empty' => '-------Select Bank-------'));
    }
} else {
    echo $form->dropDownList($model, 'bank_master_id', CHtml::listData(BankMaster::model()->findAll(), 'id', 'bank_name'), array('empty' => '-------Select Bank-------'));
}
?>
		<?php 
//echo $form->dropDownList($model,'bank_master_id',CHtml::listData(BankMaster::model()->findAll(),'id','bank_name'),array('empty' => '-------Select Bank-------'));
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'bank_master_id');
?>
	</div>
	

	<div class="row">
		<?php 
echo $form->labelEx($model, 'cheque_dd_no');
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = BankMaster::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
예제 #6
0
	     <th>Payment Method</th>
	     <th>Paid Amount</th>
	     <th>Cheque/DD Number</th>
	     <th>Bank</th>
	     <th>Receipt Number</th>
	     <th>OutStanding Amount</th>
	  </tr>
<?php    
		$i=1;
		$out=$course->course_fees;
		foreach($model as $details)
		{
	  	 echo '<tr align="center">';
	       echo '<td>'.$i.'</td>';
	       echo '<td>'.date_format(new DateTime($details['fees_payment_received_date']),'d-m-Y').'</td>';
	       echo '<td>'.$details['fees_payment_type'].'</td>';
	       echo '<td>'.$details['fees_payment_amount'].'</td>';
	       echo '<td>'.$details['fees_payment_cheque_number'].'</td>';
		$b= BankMaster::model()->findByPk($details['fees_payment_cheque_bank']);
	       echo '<td>'.$b['bank_full_name'].'</td>';
	       echo '<td>'.$details['fees_payment_receipt_no'].'</td>';
	       echo '<td>'.$out-=$details['fees_payment_amount'].'</td>';
		echo '</tr>';
		$i++;
	       }
     echo '</table>';
}
}
?>
</div>
		</td>
		<td>
		      <?php 
        echo $v['miscellaneous_fees_payment_cheque_number'];
        ?>
		
		</td>
		<td>
		      <?php 
        echo date("d-m-Y", strtotime($v['miscellaneous_fees_payment_cheque_date']));
        ?>
		
		</td>
		<td>
		       <?php 
        echo BankMaster::model()->findByPk($v['miscellaneous_fees_payment_cheque_bank'])->bank_full_name;
        ?>
		
		</td>
		<td>
		      <?php 
        echo $v['miscellaneous_fees_payment_cheque_branch'];
        ?>
		
		</td>
		
		<td>
		      <?php 
        echo $v['miscellaneous_fees_payment_cheque_receipt_id'];
        ?>
		
</span>
		</div>
		<div class="rcpt_dtl">
		  <span class="rcpt_title style2">by cheque no. </span>
		  <span class="rcpt_dd_no"><?php 
echo $misc_fees_payment->miscellaneous_fees_payment_cheque_number;
?>
</span>
		  <span class="style2 rcpt_title">dated</span>
		  <span class="rcpt_dd_dt"><?php 
echo date_format(date_create($misc_fees_payment->miscellaneous_fees_payment_cheque_date), "d-m-Y");
?>
</span>
		  <span class="style2 rcpt_title">drawn on</span> 
		  <span class="rcpt_cash"><?php 
$bank_name = BankMaster::model()->findByPk($misc_fees_payment->miscellaneous_fees_payment_cheque_bank);
echo $bank_name->bank_short_name;
?>
</span>    		
		</div>
		<div class="rcpt_sem_dtl">
		  <span class="style2 rcpt_title">of</span>
		  <span class="semester"><?php 
echo $acd_term->academic_terms_period_name;
?>
 </span>
		  <span class="style2 rcpt_title"> being payment of <?php 
echo MiscellaneousFeesMaster::model()->findByPk($misc_fees_payment->miscellaneous_fees_payment_cheque_master_id)->miscellaneous_fees_name;
?>
 towards</span>
		  <span class="style2 rcpt_title">Enrollment no. </span>
            echo AcademicTermPeriod::model()->findByPk(FeesPaymentTransaction::model()->findByAttributes(array("fees_payment_cash_cheque_id" => $v['fees_payment_cheque_id'], "fees_payment_transaction_organization_id" => Yii::app()->user->getState("org_id"), "fees_payment_method_id" => 2))->fees_academic_period_id)->academic_term_period;
            ?>
		</td>
		<td>
			<?php 
            echo date('d-m-Y', strtotime($v['fees_payment_cheque_date']));
            ?>
		</td>
		<td>
			<?php 
            echo $v['fees_payment_cheque_status'] = 1 ? 'Return Cheque' : '';
            ?>
		</td>
		<td>
			<?php 
            echo BankMaster::model()->findByPk($v['fees_payment_cheque_bank'])->bank_short_name;
            ?>
		</td>
		<td>
			<?php 
            echo $v['fees_payment_cheque_branch'];
            ?>
		</td>
		<td>
			<?php 
            echo $v['fees_payment_cheque_amount'];
            ?>
		</td>
		
		 
</tr>
<?php

$this->breadcrumbs = array('Fees Payment Cheques' => array('Cheque_search'), $model->fees_payment_cheque_number);
$this->menu = array();
?>

<h1>View Fees Cheque Details <?php 
//echo $model->fees_payment_cheque_id;
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('fees_payment_cheque_number', array('name' => 'fees_payment_cheque_date', 'value' => date_format(date_create($model->fees_payment_cheque_date), 'd-m-Y')), array('name' => 'fees_payment_cheque_bank', 'value' => BankMaster::model()->findByPk($model->fees_payment_cheque_bank)->bank_short_name), 'fees_payment_cheque_amount', array('name' => 'fees_payment_cheque_status', 'value' => $model->fees_payment_cheque_status == 1 ? 'Return Cheque' : 'Credit Cheque'), 'fees_payment_cheque_branch')));
?>

<?php 
echo '<br/><br/>';
//echo CHtml::button('Update Cheque Status', array('submit' => array('my_update','id'=>$model->fees_payment_cheque_id)));
?>