Skip to content

Commit

Permalink
Error when transferring ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
xacobofg committed Jun 6, 2019
1 parent 2d9ca84 commit 0fa7e22
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions inc/ticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,24 @@ static function deleteOldCosts($ID) {
static function generateCosts($item) {
global $DB;

if ($item->input['status']==5) {
$addcost=true;
if (!array_key_exists('status', $item->input)) {
if($item->fields['status']==5){
$entities_id=$item->input['entities_id'];
}else{
$addcost=false;
}
}else{
if ($item->input['status']==5) {
$entities_id=$item->fields['entities_id'];
}else{
$addcost=false;
}
}

if ($addcost) {

$ticket_id=$item->input['id'];
$entities_id=$item->fields['entities_id'];

self::deleteOldCosts($ticket_id);

Expand Down

0 comments on commit 0fa7e22

Please sign in to comment.