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 ...
OTTO ExPerience Support
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
OTTO ExPerience Support
FWH .. BC582.. xharbour
Re: OTTO ExPerience Support
Do you have a sample which we can compile?
Best regards,
Otto
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: OTTO ExPerience Support
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 ?
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 ?
FWH .. BC582.. xharbour
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: OTTO ExPerience Support
Silvio,
Do your own home work...
Do your own home work...
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: OTTO ExPerience Support
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!
¿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!
FWH .. BC582.. xharbour
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: OTTO ExPerience Support
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!
¿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!
FWH .. BC582.. xharbour
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: OTTO ExPerience Support
Silvio,
These forums users and myself have endless patience with you...
These forums users and myself have endless patience with you...