Page 1 of 1

XbrGetDate

Posted: Tue Jul 09, 2019 11:50 am
by Silvio.Falconi
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

 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

oBrowse:aCols[ 6 ]:VarPut( oBrowse:aCols[ 4 ]:Value * oBrowse:aCols[ 5 ]:Value )
need to calc the price for Qta

the expression

Code: Select all

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

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 ?