<?php
App::uses('AppModel', 'Model');
class AmountTransactionsCashToBank extends AppModel {
public $name = 'AmountTransactionsCashToBank';
public $displayField = 'applicant_id';
public $order = 'AmountTransactionsCashToBank.id DESC';
public $validate = array(
'applicant_id' => array(
'notBlank' => array(
'rule' => array('notBlank'),
'message' => 'Please select Applicant'
)
),
'amount' => array(
'notBlank' => array(
'rule' => array('notBlank'),
'message' => 'Please enter Amount'
),
'numeric' => array(
'rule' => array('numeric'),
'message' => 'Please enter number only.'
)
),
'bank_id' => array(
'notBlank' => array(
'rule' => array('notBlank'),
'message' => 'Please select Payment Method'
)
),
'payment_date' => array(
'notBlank' => array(
'rule' => array('notBlank'),
'message' => 'Please provide Transferred Date'
)
)
);
public $belongsTo = array(
'Applicant' => array(
'className' => 'Applicant',
'foreignKey' => 'applicant_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'Bank' => array(
'className' => 'Bank',
'foreignKey' => 'bank_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}