本文整理汇总了PHP中Transaction::search方法的典型用法代码示例。如果您正苦于以下问题:PHP Transaction::search方法的具体用法?PHP Transaction::search怎么用?PHP Transaction::search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transaction
的用法示例。
在下文中一共展示了Transaction::search方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIndex
/**
* Dashboard / All Transactions
*/
public function getIndex()
{
// Page Title
$this->_data['page_title'] = "Transactions";
$this->_data['affiliates'] = Affiliate::orderBy('name', 'ASC')->get();
$this->_data['products'] = Product::orderBy('name', 'ASC')->get();
$transactions = new Transaction();
$this->_data['transactions'] = $transactions->search();
$this->_data['searchParams'] = $transactions->getSearchParams();
$this->_data['revenue'] = $transactions->totalRevenue();
$this->_data['paidAffliates'] = $transactions->paidToAffiliates();
$this->_data['refundQueue'] = $transactions->refundQueueCount();
return View::make('admin.transactions.index', $this->_data)->nest('header', 'admin.common.header', $this->_data)->nest('footer', 'admin.common.footer', $this->_data);
}
示例2: header
<?php
require_once 'core/init.php';
$member_role = $_SESSION['roles'];
if (in_array("Laboratory Assistant", $member_role)) {
} else {
header('location:restricted_page.php');
}
if (count($_POST) > 0) {
//print_r($_POST);
//print_r($_POST["condition"]);
//print_r($_POST["returned"]);
$tid = $_POST["tid"];
$tran = Transaction::search($tid);
$tran->updateComment($_POST["comment"]);
$tran->updateRemark($_POST["remark"]);
$condition = $_POST["condition"];
$returned = $_POST["returned"];
$i = 0;
for ($i = 1; $i < count($returned); $i++) {
if ($tran->finishReturn($returned[$i], $condition[$i])) {
$status = true;
} else {
$status = false;
}
}
if ($status) {
echo "<div style='text-align:center';>";
echo "<img src='img/icons/success-icon.png' hight='200' width='200'>";
echo "<h2>Item Return Successful !</h2>";
echo "<a href='item_return_panel1.php'><h4>Back to Item Returns</h4></a>";
示例3: transactions
public function transactions()
{
$collection = Transaction::search([TransactionSearch::ids()->in($this->transactionIds)]);
return $collection;
}
示例4: postRecentTransactions
/**
* Recent Transactions
*
* Get 25 recent transactions of a user
*/
public function postRecentTransactions()
{
if ($this->_isValidRequest()) {
$email = Input::get('email');
if (!$email) {
$this->_invalidRequest("Email parameter is required");
}
$transaction = new Transaction();
$product_id = Product::where('code', '=', Input::get('code'))->first()->id;
// Set search params
$params = array("from" => "1970-01-01", "to" => date("Y-m-d", time()), "range" => "custom", "product" => $product_id, "affiliate" => NULL, "paid" => 1, "refunded" => 1, "search" => "true", "q" => NULL, "email" => $email);
$transactions = $transaction->search($params);
$response = array();
if (!$transactions) {
die(json_encode(array('data' => $response)));
}
foreach ($transactions as $transaction) {
$response[] = array('transaction_id' => $transaction->pay_id, 'amount' => $transaction->amount, 'is_refunded' => $transaction->is_refunded ? 'true' : 'false', 'date' => $transaction->updated_at, 'plan_name' => $transaction->plan_name, 'plan' => Plan::where('id', '=', $transaction->plan_id)->first()->code);
}
die(json_encode(array('data' => $response)));
}
}