add ticket installment
This commit is contained in:
@@ -222,12 +222,13 @@ class TransferController extends Controller
|
||||
try {
|
||||
ShoppingCart::deleteAll([ 'id_transfer' => $transfer->id_transfer]);
|
||||
UserSoldItem::deleteAll([ 'id_transfer' => $transfer->id_transfer]);
|
||||
if ( $transfer->delete() ){
|
||||
\Yii::$app->session->setFlash( 'success','Tranzakció törölve' );
|
||||
$transaction->commit();
|
||||
}else{
|
||||
throw new \Exception("Failed to save");
|
||||
}
|
||||
$transfer->storno();
|
||||
// if ( $transfer->delete() ){
|
||||
\Yii::$app->session->setFlash( 'success','Tranzakció törölve' );
|
||||
$transaction->commit();
|
||||
// }else{
|
||||
// throw new \Exception("Failed to save");
|
||||
// }
|
||||
|
||||
} catch(Exception $e) {
|
||||
$transaction->rollback();
|
||||
|
||||
Reference in New Issue
Block a user