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


PHP Payment::populateWithArray方法代码示例

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


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

示例1: processAddPaymentAction

 public function processAddPaymentAction()
 {
     $params = $this->_getParam('payment');
     $payment = new Payment();
     $payment->populateWithArray($params);
     if (!$payment->visitId > 0) {
         $payment->visitId = $this->_createVisit($payment->appointmentId);
     }
     $payment->timestamp = date('Y-m-d H:i:s');
     $payment->userId = (int) Zend_Auth::getInstance()->getIdentity()->personId;
     $payment->persist();
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct(true);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:15,代码来源:AppointmentController.php

示例2: processPaymentAction

 public function processPaymentAction()
 {
     $params = $this->_getParam('payment');
     $data = false;
     if (is_array($params)) {
         $payment = new Payment();
         $payment->populateWithArray($params);
         if (!strlen($payment->userId) > 0) {
             $payment->userId = (int) Zend_Auth::getInstance()->getIdentity()->personId;
         }
         if (!strlen($payment->timestamp) > 0) {
             $payment->timestamp = date('Y-m-d H:i:s');
         }
         $payment->persist();
         $data = true;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($data);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:20,代码来源:AccountsController.php

示例3: listUnallocatedFunds

 public static function listUnallocatedFunds($personId)
 {
     // payments with appointmentId OR payments assigned ONLY to person
     $db = Zend_Registry::get('dbAdapter');
     $sqlSelect = $db->select()->from('payment')->where('personId = ?', (int) $personId)->where('(amount - allocated) > 0')->where('encounter_id = 0')->where('appointmentId = 0');
     $total = 0;
     $details = array();
     if ($rows = $db->fetchAll($sqlSelect)) {
         foreach ($rows as $row) {
             $payment = new Payment();
             $payment->populateWithArray($row);
             $total += $payment->unallocated;
             $details[$row['payment_id']] = $payment;
         }
     }
     return array('total' => $total, 'details' => $details);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:17,代码来源:Payment.php

示例4: getCopay

 public function getCopay()
 {
     // payments with appointmentId
     $db = Zend_Registry::get('dbAdapter');
     $sqlSelect = $db->select()->from('payment')->where('personId = ?', (int) $this->patientId)->where('encounter_id = ?', (int) $this->encounter_id)->where('(amount - allocated) > 0')->where('appointmentId != 0');
     $total = 0;
     $details = array();
     $stmt = $db->query($sqlSelect);
     $stmt->setFetchMode(Zend_Db::FETCH_ASSOC);
     while ($row = $stmt->fetch()) {
         $payment = new Payment();
         $payment->populateWithArray($row);
         $total += $payment->unallocated;
         $details[$row['payment_id']] = $payment;
     }
     return array('total' => $total, 'details' => $details);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:17,代码来源:Visit.php

示例5: processSaveCheckAction

 public function processSaveCheckAction()
 {
     $params = $this->_getParam('payment');
     $data = false;
     if (is_array($params)) {
         $payment = new Payment();
         $payment->populateWithArray($params);
         $payment->paymentType = 'CHECK';
         $date = date('Y-m-d H:i:s');
         $payment->paymentDate = $date;
         $payment->timestamp = $date;
         $payment->persist();
         $data = true;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($data);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:18,代码来源:ClaimsController.php


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