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:
2016-01-03 18:29:39 +01:00
parent 62bcb7ff27
commit 595f663820
43 changed files with 2154 additions and 24 deletions

View File

@@ -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;
}