- If(Length(GetAsText(Int(TOTAL FACTURA))) > 7; "";
- Substitute(Trim(If(Length(GetAsText(Int(TOTAL FACTURA))) = 8 or
- Length(GetAsText(Int(TOTAL FACTURA))) = 7
- ;Choose(If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 8;Left(Int(TOTAL FACTURA);2);If(Length(GetAsText(Int(TOTAL FACTURA)))=7;Left(Int(TOTAL FACTURA);1);
- ""));
- "";"un";"dos";"tres";"cuatro";"cinco";"seis";"siete";"ocho";"nueve") &
- Case(IsEmpty(If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 8;Left(Int(TOTAL FACTURA);2);If(Length(GetAsText(Int(TOTAL FACTURA)))=7;Left(Int(TOTAL FACTURA);1);
- ""))) ; "" ;If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 8;Left(Int(TOTAL FACTURA);2);If(Length(GetAsText(Int(TOTAL FACTURA)))=7;Left(Int(TOTAL FACTURA);1);
- "")) = 1 ; " millón ";" millones "); "" ) &
- If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 6;Choose(If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 6;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-5;1);""); "";If(
- If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 5;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-4;2);If(Length(GetAsText(
- Int(TOTAL FACTURA))) =
- 4;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-3;1);"")) ="00";"cien
- ";"ciento ");"doscientos ";"trescientos ";"cuatrocientos ";"quinientos
- ";"seiscientos ";"ochocientos ";"novecientos ") ; "" ) &
- If(Length(GetAsText(Int(TOTAL FACTURA))) >= 5
- ;Choose(If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 5;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-4;2);If(Length(GetAsText(
- Int(TOTAL FACTURA))) =
- 4;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-3;1);"")); "
- ";Case(IsEmpty(If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 6;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-5;1);"")) ; ""
- ;"un");"dos";"tres";"cuatro";"cinco";"seis";"siete";"ocho";"nueve";"diez";"
- once";"doce";"trece";"catorce";"quince";"dieciseis";"diecisiete";"dieciocho
- ";"diecinueve";"veinte";"veintiuna";"veintidos";"veintitres";"veinticuatro"
- ;"veinticinco";"veintiseis";"veintisiete";"veintiocho";"veintinueve";"trein
- ta";"treinta y una";"treinta y dos";"treinta y tres";"treinta y
- cuatro";"treinta y cinco";"treinta y seis";"treinta y siete";"treinta y
- ocho";"treinta y nueve";"cuarenta";"cuarenta y una";"cuarenta y
- dos";"cuarenta y tres";"cuarenta y cuatro";"cuarenta y cinco";"cuarenta y
- seis";"cuarenta y siete";"cuarenta y ocho";"cuarenta y
- nueve";"cincuenta";"cincuenta y una";"cincuenta y dos";"cincuenta y
- tres";"cincuenta y cuatro";"cincuenta y cinco";"cincuenta y
- seis";"cincuenta y siete";"cincuenta y ocho";"cincuenta y
- nueve";"sesenta";"sesenta y una";"sesenta y dos";"sesenta y
- tres";"sesenta y cuatro";"sesenta y cinco";"sesenta y seis";"sesenta y
- siete";"sesenta y ocho";"sesenta y nueve";"setenta";"setenta y
- una";"setenta y dos";"setenta y tres";"setenta y cuatro";"setenta y
- cinco";"setenta y seis";"setenta y siete";"setenta y ocho";"setenta y
- nueve";"ochenta";"ochenta y una";"ochenta y dos";"ochenta y
- tres";"ochenta y cuatro";"ochenta y cinco";"ochenta y seis";"ochenta y
- siete";"ochenta y ocho";"ochenta y nueve";"noventa";"noveinta y
- una";"noventa y dos";"noventa y tres";"noventa y cuatro";"noventa y
- cinco";"noventa y seis";"noventa y siete";"noventa y ocho";"noventa y
- nueve") & If(If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 5;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-4;2);If(Length(GetAsText(
- Int(TOTAL FACTURA))) =
- 4;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-3;1);"")) = "0" or
- If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 5;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-4;2);If(Length(GetAsText(
- Int(TOTAL FACTURA))) =
- 4;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-3;1);"")) = "00" and
- If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 6;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-5;1);"") = "0" ; "" ; "
- mil "); If(Length(GetAsText(Int(TOTAL FACTURA))) = 4
- ;Choose(If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 5;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-4;2);If(Length(GetAsText(
- Int(TOTAL FACTURA))) =
- 4;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-3;1);"")); "
- ";Case(IsEmpty(If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 6;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-5;1);"")) ; ""
- ;"un");"dos";"tres";"cuatro";"cinco";"seis";"siete";"ocho";"nueve") & "
- mil "; "")) & Choose(If(Length(GetAsText(Int(TOTAL FACTURA))) >=
- 3;Middle(Int(TOTAL FACTURA);Length(GetAsText(Int(TOTAL FACTURA)))-2;1);"");
- "";If(If(Length(GetAsText(Int(TOTAL FACTURA))) =
- 1;Right(Int(TOTAL FACTURA);1);Right(Int(TOTAL FACTURA);2)) ="00" ; "cien" ;
- "ciento");"doscientos";"trescientos";"cuatrocientos";"quinientos";"seiscien
- tos";"ochocientos";"novecientos") & If(If(Length(GetAsText(Int(TOTAL FACTURA))) =
- 1;Right(Int(TOTAL FACTURA);1);Right(Int(TOTAL FACTURA);2)) ="00" ; "" ; " ") &
- Choose(If(Length(GetAsText(Int(TOTAL FACTURA))) =
- 1;Right(Int(TOTAL FACTURA);1);Right(Int(TOTAL FACTURA);2));
- "";"un";"dos";"tres";"cuatro";"cinco";"seis";"siete";"ocho";"nueve";"diez";
- "once";"doce";"trece";"catorce";"quince";"dieciseis";"diecisiete";"diecioch
- o";"diecinueve";"veinte";"veintiun";"veintidos";"veintitres";"veinticuatro"
- ;"veinticinco";"veintiseis";"veintisiete";"veintiocho";"veintinueve";"trein
- ta";"treinta y un";"treinta y dos";"treinta y tres";"treinta y
- cuatro";"treinta y cinco";"treinta y seis";"treinta y siete";"treinta y
- ocho";"treinta y nueve";"cuarenta";"cuarenta y un";"cuarenta y
- dos";"cuarenta y tres";"cuarenta y cuatro";"cuarenta y cinco";"cuarenta y
- seis";"cuarenta y siete";"cuarenta y ocho";"cuarenta y
- nueve";"cincuenta";"cincuenta y un";"cincuenta y dos";"cincuenta y
- tres";"cincuenta y cuatro";"cincuenta y cinco";"cincuenta y
- seis";"cincuenta y siete";"cincuenta y ocho";"cincuenta y
- nueve";"sesenta";"sesenta y un";"sesenta y dos";"sesenta y tres";"sesenta
- y cuatro";"sesenta y cinco";"sesenta y seis";"sesenta y siete";"sesenta y
- ocho";"sesenta y nueve";"setenta";"setenta y un";"setenta y dos";"setenta
- y tres";"setenta y cuatro";"setenta y cinco";"setenta y seis";"setenta y
- siete";"setenta y ocho";"setenta y nueve";"ochenta";"ochenta y
- un";"ochenta y dos";"ochenta y tres";"ochenta y cuatro";"ochenta y
- cinco";"ochenta y seis";"ochenta y siete";"ochenta y ocho";"ochenta y
- nueve";"noventa";"noveinta y un";"noventa y dos";"noventa y
- tres";"noventa y cuatro";"noventa y cinco";"noventa y seis";"noventa y
- siete";"noventa y ocho";"noventa y nueve") &
- If(If(Length(GetAsText(Int(TOTAL FACTURA))) =
- 1;Right(Int(TOTAL FACTURA);1);Right(Int(TOTAL FACTURA);2)) = 1; " euro"; " euros") &
- If(If(Length(GetAsText(Round( TOTAL FACTURA - Int(TOTAL FACTURA); 2 ) * 100)) =
- 1;Right(Round( TOTAL FACTURA - Int(TOTAL FACTURA); 2 ) * 100;1);Right(Round( TOTAL FACTURA -
- Int(TOTAL FACTURA); 2 ) * 100;2)) <> 0 ; " con " &
- Choose(If(Length(GetAsText(Round( TOTAL FACTURA - Int(TOTAL FACTURA); 2 ) * 100)) =
- 1;Right(Round( TOTAL FACTURA - Int(TOTAL FACTURA); 2 ) * 100;1);Right(Round( TOTAL FACTURA -
- Int(TOTAL FACTURA); 2 ) * 100;2));
- "";"un";"dos";"tres";"cuatro";"cinco";"seis";"siete";"ocho";"nueve";"diez";
- "once";"doce";"trece";"catorce";"quince";"dieciseis";"diecisiete";"diecioch
- o";"diecinueve";"veinte";"veintiun";"veintidos";"veintitres";"veinticuatro"
- ;"veinticinco";"veintiseis";"veintisiete";"veintiocho";"veintinueve";"trein
- ta";"treinta y un";"treinta y dos";"treinta y tres";"treinta y
- cuatro";"treinta y cinco";"treinta y seis";"treinta y siete";"treinta y
- ocho";"treinta y nueve";"cuarenta";"cuarenta y un";"cuarenta y
- dos";"cuarenta y tres";"cuarenta y cuatro";"cuarenta y cinco";"cuarenta y
- seis";"cuarenta y siete";"cuarenta y ocho";"cuarenta y
- nueve";"cincuenta";"cincuenta y un";"cincuenta y dos";"cincuenta y
- tres";"cincuenta y cuatro";"cincuenta y cinco";"cincuenta y
- seis";"cincuenta y siete";"cincuenta y ocho";"cincuenta y
- nueve";"sesenta";"sesenta y un";"sesenta y dos";"sesenta y tres";"sesenta
- y cuatro";"sesenta y cinco";"sesenta y seis";"sesenta y siete";"sesenta y
- ocho";"sesenta y nueve";"setenta";"setenta y un";"setenta y dos";"setenta
- y tres";"setenta y cuatro";"setenta y cinco";"setenta y seis";"setenta y
- siete";"setenta y ocho";"setenta y nueve";"ochenta";"ochenta y
- una";"ochenta y dos";"ochenta y tres";"ochenta y cuatro";"ochenta y
- cinco";"ochenta y seis";"ochenta y siete";"ochenta y ocho";"ochenta y
- nueve";"noventa";"noveinta y un";"noventa y dos";"noventa y
- tres";"noventa y cuatro";"noventa y cinco";"noventa y seis";"noventa y
- siete";"noventa y ocho";"noventa y nueve") &
- Case(If(Length(GetAsText(Round( TOTAL FACTURA - Int(TOTAL FACTURA); 2 ) * 100)) =
- 1;Right(Round( TOTAL FACTURA - Int(TOTAL FACTURA); 2 ) * 100;1);Right(Round( TOTAL FACTURA -
- Int(TOTAL FACTURA); 2 ) * 100;2)) = 1 ; " céntimo" ; " céntimos"); "")); " " ; "
- " ))
Jesus Sanchez
Database Developer
info@dbfile.es






