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


PHP Payment::all方法代码示例

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


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

示例1: index

 /**
  * Display a listing of payments
  *
  * @return Response
  */
 public function index()
 {
     $payments = Payment::all();
     $erporders = Erporder::all();
     $erporderitems = Erporderitem::all();
     return View::make('payments.index', compact('payments', 'erporderitems', 'erporders'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:12,代码来源:PaymentsController.php

示例2: payments

 public function payments()
 {
     $payments = Payment::all();
     $erporders = Erporder::all();
     $erporderitems = Erporderitem::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.paymentsReport', compact('payments', 'erporders', 'erporderitems', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Payment List.pdf');
 }
开发者ID:kenkode,项目名称:umash-1,代码行数:9,代码来源:ErpReportsController.php

示例3: filters

 public function filters($offset = 0)
 {
     $this->load->helpers('date');
     $string = '%' . $this->input->post('estudiante') . '%';
     $usuario = $this->input->post('user_id');
     $fecha_desde = $this->input->post('fecha_desde');
     $fecha_hasta = $this->input->post('fecha_hasta');
     $condiciones = 'anulado = ?';
     $valores[] = 0;
     if ($string != '%%') {
         $condiciones .= " AND CONCAT(students.apellido,' ', students.nombre) LIKE ?";
         $valores[] = $string;
     }
     if ($usuario > 0) {
         /*if($condiciones != ''){
         		$condiciones .= " AND ";
         		}*/
         $condiciones .= " AND user_id = ?";
         $valores[] = $usuario;
     }
     if ($fecha_desde != '') {
         $fecha_desde = mdate('%Y-%m-%d', normal_to_unix($fecha_desde));
         if ($fecha_hasta != '') {
             $fecha_hasta = mdate('%Y-%m-%d', normal_to_unix($fecha_hasta));
         } else {
             $fecha_hasta = date('Y-m-d');
         }
         /*if($condiciones != ''){
         		$condiciones .= " AND ";
         		}*/
         $condiciones .= " AND fecha BETWEEN ? AND ?";
         $valores[] = $fecha_desde;
         $valores[] = $fecha_hasta;
     }
     $conditions = array_merge(array($condiciones), $valores);
     $config['base_url'] = site_url('pagos/index');
     $config['total_rows'] = Payment::count(array('joins' => array('student'), 'conditions' => $conditions));
     $config['per_page'] = '10';
     $config['num_links'] = '10';
     $config['first_link'] = '← primero';
     $config['last_link'] = 'último →';
     $this->load->library('pagination', $config);
     $pagos = array();
     $pagos = Payment::all(array('joins' => array('student'), 'conditions' => $conditions, 'limit' => $config['per_page'], 'offset' => $offset));
     $this->table->set_heading('Fecha', 'Nro Comprobante', 'Estudiante', 'Importe', 'Usuario', 'Acciones');
     foreach ($pagos as $pago) {
         $this->table->add_row($pago->fecha->format('d/m/Y'), $pago->nro_comprobante, $pago->student->apellido . ' ' . $pago->student->nombre, $pago->importe, $pago->user->apellido . ' ' . $pago->user->nombre, anchor('pagos/ver/' . $pago->id, img('static/img/icon/doc_lines.png'), 'class="tipwe" title="Ver detalles pago"') . ' ' . anchor('pagos/editar/' . $pago->id, img('static/img/icon/pencil.png'), 'class="tipwe" title="Editar pago"') . ' ' . anchor('pagos/eliminar/' . $pago->id, img('static/img/icon/trash.png'), 'class="tipwe eliminar" title="Eliminar pago"'));
     }
     echo $this->table->generate();
     echo '<div class="pagination">';
     echo $this->pagination->create_links();
     echo '</div>';
 }
开发者ID:ricardocasares,项目名称:Cobros,代码行数:53,代码来源:pagos.php

示例4: index

 /**
  * Display a listing of payments
  *
  * @return Response
  */
 public function index()
 {
     /*
     		$payments = DB::table('payments')
     ->join('erporders', 'payments.erporder_id', '=', 'erporders.id')
     ->join('erporderitems', 'payments.erporder_id', '=', 'erporderitems.erporder_id')
     ->join('clients', 'erporders.client_id', '=', 'clients.id')
     ->join('items', 'erporderitems.item_id', '=', 'items.id')
     ->select('clients.name as client','items.name as item','payments.amount_paid as amount','payments.date as date','payments.erporder_id as erporder_id','payments.id as id','erporders.order_number as order_number')
     ->get();
     */
     $erporders = Erporder::all();
     $erporderitems = Erporderitem::all();
     $paymentmethods = Paymentmethod::all();
     $payments = Payment::all();
     return View::make('payments.index', compact('payments', 'erporderitems', 'erporders', 'paymentmethods'));
 }
开发者ID:kenkode,项目名称:umash-1,代码行数:22,代码来源:PaymentsController.php

示例5: getPaymentsList

 public function getPaymentsList()
 {
     $data = Input::all();
     //        dd($data);
     if (Input::get('search')) {
         $validator = Validator::make($data, array('from_date' => 'required|date', 'to_date' => 'required|date'));
         if ($validator->fails()) {
             return Redirect::back()->with($validator->errors());
         }
         $from = Input::get('from_date');
         $to = Input::get('to_date');
         $payments = Payment::where('payment_date_time', '>=', $from)->where('payment_date_time', '<=', $to)->get();
         //            dd($payments);
     } else {
         $payments = Payment::all();
     }
     return View::make('payments.index', compact('payments', 'from', 'to'));
 }
开发者ID:tharindarodrigo,项目名称:agent,代码行数:18,代码来源:PaymentsController.php

示例6: affiliates

 /**
  * @before _secure
  */
 public function affiliates()
 {
     $this->seo(array("title" => "Billing"));
     $view = $this->getActionView();
     $start = RM::get("start", date("Y-m-d", strtotime('-60 day')));
     $end = RM::get("end", date("Y-m-d", strtotime('now')));
     $query = ['utype' => 'publisher', 'org_id' => $this->org->_id];
     $payments = \Payment::all($query);
     $page = RM::get("page", 1);
     $limit = RM::get("limit", 10);
     $property = RM::get("property");
     $value = RM::get("value");
     if ($property) {
         $query["{$property} = ?"] = $value;
     } else {
         $query['created'] = Db::dateQuery($start, $end);
     }
     $invoices = \Invoice::all($query);
     $view->set('invoices', $invoices)->set('payments', $payments)->set('active', Invoice::count(['utype' => 'publisher', 'org_id' => $this->org->_id, "live = ?" => 1]))->set('inactive', Invoice::count(['utype' => 'publisher', 'org_id' => $this->org->_id, "live = ?" => 0]))->set('start', $start)->set('end', $end);
 }
开发者ID:vNative,项目名称:vnative,代码行数:23,代码来源:billing.php

示例7: index

 /**
  * Display a listing of payments
  *
  * @return Response
  */
 public function index()
 {
     $payments = Payment::all();
     return View::make('payments.index', compact('payments'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:10,代码来源:PaymentsController.php

示例8: account

 /**
  * @before _secure
  */
 public function account()
 {
     $this->seo(array("title" => "Account"));
     $view = $this->getActionView();
     $invoices = \Invoice::all(['user_id = ?' => $this->user->_id], ['start', 'end', 'amount', 'live', 'created']);
     $payments = \Payment::all(['user_id = ?' => $this->user->_id], ['type', 'amount', 'meta', 'live', 'created']);
     $user = $this->user;
     $view->set("errors", []);
     if (RM::type() == 'POST') {
         $action = RM::post('action', '');
         switch ($action) {
             case 'account':
                 $fields = ['name', 'phone', 'currency', 'username'];
                 foreach ($fields as $f) {
                     $user->{$f} = RM::post($f);
                 }
                 $user->save();
                 $view->set('message', 'Account Info updated!!');
                 break;
             case 'password':
                 $old = RM::post('password');
                 $new = RM::post('npassword');
                 $view->set($user->updatePassword($old, $new));
                 break;
             case 'bank':
                 $user->getMeta()['bank'] = ['name' => RM::post('account_bank', ''), 'ifsc' => RM::post('account_code', ''), 'account_no' => RM::post('account_number', ''), 'account_owner' => RM::post('account_owner', '')];
                 $user->save();
                 $view->set('message', 'Bank Info Updated!!');
                 break;
             case 'payout':
                 $user->getMeta()['payout'] = ['paypal' => RM::post('paypal', ''), 'payquicker' => RM::post('payquicker', ''), 'payoneer' => RM::post('payoneer', ''), 'paytm' => RM::post('paytm', ''), 'mobicash' => RM::post('mobicash', ''), 'easypaisa' => RM::post('easypaisa', '')];
                 $user->save();
                 $view->set('message', 'Payout Info Updated!!');
                 break;
             case 'custom':
                 $output = Shared\Services\User::customFields($user, $this->org);
                 if (!$output['success']) {
                     return $view->set($output);
                 }
                 $user->save();
                 $view->set('user', $user);
                 $view->set('message', 'Custom field updated!!');
                 break;
             default:
                 $this->_postback('add');
                 break;
         }
         $this->setUser($user);
     }
     if (RM::type() === 'DELETE') {
         $this->_postback('delete');
     }
     $this->_postback('show');
     $afields = Meta::search('customField', $this->org);
     $view->set('afields', $afields)->set("invoices", $invoices)->set("payments", $payments);
 }
开发者ID:vNative,项目名称:vnative,代码行数:59,代码来源:publisher.php


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