Version 2.1.3
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@97 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
4e8269c20f
commit
4ecdab79ea
@ -149,7 +149,7 @@
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">2</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">1</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Release">3</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
@ -162,7 +162,7 @@
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">2.1.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">2.1.3.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
|
||||
Binary file not shown.
@ -0,0 +1,23 @@
|
||||
unit uIEditorDetalleReservas;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uEditorGridBase, uBizInventario;
|
||||
|
||||
type
|
||||
IEditorDetalleReservas = interface(IEditorGridBase)
|
||||
['{EE301C2F-98DC-49CD-B7EA-D29D0B9326D8}']
|
||||
function GetDetalleReservas: IBizDetalleReservas;
|
||||
procedure SetDetalleReservas(const Value: IBizDetalleReservas);
|
||||
property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas;
|
||||
|
||||
function GetArticulo: IBizInventario;
|
||||
procedure SetArticulo(const Value: IBizInventario);
|
||||
property Articulo: IBizInventario read GetArticulo write SetArticulo;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
1825
Source/Modulos/Inventario/Views/uEditorDetalleReservas.dfm
Normal file
1825
Source/Modulos/Inventario/Views/uEditorDetalleReservas.dfm
Normal file
File diff suppressed because it is too large
Load Diff
232
Source/Modulos/Inventario/Views/uEditorDetalleReservas.pas
Normal file
232
Source/Modulos/Inventario/Views/uEditorDetalleReservas.pas
Normal file
@ -0,0 +1,232 @@
|
||||
unit uEditorDetalleReservas;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
uCustomEditor, ImgList, PngImageList, StdActns, ActnList, TB2ExtItems, TBXExtItems, TBX, TB2Item,
|
||||
TB2Dock, TB2Toolbar, JvExControls, JvComponent, JvNavigationPane,
|
||||
uViewDetalleReservas, Menus, DB, uDADataTable, ComCtrls, uViewGrid,
|
||||
uDAScriptingProvider, uDACDSDataTable, JvAppStorage,
|
||||
JvAppRegistryStorage, JvFormPlacement, pngimage, ExtCtrls, uCustomView,
|
||||
uViewBase, uViewBarraSeleccion, JvComponentBase, uEditorGridBase,
|
||||
uIEditorDetalleReservas, uBizInventario, uViewGridBase,
|
||||
JvExComCtrls, JvStatusBar, uViewGrid2Niveles, JSDialog;
|
||||
|
||||
type
|
||||
|
||||
TfEditorDetalleReservas = class(TfEditorGridBase, IEditorDetalleReservas)
|
||||
TBXSeparatorItem17: TTBXSeparatorItem;
|
||||
actExpandir: TAction;
|
||||
actContraer: TAction;
|
||||
frViewDetalleReservas1: TfrViewDetalleReservas;
|
||||
|
||||
procedure FormShow(Sender: TObject);
|
||||
|
||||
private
|
||||
function SeleccionarAlmacen(Descripcion: String): Integer;
|
||||
function DarIDAlmacenSeleccionado(Descripcion: String): Integer;
|
||||
|
||||
protected
|
||||
FArticulo: IBizInventario;
|
||||
FDetalleReservas: IBizDetalleReservas;
|
||||
// FController : IDetalleReservasController;
|
||||
|
||||
function GetArticulo: IBizInventario;
|
||||
procedure SetArticulo(const Value: IBizInventario);
|
||||
function GetDetalleReservas: IBizDetalleReservas;
|
||||
procedure SetDetalleReservas(const Value: IBizDetalleReservas);
|
||||
|
||||
// function GetController : IDetalleReservasController; virtual;
|
||||
// procedure SetController (const Value : IDetalleReservasController); virtual;
|
||||
|
||||
{ procedure SetMultiSelect (AValue : Boolean);
|
||||
function GetMultiSelect : Boolean;
|
||||
function GetArticulosSeleccionados: IBizDetalleReservas;
|
||||
}
|
||||
procedure ImprimirInterno; override;
|
||||
procedure PrevisualizarInterno; override;
|
||||
|
||||
public
|
||||
property Articulo: IBizInventario read GetArticulo write SetArticulo;
|
||||
property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas;
|
||||
// property Controller : IDetalleReservasController read GetController write SetController;
|
||||
// property ArticulosSeleccionados: IBizDetalleReservas read GetArticulosSeleccionados;
|
||||
// property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
|
||||
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure PonerTitulos(const ATitulo: string = ''); override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
{$R *.DFM}
|
||||
|
||||
uses
|
||||
cxControls, uGridUtils, uDataModuleInventario, uDataModuleUsuarios,
|
||||
uEditorBase, uDBSelectionListUtils, cxGridDBTableView, cxGridCustomTableView,
|
||||
uAlmacenesController, uBizAlmacenes, uGenerarAlbaranesProvUtils,
|
||||
schInventarioClient_Intf;
|
||||
|
||||
{, uDBSelectionList, uDataModulePedidosProveedor,
|
||||
uBizPedidosProveedor, uBizMontajes, uDataModuleMontajes;
|
||||
}
|
||||
|
||||
|
||||
{ TfEditorDetalleReservas }
|
||||
|
||||
{
|
||||
***************************** TfEditorDetalleReservas *****************************
|
||||
}
|
||||
constructor TfEditorDetalleReservas.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
ViewGrid := frViewDetalleReservas1;
|
||||
end;
|
||||
|
||||
function TfEditorDetalleReservas.DarIDAlmacenSeleccionado(Descripcion: String): Integer;
|
||||
var
|
||||
AAlmacenes : IBizAlmacen;
|
||||
AAlmacenesController : IAlmacenesController;
|
||||
Respuesta : integer;
|
||||
begin
|
||||
if (ViewGrid._Grid.ActiveLevel.Tag = -1) then
|
||||
Result := SeleccionarAlmacen(Descripcion)
|
||||
else
|
||||
Result := ViewGrid._Grid.ActiveLevel.Tag;
|
||||
end;
|
||||
|
||||
destructor TfEditorDetalleReservas.Destroy;
|
||||
begin
|
||||
FDetalleReservas := NIL;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfEditorDetalleReservas.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if not Assigned(ViewGrid) then
|
||||
raise Exception.Create('No hay ninguna vista asignada');
|
||||
|
||||
if not Assigned(DetalleReservas) then
|
||||
raise Exception.Create('No hay ningún DetalleReservas asignado');
|
||||
|
||||
DetalleReservas.DataTable.Active := True;
|
||||
ViewGrid.GotoFirst;
|
||||
end;
|
||||
{
|
||||
function TfEditorDetalleReservas.GetArticulosSeleccionados: IBizDetalleReservas;
|
||||
begin
|
||||
SeleccionarFilasDesdeGrid((ViewGrid as IViewDetalleReservas)._FocusedView, (DetalleReservas as ISeleccionable).SelectedRecords);
|
||||
// En Presupuestos.SelectedRecords tengo los ID de las filas seleccionadas del grid
|
||||
Result := Controller.ExtraerSeleccionados(DetalleReservas);
|
||||
end;
|
||||
|
||||
function TfEditorDetalleReservas.GetController: IDetalleReservasController;
|
||||
begin
|
||||
Result := FController;
|
||||
end;
|
||||
}
|
||||
function TfEditorDetalleReservas.GetArticulo: IBizInventario;
|
||||
begin
|
||||
Result := FArticulo;
|
||||
end;
|
||||
|
||||
function TfEditorDetalleReservas.GetDetalleReservas: IBizDetalleReservas;
|
||||
begin
|
||||
Result := FDetalleReservas;
|
||||
end;
|
||||
{
|
||||
function TfEditorDetalleReservas.GetMultiSelect: Boolean;
|
||||
begin
|
||||
Result := ViewGrid.MultiSelect;
|
||||
end;
|
||||
}
|
||||
procedure TfEditorDetalleReservas.ImprimirInterno;
|
||||
begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfEditorDetalleReservas.PonerTitulos(const ATitulo: string);
|
||||
var
|
||||
FTitulo : String;
|
||||
begin
|
||||
FTitulo := 'Detalle de reservas en almacen - ' + dmUsuarios.EmpresaActual.NOMBRE;
|
||||
inherited PonerTitulos(FTitulo);
|
||||
end;
|
||||
|
||||
procedure TfEditorDetalleReservas.PrevisualizarInterno;
|
||||
begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TfEditorDetalleReservas.SeleccionarAlmacen(Descripcion: String): Integer;
|
||||
var
|
||||
AAlmacenes : IBizAlmacen;
|
||||
Respuesta : integer;
|
||||
begin
|
||||
Result := -1;
|
||||
{
|
||||
JsElegirAlmacenDialog.Instruction.Text := Descripcion;
|
||||
with JsElegirAlmacenDialog.RadioButtons do
|
||||
begin
|
||||
Clear;
|
||||
AAlmacenes := (ViewGrid as IViewDetalleReservas).Almacenes;
|
||||
AAlmacenes.First;
|
||||
while not AAlmacenes.EOF do
|
||||
begin
|
||||
with Add do
|
||||
begin
|
||||
Caption := AAlmacenes.NOMBRE;
|
||||
Value := 1000 + AAlmacenes.ID;
|
||||
end;
|
||||
//Asi sabemos que solo va a intentar chequear el primero si hemos añadido al menos un item
|
||||
Items[0].Checked := True;
|
||||
AAlmacenes.Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
//Sacar la pantalla de selección y devolver el almacén seleccionado.
|
||||
Respuesta := JsElegirAlmacenDialog.Execute;
|
||||
if Respuesta <> IDCANCEL then
|
||||
Result := JsElegirAlmacenDialog.RadioResult - 1000;
|
||||
}
|
||||
end;
|
||||
{
|
||||
procedure TfEditorDetalleReservas.SetController(const Value: IDetalleReservasController);
|
||||
begin
|
||||
FController := Value;
|
||||
|
||||
if Assigned(FController) then
|
||||
begin
|
||||
if Assigned(ViewGrid) then
|
||||
(ViewGrid as IViewDetalleReservas).Almacenes := FController.AlmacenesController.BuscarTodos;
|
||||
end;
|
||||
end;
|
||||
}
|
||||
procedure TfEditorDetalleReservas.SetArticulo(const Value: IBizInventario);
|
||||
begin
|
||||
FArticulo := Value;
|
||||
if Assigned(FArticulo) then
|
||||
begin
|
||||
tbxEditFiltro.Text := FArticulo.REFERENCIA;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorDetalleReservas.SetDetalleReservas(const Value: IBizDetalleReservas);
|
||||
begin
|
||||
FDetalleReservas := Value;
|
||||
dsDataTable.DataTable := FDetalleReservas.DataTable;
|
||||
|
||||
if Assigned(ViewGrid) then
|
||||
(ViewGrid as IViewDetalleReservas).DetalleReservas := FDetalleReservas;
|
||||
end;
|
||||
{
|
||||
procedure TfEditorDetalleReservas.SetMultiSelect(AValue: Boolean);
|
||||
begin
|
||||
ViewGrid.MultiSelect := AValue;
|
||||
end;
|
||||
}
|
||||
end.
|
||||
|
||||
198
Source/Modulos/Inventario/Views/uViewDetalleReservas.dfm
Normal file
198
Source/Modulos/Inventario/Views/uViewDetalleReservas.dfm
Normal file
@ -0,0 +1,198 @@
|
||||
inherited frViewDetalleReservas: TfrViewDetalleReservas
|
||||
inherited cxGrid: TcxGrid
|
||||
RootLevelOptions.DetailTabsPosition = dtpTop
|
||||
OnActiveTabChanged = cxGridActiveTabChanged
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
DataController.KeyFieldNames = 'RecID'
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Format = '0 art'#237'culos'
|
||||
Kind = skCount
|
||||
end
|
||||
item
|
||||
Format = '0 art'#237'culos'
|
||||
Kind = skCount
|
||||
end
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = '0 Reservados'
|
||||
Kind = skSum
|
||||
Column = cxGridViewCANTIDAD_ART
|
||||
end>
|
||||
OptionsCustomize.ColumnHidingOnGrouping = False
|
||||
OptionsCustomize.GroupBySorting = True
|
||||
OptionsView.GroupRowStyle = grsOffice11
|
||||
object cxGridViewRecID: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'RecID'
|
||||
Visible = False
|
||||
end
|
||||
object cxGridViewREFERENCIA_ALB: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'REFERENCIA_ALB'
|
||||
end
|
||||
object cxGridViewSITUACION_ALB: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'SITUACION_ALB'
|
||||
Visible = False
|
||||
end
|
||||
object cxGridViewFECHA_PREVISTA_ENVIO_ALB: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'FECHA_PREVISTA_ENVIO_ALB'
|
||||
end
|
||||
object cxGridViewID_ALMACEN_ALB: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID_ALMACEN_ALB'
|
||||
Visible = False
|
||||
end
|
||||
object cxGridViewALMACEN_ALB: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ALMACEN_ALB'
|
||||
end
|
||||
object cxGridViewCLIENTE_ALB: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'CLIENTE_ALB'
|
||||
end
|
||||
object cxGridViewFAMILIA_ART: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'FAMILIA_ART'
|
||||
end
|
||||
object cxGridViewREFERENCIA_ART: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'REFERENCIA_ART'
|
||||
end
|
||||
object cxGridViewREFERENCIA_PROV_ART: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'REFERENCIA_PROV_ART'
|
||||
end
|
||||
object cxGridViewDESCRIPCION_ART: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'DESCRIPCION_ART'
|
||||
end
|
||||
object cxGridViewCANTIDAD_ART: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'CANTIDAD_ART'
|
||||
PropertiesClassName = 'TcxSpinEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
FooterAlignmentHorz = taRightJustify
|
||||
end
|
||||
end
|
||||
object cxGridDBTableView1: TcxGridDBTableView [1]
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
end
|
||||
inherited cxGridLevel: TcxGridLevel
|
||||
Tag = -1
|
||||
Caption = 'Todos los almacenes'
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
inherited TBXDock1: TTBXDock
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
ExplicitWidth = 464
|
||||
Width = 464
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
ExplicitWidth = 244
|
||||
Width = 244
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
ExplicitWidth = 203
|
||||
Width = 203
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited dxComponentPrinter: TdxComponentPrinter
|
||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||
ReportDocument.CreationDate = 38673.741107951390000000
|
||||
BuiltInReportLink = True
|
||||
end
|
||||
end
|
||||
inherited cxStyleRepository1: TcxStyleRepository
|
||||
inherited cxStyleEven: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
end
|
||||
inherited cxStyleOdd: TcxStyle
|
||||
AssignedValues = [svColor, svFont]
|
||||
end
|
||||
inherited cxStyleSelection: TcxStyle
|
||||
AssignedValues = [svColor, svFont, svTextColor]
|
||||
end
|
||||
object cxStyleArticuloSinStock: TcxStyle
|
||||
AssignedValues = [svFont, svTextColor]
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
TextColor = clRed
|
||||
end
|
||||
end
|
||||
inherited dxPrintStyleManager1: TdxPrintStyleManager
|
||||
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
|
||||
BuiltInStyle = True
|
||||
end
|
||||
end
|
||||
object PngImageList: TPngImageList
|
||||
PngImages = <
|
||||
item
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000000970485973000017120000171201679FD252000001004944415478DA
|
||||
63BC5C22F99F8148A0D3FD8C115D8C1164806A4B0D84F7FD3B03C3FD3B0CB3DB
|
||||
3732A42EC614CB5985CF00A8C2E9177D1858B6A5420C4013C36D4075315821C3
|
||||
F5AB0CD37F95430C98852986DB80287FB02D300036A012530CA701071E121788
|
||||
F8C3002DC072573F67FCFF9F7004E10C449001403967A09A3D78F4BBE00C44A8
|
||||
0160C3D9D9B33074FEFC398D61766C0BEE408419004C3C60C5700072E98FEF0C
|
||||
D3771882D5E10C44AC0680347F7807A6A79F748618802FA0AE944A210C80697E
|
||||
0FC43F7E324CBF194C82011F7A119A3F7C80B8E0552A09063CA8466806BBE03B
|
||||
3CB0091A008A85E9CBE5B1CA13638033308071A6030779061700E6FAF742387F
|
||||
63F70000000049454E44AE426082}
|
||||
Name = 'PngImage1'
|
||||
Background = clWindow
|
||||
end
|
||||
item
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
|
||||
610000000970485973000017120000171201679FD252000001A94944415478DA
|
||||
8D925D28836114C7FF4FBEE246B9734BBB61B990C89512492925F9B6BB5D0817
|
||||
98968FF21186250AADB69285D2848DB2A5AC854D44CBB7D096C495A4D078278F
|
||||
BDCF986C5EAF53E7E2391FBF739E7F871C2AE229FE6952F52D098E111E20E969
|
||||
F7BF3C1EC07D099DCA04F95468ACCEF017E0B350B35F80F015B91F10141306B4
|
||||
35B1429C1E43C329FD00AD3F962493E22156E2AB04C2C280A8FB0B5C1FD4929F
|
||||
808A4236E5CB18A0A51059CD524CE86B7E4C54CD7A611C69C5E3F51009006C57
|
||||
A1822D726D181DAF816DDF0B854CC936A03E2F560EB0BC75BA0337CE7E2228A2
|
||||
FA7912666D0E4A4B1A71681FF95E396D8B5695A7C2BED00597BD8F088A38F834
|
||||
098B2E0795D58D705A4301DBCBDD38B7F5124111EB5DF3A277417733C9AF2236
|
||||
8CC5E1D894210A48CE1FFE5D447E3A0F303ADEC0BD51B87737E1DAE944427A27
|
||||
A21333F1F24AA19F3900380708A5A197CCFF930718D6BDE0BC141BBADC402EB1
|
||||
C8020FF70EC3DC9138607A8D631BF0EE9CCA0B34BFF87CC974220ED0995F59F3
|
||||
ED9E1177671A44C457213AA98C01ACAB677F034415E44D08C0202943A290C8C8
|
||||
98EC0F53DC14659A0322CE0000000049454E44AE426082}
|
||||
Name = 'PngImage0'
|
||||
Background = clWindow
|
||||
end>
|
||||
Left = 56
|
||||
Top = 48
|
||||
Bitmap = {}
|
||||
end
|
||||
end
|
||||
191
Source/Modulos/Inventario/Views/uViewDetalleReservas.pas
Normal file
191
Source/Modulos/Inventario/Views/uViewDetalleReservas.pas
Normal file
@ -0,0 +1,191 @@
|
||||
unit uViewDetalleReservas;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, frxClass, frxPreview, cxStyles,
|
||||
cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB,
|
||||
cxDBData, ActnList, uDADataTable, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGrid, StdCtrls, ExtCtrls, cxLabel, dxPSGlbl, dxPSUtl,
|
||||
dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
|
||||
dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore, dxPScxCommon, dxPScxGridLnk, cxImage,
|
||||
cxImageComboBox, ImgList, PngImageList, cxTextEdit, Grids, DBGrids, cxDBLookupComboBox,
|
||||
cxButtonEdit, cxGridCustomPopupMenu, cxGridPopupMenu, uViewGrid,
|
||||
uBizInventario, uBizAlmacenes, cxSpinEdit, uViewFiltroBase, TB2Item, TBX,
|
||||
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, cxCurrencyEdit, uAlmacenesController;
|
||||
|
||||
type
|
||||
IViewDetalleReservas = interface(IViewGrid)
|
||||
['{4417F53A-5BB1-4B99-8760-4C0E1D449582}']
|
||||
function GetDetalleReservas: IBizDetalleReservas;
|
||||
procedure SetDetalleReservas(const Value: IBizDetalleReservas);
|
||||
property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas;
|
||||
function GetAlmacenes: IBizAlmacen;
|
||||
procedure SetAlmacenes(const Value: IBizAlmacen);
|
||||
property Almacenes: IBizAlmacen read GetAlmacenes write SetAlmacenes;
|
||||
end;
|
||||
|
||||
TfrViewDetalleReservas = class(TfrViewGrid, IViewDetalleReservas)
|
||||
cxGridDBTableView1: TcxGridDBTableView;
|
||||
PngImageList: TPngImageList;
|
||||
cxStyleArticuloSinStock: TcxStyle;
|
||||
cxGridViewRecID: TcxGridDBColumn;
|
||||
cxGridViewREFERENCIA_ALB: TcxGridDBColumn;
|
||||
cxGridViewSITUACION_ALB: TcxGridDBColumn;
|
||||
cxGridViewFECHA_PREVISTA_ENVIO_ALB: TcxGridDBColumn;
|
||||
cxGridViewID_ALMACEN_ALB: TcxGridDBColumn;
|
||||
cxGridViewALMACEN_ALB: TcxGridDBColumn;
|
||||
cxGridViewCLIENTE_ALB: TcxGridDBColumn;
|
||||
cxGridViewFAMILIA_ART: TcxGridDBColumn;
|
||||
cxGridViewREFERENCIA_ART: TcxGridDBColumn;
|
||||
cxGridViewREFERENCIA_PROV_ART: TcxGridDBColumn;
|
||||
cxGridViewDESCRIPCION_ART: TcxGridDBColumn;
|
||||
cxGridViewCANTIDAD_ART: TcxGridDBColumn;
|
||||
|
||||
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
|
||||
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
|
||||
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out
|
||||
AStyle: TcxStyle);
|
||||
|
||||
private
|
||||
FAlmacenesController: IAlmacenesController;
|
||||
FAlmacenes: IBizAlmacen;
|
||||
function GetAlmacenes: IBizAlmacen;
|
||||
procedure SetAlmacenes(const Value: IBizAlmacen);
|
||||
|
||||
//Filtros relativos a la vista
|
||||
procedure AnadirFiltroAlmacenes;
|
||||
|
||||
protected
|
||||
FDetalleReservas: IBizDetalleReservas;
|
||||
function GetDetalleReservas: IBizDetalleReservas;
|
||||
procedure SetDetalleReservas(const Value: IBizDetalleReservas);
|
||||
procedure AnadirOtrosFiltros; override;
|
||||
|
||||
public
|
||||
property Almacenes: IBizAlmacen read GetAlmacenes write SetAlmacenes;
|
||||
property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses uDataModuleInventario, schInventarioClient_Intf;
|
||||
|
||||
procedure TfrViewDetalleReservas.AnadirFiltroAlmacenes;
|
||||
var
|
||||
FFiltro : TcxFilterCriteriaItemList;
|
||||
CodigoAlmacen: String;
|
||||
begin
|
||||
|
||||
FFiltro := AddFilterGrid(fboAnd);
|
||||
|
||||
CodigoAlmacen := IntToStr(cxGrid.Levels.Items[cxGrid.ActiveLevel.Index].Tag);
|
||||
if CodigoAlmacen <> '-1' then
|
||||
begin
|
||||
FFiltro.AddItem(cxGridViewID_ALMACEN_ALB, foEqual, CodigoAlmacen, CodigoAlmacen);
|
||||
cxGridViewALMACEN_ALB.Visible := False;
|
||||
end
|
||||
else
|
||||
cxGridViewALMACEN_ALB.Visible := True;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetalleReservas.AnadirOtrosFiltros;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
AnadirFiltroAlmacenes;
|
||||
|
||||
//Finalmente activamos el filtro si tenemos algo
|
||||
if cxGridView.DataController.Filter.IsEmpty
|
||||
then cxGridView.DataController.Filter.Active := False
|
||||
else cxGridView.DataController.Filter.Active := True;
|
||||
cxGrid.ActiveLevel.GridView := cxGridView;
|
||||
end;
|
||||
|
||||
constructor TfrViewDetalleReservas.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FAlmacenesController := TAlmacenesController.Create;
|
||||
Almacenes := FAlmacenesController.BuscarTodos;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetalleReservas.cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
|
||||
begin
|
||||
inherited;
|
||||
RefrescarFiltro;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetalleReservas.cxGridViewStylesGetContentStyle(Sender:
|
||||
TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem:
|
||||
TcxCustomGridTableItem; out AStyle: TcxStyle);
|
||||
var
|
||||
IndiceCol: Integer;
|
||||
AStock: Variant;
|
||||
begin
|
||||
inherited;
|
||||
{
|
||||
if Assigned(ARecord) then
|
||||
begin
|
||||
IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_DetalleReservasSTOCK).Index;
|
||||
AStock := ARecord.DisplayTexts[IndiceCol];
|
||||
if (AStock < 0) then
|
||||
AStyle := cxStyleArticuloSinStock;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
destructor TfrViewDetalleReservas.Destroy;
|
||||
begin
|
||||
FAlmacenesController := Nil;
|
||||
FAlmacenes := Nil;
|
||||
FDetalleReservas := Nil;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TfrViewDetalleReservas.GetAlmacenes: IBizAlmacen;
|
||||
begin
|
||||
Result := FAlmacenes;
|
||||
end;
|
||||
|
||||
function TfrViewDetalleReservas.GetDetalleReservas: IBizDetalleReservas;
|
||||
begin
|
||||
Result := FDetalleReservas;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetalleReservas.SetAlmacenes(const Value: IBizAlmacen);
|
||||
var
|
||||
Nivel: TcxGridLevel;
|
||||
begin
|
||||
FAlmacenes := Value;
|
||||
|
||||
if Assigned(FAlmacenes) then
|
||||
begin
|
||||
if not FAlmacenes.DataTable.Active then
|
||||
FAlmacenes.DataTable.Active := True;
|
||||
|
||||
FAlmacenes.First;
|
||||
while not FAlmacenes.EOF do
|
||||
begin
|
||||
Nivel := cxGrid.Levels.Add;
|
||||
Nivel.Caption := FAlmacenes.NOMBRE;
|
||||
Nivel.Tag := FAlmacenes.ID;
|
||||
FAlmacenes.Next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetalleReservas.SetDetalleReservas(const Value: IBizDetalleReservas);
|
||||
begin
|
||||
FDetalleReservas := Value;
|
||||
if Assigned(FDetalleReservas) then
|
||||
dsDataSource.DataTable := FDetalleReservas.DataTable
|
||||
else
|
||||
dsDataSource.DataTable := Nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -154,7 +154,7 @@
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">2</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">1</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Release">3</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
@ -167,15 +167,15 @@
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">2.1.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">2.1.3.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">2.0.8.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">2.1.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompileDate">lunes, 25 de junio de 2007 19:23</VersionInfoKeys></VersionInfoKeys> <Excluded_Packages>
|
||||
<VersionInfoKeys Name="CompileDate">lunes, 16 de julio de 2007 19:10</VersionInfoKeys></VersionInfoKeys> <Excluded_Packages>
|
||||
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user