add hidden account, cart insert/delete
add hidden account support add delete/payout buttons to carts add backend product sales with pdf export add frontend product sales with pdf export add frontend ticket sales with pdf export
This commit is contained in:
@@ -110,11 +110,25 @@ class TicketCreate extends Ticket{
|
||||
|
||||
protected function addTransfer(){
|
||||
$transfer = Transfer::createTicketTransfer($this->_account, $this->_discount, null, 1, $this);
|
||||
// $transfer->status = Transfer::STATUS_PAID;
|
||||
|
||||
$status = Transfer::STATUS_PAID;
|
||||
if ( $this->isAppendToUserCart() ){
|
||||
$status = Transfer::STATUS_NOT_PAID;
|
||||
}else if ( $this->isAppendToCustomerCart() ){
|
||||
$status = Transfer::STATUS_NOT_PAID;
|
||||
$customer = $this->customer;
|
||||
}else {
|
||||
$status = Transfer::STATUS_PAID;
|
||||
$transfer->paid_at = date('Y-m-d H:i:s' ) ;
|
||||
}
|
||||
$transfer->status = $status;
|
||||
|
||||
|
||||
if ( isset($this->comment)){
|
||||
$transfer->comment = $this->comment;
|
||||
}
|
||||
$transfer->id_user = \Yii::$app->user->id;
|
||||
$transfer->id_customer = $this->customer->id_customer;
|
||||
$transfer->save();
|
||||
$this->_transfer = $transfer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user