protected function _ignoreIncrease(RM_Points_Account $obAccount, RM_User_Family_Object $obPerson) { return count($obAccount->getPaymentList()->filter('event=? and family_id=? and date_format(amount_date,?) = date_format(now(),?)', $this->_name, $obPerson->id(), '%Y', '%Y')) > 0; }
protected function _isAlreadyAwarded(RM_Points_Account $obAccount, $bdate) { $checkEvents = array('scanning', 'no-purchase'); return count($obAccount->getPaymentList()->filter('event in (' . sqlBinds($checkEvents) . ')', $checkEvents)->filter('amount_date=?', $bdate)) > 0; }
protected function _isNotUnique(RM_Points_Account $obAccount, $bdate) { $checkEvents = array('new-barcode', 'no-new-barcode'); return count($obAccount->getPaymentList()->filter('event in (' . sqlBinds($checkEvents) . ')', $checkEvents)->filter('amount_date=?', M('Date')->dbDate($bdate))) > 0; }
/** * Retrievs a list of payments for account with my event types * * @param RM_Points_Account $obAccount * @return RM_Store_iRequest<RM_Points_Payment> */ protected function _getEventPaymentList(RM_Points_Account $obAccount) { return $obAccount->getPaymentList()->filter('event=?', $this->_name); }