add ticket installment

This commit is contained in:
2016-01-22 14:45:56 +01:00
parent bb5978c1df
commit a2a6b1f240
51 changed files with 1498 additions and 113 deletions

View File

@@ -11,6 +11,10 @@ use yii\helpers\ArrayHelper;
*
* @property integer $id_ugiro
* @property integer $id_user
* @property string $path
* @property string $desta_path
* @property string $datum
* @property integer $number
* @property string $created_at
* @property string $updated_at
*/
@@ -18,8 +22,10 @@ class Ugiro extends \yii\db\ActiveRecord
{
public static $PATH_MEGBIZAS = "giro/megbizas";
public static $PATH_VALASZ = "giro/valasz";
public static $STATUS_SENT = 0;
public static $STATUS_FINISHED = 1;
public static $STATUS_RECIEVED = 10;
public static $STATUS_FINISHED = 20;
/**
* @inheritdoc
@@ -66,10 +72,19 @@ class Ugiro extends \yii\db\ActiveRecord
return $this->hasOne( User::className(), ["id" =>"id_user" ] );
}
public function getRequests()
{
return $this->hasMany(TicketInstallmentRequest::className(), ['id_ticket_installment_request' => 'id_request'])
->viaTable('ugiro_request_assignment', ['id_ugiro' => 'id_ugiro']);
}
public static function statuses() {
return [
static::$STATUS_SENT =>"Folyamatban",
static::$STATUS_FINISHED =>"Befejezve",
static::$STATUS_RECIEVED =>"Detsta fájl feltöltve",
]
;
}