public function getMaxJournalVoucherNumber($id, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    return $this->JournalVoucher->setConnection($databaseConnectionName)->where('organization_id', '=', $id)->max('number');
  }