
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
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
oBrowse:aCols[ 6 ]:VarPut( oBrowse:aCols[ 4 ]:Value * oBrowse:aCols[ 5 ]:Value )need to calc the price for Qta
the expression
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
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
ENDHow can I solve this problem ?
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
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