multiple reservations

multiple reservations

Postby Silvio.Falconi » Fri Jul 02, 2021 5: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.

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
Silvio.Falconi
 
Posts: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: multiple reservations

Postby cmsoft » Mon Jul 05, 2021 8: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.
User avatar
cmsoft
 
Posts: 1290
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: multiple reservations

Postby Silvio.Falconi » 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 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 82 guests