<?php
/**
 * invoice_entry class
 *
 */
class invoice_entry
{
	var $data;
	
	/**
	 * initiated the invoice_entry class
	 *
	 * @param object $invoice_entry_object
	 */
	function invoice_entry( $invoice_entry_object ){
		$this->data = $invoice_entry_object;
	}

	/**
	 * return array with table data
	 *
	 * @return array
	 */
	function get_smarty_data_array(){
		$array = (array) $this->data;
		$array['edit_link'] = yes_draw_href_image('images/icons/icon_edit.gif',IMAGE_DELETE,xtc_href_link(FILENAME_INVOICES_ENTRIES_EDIT,'id='.$array['invoice_entries_id']),'invoice_entries_edit','' ); 
		$array['delete_link'] = yes_draw_href_image_confirm(TEXT_REMOVE_ENTRY,'images/icons/delete.gif',IMAGE_DELETE,xtc_href_link(FILENAME_INVOICES,'id='.$array['invoices_id'].'&action=overview&subaction=delete_entry&entries_id='.$array['invoice_entries_id']),'func_invoice_entries_delete','' ); 
		return $array;
	}
}
