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


PHP Receipt::find方法代码示例

本文整理汇总了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');
 }
开发者ID:BaobabHealthTrust,项目名称:iBLIS,代码行数:12,代码来源:IssueControllerTest.php

示例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);
     }
 }
开发者ID:phalkaline,项目名称:phkondo,代码行数:26,代码来源:IncomeController.php

示例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'));
 }
开发者ID:jeremiteki,项目名称:mteja-laravel,代码行数:15,代码来源:BillController.php

示例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'));
 }
开发者ID:BaobabHealthTrust,项目名称:iBLIS,代码行数:14,代码来源:ReceiptController.php

示例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'];
         }
     }
 }
开发者ID:phalkaline,项目名称:phkondo,代码行数:15,代码来源:AppController.php


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