XbrGetDate

XbrGetDate

Postby Silvio.Falconi » Tue Jul 09, 2019 11:50 am

Image

Admittedly, I assume that I have two dates
08 July 2019 and 9 July 2019
in practice the total of the days must be 2 but on picture you're seen 1

if I do dcheck_out-dcheck_in the result is 1 and not 2 , so I ust add +1

If then I use the Nages calendar (XbrGetDate) a strange thing happens

if I press for example the day 9 july the calculation is not calculated.

If I go back to the calendar and press day 10 july then the result is 3 and pressing again on day 9 then the result is 2.

on xbrowse I have to calculate the row

Code: Select all  Expand view
bCalcRow := { || (oBrowse:aCols[ 6 ]:VarPut( oBrowse:aCols[ 4 ]:Value * oBrowse:aCols[ 5 ]:Value ),;
                     oBrowse:aCols[ 9 ]:VarPut((oBrowse:aCols[ 8 ]:Value-oBrowse:aCols[ 7 ]:Value)+1),;  
                     oBrowse:aCols[ 11 ]:VarPut(( oBrowse:aCols[ 6 ]:value * oBrowse:aCols[ 9 ]:value)-oBrowse:aCols[ 10 ]:value),;
                     CalcoloTotali(oBrowse,aGet)     )}


where
oBrowse :aCol[9] is the number of days
oBrowse:aCols[ 8 ]: is the date_out
oBrowse:aCols[ 7 ]: is the date in

the expression

Code: Select all  Expand view
oBrowse:aCols[ 6 ]:VarPut( oBrowse:aCols[ 4 ]:Value * oBrowse:aCols[ 5 ]:Value )


need to calc the price for Qta

the expression

Code: Select all  Expand view
oBrowse:aCols[ 11 ]:VarPut(( oBrowse:aCols[ 6 ]:value * oBrowse:aCols[ 9 ]:value)-oBrowse:aCols[ 10 ]:value)


need to calc the total of row ( price for Qta * days)



and this to select the calendar of Nages

Code: Select all  Expand view
WITH OBJECT oBrowse:aCols[ 7]
         :nEditType  := EDIT_BUTTON
         :AddBitmap( "INVOICE_CALENDAR" )
         :nBtnBmp    := 1
         :bEditBlock := { |r,c,o,k| XbrGetDate( o,"Seleziona una data",dStagioneMin,dStagioneMax ) }
         :bOnChange := bCalcRow
      END

           WITH OBJECT oBrowse:aCols[ 8]
         :nEditType  := EDIT_BUTTON
         :AddBitmap( "INVOICE_CALENDAR" )
         :nBtnBmp    := 1
         :bEditBlock := { |r,c,o,k| XbrGetDate( o,"Seleziona una data",dStagioneMin,dStagioneMax ) }

         :bOnChange := bCalcRow

      END

 





How can I solve this problem ?
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: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Otto and 62 guests