QUERY
- Code: Select all Expand view
cSql := "SELECT cu.numero_cuota, cu.aporte_mensual, cu.vencimiento, "
cSql += "DATE(NOW()) AS fch_pag_cuo, "
cSql += "IF(ISNULL(cu.multa), 0, cu.multa) AS mto_multa, "
cSql += "DATE(NOW()) AS fch_pag_mul, cp.cedula_cliente, "
cSql += "cp.pax, cp.id_cliente_pax, ct.id_contrato, "
[b]cSql += "0 AS setche1, 0 AS setche2 " // ESTAS SON LAS COLUMNAS VIRTUALES LAS CUALES SON LAS COLUMNAS 5 Y 8 EN XBROWSE[/b]
cSql += "FROM jlr_clientes_pax AS cp "
cSql += "LEFT JOIN jlr_contratos AS ct ON cp.id_cliente_pax = ct.id_cliente_pax "
cSql += "LEFT JOIN jlr_estados_cuenta AS cu ON ct.id_contrato = cu.id_contrato "
cSql += "WHERE ISNULL(cp.cedula_cliente) "
cSql += "ORDER BY cu.numero_cuota, cp.pax"
TRY // TABLA CONTRATOS-CUOTAS
oQryCuo := TDolphinQry():New( cSql, oDatos:oConex )
CATCH oError
ShowError( oError, "dat_factu", "ma_facturas.prg", "jlr_clientes_pax" )
RETURN
END
XBROWSE
- Code: Select all Expand view
REDEFINE XBROWSE aBrw[1] ID 100 OF oDlg ;
DATASOURCE oQryCuo ;
LINES AUTOSORT FOOTERS ;
HEADERS "Número" + CRLF + "Cuota" ,;
"Monto" + CRLF + "Cuota" ,;
"Fecha" + CRLF + "Vencimiento" ,;
"Fecha" + CRLF + "Pagada Cuota" ,;
"SC" ,;
"Monto" + CRLF + "Multa" ,;
"Fecha" + CRLF + "Pagada Multa" ,;
"SM" ; //"E" ,; "D" ;
COLUMNS "numero_cuota" ,;
"aporte_mensual" ,;
"vencimiento" ,;
"fch_pag_cuo" ,;
"setche1" ,;
"mto_multa" ,;
"fch_pag_mul" ,;
"setche2" ;
COLSIZES 50, 100, 90, 90, 70, 70, 90, 70 ;
JUSTIFY 2, 1, 2, 2, 2, 1, 2, 2 ;
PICTURES , "@E 999,999,999.99", , , , "@E 999,999,999.99"
WITH OBJECT aBrw[1] // COLUMNAS VIRTUALES
:aCols[5]:cToolTip := "Seleccione Cuota(s) a Pagar"
:aCols[5]:bStrData := { || IF( oQryCuota:setche1 = 0, 'N', 'S' ) }
:aCols[5]:nEditType := EDIT_GET
:aCols[5]:addresource("ok16")
:aCols[5]:bBmpData := {|| IF( oQryCuota:setche1 > 0, 1, 0 ) }
:aCols[5]:cDataType := 'L'
:aCols[5]:SetCheck()
*:aCols[5]:SetCheck(nil, .t.)
*:aCols[5]:SetCheck( { "ok16", } )
:aCols[5]:bEditValue := { || IF( oQryCuota:setche1 > 0, .t., .f. ) }
:aCols[5]:bOnPostEdit := { |o,x,n| IF( n != VK_ESCAPE, ( o:value:= x, Alert(x) ), ) }
***
:aCols[8]:cToolTip := "Seleccione Multa(s) a Pagar"
:aCols[8]:bStrData := { || IF( oQryCuota:setche2 = 0, 'N', 'S' ) }
:aCols[8]:nEditType := EDIT_GET
:aCols[8]:addresource("ok16")
:aCols[8]:bBmpData := {|| IF( oQryCuota:setche2 > 0, 1, 0 ) }
:aCols[8]:cDataType := 'L'
:aCols[8]:SetCheck()
*:aCols[8]:SetCheck(nil, .t.)
*:aCols[8]:SetCheck( { "ok16", } )
:aCols[8]:bEditValue := { || IF( oQryCuota:setche2 > 0, .t., .f. ) }
:aCols[8]:bOnPostEdit := { |o,x,n| IF( n != VK_ESCAPE, ( o:value:= x, Alert(x) ), ) }
END WITH
IMAGEN XBROWSE