Page 1 of 1

multiple reservations

Posted: Fri Jul 02, 2021 5:31 pm
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 ?

Re: multiple reservations

Posted: Mon Jul 05, 2021 8:53 pm
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.

Re: multiple reservations

Posted: Mon Jul 05, 2021 11:03 pm
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