// This may need to have filters setup in the contact plugin as well.
// $employees = apply_filters( 'glm_contact_has_employees', '', $member_id );
$main_billing_account = $this->getAccountByRefDest( $member_id );
+ if ( !$main_billing_account ) {
+ return $accounts;
+ }
// echo '<pre>$main_billing_account: ' . print_r( $main_billing_account, true ) . '</pre>';
$Employees = new GlmDataEmployees( $this->wpdb, $this->config );
$employees = $Employees->getList( "T.account = " . $main_billing_account['id'] );
* Plugin Name: GLM Members Billing
* Plugin URI: http://www.gaslightmedia.com/
* Description: This is glmAssociate Billing Module
- * Version: 1.0.19
+ * Version: 1.0.20
* Author: Gaslight Media
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* @package glmMembersBillingAddOn
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.0.19
+ * @version 1.0.20
*/
/*
* so that we're sure the other add-ons see an up to date
* version from this plugin.
*/
-define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.19');
+define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.20');
define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.26');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
$orderBy = 'renewal_date ASC';
$curDate = date( 'Y-m-d' );
$pendingWhere = "T.archived <> true AND invoice_type != 0 ";
- $pendingWhere .= " AND T.renewal_date + INTERVAL 1 YEAR - INTERVAL $days_before_renewal DAY < = '$curDate'" ;
- $pendingWhere .= " AND T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY > = '$curDate'";
+ $pendingWhere .= " AND T.renewal_date + INTERVAL 1 YEAR - INTERVAL $days_before_renewal DAY <= '$curDate'" ;
+ $pendingWhere .= " AND T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY >= '$curDate'";
$start = 1;
$this->postEmployees = true;
$pending = $this->getList( $pendingWhere, $orderBy, true, 'id', $start, $limit );