public function subsequentByPeriodByNumberAndByOrganization($periodId, $number, $organizationId, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    return $this->JournalVoucher->setConnection($databaseConnectionName)
      ->where('period_id', '=', $periodId)
      ->where('number', '>', $number)
      ->where('organization_id', '=', $organizationId)
      ->get();
  }
public function subsequentByPeriodByNumberAndByOrganization($periodId, $number, $organizationId, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    return $this->JournalVoucher->setConnection($databaseConnectionName)
      ->where('period_id', '=', $periodId)
      ->where('number', '>', $number)
      ->where('organization_id', '=', $organizationId)
      ->get();
  }
public function subsequentByPeriodByNumberAndByOrganization ( $ periodId , $ number , $ organizationId , $ databaseConnectionName = null ) { if ( empty ( $ databaseConnectionName ) ) { $ databaseConnectionName = $ this -> databaseConnectionName ; } return $ this -> JournalVoucher -> setConnection ( $ databaseConnectionName ) -> where ( 'period_id' , '=' , $ periodId ) -> where ( 'number' , '>' , $ number ) -> where ( 'organization_id' , '=' , $ organizationId ) -> get ( ) ; }
Get subsequent journal vouchers by period by number and by organization id

@param int $periodId
@param int $number
@param int $organizationId

@return integer
Get subsequent journal vouchers by period by number and by organization id