Page 1 of 1

OTTO ExPerience Support

Posted: Sun Aug 28, 2011 12:27 am
by MdaSolution
Dear Otto,
I saw you made an application for Hotel
and I m asking if you could resolve my problem

I'm making a app for Bungalow

and I have problems with rango dates I think you have resolve this problem on your hotel application

I explain you

I made a dialog with btnbmp and for each btn I assign a cargo if is free,is occupated, is notpayed, is daily ,is reservation (nstate= 1,2,3,4,5)

then I have a dbf where I insert the reservations with these field NUMTABLE, DATAIN , DATAFIN , TIPO
NUMTBLE is numeric and it is the number of Bungalow
DATAIN is the priod from
DATAFIn is the period To
TIPO is the type of Bungalow


on a ribbonbar I insert two datepick control where the final user select a rango dates the I cal a function to show or change btnbmp file

on my function I made :

For n=1 to 100
IF RESERVATION-> DBSEEK(n) //searh the number of bungalow on reservation archive

IF RE->NUMTABLE=n .AND.;
( ;
( RE->DATAIN >= dDataIni .AND. RE->DATAFIN >= dDataIni ) .or. ;
( dDataFin <= RE->DATAIN .AND. RE->DATAFIN <= dDataFin );
)
nState := 2 //occupated
cPos:=RE->Ccustomer

ELSE
nState := 1 //free
cPos:="Bungalow "+str(n)

ENDIF

IF RE->NUMTABLE=n .AND.;
( ;
( RE->DATAIN = dDataIni .AND. RE->DATAFIN = dDataIni );
)
nStato :=5 //DAILY
ENDIF

IF nStato=2
IF re->diff=0 //if the customer have to pay also
nStato :=2 // occupated
ELSE
nStato :=3 // the customer must also to pay
ENDIF
ENDIF
ENDIF



then I show the bungalow btnbmp with setfile and change the bmp for the nstate numbers


the problem is this

on reservation archive (I have only an index on NUMTABLE) I have for a sample

NUMTABLE DATAIN DATAFIN TIPO
1 04.08.11 08.04.11 O
11 04.08.11 04.08.11 O
53 07.08.11 07.08.11 O

if I select 04.08.11 to 04.08.11

the procedure show me
the number 1 with right bmp ( nstate= 3) ,
the number 11 with right bmp (nstate= 5 daily) ,
and the number 53 with wrong bmp

but why it show me the number 53 if the user select the rango date 04.08.11 to 04.08.11 ?

If I have many reservation sometimes give me a right plan visualization and sometimes give me it bad

I hope you understand and you can resolve this problem ...

Re: OTTO ExPerience Support

Posted: Mon Aug 29, 2011 4:26 pm
by Otto
Do you have a sample which we can compile?
Best regards,
Otto

Re: OTTO ExPerience Support

Posted: Mon Aug 29, 2011 7:34 pm
by MdaSolution
no but I can make it easy

Re: OTTO ExPerience Support

Posted: Tue Aug 30, 2011 9:13 am
by MdaSolution
Otto,
I made a test and it seems to run ok , Incredible ..when I insert the code on application it not run !

seem run also the search if a bungalow is reserved before 3 day .....

IF nState = 1
IF ((RESERVATION->DATAIN)+3=dDataIni)
nState := 4
ENDIF
ENDIF

I not Know why ....perhaps I make an error but where ?

Re: OTTO ExPerience Support

Posted: Tue Aug 30, 2011 9:50 am
by Antonio Linares
Silvio,

Do your own home work...

Re: OTTO ExPerience Support

Posted: Tue Aug 30, 2011 11:39 am
by MdaSolution
Antonio, yo no soy Silvio.
¿Entonces por qué lo hace Silvio?
¿Por qué no decir toda la verdad?
Desea Diseñador RibbonBar: envíame un correo electrónico a: d dg.974 @ gmail.com y yo enviaré
Si se elimina este mensaje Entiendo que usted no dice la verdad, sino también ocultar la verdad a usted mismo, recuerde para siempre!

Re: OTTO ExPerience Support

Posted: Tue Aug 30, 2011 2:01 pm
by MdaSolution
Antonio, yo no soy Silvio.
¿Entonces por qué lo hace Silvio?
¿Por qué no decir toda la verdad?
Desea Diseñador RibbonBar: envíame un correo electrónico a: d dg.974 @ gmail.com y yo enviaré
Si se elimina este mensaje Entiendo que usted no dice la verdad, sino también ocultar la verdad a usted mismo, recuerde para siempre!

Re: OTTO ExPerience Support

Posted: Tue Aug 30, 2011 4:30 pm
by Antonio Linares
Silvio,

These forums users and myself have endless patience with you... :-)