add admin delete contract

This commit is contained in:
Roland Schneider 2017-03-07 22:25:32 +01:00
parent 6a4536c877
commit cb5a19d752

View File

@ -160,14 +160,19 @@ class ContractController extends Controller {
throw new Exception ( "A szerződés nem törölhető" );
}
$parts = TicketInstallmentRequest::find ()->andWhere ( [
$parts = TicketInstallmentRequest::find ()->andWhere (
[
'not in',
'status',
[
TicketInstallmentRequest::$STATUS_CANCELED,
TicketInstallmentRequest::$STATUS_PENDING
]
] )->all ();
] )->andWhere([
'id_contract' => $model->id_contract
])
->all ();
if (count ( $parts ) > 0) {
throw new Exception ( "Már van feldolgozott részlet, nem lehet törölni" );