当前位置: 首页>>代码示例>>PHP>>正文


PHP invoice::select方法代码示例

本文整理汇总了PHP中invoice::select方法的典型用法代码示例。如果您正苦于以下问题:PHP invoice::select方法的具体用法?PHP invoice::select怎么用?PHP invoice::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在invoice的用法示例。


在下文中一共展示了invoice::select方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: invoice

 function get_all_parties($invoiceID)
 {
     if ($invoiceID) {
         $invoice = new invoice();
         $invoice->set_id($invoiceID);
         $invoice->select();
         $interestedPartyOptions = $invoice->get_all_partieS($invoice->get_value("projectID"), $invoice->get_value("clientID"));
     }
     if (is_object($this) && $this->get_id()) {
         $interestedPartyOptions = interestedParty::get_interested_parties("invoiceRepeat", $this->get_id(), $interestedPartyOptions);
     }
     return $interestedPartyOptions;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:13,代码来源:invoiceRepeat.inc.php

示例2: getData

	function getData()
	{
		//echo "export - get data";
		global $smarty;
		global $siUrl;
		global $include_dir;
        
        $SI_BILLER = new SimpleInvoices_Db_Table_Biller();
        $SI_CUSTOM_FIELDS = new SimpleInvoices_Db_Table_CustomFields();
        $SI_PREFERENCES = new SimpleInvoices_Db_Table_Preferences();
        
		switch ($this->module)
		{
			case "database":
			{
                $data = SimpleInvoices_Db::performBackup();
				break;
			}
			case "statement":
			{
				$invoice = new invoice();
				$invoice->biller = $this->biller_id;
				$invoice->customer = $this->customer_id;

				if ( $this->filter_by_date =="yes" )
				{
					if ( isset($this->start_date) )
					{
						$invoice->start_date = $this->start_date;
					}
					if ( isset($this->end_date) )
					{
						$invoice->end_date = $this->end_date;
					}

					if ( isset($this->start_date) AND isset($this->end_date) )
					{
						$invoice->having = "date_between";
					}
					$having_count = '1';
				}

				if ( $this->show_only_unpaid == "yes")
				{
					if ($having_count == '1')
					{

						$invoice->having_and = "money_owed";
					    $having_count = '2';

					} else {

						$invoice->having = "money_owed";
					    $having_count = '1';

					}
				}

				if ( $this->show_only_real == "yes")
				{
					if ($having_count == '2')
					{

						$invoice->having_and2 = "real";

					} elseif ($having_count == '1') {

						$invoice->having_and = "real";

					} else {

						$invoice->having = "real";

					}
				}

				$invoice_all = $invoice->select_all('count');

				$invoices = $invoice_all->fetchAll();

				foreach ($invoices as $i => $row) {
					$statement['total'] = $statement['total'] + $row['invoice_total'];
					$statement['owing'] = $statement['owing'] + $row['owing'] ;
					$statement['paid'] = $statement['paid'] + $row['INV_PAID'];

				}

                // ToDo: THIS FILE IS MISSING!!
				$templatePath = $include_dir . "sys/templates/default/statement/index.tpl";

				$biller_details = $SI_BILLER->getBiller($this->biller_id);
				$customer_details = customer::get($this->customer_id);

				$this->file_name = "statement_".$this->biller_id."_".$this->customer_id."_".$invoice->start_date."_".$invoice->end_date;

				$smarty -> assign('biller_id', $biller_id);
				$smarty -> assign('biller_details', $biller_details);
				$smarty -> assign('customer_id', $customer_id);
				$smarty -> assign('customer_details', $customer_details);

//.........这里部分代码省略.........
开发者ID:CalhounGaming,项目名称:simpleinvoices,代码行数:101,代码来源:export.php

示例3: eway

<?php

$saved = false;

if ( ($_POST['op'] =='add') AND (!empty($_POST['invoice_id'])) )
{

    $invoice= invoice::select($_POST['invoice_id']);

    $eway_check = new eway();
    $eway_check->invoice = $invoice;
    $eway_pre_check = $eway_check->pre_check();
    
    if($eway_pre_check == 'true')
    {
        //do eway payment
        $eway = new eway();
        $eway->invoice = $invoice;
        $saved = $eway->payment();  
    } else {
        $saved = 'check_failed';
    }
    
}      

$invoice_all = invoice::get_all();

$smarty -> assign('invoice_all',$invoice_all);
$smarty -> assign('saved',$saved);

$smarty -> assign('pageActive', 'payment');
开发者ID:CalhounGaming,项目名称:simpleinvoices,代码行数:31,代码来源:eway.php

示例4: date

     #$payment->ac_inv_id = $_POST['invoice'];
     $payment->ac_amount = $p->ipn_data['mc_gross'];
     #$payment->ac_amount = $_POST['mc_gross'];
     $payment->ac_notes = $paypal_data;
     #$payment->ac_notes = $paypal_data;
     $payment->ac_date = date('Y-m-d', strtotime($p->ipn_data['payment_date']));
     #$payment->ac_date = date( 'Y-m-d', strtotime($_POST['payment_date']));
     $payment->online_payment_id = $p->ipn_data['txn_id'];
     $payment->domain_id = $domain_id;
     $payment_type = new payment_type();
     $payment_type->type = "Paypal";
     $payment_type->domain_id = $domain_id;
     $payment->ac_payment_type = $payment_type->select_or_insert_where();
     $logger->log('Paypal - payment_type=' . $payment->ac_payment_type, Zend_Log::INFO);
     $payment->insert();
     $invoice = invoice::select($p->ipn_data['invoice']);
     #$invoice = invoice::select($_POST['invoice']);
     $biller = getBiller($invoice['biller_id']);
     //send email
     $body = "A Paypal instant payment notification was successfully recieved into Simple Invoices\n";
     $body .= "from " . $p->ipn_data['payer_email'] . " on " . date('m/d/Y');
     $body .= " at " . date('g:i A') . "\n\nDetails:\n";
     $body .= $paypal_data;
     $email = new email();
     $email->notes = $body;
     $email->to = $biller['email'];
     $email->from = "simpleinvoices@localhost.localdomain";
     $email->subject = 'Instant Payment Notification - Recieved Payment';
     $email->send();
     $xml_message['data'] .= $body;
 }
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:31,代码来源:paypal.php

示例5: prepare

 function get_amount_allocated($fmt = "%s%mo")
 {
     // Return total amount used and total amount allocated
     if (is_object($this) && $this->get_id()) {
         $db = new db_alloc();
         // Get most recent invoiceItem that this time sheet belongs to.
         $q = prepare("SELECT invoiceID\n                      FROM invoiceItem\n                     WHERE invoiceItem.timeSheetID = %d\n                  ORDER BY invoiceItem.iiDate DESC\n                     LIMIT 1\n                  ", $this->get_id());
         $db->query($q);
         $row = $db->row();
         $invoiceID = $row["invoiceID"];
         if ($invoiceID) {
             $invoice = new invoice();
             $invoice->set_id($invoiceID);
             $invoice->select();
             $maxAmount = page::money($invoice->get_value("currencyTypeID"), $invoice->get_value("maxAmount"), $fmt);
             // Loop through all the other invoice items on that invoice
             $q = prepare("SELECT sum(iiAmount) AS totalUsed FROM invoiceItem WHERE invoiceID = %d", $invoiceID);
             $db->query($q);
             $row2 = $db->row();
             return array(page::money($invoice->get_value("currencyTypeID"), $row2["totalUsed"], $fmt), $maxAmount);
         }
     }
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:23,代码来源:timeSheet.inc.php

示例6: checkLogin

checkLogin();
$maxInvoice = maxInvoice();
jsBegin();
jsFormValidationBegin("frmpost");
#jsValidateifNum("ac_inv_id",$LANG['invoice_id']);
#jsPaymentValidation("ac_inv_id",$LANG['invoice_id'],1,$maxInvoice['maxId']);
jsValidateifNum("ac_amount", $LANG['amount']);
jsValidateifNum("ac_date", $LANG['date']);
jsFormValidationEnd();
jsEnd();
/* end validataion code */
$today = date("Y-m-d");
$master_invoice_id = $_GET['id'];
$invoice = null;
if (isset($_GET['id'])) {
    $invoice = invoice::select($master_invoice_id);
} else {
    $sth = dbQuery("SELECT * FROM " . TB_PREFIX . "invoices");
    $invoice = $sth->fetch();
    #$sth = new invoice();
    #$invoice = $sth->select_all();
}
$customer = getCustomer($invoice['customer_id']);
$biller = getBiller($invoice['biller_id']);
$defaults = getSystemDefaults();
$pt = getPaymentType($defaults['payment_type']);
$invoices = new invoice();
$invoices->sort = 'id';
$invoices->having = 'money_owed';
$invoice_all = $invoices->select_all('count');
$smarty->assign('invoice_all', $invoice_all);
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:31,代码来源:process.php

示例7: expense

//stop the direct browsing to this file - let index.php handle which files get displayed
checkLogin();
#get the invoice id
$expense_id = $_GET['id'];
$expenseobj = new expense();
$customerobj = new customer();
$billerobj = new biller();
$invoiceobj = new invoice();
$productobj = new product();
$expenseaccountobj = new expenseaccount();
$expensetaxobj = new expensetax();
$expense = $expenseobj->get($expense_id);
$detail = $expenseobj->detail();
$detail['customer'] = $customerobj->get($expense['customer_id']);
$detail['biller'] = $billerobj->select($expense['biller_id']);
$detail['invoice'] = $invoiceobj->select($expense['invoice_id']);
$detail['product'] = $productobj->get($expense['product_id']);
$detail['expense_account'] = $expenseaccountobj->select($expense['expense_account_id']);
$detail['expense_tax'] = $expensetaxobj->get_all($expense_id);
$detail['expense_tax_total'] = $expense['amount'] + $expensetaxobj->get_sum($expense_id);
$detail['expense_tax_grouped'] = $expensetaxobj->grouped($expense_id);
$detail['status_wording'] = $expense['status'] == 1 ? $LANG['paid'] : $LANG['not_paid'];
$taxes = getActiveTaxes();
#$tax_selected = getTaxRate($product['default_tax_id']);
$defaults = getSystemDefaults();
$smarty->assign('expense', $expense);
$smarty->assign('detail', $detail);
$smarty->assign('taxes', $taxes);
$smarty->assign('defaults', $defaults);
//$smarty -> assign('tax_selected',$tax_selected);
//$smarty -> assign('customFieldLabel',$customFieldLabel);
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:31,代码来源:details.php

示例8: updateInvoice

function updateInvoice($invoice_id, $domain_id = '')
{
    //  global $logger;
    global $db_server;
    $domain_id = domain_id::get($domain_id);
    $invoiceobj = new invoice();
    $current_invoice = $invoiceobj->select($_POST['id']);
    $current_pref_group = getPreference($current_invoice['preference_id']);
    $new_pref_group = getPreference($_POST['preference_id']);
    $index_id = $current_invoice['index_id'];
    //	$logger->log('Curent Index Group: '.$description, Zend_Log::INFO);
    //	$logger->log('Description: '.$description, Zend_Log::INFO);
    if ($current_pref_group['index_group'] != $new_pref_group['index_group']) {
        $index_id = index::increment('invoice', $new_pref_group['index_group']);
    }
    if ($db_server == 'mysql' && !_invoice_check_fk($_POST['biller_id'], $_POST['customer_id'], $type, $_POST['preference_id'])) {
        return null;
    }
    $sql = "UPDATE\n\t\t\t" . TB_PREFIX . "invoices\n\t\tSET\n\t\t\tindex_id = :index_id,\n\t\t\tbiller_id = :biller_id,\n\t\t\tcustomer_id = :customer_id,\n\t\t\tpreference_id = :preference_id,\n\t\t\tdate = :date,\n\t\t\tnote = :note,\n\t\t\tcustom_field1 = :customField1,\n\t\t\tcustom_field2 = :customField2,\n\t\t\tcustom_field3 = :customField3,\n\t\t\tcustom_field4 = :customField4\n\t\tWHERE\n\t\t\tid = :invoice_id\n\t\tAND domain_id = :domain_id";
    return dbQuery($sql, ':index_id', $index_id, ':biller_id', $_POST['biller_id'], ':customer_id', $_POST['customer_id'], ':preference_id', $_POST['preference_id'], ':date', $_POST['date'], ':note', trim($_POST['note']), ':customField1', $_POST['customField1'], ':customField2', $_POST['customField2'], ':customField3', $_POST['customField3'], ':customField4', $_POST['customField4'], ':invoice_id', $invoice_id, ':domain_id', $domain_id);
}
开发者ID:simpleinvoices2,项目名称:simpleinvoices,代码行数:21,代码来源:sql_queries.php

示例9: prepare

if (is_object($invoice) && $invoice->get_id()) {
    $q = prepare("SELECT * FROM invoiceRepeat WHERE invoiceID = %d LIMIT 1", $invoice->get_id());
    $qid1 = $db->query($q);
    if ($db->row($qid1)) {
        $invoiceRepeat->read_db_record($db);
        $invoiceRepeat->set_values("invoiceRepeat_");
        foreach (explode(" ", $TPL["invoiceRepeat_frequency"]) as $id) {
            if ($id) {
                $qid2 = $db->query("SELECT * FROM invoice WHERE invoiceRepeatID = %d AND invoiceRepeatDate = '%s'", $invoiceRepeat->get_id(), $id);
                if ($idrow = $db->row($qid2)) {
                    $links[] = "<a href='" . $TPL["url_alloc_invoice"] . "invoiceID=" . $idrow["invoiceID"] . "'>" . $id . "</a>";
                } else {
                    $links[] = $id;
                }
            }
        }
        $TPL["message_help_no_esc"][] = "This invoice is also a template for the scheduled creation of new invoices on the following dates:\n                              <br>" . implode("&nbsp;&nbsp;", (array) $links) . "\n                              <br>Click the Repeating Invoice link for more information.";
    }
    if ($invoice->get_value("invoiceRepeatID")) {
        $ir = new invoiceRepeat();
        $ir->set_id($invoice->get_value("invoiceRepeatID"));
        $ir->select();
        $i = new invoice();
        $i->set_id($ir->get_value("invoiceID"));
        $i->select();
        $TPL["message_help_no_esc"][] = "This invoice was automatically generated by the\n                                   <a href='" . $TPL["url_alloc_invoice"] . "invoiceID=" . $ir->get_value("invoiceID") . "'>\n                                   repeating invoice " . $i->get_value("invoiceNum") . "</a>";
    }
}
$TPL["invoice"] = $invoice;
$TPL["invoiceRepeat"] = $invoiceRepeat;
include_template("templates/invoiceM.tpl");
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:invoice.php

示例10: date

        $payment->ac_amount = $p->ipn_data['mc_gross'];
        #$payment->ac_amount = $_POST['mc_gross'];
        $payment->ac_notes = $paypal_data;
        #$payment->ac_notes = $paypal_data;
        $payment->ac_date = date('Y-m-d', strtotime($p->ipn_data['payment_date']));
        #$payment->ac_date = date( 'Y-m-d', strtotime($_POST['payment_date']));
        $payment->online_payment_id = $p->ipn_data['txn_id'];
        $payment->domain_id = $domain_id;
        $payment_type = new payment_type();
        $payment_type->type = "Paypal";
        $payment_type->domain_id = $domain_id;
        $payment->ac_payment_type = $payment_type->select_or_insert_where();
        $logger->log('Paypal - payment_type=' . $payment->ac_payment_type, Zend_Log::INFO);
        $payment->insert();
        $invoiceobj = new invoice();
        $invoice = $invoiceobj->select($p->ipn_data['invoice']);
        $biller = getBiller($invoice['biller_id']);
        //send email
        $body = "A Paypal instant payment notification was successfully recieved into Simple Invoices\n";
        $body .= "from " . $p->ipn_data['payer_email'] . " on " . date('m/d/Y');
        $body .= " at " . date('g:i A') . "\n\nDetails:\n";
        $body .= $paypal_data;
        $email = new email();
        $email->notes = $body;
        $email->to = $biller['email'];
        $email->from = "simpleinvoices@localhost.localdomain";
        $email->subject = 'Instant Payment Notification - Recieved Payment';
        $email->send();
        $xml_message['data'] .= $body;
    }
} else {
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:31,代码来源:paypal.php

示例11: header

$checkPermission = $acl->isAllowed($auth_session->role_name, $module, $view) ?  "allowed" : "denied"; // allowed

//sbasic customer page check - exmaple
/*
if( ($auth_session->role_name =='customer') AND ($module == 'customers') AND ($_GET['id'] != $auth_session->user_id) )
{
	$checkPermission = "denied";
}
*/

/*
 * Check customer
 */
if( ($auth_session->role_name =='customer') AND ($module == 'invoices') AND ($_GET['id']) )
{

   // Check invoice ID belongs to customer
   $invoice = invoice::select($_GET['id']);
   if($invoice['customer_id'] != $auth_session->role_link_id)
   {
        $checkPermission = "denied";
   }

}

//$checkPermission == "denied" ? exit($LANG['denied_page']) :"" ;

$checkPermission == "denied" ?  header("Location: index.php?module=error&view=401") : false;

开发者ID:CalhounGaming,项目名称:simpleinvoices,代码行数:28,代码来源:check_permission.php

示例12: max

 function update_invoice_dates($invoiceID)
 {
     $db = new db_alloc();
     $db->query(prepare("SELECT max(iiDate) AS maxDate, min(iiDate) AS minDate\n                          FROM invoiceItem\n                         WHERE invoiceID=%d", $invoiceID));
     $db->next_record();
     $invoice = new invoice();
     $invoice->set_id($invoiceID);
     $invoice->select();
     $invoice->set_value("invoiceDateFrom", $db->f("minDate"));
     $invoice->set_value("invoiceDateTo", $db->f("maxDate"));
     return $invoice->save();
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:12,代码来源:invoice.inc.php

示例13: updateInvoice

function updateInvoice($invoice_id) {

    global $logger;
    $SI_PREFERENCES = new SimpleInvoices_Db_Table_Preferences();
    
    $current_invoice = invoice::select($_POST['id']);
    $current_pref_group = $SI_PREFERENCES->getPreferenceById($current_invoice[preference_id]);

    $new_pref_group= $SI_PREFERENCES->getPreferenceById($_POST[preference_id]);

    $index_id = $current_invoice['index_id'];

//	$logger->log('Curent Index Group: '.$description, Zend_Log::INFO);
//	$logger->log('Description: '.$description, Zend_Log::INFO);

    if ($current_pref_group['index_group'] != $new_pref_group['index_group'])
    {
        $index_id = SimpleInvoices_Db_Table_Index::INCREMENT('invoice',$new_pref_group['index_group']);
    }

	if ($db_server == 'mysql' && !_invoice_check_fk(
		$_POST['biller_id'], $_POST['customer_id'],
		$type, $_POST['preference_id'])) {
		return null;
	}
	$sql = "UPDATE
			".TB_PREFIX."invoices
		SET
			index_id = :index_id,
			biller_id = :biller_id,
			customer_id = :customer_id,
			preference_id = :preference_id,
			date = :date,
			note = :note,
			custom_field1 = :customField1,
			custom_field2 = :customField2,
			custom_field3 = :customField3,
			custom_field4 = :customField4
		WHERE
			id = :invoice_id";

	return dbQuery($sql,
        ':index_id', $index_id,
		':biller_id', $_POST['biller_id'],
		':customer_id', $_POST['customer_id'],
		':preference_id', $_POST['preference_id'],
		':date', $_POST['date'],
		':note', $_POST['note'],
		':customField1', $_POST['customField1'],
		':customField2', $_POST['customField2'],
		':customField3', $_POST['customField3'],
		':customField4', $_POST['customField4'],
		':invoice_id', $invoice_id
		);
}
开发者ID:CalhounGaming,项目名称:simpleinvoices,代码行数:55,代码来源:sql_queries.php

示例14:

<?php

//get invoice details

$invoice = invoice::select('1');
//echo json_encode($invoice);
//header('Content-type: application/xml');
echo encode::xml($invoice);
//print_r($invoice);
开发者ID:CalhounGaming,项目名称:simpleinvoices,代码行数:9,代码来源:invoice.php

示例15: invoice

<?php

$saved = false;
$invoiceobj = new invoice();
$invoice_all = $invoiceobj->get_all();
if ($_POST['op'] == 'add' and !empty($_POST['invoice_id'])) {
    $invoice = $invoiceobj->select($_POST['invoice_id']);
    $eway_check = new eway();
    $eway_check->invoice = $invoice;
    $eway_pre_check = $eway_check->pre_check();
    if ($eway_pre_check == 'true') {
        //do eway payment
        $eway = new eway();
        $eway->invoice = $invoice;
        $saved = $eway->payment();
    } else {
        $saved = 'check_failed';
    }
}
$smarty->assign('invoice_all', $invoice_all);
$smarty->assign('saved', $saved);
$smarty->assign('pageActive', 'payment');
$smarty->assign('subPageActive', 'payment_eway');
$smarty->assign('active_tab', '#money');
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:24,代码来源:eway.php


注:本文中的invoice::select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。