<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://doc-en-mirror.openflyers.com/index.php?action=history&amp;feed=atom&amp;title=OpenFlyers-SQL-stored-functions-and-procedures</id>
	<title>OpenFlyers SQL stored functions and procedures - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://doc-en-mirror.openflyers.com/index.php?action=history&amp;feed=atom&amp;title=OpenFlyers-SQL-stored-functions-and-procedures"/>
	<link rel="alternate" type="text/html" href="https://doc-en-mirror.openflyers.com/index.php?title=OpenFlyers-SQL-stored-functions-and-procedures&amp;action=history"/>
	<updated>2026-05-01T07:55:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://doc-en-mirror.openflyers.com/index.php?title=OpenFlyers-SQL-stored-functions-and-procedures&amp;diff=249&amp;oldid=prev</id>
		<title>imported&gt;Claratte: /* sexa2HoursMinute */</title>
		<link rel="alternate" type="text/html" href="https://doc-en-mirror.openflyers.com/index.php?title=OpenFlyers-SQL-stored-functions-and-procedures&amp;diff=249&amp;oldid=prev"/>
		<updated>2020-05-13T11:03:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;sexa2HoursMinute&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
=Presentation=&lt;br /&gt;
This page is dedicated to list OpenFlyers SQL stored functions and procedures which are accessibles to OpenFlyers administrators via the SQL exports or imports.&lt;br /&gt;
&lt;br /&gt;
=distanceBetween2Point=&lt;br /&gt;
*This procedure exists with OF 3.0+&lt;br /&gt;
*Stored function to calculate distance between two points (of a coordinate)&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**latitude1&lt;br /&gt;
**longitude1&lt;br /&gt;
**latitude2&lt;br /&gt;
**longitude2&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**distance&lt;br /&gt;
&lt;br /&gt;
=formatDecimal=&lt;br /&gt;
*This function exists with OF 3.6+&lt;br /&gt;
*Stored function for SQL report to formal decimal by removing trailing zero after the decimal separator and by replacing the decimal separator with the one customized by the platform&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**string (the decimal to format)&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**replacedString (the formated decimal)&lt;br /&gt;
&lt;br /&gt;
=isBalancedAccountEntryFlow=&lt;br /&gt;
*This function exists with OF 3.6+&lt;br /&gt;
*Stored function for SQL report to check if account entries from a flow are balanced&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**flowId (flow id)&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**isBalanced (1 when entries are balanced, 0/null when not)&lt;br /&gt;
&lt;br /&gt;
=nearestPoint=&lt;br /&gt;
*This procedure exists with OF 3.0+&lt;br /&gt;
*Stored function to find the nearest ICAO from a coordinate&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**latRef (latitude of the coordinate)&lt;br /&gt;
**longRef (longitude of the coordinate)&lt;br /&gt;
**distanceMax (max distance to filter result)&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**ICAO id&lt;br /&gt;
&lt;br /&gt;
=saleValidity=&lt;br /&gt;
*This procedure exists with OF 3.0alpha only&lt;br /&gt;
*Stored procedure to create account entries and update validity expire date of an user (or add validity to the user if it doesn't exist)&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**validityTypeId (id of the validity type)&lt;br /&gt;
**personId (id of the person)&lt;br /&gt;
**validityTypeCost (validity type cost)&lt;br /&gt;
&lt;br /&gt;
=sexa2HoursHundredths=&lt;br /&gt;
*This function exists with OF 4+&lt;br /&gt;
*Stored function to format sexacentimal to &amp;quot;hours:hundreths&amp;quot;&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**sexacentimal&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**convertedValue (hours:hundreths)&lt;br /&gt;
&lt;br /&gt;
=sexa2HoursMinute=&lt;br /&gt;
*This function exists with OF 3.6+&lt;br /&gt;
*Stored function to format sexacentimal to &amp;quot;hours:minutes&amp;quot;&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**sexacentimal&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**convertedValue (hours:minutes)&lt;br /&gt;
&lt;br /&gt;
=stripChars=&lt;br /&gt;
*This function exists with OF 3.0+&lt;br /&gt;
*Stored function to get a cleaned string (remove spaces and underscores)&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**word (the string to be cleaned)&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**stripWord (the string cleaned)&lt;br /&gt;
&lt;br /&gt;
=sumAccountEntry=&lt;br /&gt;
*This function exists with OF 2.1+&lt;br /&gt;
*Stored function to compute the current balance of an account at a given date&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**accountId (account Id)&lt;br /&gt;
**endDate (to compute only account entries from opening accounting date to this date)&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**totalBalance (balance)&lt;br /&gt;
&lt;br /&gt;
=sumAccountEntryCredit=&lt;br /&gt;
*This function exists with OF 3.6+&lt;br /&gt;
*Stored function to compute the current sum of credit lines of an account at a given date&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**accountId (account Id)&lt;br /&gt;
**endDate (to compute only account entries from opening accounting date to this date)&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**totalCredit (total credit)&lt;br /&gt;
&lt;br /&gt;
=sumAccountEntryDebit=&lt;br /&gt;
*This function exists with OF 3.6+&lt;br /&gt;
*Stored function to compute the current sum of debit lines of an account at a given date&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**accountId (account Id)&lt;br /&gt;
**endDate (to compute only account entries from opening accounting date to this date)&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**totalDebit (total debit)&lt;br /&gt;
&lt;br /&gt;
=sumValidatedAccountEntry=&lt;br /&gt;
*This function exists with OF 4.0+&lt;br /&gt;
*Stored function to compute the current balance of an account at a given date. Only validated account entries are taken into account&lt;br /&gt;
*Input parameters:&lt;br /&gt;
**accountId (account Id)&lt;br /&gt;
**endDate (to compute only account entries from opening accounting date to this date)&lt;br /&gt;
*Output parameters:&lt;br /&gt;
**totalBalance (balance)&lt;/div&gt;</summary>
		<author><name>imported&gt;Claratte</name></author>
	</entry>
</feed>