本文整理汇总了PHP中Receipt::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Receipt::find方法的具体用法?PHP Receipt::find怎么用?PHP Receipt::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Receipt
的用法示例。
在下文中一共展示了Receipt::find方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setVariables
/**
* Contains the testing sample data for the IssueController.
*
* @return void
*/
public function setVariables()
{
// Initial sample storage data
$this->input = array('batch_no' => Receipt::find(1)->id, 'topup_request_id' => TopupRequest::find(1)->id, 'quantity_issued' => '20', 'receivers_name' => 'Lab2', 'remarks' => 'first issue');
// Edition sample data
$this->inputUpdate = array('batch_no' => Receipt::find(1)->id, 'topup_request_id' => TopupRequest::find(1)->id, 'quantity_issued' => '20', 'receivers_name' => 'Lab2', 'remarks' => 'first issue');
}
示例2: receipts
public function receipts()
{
$Receipt = new Receipt();
$condos = $Receipt->Condo->find('list');
$receiptStatuses = $Receipt->ReceiptStatus->find('list', array('conditions' => array('active' => '1')));
$this->set(compact('condos', 'clients', 'receiptStatuses'));
if (isset($this->request->data['Receipt'])) {
$conditions = array('conditions');
if ($this->request->data['Receipt']['condo_id'] != '') {
$conditions['conditions']['Receipt.condo_id'] = $this->request->data['Receipt']['condo_id'];
}
if ($this->request->data['Receipt']['receipt_status_id'] != '') {
$conditions['conditions']['Receipt.receipt_status_id'] = $this->request->data['Receipt']['receipt_status_id'];
}
if ($this->request->data['Receipt']['payment_date'] != '') {
if (is_array($this->request->data['Receipt']['payment_date'])) {
$dateTmp = $this->request->data['Receipt']['payment_date']['day'] . '-' . $this->request->data['Receipt']['payment_date']['month'] . '-' . $this->request->data['Receipt']['payment_date']['year'];
$this->request->data['Receipt']['payment_date'] = $dateTmp;
}
$conditions['conditions']['Receipt.payment_date'] = $this->request->data['Receipt']['payment_date'];
}
$Receipt->contain(array('PaymentUser', 'ReceiptStatus', 'ReceiptPaymentType', 'Client', 'Condo', 'CancelUser'));
$this->set('receipts', $Receipt->find('all', $conditions));
$this->set('hasData', true);
}
}
示例3: showReceipt
public function showReceipt($id)
{
$receipts = Receipt::find($id);
$hid = $receipts->houseID;
$housename = $hid;
$propertyid = House::where('name', $hid)->pluck('propertyID');
$propertyname = Property::where('id', $propertyid)->pluck('name');
$inid = $receipts->invoiceID;
$allbal = Invoice::where('houseID', $hid)->sum('balance');
$current_bal = Invoice::where('id', $inid)->pluck('balance');
$outstandingbal = $allbal - $current_bal;
$amountdue = $allbal;
$balance = $receipts->balance;
return View::make('backend.code.invoice.showr', compact('receipts', 'amountdue', 'housename', 'outstandingbal', 'propertyname', 'invoicedetails', 'total', 'balance', 'amountdue'));
}
示例4: delete
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function delete($id)
{
//Soft delete the patient
$receipt = Receipt::find($id);
$receipt->delete();
// redirect
return Redirect::route('receipt.index')->with('message', trans('messages.receipt-succesfully-deleted'));
}
示例5: setReceiptData
private function setReceiptData()
{
if (isset($this->phkRequestData['receipt_id']) && !isset($this->phkRequestData['receipt_text'])) {
App::import("Model", "Receipt");
$receipt = new Receipt();
$result = $receipt->find("first", array('conditions' => array('Receipt.id' => $this->phkRequestData['receipt_id'])));
if (count($result)) {
$this->phkRequestData['receipt_id'] = $result['Receipt']['id'];
$this->phkRequestData['receipt_text'] = $result['Receipt']['document'];
$this->phkRequestData['owner_id'] = $result['Receipt']['client_id'];
$this->phkRequestData['fraction_id'] = $result['Receipt']['fraction_id'];
$this->phkRequestData['condo_id'] = $result['Receipt']['condo_id'];
}
}
}