Add waste

This commit is contained in:
2016-05-08 08:56:42 +02:00
parent a6fdfb1c83
commit f8e1f90a8e
28 changed files with 1075 additions and 102 deletions

View File

@@ -141,6 +141,13 @@ class TicketCreate extends Ticket{
$result = parent::beforeSave($insert);
if ( $result ){
if ($insert){
if ( $this->isAppendToCustomerCart() || $this->isAppendToUserCart()){
$this->status = Ticket::STATUS_INACTIVE;
}else{
$this->status = Ticket::STATUS_ACTIVE;
}
$ticketType = TicketType::findOne($this->id_ticket_type);
if ( isset($ticketType) && $ticketType->isInstallment() ){
$this->part = 0;