FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour multiple reservations
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
multiple reservations
Posted: Fri Jul 02, 2021 05:31 PM
when I show the beach (using btnbmp) I go to look for reservations for each umbrella making a filter with the period requested by the user.



with a do while loop the procedure loads only the first record by assigning

but it is possible that a element has more reservations during the selected interval

how could i save in memory all the reservations i find for that element?

some idea ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: multiple reservations
Posted: Mon Jul 05, 2021 08:53 PM
Hi Silvio:
If you do not use the cargo of each btnbmp, you can use that data to save an array with all the reservations that that umbrella has in the selected period.
It's an idea.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: multiple reservations
Posted: Mon Jul 05, 2021 11:03 PM
cmsoft wrote:Hi Silvio:
If you do not use the cargo of each btnbmp, you can use that data to save an array with all the reservations that that umbrella has in the selected period.
It's an idea.


i did it this way
open reservation
filter reservation with my parameter( range date, number and type)
do while .not. eof

load on cargo the data info
save on a array aMultiplePrenotazioni some data

aadd(aMultiplePrenotazioni,{nElemento,oreservation:type,dCheckIn,dCheckout,nInvoice} )

oreservation:Skip()
ENDDO

then calc the multiple reservations

nContaMultipli:= 0
For n= 1 to Len(aMultiplePrenotazioni)
If aMultiplePrenotazioni[n][1]==nElemento
nContaMultipli+=1
endif

next


so if the umbrella have nContamultipli:= 1 not have multiple reservations

then when I click on a umbrela I can list all reservations from that array

just an idea no made also
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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

Continue the discussion