function TForm1.ProxCod(Numero: Integer): string; begin Result:= Copy(DateToStr(Date), 7, 4) + '-' + Copy('000000', 1, 6 - Length(IntToStr(Numero))) + IntToStr(Numero); end;