Brian Dunning's FileMaker Custom Functions

redondeoChile ( numero )

Redondeo chile

  Be the first to rate this function Log in to vote

Tomas ortega   Tomas ortega - Show more from this author
Augurio Solutions
http://augurio.cl

Share on Facebook Share on Twitter

  Sample input:
redondeoChile( 504 ) = 500
redondeoChile( 506 ) = 510
  Sample output:
500
510

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

/*
* ==============================
* redondeoChile ( numero )
* ==============================
* Nueva regla de Redondeo que aplica para los pagos en efectivo desde el 1 de
* noviembre del 2017 en Chile
* las monedas de $1 y $5 dejarán de emitirse, redondeando el valor total de
* la cuenta.
* Ejemplo: Si el valor termina de $1 a $5, se redondea para abajo $785 = $780
* Si el valor total termina de $6 a $9, se redondea para arriba $786 = $790
* ==============================
* Creado: 21-05-2018
* By: Tomas ortega • https://augurio.cl
* Version: 1.0
* ==============================
*/

 

Comments

flusheDData   flusheDData, n/a
Aug 9, 2021
Hola.
Con la función Choose evitas repetir Right ( _numINT ; 1 ).
Choose ( Right ( _numINT ; 1 ) ; _numINT ; _numINT - 1 ; _numINT - 2 ; _numINT - 3 ; _numINT - 4 ; _numINT - 5 ; _numINT + 4 ; _numINT + 3 ; _numINT + 2 ; _numINT + 1 )
Buena función, enhorabuena.
Sls.
 
Tomas ortega   Tomas ortega, Augurio Solutions
Aug 9, 2021
Hola flusheddata, te agradezco tu comentario, actualizare la función con tu recomendación.
Saludos.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: