git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES/trunk@18 9a1d36f3-7752-2d40-8ccb-50eb49674c68
53 lines
1.6 KiB
ObjectPascal
53 lines
1.6 KiB
ObjectPascal
unit uViewDetallesPedidosProveedor;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, cxImageComboBox,
|
|
cxTextEdit, cxSpinEdit, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, ImgList, Controls,
|
|
PngImageList, uDADataTable, Classes, ActnList, ComCtrls, ToolWin,
|
|
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
|
cxClasses, cxControls, cxGridCustomView, cxGrid, uViewDetallesFamilias,
|
|
cxCheckBox, cxMaskEdit, cxCurrencyEdit, uViewDetallesNormales;
|
|
|
|
type
|
|
TfrViewDetallesPedidosProveedor = class(TfrViewDetallesNormales)
|
|
cxGridViewDESCRIPCION: TcxGridDBColumn;
|
|
cxGridViewCANTIDAD: TcxGridDBColumn;
|
|
cxGridViewIMPORTEUNIDAD: TcxGridDBColumn;
|
|
cxGridViewIMPORTETOTAL: TcxGridDBColumn;
|
|
cxGridViewPOSICION: TcxGridDBColumn;
|
|
procedure cxGridViewEditing(Sender: TcxCustomGridTableView;
|
|
AItem: TcxCustomGridTableItem; var AAllow: Boolean);
|
|
end;
|
|
|
|
|
|
implementation
|
|
|
|
uses
|
|
Variants, uBizImportesDetalleBase, SysUtils;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure TfrViewDetallesPedidosProveedor.cxGridViewEditing(
|
|
Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem;
|
|
var AAllow: Boolean);
|
|
var
|
|
IndiceCol : Integer;
|
|
begin
|
|
IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_IMPORTEPUNTOS).Index;
|
|
if AItem.Index = IndiceCol then
|
|
begin
|
|
IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_TIPODETALLE).Index;
|
|
if (UpperCase(AItem.GridView.Items[IndiceCol].EditValue) = TIPODETALLE_SUBTOTAL) then
|
|
AAllow := False
|
|
else
|
|
AAllow := True
|
|
end
|
|
else
|
|
inherited;
|
|
end;
|
|
|
|
end.
|