multiple reservations

Post Reply
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

multiple reservations

Post by Silvio.Falconi »

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.

Image

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 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
cmsoft
Posts: 1297
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina
Been thanked: 2 times

Re: multiple reservations

Post by cmsoft »

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.
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: multiple reservations

Post by Silvio.Falconi »

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 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
Post Reply