Code: Select all
Function ConfeccionaCaja()
Local oBtn := Array( 4, 0 )
Local oRBar
Local oDlg
Local oFont
Local i
Local oImageList
Local oGr1_1
Local oGr2_1
Local oGr3_1
Local oGr4_1
Local oBtn1_1_1
Local oBtn2_1_1
Local oBtn1_2_1
Local oBtn2_2_1
//Local oBtn1_3_1
Local oBtn2_3_1
Local oBtn3_3_1
Local oBtn4_3_1
Local oBtn1_4_1
Local lApagaBoton
Local cNomVentana := 'Caja Diaria ' + StrTran( DToC( aVarCaja : dFechaCaja ), "/", "-" )
ArmaDocumneto()
Define Font oFont Name 'Courier' Size 0, -12
If( BuscaUltimaFechaDeCierre(), lApagaBoton := .t., lApagaBoton := .f. )
Define Window oDlg MDICHILD Of oVarGlobales : oWndMain NoSysMenu
oDlg : SetText( 'Caja Diaria ' + StrTran( DToC( aVarCaja : dFechaCaja ), "/", "-" ) )
oDlg : Hide()
Define Ribbonbar oRBar Window oDlg Height 58 Topmargin 0
Add Group oGr1_1 Ribbon oRBar TO Option 1 Prompt "volcado" Width 107 Gradiant { { 0.1, Rgb( 218, 229, 243 ), Rgb( 218, 229, 243 ) }, { 0.9, Rgb( 199, 216, 237 ), Rgb( 218, 229, 243 ) } }
@ 003, 003 Add Button oBtn1_1_1 Prompt "" Bitmap "#8051" Group oGr1_1 Action( XlsCajaDiaria( aVarCaja ), ManejaVentana( cNomVentana ) ) Size 50, 30 Top Tooltip 'Exportar A Planilla De Cálculo'
@ 003, 053 Add Button oBtn2_1_1 Prompt "" Bitmap "print" Group oGr1_1 Action Rep23() Size 50, 30 Top Tooltip 'Imprimir'
//Add Group oGr2_1 Ribbon oRBar TO Option 1 Prompt "c. ant." Width 56 Gradiant { { 0.1, Rgb( 218, 229, 243 ), Rgb( 218, 229, 243 ) }, { 0.9, Rgb( 199, 216, 237 ), Rgb( 218, 229, 243 ) } }
//@ 003, 003 Add Button oBtn1_2_1 Prompt "" Bitmap "c:\sipep_sql\imagenes\calendar.bmp" Group oGr2_1 Action CambiaFecha( oDlg ) Size 50, 30 Top Tooltip "Visualizar cajas anteriores"
Add Group oGr3_1 Ribbon oRBar TO Option 1 Prompt "cerrar" Width 56 Gradiant { { 0.1, Rgb( 218, 229, 243 ), Rgb( 218, 229, 243 ) }, { 0.9, Rgb( 199, 216, 237 ), Rgb( 218, 229, 243 ) } }
@ 003, 003 Add Button oBtn1_3_1 Prompt "" Bitmap "cierre_caja" Group oGr3_1 Action If( !lApagaBoton, CierraCaja( oDlg ), MsgStop( ' La caja diaria ya ha sido cerrada !', 'Imposible ...' ) ) Size 50, 30 Top Tooltip 'Cerrar caja diaria'
Add Group oGr4_1 Ribbon oRBar TO Option 1 Prompt "salir" Width 56 Gradiant { { 0.1, Rgb( 218, 229, 243 ), Rgb( 218, 229, 243 ) }, { 0.9, Rgb( 199, 216, 237 ), Rgb( 218, 229, 243 ) } }
@ 003, 003 Add Button oBtn1_4_1 Prompt "" Bitmap "imagen98" Group oGr4_1 Action oDlg : End() Size 50, 30 Top Tooltip 'Cerrar ventana actual'
aVarCaja : oGet := TMultiGet() : New( 0, 0, { || aVarCaja : cCadena }, oDlg, 30, 30, oFont, .t. ) <- LINEA 1695 AQUI DA ERROR
aVarCaja : oGet : lReadOnly := .t.
aVarCaja : oGet : bKeyDown := { | nKey | If( nKey == VK_ESCAPE, oDlg : End(), ) }
oDlg : SetControl( aVarCaja : oGet )
Activate Window oDlg Maximized On Init oDlg : Show() Valid( recibos -> ( DbClearFilter() ), factura -> ( DbClearFilter() ), .t. )
oFont : End()
Return 0