FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour OTTO ExPerience Support
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
OTTO ExPerience Support
Posted: Sun Aug 28, 2011 12:27 AM
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 ...
FWH .. BC582.. xharbour
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: OTTO ExPerience Support
Posted: Mon Aug 29, 2011 04:26 PM

Do you have a sample which we can compile?
Best regards,
Otto

Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: OTTO ExPerience Support
Posted: Mon Aug 29, 2011 07:34 PM

no but I can make it easy

FWH .. BC582.. xharbour
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: OTTO ExPerience Support
Posted: Tue Aug 30, 2011 09:13 AM

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-&gt;DATAIN)+3=dDataIni)
                                    nState := 4
                                 ENDIF
                               ENDIF

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

FWH .. BC582.. xharbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: OTTO ExPerience Support
Posted: Tue Aug 30, 2011 09:50 AM

Silvio,

Do your own home work...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: OTTO ExPerience Support
Posted: Tue Aug 30, 2011 11:39 AM

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!

FWH .. BC582.. xharbour
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: OTTO ExPerience Support
Posted: Tue Aug 30, 2011 02:01 PM

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!

FWH .. BC582.. xharbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: OTTO ExPerience Support
Posted: Tue Aug 30, 2011 04:30 PM

Silvio,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion