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

    return $this->JournalVoucher->setConnection($databaseConnectionName)->where('organization_id', '=', $id)->max('number');
  }
public function getMaxJournalVoucherNumber($id, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    return $this->JournalVoucher->setConnection($databaseConnectionName)->where('organization_id', '=', $id)->max('number');
  }
public function getMaxJournalVoucherNumber ( $ id , $ databaseConnectionName = null ) { if ( empty ( $ databaseConnectionName ) ) { $ databaseConnectionName = $ this -> databaseConnectionName ; } return $ this -> JournalVoucher -> setConnection ( $ databaseConnectionName ) -> where ( 'organization_id' , '=' , $ id ) -> max ( 'number' ) ; }
Get the max journal voucher number

@param  int $id Organization id

@return integer
Get the max journal voucher number