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


PHP invoice::select_all方法代码示例

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


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

示例1: inventory

	$inventory = new inventory();
	$inventory->id=$_GET['id'];
	$inventory->domain_id=domain_id::get();
	$inventory->product_id=$_POST['product_id'];
	$inventory->quantity=$_POST['quantity'];
	$inventory->cost=$_POST['cost'];
	$inventory->date=$_POST['date'];
	$inventory->note=$_POST['note'];
	$result = $inventory->update();

	$saved = !empty($result) ? "true" : "false";
}      

$invoices = new invoice();
$invoices->sort='id';
$invoice_all = $invoices->select_all('count');

$get_inventory = new inventory();
$get_inventory->id = $_GET['id'];
$inventory = $get_inventory->select();

$product_all = product::get_all();
$smarty -> assign('product_all',$product_all);
$smarty -> assign('saved',$saved);
$smarty -> assign('inventory',$inventory);

$smarty -> assign('pageActive', 'inventory');
$smarty -> assign('subPageActive', 'inventory_edit');
$smarty -> assign('active_tab', '#product');
开发者ID:CalhounGaming,项目名称:simpleinvoices,代码行数:29,代码来源:edit.php

示例2: getCustomerInvoices

$invoices = getCustomerInvoices($customer_id);
//$start = (isset($_POST['start'])) ? $_POST['start'] : "0" ;
$dir = "DESC";
$sort = "id";
$rp = isset($_POST['rp']) ? $_POST['rp'] : "25";
$having = 'money_owed';
$page = isset($_POST['page']) ? $_POST['page'] : "1";
//$sql = "SELECT * FROM ".TB_PREFIX."invoices LIMIT $start, $limit";
$invoice_owing = new invoice();
$invoice_owing->sort = $sort;
$invoice_owing->having_and = "real";
$invoice_owing->query = $_REQUEST['query'];
$invoice_owing->qtype = $_REQUEST['qtype'];
$large_dataset = getDefaultLargeDataset();
if ($large_dataset == $LANG['enabled']) {
    $sth = $invoice_owing->select_all('large_count', $dir, $rp, $page, $having);
} else {
    $sth = $invoice_owing->select_all('', $dir, $rp, $page, $having);
}
$invoices_owing = $sth->fetchAll(PDO::FETCH_ASSOC);
//$customFieldLabel = getCustomFieldLabels("biller");
$smarty->assign("stuff", $stuff);
$smarty->assign('customer', $customer);
$smarty->assign('invoices', $invoices);
$smarty->assign('invoices_owing', $invoices_owing);
$smarty->assign('customFieldLabel', $customFieldLabel);
$smarty->assign('pageActive', 'customer');
$subPageActive = $_GET['action'] == "view" ? "customer_view" : "customer_edit";
$smarty->assign('subPageActive', $subPageActive);
$smarty->assign('pageActive', 'customer');
$smarty->assign('active_tab', '#people');
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:31,代码来源:details.php

示例3: dbQuery

define("BROWSE","browse");
//if this page has error with auth remove the above line and figure out how to do it right

$SI_INVOICE_TYPE = new SimpleInvoices_Db_Table_InvoiceType();

$domain_id = domain_id::get();

#$sql = "SELECT * FROM ".TB_PREFIX."invoices where domain_id = ".$domain_id;

#global $dbh;
#$sth = dbQuery($sql) or die(htmlsafe(end($dbh->errorInfo())));

//$sql = "SELECT * FROM ".TB_PREFIX."invoices LIMIT $start, $limit";
$invoice = new invoice();
$sth = $invoice->select_all();

$q = strtolower($_GET["q"]);
if (!$q) return;

while ($invoice = getInvoices($sth)) {

	$invoiceType = $SI_INVOICE_TYPE->getInvoiceType($invoice['type_id']);

	if (strpos(strtolower($invoice['index_id']), $q) !== false) {
		$invoice['id'] = htmlsafe($invoice['id']);
		$invoice['total'] = htmlsafe(number_format($invoice['total'],2));
		$invoice['paid'] = htmlsafe(number_format($invoice['paid'],2));
		$invoice['owing'] = htmlsafe(number_format($invoice['owing'],2));
		echo "$invoice[id]|<table><tr><td class='details_screen'>$invoice[preference]:</td><td>$invoice[index_id]</td><td  class='details_screen'>Total: </td><td>$invoice[total] </td></tr><tr><td class='details_screen'>Biller: </td><td>$invoice[biller] </td><td class='details_screen'>Paid: </td><td>$invoice[paid] </td></tr><tr><td class='details_screen'>Customer: </td><td>$invoice[customer] </td><td class='details_screen'>Owing: </td><td><u>$invoice[owing]</u></td></tr></table>\n";
	}
开发者ID:CalhounGaming,项目名称:simpleinvoices,代码行数:30,代码来源:process_ajax.php

示例4: isset

$rp = isset($_POST['rp']) ? $_POST['rp'] : "25";
$having = isset($_GET['having']) ? $_GET['having'] : "";
$page = isset($_POST['page']) ? $_POST['page'] : "1";
//$sql = "SELECT * FROM ".TB_PREFIX."invoices LIMIT $start, $limit";
$invoice = new invoice();
$invoice->sort = $sort;
if ($auth_session->role_name == 'customer') {
    $invoice->customer = $auth_session->user_id;
} elseif ($auth_session->role_name == 'biller') {
    $invoice->biller = $auth_session->user_id;
}
$invoice->query = isset($_REQUEST['query']) ? $_REQUEST['query'] : null;
$invoice->qtype = isset($_REQUEST['qtype']) ? $_REQUEST['qtype'] : null;
$large_dataset = getDefaultLargeDataset();
if ($large_dataset == $LANG['enabled']) {
    $sth = $invoice->select_all('large', $dir, $rp, $page, $having);
    $sth_count_rows = $invoice->count();
    $invoice_count = $sth_count_rows->fetch(PDO::FETCH_ASSOC);
    $invoice_count = $invoice_count['count'];
} else {
    $sth = $invoice->select_all('', $dir, $rp, $page, $having);
    $sth_count_rows = $invoice->select_all('count', $dir, $rp, $page, $having);
    $invoice_count = $sth_count_rows->rowCount();
}
$invoices = $sth->fetchAll(PDO::FETCH_ASSOC);
$xml = "";
$xml .= "<rows>";
$xml .= "<page>{$page}</page>";
$xml .= "<total>" . $invoice_count . "</total>";
foreach ($invoices as $row) {
    $xml .= "<row id='" . $row['id'] . "'>";
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:31,代码来源:xml.php

示例5: 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

示例6: lastOfMonth

{
    return date("Y-m-d", strtotime('01-' . date('m') . '-' . date('Y') . ' 00:00:00'));
}
function lastOfMonth()
{
    return date("Y-m-d", strtotime('-1 second', strtotime('+1 month', strtotime('01-' . date('m') . '-' . date('Y') . ' 00:00:00'))));
}
isset($_POST['start_date']) ? $start_date = $_POST['start_date'] : ($start_date = firstOfMonth());
isset($_POST['end_date']) ? $end_date = $_POST['end_date'] : ($end_date = lastOfMonth());
$sql = "select \n        e.amount as expense, \n        e.status as status, \n        ea.name as account,\n        (select sum(tax_amount) from si_expense_item_tax where expense_id = e.id) as tax,\n        (select tax + e.amount) as total,\n        (CASE WHEN status = 1 THEN '" . $LANG['paid'] . "'\n              WHEN status = 0 THEN '" . $LANG['not_paid'] . "'\n         END) AS status_wording\n    from \n        si_expense e, \n        si_expense_account ea \n    where \n        e.expense_account_id = ea.id \n        and \n        e.date between '{$start_date}' and '{$end_date}'";
$sth = $db->query($sql);
$accounts = $sth->fetchAll();
$payment = new payment();
$payment->start_date = $start_date;
$payment->end_date = $end_date;
$payment->filter = "date";
$payments = $payment->select_all();
$invoice = new invoice();
$invoice->start_date = $start_date;
$invoice->end_date = $end_date;
$invoice->having = "date_between";
$invoice->sort = "preference";
$invoice_all = $invoice->select_all();
$invoices = $invoice_all->fetchAll();
$smarty->assign('accounts', $accounts);
$smarty->assign('payments', $payments);
$smarty->assign('invoices', $invoices);
$smarty->assign('start_date', $start_date);
$smarty->assign('end_date', $end_date);
$smarty->assign('pageActive', 'report');
$smarty->assign('active_tab', '#home');
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:31,代码来源:report_summary.php

示例7: getData

 function getData()
 {
     //echo "export - get data";
     global $smarty;
     global $siUrl;
     switch ($this->module) {
         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";
                 } else {
                     $invoice->having = "money_owed";
                 }
             }
             $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'];
             }
             $templatePath = "./templates/default/statement/index.tpl";
             $biller_details = getBiller($this->biller_id);
             $customer_details = getCustomer($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);
             $smarty->assign('show_only_unpaid', $show_only_unpaid);
             $smarty->assign('filter_by_date', $this->filter_by_date);
             $smarty->assign('invoices', $invoices);
             $smarty->assign('start_date', $this->start_date);
             $smarty->assign('end_date', $this->end_date);
             $smarty->assign('invoices', $invoices);
             $smarty->assign('statement', $statement);
             $data = $smarty->fetch("." . $templatePath);
             break;
         case "payment":
             $payment = getPayment($this->id);
             /*Code to get the Invoice preference - so can link from this screen back to the invoice - START */
             $invoice = getInvoice($payment['ac_inv_id']);
             $biller = getBiller($payment['biller_id']);
             $logo = getLogo($biller);
             $logo = str_replace(" ", "%20", $logo);
             $customer = getCustomer($payment['customer_id']);
             $invoiceType = getInvoiceType($invoice['type_id']);
             $customFieldLabels = getCustomFieldLabels();
             $paymentType = getPaymentType($payment['ac_payment_type']);
             $preference = getPreference($invoice['preference_id']);
             $smarty->assign("payment", $payment);
             $smarty->assign("invoice", $invoice);
             $smarty->assign("biller", $biller);
             $smarty->assign("logo", $logo);
             $smarty->assign("customer", $customer);
             $smarty->assign("invoiceType", $invoiceType);
             $smarty->assign("paymentType", $paymentType);
             $smarty->assign("preference", $preference);
             $smarty->assign("customFieldLabels", $customFieldLabels);
             $smarty->assign('pageActive', 'payment');
             $smarty->assign('active_tab', '#money');
             $css = $siUrl . "/templates/invoices/default/style.css";
             $smarty->assign('css', $css);
             $templatePath = "./templates/default/payments/print.tpl";
             $data = $smarty->fetch("." . $templatePath);
             break;
         case "invoice":
             $invoice = invoice::select($this->id);
             $invoice_number_of_taxes = numberOfTaxesForInvoice($this->id);
             $customer = getCustomer($invoice['customer_id']);
             $biller = biller::select($invoice['biller_id']);
             $preference = getPreference($invoice['preference_id']);
             $defaults = getSystemDefaults();
             $logo = getLogo($biller);
             $logo = str_replace(" ", "%20", $logo);
             $invoiceItems = invoice::getInvoiceItems($this->id);
             $spc2us_pref = str_replace(" ", "_", $invoice['index_name']);
             $this->file_name = $spc2us_pref;
             $customFieldLabels = getCustomFieldLabels();
             /*Set the template to the default*/
             $template = $defaults['template'];
             $templatePath = "./templates/invoices/{$template}/template.tpl";
             $template_path = "../templates/invoices/{$template}";
             $css = $siUrl . "/templates/invoices/{$template}/style.css";
             $pluginsdir = "./templates/invoices/{$template}/plugins/";
//.........这里部分代码省略.........
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:101,代码来源:export.php


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