AnonSec Team
Server IP : 127.0.0.1  /  Your IP : 127.0.0.1
Web Server : Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3
System : Windows NT WIN-R7LTCC7BPLI 6.3 build 9200 (Windows Server 2012 R2 Datacenter Edition) i586
User : GerbangSIPAD ( 0)
PHP Version : 5.6.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF
Directory (0777) :  C:/xampp5/htdocs/bhumie/upload/../protected/models/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : C:/xampp5/htdocs/bhumie/upload/../protected/models/PstPermohonan.php
<?php

/**
 * This is the model class for table "pbb.pst_permohonan".
 *
 * The followings are the available columns in table 'pbb.pst_permohonan':
 * @property string $kd_kanwil
 * @property string $kd_kantor
 * @property string $thn_pelayanan
 * @property string $bundel_pelayanan
 * @property string $no_urut_pelayanan
 * @property string $no_srt_permohonan
 * @property string $tgl_surat_permohonan
 * @property string $nama_pemohon
 * @property string $alamat_pemohon
 * @property string $keterangan_pst
 * @property string $catatan_pst
 * @property string $status_kolektif
 * @property string $tgl_terima_dokumen_wp
 * @property string $tgl_perkiraan_selesai
 * @property string $nip_penerima
 * @property integer $createdby
 * @property string $createdtime
 * @property integer $updatedby
 * @property string $updatedtime
 */
class PstPermohonan extends CBhumieRecord
{
   
    public $kd_jns_pelayanan;
    public $jns_pengurangan;
    public $no_urut_pemohon;
    public $kd_propinsi_pemohon;
    public $kd_dati2_pemohon;
    public $kd_kecamatan_pemohon;
    public $kd_kelurahan_pemohon;    
    public $kd_blok_pemohon;
    public $kd_jns_op_pemohon;
    public $thn_pajak_permohonan;
	public $nama_penanggung_jawab;
	public $no_hp_wp;
	public $no_hp_penanggung_jawab;
	/**
	 * Returns the static model of the specified AR class.
	 * @param string $className active record class name.
	 * @return PstPermohonan the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}
	
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'pbb.pst_permohonan';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			//array('kd_kanwil, kd_kantor, thn_pelayanan, bundel_pelayanan, no_urut_pelayanan, tgl_perkiraan_selesai, nip_penerima, createdby, createdtime, updatedby, updatedtime', 'required'),
			array('kd_kanwil, kd_kantor, thn_pelayanan, bundel_pelayanan, no_urut_pelayanan, tgl_perkiraan_selesai, nip_penerima', 'required'),
			//array('createdby, updatedby', 'numerical', 'integerOnly'=>true),
			array('nama_penanggung_jawab, no_hp_wp, no_hp_penanggung_jawab', 'length', 'max' => 30),
			array('kd_kanwil, kd_kantor', 'length', 'max'=>2),
			array('thn_pelayanan, bundel_pelayanan', 'length', 'max'=>4),
			array('no_urut_pelayanan', 'length', 'max'=>3),
			array('no_srt_permohonan, nama_pemohon', 'length', 'max'=>30),
			array('alamat_pemohon', 'length', 'max'=>40),
			array('keterangan_pst, catatan_pst', 'length', 'max'=>500),
			array('status_kolektif', 'length', 'max'=>1),
			array('nip_penerima', 'length', 'max'=>18),
			array('tgl_surat_permohonan, tgl_terima_dokumen_wp', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			//array('kd_kanwil, kd_kantor, thn_pelayanan, bundel_pelayanan, no_urut_pelayanan, no_srt_permohonan, tgl_surat_permohonan, nama_pemohon, alamat_pemohon, keterangan_pst, catatan_pst, status_kolektif, tgl_terima_dokumen_wp, tgl_perkiraan_selesai, nip_penerima, createdby, createdtime, updatedby, updatedtime', 'safe', 'on'=>'search'),
			array('kd_kanwil, kd_kantor, thn_pelayanan, bundel_pelayanan, no_urut_pelayanan, no_srt_permohonan, tgl_surat_permohonan, nama_pemohon, alamat_pemohon, keterangan_pst, catatan_pst, status_kolektif, tgl_terima_dokumen_wp, tgl_perkiraan_selesai, nip_penerima', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'kd_kanwil' => 'Kd Kanwil :',
			'kd_kantor' => 'Kode Kantor :',
			'thn_pelayanan' => 'Tahun Pajak :',
			'bundel_pelayanan' => 'Bundel Pelayanan :',
			'no_urut_pelayanan' => 'Nomor Pelayanan :',
			'no_srt_permohonan' => 'No Surat Permohonan :',
			'tgl_surat_permohonan' => 'Tgl Surat Permohonan :',
			'nama_pemohon' => 'Nama Wajib Pajak/Pemohon :',
			'alamat_pemohon' => 'Letak Objek Pajak :',
			'keterangan_pst' => 'Keterangan :',
			'catatan_pst' => 'Catatan :',
			'status_kolektif' => 'Status Kolektif :',
			'tgl_terima_dokumen_wp' => 'Tgl Terima :',
			'tgl_perkiraan_selesai' => 'Tgl Perkiraan Selesai :',
			'nama_penanggung_jawab' => 'Nama Penanggung Jawab :',
			'no_hp_wp' => 'No. HP Wajib Pajak :',
			'no_hp_penanggung_jawab' => 'No. HP Penanggung Jawab :',
			'nip_penerima' => 'NIP Penerima :',
			'createdby' => 'Createdby',
			'createdtime' => 'Createdtime',
			'updatedby' => 'Updatedby',
			'updatedtime' => 'Updatedtime',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('kd_kanwil',$this->kd_kanwil,true);
		$criteria->compare('kd_kantor',$this->kd_kantor,true);
		$criteria->compare('thn_pelayanan',$this->thn_pelayanan,true);
		$criteria->compare('bundel_pelayanan',$this->bundel_pelayanan,true);
		$criteria->compare('no_urut_pelayanan',$this->no_urut_pelayanan,true);
		$criteria->compare('no_srt_permohonan',$this->no_srt_permohonan,true);
		$criteria->compare('tgl_surat_permohonan',$this->tgl_surat_permohonan,true);
		$criteria->compare('nama_pemohon',$this->nama_pemohon,true);
		$criteria->compare('alamat_pemohon',$this->alamat_pemohon,true);
		$criteria->compare('keterangan_pst',$this->keterangan_pst,true);
		$criteria->compare('catatan_pst',$this->catatan_pst,true);
		$criteria->compare('status_kolektif',$this->status_kolektif,true);
		$criteria->compare('tgl_terima_dokumen_wp',$this->tgl_terima_dokumen_wp,true);
		$criteria->compare('tgl_perkiraan_selesai',$this->tgl_perkiraan_selesai,true);
		$criteria->compare('nip_penerima',$this->nip_penerima,true);
		$criteria->compare('createdby',$this->createdby);
		$criteria->compare('createdtime',$this->createdtime,true);
		$criteria->compare('updatedby',$this->updatedby);
		$criteria->compare('updatedtime',$this->updatedtime,true);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
	public function infoPermohonanJoinPstPermohonan($kd_kanwil, $kd_kantor, $thn_pelayanan, $bundel_pelayanan,$no_urut_pelayanan) {
        $user = Yii::app()->db->createCommand()
    ->selectDistinct('t.status_kolektif,b.*')
    ->from('pbb.pst_permohonan t')
    ->join('pbb.pst_detail b', 'b.kd_kanwil = t.kd_kanwil and b.kd_kantor = t.kd_kantor
                                and b.thn_pelayanan = t.thn_pelayanan
                                and b.bundel_pelayanan = t.bundel_pelayanan
                                and b.no_urut_pelayanan = t.no_urut_pelayanan')
    ->where('                     b.kd_kanwil		= \''.$kd_kanwil .'\'
				  AND  b.kd_kantor		= \''.$kd_kantor.'\'
				  AND  b.thn_pelayanan		= \''.$thn_pelayanan.'\'
				  AND  b.bundel_pelayanan	= \''.$bundel_pelayanan.'\'
				  AND  b.no_urut_pelayanan 	= \''.$no_urut_pelayanan.'\'
				  and b.kd_jns_pelayanan in (\'03\')
    ')
    ->queryRow();
        
        return $user;        
    }
}

AnonSec - 2021