public function getByOrganizationByPeriodAndByStatus($organizationId, $periodIds, $status, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    return $this->JournalVoucher->setConnection($databaseConnectionName)
      ->where('organization_id', '=', $organizationId)
      ->whereIn('period_id', $periodIds)
      ->where('status', '=', $status)
      ->get();
  }
public function getByOrganizationByPeriodAndByStatus($organizationId, $periodIds, $status, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    return $this->JournalVoucher->setConnection($databaseConnectionName)
      ->where('organization_id', '=', $organizationId)
      ->whereIn('period_id', $periodIds)
      ->where('status', '=', $status)
      ->get();
  }
public function getByOrganizationByPeriodAndByStatus ( $ organizationId , $ periodIds , $ status , $ databaseConnectionName = null ) { if ( empty ( $ databaseConnectionName ) ) { $ databaseConnectionName = $ this -> databaseConnectionName ; } return $ this -> JournalVoucher -> setConnection ( $ databaseConnectionName ) -> where ( 'organization_id' , '=' , $ organizationId ) -> whereIn ( 'period_id' , $ periodIds ) -> where ( 'status' , '=' , $ status ) -> get ( ) ; }
Get journal voucher by organization, by period and by status

@param  int $organizationId
@param  array $periodIds
@param  string $status

@return integer
Get journal voucher by organization by period and by status