add transfer later
This commit is contained in:
@@ -217,7 +217,10 @@ class TicketCreate extends Ticket{
|
||||
$transfer->id_account = $this->_account->id_account;
|
||||
|
||||
$status = Transfer::STATUS_PAID;
|
||||
if ( $this->isAppendToUserCart() ){
|
||||
|
||||
if ( !Transfer::canMarkPaidByReception( $this->payment_method ) ){
|
||||
$status = Transfer::STATUS_NOT_PAID;
|
||||
}else if ( $this->isAppendToUserCart() ){
|
||||
$status = Transfer::STATUS_NOT_PAID;
|
||||
}else if ( $this->isAppendToCustomerCart() ){
|
||||
$status = Transfer::STATUS_NOT_PAID;
|
||||
@@ -284,15 +287,17 @@ class TicketCreate extends Ticket{
|
||||
}
|
||||
|
||||
public function appendToCustomerCart(){
|
||||
if ( $this->isAppendToCustomerCart() && isset($this->customer) ){
|
||||
$item = new ShoppingCart();
|
||||
$item->id_customer = $this->customer->id_customer;
|
||||
$item->id_transfer = $this->_transfer->id_transfer;
|
||||
if ( !$item->save(false) ){
|
||||
\Yii::error("Nem sikerült menteni a bérletet! Vendég kosár hozzárendelés sikertelen!");
|
||||
throw new \Exception("Nem sikerült menteni a bérletet! Vendég kosár hozzárendelés sikertelen!");
|
||||
}
|
||||
|
||||
if ( Transfer::canBeAddedToCart($this->payment_method)){
|
||||
if ( $this->isAppendToCustomerCart() && isset($this->customer) ){
|
||||
$item = new ShoppingCart();
|
||||
$item->id_customer = $this->customer->id_customer;
|
||||
$item->id_transfer = $this->_transfer->id_transfer;
|
||||
if ( !$item->save(false) ){
|
||||
\Yii::error("Nem sikerült menteni a bérletet! Vendég kosár hozzárendelés sikertelen!");
|
||||
throw new \Exception("Nem sikerült menteni a bérletet! Vendég kosár hozzárendelés sikertelen!");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user