SEARCH NUMBER FREE -RESOLVED

SEARCH NUMBER FREE -RESOLVED

Postby Silvio.Falconi » Thu Jul 18, 2019 5:49 pm

I must search all number free for a day
for a test i make a filter to a dbf
today is 18 july

DATE() <=CHECK_OUT .AND. DATE() >= CHECK_IN

Image


and i have the record so all numbers you not see on this picture are free

But

then I make the filter on archive directly making a cicle for next to search wich number is free,
I have before found the total of numbers for each type


Code: Select all  Expand view  RUN
for nElemento = 1 to nTotaleElementi

    oReservation:setorder(1)
    oReservation:Exec( < ||
    SET FILTER TO AllTrim( FIELD->TYPE ) = AllTrim( cTypeRoom ) .and. FIELD->NUM = nElemento ;
   .AND. ( dDataIniziale <= FIELD->CHECK_OUT .AND. dDataFinale >= FIELD->CHECK_IN )
   return nil
   > )
   oReservation:gotop()

     If oReservation:eof()
         aadd(aTemp,{nElemento,.f.} )
      Endif

      oReservation:SetFilter( "" )
     *nElemento++
     next


   return nil


I save on an array all numbers free

Image



I make another super check with the tplan and I saw perhpas there is some errors or the tplan not run ok

Image


for a sample you can see the numbers 2 and 4 , 7, 11, 16, 21 on tplan are free and on array are occupated or not visible

how it possible ?

I have another check and I saw it is right but the tplan not show the right date because

I check the number 21

Image

as you can see the reservation finish to 18.07.2019 but for the tplan it is untill 17.07.2019

How I can resolve it ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: SEARCH NUMBER FREE -RESOLVED

Postby Silvio.Falconi » Fri Jul 19, 2019 11:41 am

Code: Select all  Expand view  RUN
DATE() <CHECK_OUT .AND. DATE() >= CHECK_IN


RESOLVED !!!! THANKS TO Antonino
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 45 guests