Libre


Genera CUIL con generación de archivo de texto

program gencuit; {$mode objfpc}{$H+} uses  {$IFDEF UNIX}{$IFDEF UseCThreads}  cthreads,  {$ENDIF}{$ENDIF}  Classes , sysutils , crt  { you can add units after this };  var    isexo:integer;    sDNI, sCuit, sprefijo:string;    arch: text; {$IFDEF WINDOWS}{$R gencuit.rc}{$ENDIF} function GeneraCuit(cad1:string;cad2:string):string;     var        isuma, iresto:integer;        sdigito:string[1];begin     isuma:=strtoint(cad1[1])*5+strtoint(cad1[2])*4+strtoint(cad2[1])*3+strtoint(cad2[2])*2+strtoint(cad2[3])*7;     isuma:=isuma+strtoint(cad2[4])*6+strtoint(cad2[5])*5+strtoint(cad2[6])*4+strtoint(cad2[7])*3+strtoint(cad2[8])*2;     iresto:=isuma MOD 11;     case iresto of          0: GeneraCuit:=cad1+’-‘+cad2+’-0′;          1: […]