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:
@@ -187,18 +187,27 @@ class ProductSaleForm extends Model
|
||||
|
||||
protected function saveTransfer(){
|
||||
$customer = null;
|
||||
$paid_at;
|
||||
$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{
|
||||
$paid_at = date('Y-m-d H:i:s' ) ;
|
||||
}
|
||||
|
||||
$this->transfer = Transfer::createProductTransfer($this->sale,$this->account, $this->discount, $this->currency, $this->count, $this->product,$status,$customer);
|
||||
if ( isset($this->comment)){
|
||||
$this->transfer->comment = $this->comment;
|
||||
}
|
||||
|
||||
if ( isset($paid_at)){
|
||||
$this->transfer->paid_at = $paid_at;
|
||||
}
|
||||
|
||||
|
||||
$this->transfer->id_user = Yii::$app->user->id;
|
||||
$this->transfer->save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user