add conctract flag canceled2
This commit is contained in:
@@ -199,8 +199,15 @@ class ContractController extends Controller {
|
||||
/**
|
||||
* EGY RÉSZLET KIFIZETÉSE
|
||||
*/
|
||||
public function actionCancel($id) {
|
||||
public function actionCancel($id,$flag) {
|
||||
$contract = $this->findModel ( $id );
|
||||
|
||||
if ( $flag != Contract::$FLAG_CANCELED && $flag != Contract::$FLAG_CANCELED_2){
|
||||
\Yii::error("A felmondási státusz nem található! ($flag)");
|
||||
throw new NotFoundHttpException("Az oldal nem található!");
|
||||
|
||||
}
|
||||
|
||||
$customer = $contract->customer;
|
||||
$card = $customer->card;
|
||||
|
||||
@@ -209,7 +216,7 @@ class ContractController extends Controller {
|
||||
$transaction = $connection->beginTransaction ();
|
||||
try {
|
||||
|
||||
$contract->flag = Contract::$FLAG_CANCELED;
|
||||
$contract->flag = $flag;
|
||||
$contract->save ();
|
||||
$requests = $contract->requests;
|
||||
$buntetes = 0;
|
||||
|
||||
Reference in New Issue
Block a user