Spade
Mini Shell
| Directory:~$ /proc/self/root/home/lmsyaran/public_html/administrator/components/com_invoices/tables/ |
| [Home] [System Details] [Kill Me] |
<?php
/*------------------------------------------------------------------------
# com_invoices - Invoice Manager for Joomla
# ------------------------------------------------------------------------
# author Germinal Camps
# copyright Copyright (C) 2012 - 2016 JoomlaThat.com. All Rights
Reserved.
# @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.joomlathat.com
# Technical Support: Forum - http://www.joomlathat.com/support
-------------------------------------------------------------------------*/
//no direct access
defined('_JEXEC') or die('Restricted access.');
jimport('joomla.filesystem.file');
class TableQuote extends JTable
{
var $id = null;
var $created_by = null;
var $user_id = null;
var $added = null;
var $to_name = null;
var $to_address = null;
var $invoice_num = null;
var $real_invoice_num = null;
var $from_name = null;
var $from_address = null;
var $from_num = null;
var $invoice_date = null;
var $publish = null;
var $notes = null;
var $template_id = null;
var $taxes = null;
var $start_publish = null;
var $end_publish = null;
var $currency_before = null;
var $currency_after = null;
var $status = null;
var $to_email = null;
var $to_company = null;
var $from_email = null;
var $from_phone = null;
var $from_url = null;
var $discount = null ;
var $invoice_duedate = null ;
var $admin_notes = null ;
var $to_city = null;
var $to_state = null;
var $to_country = null;
var $to_zipcode = null;
var $to_vatid = null;
var $rec_year = null;
var $rec_month = null;
var $rec_day = null;
var $rec_nextdate = null;
var $is_recurrent = null;
var $to_phone = null;
var $external_type = null;
var $external_id = null;
var $type = 2;
var $rec_email = null;
var $auth_code = null;
var $computed_status = null;
var $computed_total = null;
var $language = null;
var $last_sent = null;
function __construct(& $db) {
parent::__construct('#__invoices_invoices', 'id',
$db);
}
function check(){
if($this->id == 0){
$this->added = date('Y-m-d H:i:s') ;
$user = JFactory::getUser();
$this->created_by = $user->id;
}
if(is_array($this->taxes)) {
$this->taxes = implode(",", $this->taxes);
}
else $this->taxes = "";
if($this->auth_code == ""){
$this->auth_code = InvoicesHelper::genRandomCode();
}
return true;
}
}