Procedure DefineColuna(i,oBrw,nGet,aCliente)
if numero_impar(i)
oBrw:aCols[i]:cHeader := "Qtd"
oBrw:aCols[i]:nWidth := 40
oBrw:aCols[i]:oDataFont := Couriern6
oBrw:aCols[i]:nHeadStrAlign := AL_RIGHT
oBrw:aCols[i]:nDataStrAlign := AL_RIGHT
oBrw:aCols[i]:bstrData := {|| trans(aVendas[oBrw:nArrayAt,i+1],'@E 999.99')}
oBrw:aCols[i]:cEditPicture := "@E 999.99"
oBrw:aCols[i]:nEditType := EDIT_GET
oBrw:aCols[i]:bonPostEdit := { | oCol, uValue, nLastKey | If( nLastKey == 13, aVendas[oBrw:nArrayAt,i+1] := uValue, nil ) }
oBrw:aCols[i]:bEditValid := { | oGet,oCol | EditCampo(aVendas,oBrw:nArrayAT,oBrw,oGet,"QTD",nGet,aCliente) }
oBrw:aCols[i]:bClrStd := { || iif(aVendas[oBrw:nArrayAt,i+1]>0,{COR_PRETO,COR_BRANCO},{COR_BRANCO,COR_BRANCO}) }
oBrw:aCols[i]:bLClickHeader := {|r,c,f,o| fecha_cliente(oBrw,nGet,1,o:cGrpHdr,o:nCreationOrder) }
else
oBrw:aCols[i]:cHeader := "Valor"
oBrw:aCols[i]:nWidth := 40
oBrw:aCols[i]:oDataFont := Couriern6
oBrw:aCols[i]:nHeadStrAlign := AL_RIGHT
oBrw:aCols[i]:nDataStrAlign := AL_RIGHT
oBrw:aCols[i]:bstrData := {|| trans(aVendas[oBrw:nArrayAt,i+1],'@E 99,999.99')}
oBrw:aCols[i]:cEditPicture := "@E 99,999.99"
oBrw:aCols[i]:nEditType := EDIT_GET
oBrw:aCols[i]:bonPostEdit := { | oCol, uValue, nLastKey | If( nLastKey == 13, aVendas[oBrw:nArrayAt,i+1] := uValue, nil ) }
oBrw:aCols[i]:bEditValid := { | oGet,oCol | EditCampo(aVendas,oBrw:nArrayAT,oBrw,oGet,"VLR",nGet,aCliente) }
oBrw:aCols[i]:bClrStd := { || iif(aVendas[oBrw:nArrayAt,i+1]>0,{COR_PRETO,COR_BRANCO},{COR_BRANCO,COR_BRANCO}) }
oBrw:aCols[i]:bLClickHeader := { | r,c,f,o| fecha_cliente(oBrw,nGet,2,o:cGrpHdr,o:nCreationOrder) }
endif
Return nil