I saw the modifications for tracking time on the ticket level, but I want to do things a little differently and track it on the ticket response level.
I've added a "billablehours" field, type double to the ost_ticket_response table.
on the staff/viewticket.inc.php file I added
Billable Hours:
to this form
#reply" name="reply" id="replyform" method="post" enctype="multipart/form-data">
next under tickets.php (line 85) I changed this:
if(!$errors && ($respId=$ticket->postResponse($_POST,$_POST,$_POST,$_FILES,$_POST)))
and last under class.ticket.php
I made this alteration:
function postResponse($msgid,$response,$signature='none',$attachment=false,$canalert=true,$billablehours=0){
global $thisuser,$cfg;
if(!$thisuser || !$thisuser->getId() || !$thisuser->isStaff()) //just incase
return 0;
$sql= 'INSERT INTO '.TICKET_RESPONSE_TABLE.' SET created=NOW() '.
',billablehours='.db_input($billablehours).
',ticket_id='.db_input($this->getId()).
',msg_id='.db_input($msgid).
',response='.db_input(Format:($response)).
',staff_id='.db_input($thisuser->getId()).
',staff_name='.db_input($thisuser->getName()).
',ip_address='.db_input($thisuser->getIP());
$resp_id=0;
Let me also explain, I am not a PHP developer, I've never done anything in PHP, just CF. I know if I change',billablehours=5'. it writes the message and the hours in there with no problem... I guess I am just not passing the field or parsing it properly. Any help would be appreciated.
The reason why I did it like this is because I will compile my bills at the end of each week regardless if the ticket is closed or not. I want to be able to bill for the services performed.
steve