Poder elegir articulos de otros proveedores en todos los documentos de compras, además de otros arreglos pendientes
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@50 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
803b6a841f
commit
69cdaef48a
Binary file not shown.
Binary file not shown.
@ -68,9 +68,10 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
uses uDialogUtils;
|
||||||
|
|
||||||
{ TfrViewFiltroBase }
|
{ TfrViewFiltroBase }
|
||||||
|
|
||||||
function TfrViewFiltroBase.GetFiltrosChange: TNotifyEvent;
|
function TfrViewFiltroBase.GetFiltrosChange: TNotifyEvent;
|
||||||
@ -117,7 +118,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if (edtFechaIniFiltro.EditValue > edtFechaFinFiltro.EditValue) then
|
if (edtFechaIniFiltro.EditValue > edtFechaFinFiltro.EditValue) then
|
||||||
begin
|
begin
|
||||||
ShowMessage('La fecha de inicio debe ser anterior a la fecha final');
|
ShowWarningMessage('La fecha de inicio debe ser anterior a la fecha final');
|
||||||
edtFechaIniFiltro.SetFocus;
|
edtFechaIniFiltro.SetFocus;
|
||||||
Result := False;
|
Result := False;
|
||||||
end
|
end
|
||||||
|
|||||||
@ -5,7 +5,8 @@ interface
|
|||||||
uses
|
uses
|
||||||
SysUtils, Classes;
|
SysUtils, Classes;
|
||||||
|
|
||||||
|
function DarFechaPrimerDia(Date: TDateTime): TDateTime;
|
||||||
|
function DarFechaUltimoDia(Date: TDateTime): TDateTime;
|
||||||
function EsFechaVacia(AFecha : TDateTime): Boolean;
|
function EsFechaVacia(AFecha : TDateTime): Boolean;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -18,4 +19,23 @@ begin
|
|||||||
Result := (AFecha = FECHA_NULA) or (AFecha = 0);
|
Result := (AFecha = FECHA_NULA) or (AFecha = 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function DarFechaPrimerDia(Date: TDateTime): TDateTime;
|
||||||
|
var
|
||||||
|
Year, Month, Day: Word;
|
||||||
|
begin
|
||||||
|
DecodeDate(Date, Year, Month, Day);
|
||||||
|
Result := EncodeDate(Year, Month, 1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function DarFechaUltimoDia(Date: TDateTime): TDateTime;
|
||||||
|
var
|
||||||
|
Year, Month, Day: Word;
|
||||||
|
begin
|
||||||
|
DecodeDate(Date, Year, Month, Day);
|
||||||
|
// (if Month < 12 then inc(Month)
|
||||||
|
// else begin Month := 1; inc(Year) end;
|
||||||
|
// Result := EncodeDate(Year, Month, 1) - 1;
|
||||||
|
Result := EncodeDate(Year, Month,
|
||||||
|
MonthDays[IsLeapYear(Year), Month]);
|
||||||
|
end;
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -31,7 +31,7 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses Dialogs, Variants, uControllerDetallesBase, uControllerDetallesDTO, uDataModuleAlbaranesCliente, uArticulosAlbaranClienteController;
|
uses Dialogs, uDialogUtils, Variants, uControllerDetallesBase, uControllerDetallesDTO, uDataModuleAlbaranesCliente, uArticulosAlbaranClienteController;
|
||||||
|
|
||||||
{ TDetallesAlbaranClienteController }
|
{ TDetallesAlbaranClienteController }
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ begin
|
|||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
||||||
ActualizarDetalles(ADetalles, AArticulos);
|
ActualizarDetalles(ADetalles, AArticulos);
|
||||||
ShowMessage('Se han actualizado los descuentos para el cliente seleccionado');
|
ShowInfoMessage('Se han actualizado los descuentos para el cliente seleccionado');
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -3,11 +3,14 @@ unit uIEditorElegirArticulosAlbaranesProveedor;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uIEditorElegirArticulos;
|
uIEditorElegirArticulos, uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
IEditorElegirArticulosAlbaranesProveedor = interface(IEditorElegirArticulos)
|
IEditorElegirArticulosAlbaranesProveedor = interface(IEditorElegirArticulos)
|
||||||
['{CAA16595-482A-4936-875E-F19263772C0D}']
|
['{CAA16595-482A-4936-875E-F19263772C0D}']
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,16 +3,17 @@ unit uArticulosAlbaranProveedorController;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uDADataTable, uArticulosController, uBizArticulos;
|
uDADataTable, uArticulosController, uBizArticulos, uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
IArticulosAlbaranProveedorController = interface(IArticulosController)
|
IArticulosAlbaranProveedorController = interface(IArticulosController)
|
||||||
['{8E3C2FF0-9D42-461C-BF14-6E77843E4173}']
|
['{8E3C2FF0-9D42-461C-BF14-6E77843E4173}']
|
||||||
|
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TArticulosAlbaranProveedorController = class(TArticulosController, IArticulosAlbaranProveedorController)
|
TArticulosAlbaranProveedorController = class(TArticulosController, IArticulosAlbaranProveedorController)
|
||||||
public
|
public
|
||||||
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean): IBizArticulo; override;
|
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo; overload;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -21,8 +22,7 @@ implementation
|
|||||||
|
|
||||||
uses Controls, uIEditorElegirArticulosAlbaranesProveedor, uIEditorElegirArticulos;
|
uses Controls, uIEditorElegirArticulosAlbaranesProveedor, uIEditorElegirArticulos;
|
||||||
|
|
||||||
function TArticulosAlbaranProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String;
|
function TArticulosAlbaranProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo;
|
||||||
AMultiSelect: Boolean): IBizArticulo;
|
|
||||||
var
|
var
|
||||||
AEditor : IEditorElegirArticulosAlbaranesProveedor;
|
AEditor : IEditorElegirArticulosAlbaranesProveedor;
|
||||||
begin
|
begin
|
||||||
@ -33,6 +33,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Controller := Self;
|
Controller := Self;
|
||||||
Articulos := AArticulos;
|
Articulos := AArticulos;
|
||||||
|
Proveedor := AProveedor;
|
||||||
MultiSelect := AMultiSelect;
|
MultiSelect := AMultiSelect;
|
||||||
Mensaje := AMensaje;
|
Mensaje := AMensaje;
|
||||||
if IsPositiveResult(ShowModal) then
|
if IsPositiveResult(ShowModal) then
|
||||||
|
|||||||
@ -31,7 +31,7 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses Variants, uControllerDetallesBase, uControllerDetallesDTO, uDataModuleAlbaranesProveedor, uArticulosAlbaranProveedorController;
|
uses Variants, uDialogUtils, uControllerDetallesBase, uControllerDetallesDTO, uDataModuleAlbaranesProveedor, uArticulosAlbaranProveedorController;
|
||||||
|
|
||||||
{ TDetallesAlbaranProveedorController }
|
{ TDetallesAlbaranProveedorController }
|
||||||
|
|
||||||
@ -45,6 +45,7 @@ begin
|
|||||||
AArticulos := (FArticulosController.BuscarTodos(AProveedor) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos(AProveedor) as IBizArticulo);
|
||||||
ActualizarDetalles(ADetalles, AArticulos);
|
ActualizarDetalles(ADetalles, AArticulos);
|
||||||
EliminarArticulosProveedor(ADetalles);
|
EliminarArticulosProveedor(ADetalles);
|
||||||
|
ShowInfoMessage('Se han eliminado todos los artículos que no pertenecen al nuevo proveedor seleccionado, y los que pertenecen sus descuentos han sido adaptados al proveedor seleccionado');
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
@ -58,8 +59,8 @@ begin
|
|||||||
if Assigned(ADetalles) then
|
if Assigned(ADetalles) then
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos(AProveedor) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
|
||||||
AArticulos := (FArticulosController as IArticulosAlbaranProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este albarán de proveedor', True);
|
AArticulos := (FArticulosController as IArticulosAlbaranProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este albarán de proveedor', True, AProveedor);
|
||||||
Add(ADetalles, AArticulos);
|
Add(ADetalles, AArticulos);
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
inherited fEditorElegirArticulosAlbaranProveedor: TfEditorElegirArticulosAlbaranProveedor
|
inherited fEditorElegirArticulosAlbaranProveedor: TfEditorElegirArticulosAlbaranProveedor
|
||||||
Caption = 'fEditorElegirArticulosAlbaranProveedor'
|
Caption = 'fEditorElegirArticulosAlbaranProveedor'
|
||||||
ExplicitHeight = 480
|
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
end
|
end
|
||||||
|
|||||||
@ -9,12 +9,22 @@ uses
|
|||||||
StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
|
StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
|
||||||
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
|
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
|
||||||
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
|
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
|
||||||
JvgWizardHeader, uIEditorElegirArticulosAlbaranesProveedor;
|
JvgWizardHeader, uIEditorElegirArticulosAlbaranesProveedor, uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfEditorElegirArticulosAlbaranProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosAlbaranesProveedor)
|
TfEditorElegirArticulosAlbaranProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosAlbaranesProveedor)
|
||||||
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
|
private
|
||||||
|
FProveedor: IBizProveedor;
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
procedure AsignarVista; override;
|
procedure AsignarVista; override;
|
||||||
|
|
||||||
|
public
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -30,4 +40,26 @@ begin
|
|||||||
ViewGrid := CreateView(TfrViewElegirArticulosAlbaranesProveedor) as IViewElegirArticulosAlbaranesProveedor;
|
ViewGrid := CreateView(TfrViewElegirArticulosAlbaranesProveedor) as IViewElegirArticulosAlbaranesProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorElegirArticulosAlbaranProveedor.FormCloseQuery(
|
||||||
|
Sender: TObject; var CanClose: Boolean);
|
||||||
|
begin
|
||||||
|
FProveedor := Nil;
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfEditorElegirArticulosAlbaranProveedor.GetProveedor: IBizProveedor;
|
||||||
|
begin
|
||||||
|
Result := FProveedor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorElegirArticulosAlbaranProveedor.SetProveedor(const Value: IBizProveedor);
|
||||||
|
begin
|
||||||
|
FProveedor := Value;
|
||||||
|
if Assigned(FProveedor) then
|
||||||
|
begin
|
||||||
|
if Assigned(Self.ViewGrid) then
|
||||||
|
(Self.ViewGrid as IViewElegirArticulosAlbaranesProveedor).Proveedor := FProveedor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -1,7 +1,55 @@
|
|||||||
inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaranesProveedor
|
inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaranesProveedor
|
||||||
|
Height = 414
|
||||||
|
OnDestroy = CustomViewDestroy
|
||||||
|
ExplicitHeight = 414
|
||||||
|
inherited cxGrid: TcxGrid
|
||||||
|
Height = 286
|
||||||
|
RootLevelOptions.DetailTabsPosition = dtpTop
|
||||||
|
OnActiveTabChanged = cxGridActiveTabChanged
|
||||||
|
ExplicitHeight = 286
|
||||||
|
inherited cxGridView: TcxGridDBTableView
|
||||||
|
object cxGridViewID_PROVEEDOR: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'ID_PROVEEDOR'
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
Caption = 'Otros proveedores'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||||
|
inherited TBXDock1: TTBXDock
|
||||||
|
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||||
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
|
inherited txtFiltroTodo: TcxTextEdit
|
||||||
|
ExplicitWidth = 273
|
||||||
|
Width = 273
|
||||||
|
end
|
||||||
|
inherited edtFechaIniFiltro: TcxDateEdit
|
||||||
|
ExplicitWidth = 121
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
inherited edtFechaFinFiltro: TcxDateEdit
|
||||||
|
ExplicitWidth = 121
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||||
|
Top = 388
|
||||||
|
ExplicitTop = 388
|
||||||
|
end
|
||||||
inherited dxComponentPrinter: TdxComponentPrinter
|
inherited dxComponentPrinter: TdxComponentPrinter
|
||||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||||
|
ReportDocument.CreationDate = 39252.489745000000000000
|
||||||
BuiltInReportLink = True
|
BuiltInReportLink = True
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited dxPrintStyleManager1: TdxPrintStyleManager
|
||||||
|
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
|
||||||
|
BuiltInStyle = True
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -10,17 +10,99 @@ uses
|
|||||||
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, ImgList, PngImageList,
|
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, ImgList, PngImageList,
|
||||||
cxGridCustomPopupMenu, cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGridLnk,
|
cxGridCustomPopupMenu, cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGridLnk,
|
||||||
uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||||
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid;
|
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, uBizContactos,
|
||||||
|
dxPgsDlg, ActnList, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock,
|
||||||
|
uViewFiltroBase;
|
||||||
|
|
||||||
type
|
type
|
||||||
IViewElegirArticulosAlbaranesProveedor = interface(IViewArticulos)
|
IViewElegirArticulosAlbaranesProveedor = interface(IViewArticulos)
|
||||||
['{93C55517-8F37-4EDF-A1B0-95461D0AD807}']
|
['{93C55517-8F37-4EDF-A1B0-95461D0AD807}']
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TfrViewElegirArticulosAlbaranesProveedor = class(TfrViewArticulos, IViewElegirArticulosAlbaranesProveedor)
|
TfrViewElegirArticulosAlbaranesProveedor = class(TfrViewArticulos, IViewElegirArticulosAlbaranesProveedor)
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridViewID_PROVEEDOR: TcxGridDBColumn;
|
||||||
|
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid;
|
||||||
|
ALevel: TcxGridLevel);
|
||||||
|
procedure CustomViewDestroy(Sender: TObject);
|
||||||
|
|
||||||
|
private
|
||||||
|
FProveedor: IBizProveedor;
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
|
||||||
|
//Filtros relativos a la vista
|
||||||
|
procedure AnadirFiltroProveedor;
|
||||||
|
|
||||||
|
public
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
|
procedure AnadirOtrosFiltros; override;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
{ TfrViewElegirArticulosAlbaranesProveedor }
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosAlbaranesProveedor.AnadirFiltroProveedor;
|
||||||
|
var
|
||||||
|
FFiltro : TcxFilterCriteriaItemList;
|
||||||
|
begin
|
||||||
|
FFiltro := AddFilterGrid(fboAnd);
|
||||||
|
|
||||||
|
case cxGrid.ActiveLevel.Index of
|
||||||
|
0 : if Assigned(FProveedor) then
|
||||||
|
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foEqual, FProveedor.ID, FProveedor.NOMBRE);
|
||||||
|
1 : if Assigned(FProveedor) then
|
||||||
|
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foNotEqual, FProveedor.ID, FProveedor.NOMBRE);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosAlbaranesProveedor.AnadirOtrosFiltros;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
AnadirFiltroProveedor;
|
||||||
|
|
||||||
|
//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;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosAlbaranesProveedor.CustomViewDestroy(
|
||||||
|
Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
FProveedor := Nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosAlbaranesProveedor.cxGridActiveTabChanged(
|
||||||
|
Sender: TcxCustomGrid; ALevel: TcxGridLevel);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
RefrescarFiltro;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrViewElegirArticulosAlbaranesProveedor.GetProveedor: IBizProveedor;
|
||||||
|
begin
|
||||||
|
Result := FProveedor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosAlbaranesProveedor.SetProveedor(
|
||||||
|
const Value: IBizProveedor);
|
||||||
|
begin
|
||||||
|
FProveedor := Value;
|
||||||
|
if Assigned(FProveedor) then
|
||||||
|
begin
|
||||||
|
cxGridLevel.Caption := FProveedor.NOMBRE;
|
||||||
|
RefrescarFiltro;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -2,6 +2,7 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
|
|||||||
Caption = 'Seleccionar art'#237'culos'
|
Caption = 'Seleccionar art'#237'culos'
|
||||||
ClientWidth = 656
|
ClientWidth = 656
|
||||||
ExplicitWidth = 664
|
ExplicitWidth = 664
|
||||||
|
ExplicitHeight = 478
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object JvgWizardHeader1: TJvgWizardHeader [0]
|
object JvgWizardHeader1: TJvgWizardHeader [0]
|
||||||
@ -55,7 +56,7 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
|
|||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
DockPos = -6
|
DockPos = -6
|
||||||
ExplicitWidth = 346
|
ExplicitWidth = 117
|
||||||
inherited TBXItem2: TTBXItem
|
inherited TBXItem2: TTBXItem
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
@ -73,12 +74,12 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited tbxFiltro: TTBXToolbar
|
inherited tbxFiltro: TTBXToolbar
|
||||||
Left = 346
|
Left = 117
|
||||||
Top = 23
|
Top = 23
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
DockPos = 101
|
DockPos = 101
|
||||||
DockRow = 1
|
DockRow = 1
|
||||||
ExplicitLeft = 346
|
ExplicitLeft = 117
|
||||||
ExplicitTop = 23
|
ExplicitTop = 23
|
||||||
inherited TBXItem34: TTBXItem
|
inherited TBXItem34: TTBXItem
|
||||||
Action = actQuitarFiltro2
|
Action = actQuitarFiltro2
|
||||||
@ -136,6 +137,15 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
|
|||||||
inherited EditorActionList: TActionList [5]
|
inherited EditorActionList: TActionList [5]
|
||||||
Left = 112
|
Left = 112
|
||||||
Top = 192
|
Top = 192
|
||||||
|
inherited actPrevisualizar: TAction
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
inherited actImprimir: TAction
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
inherited actDuplicar: TAction
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited SmallImages: TPngImageList [6]
|
inherited SmallImages: TPngImageList [6]
|
||||||
end
|
end
|
||||||
|
|||||||
@ -68,7 +68,7 @@ uses
|
|||||||
Variants, Dialogs, cxControls, DB, uEditorRegistryUtils, schComisionesClient_Intf,
|
Variants, Dialogs, cxControls, DB, uEditorRegistryUtils, schComisionesClient_Intf,
|
||||||
uIEditorComisiones, uDataModuleComisiones, uDataModuleUsuarios,
|
uIEditorComisiones, uDataModuleComisiones, uDataModuleUsuarios,
|
||||||
uDAInterfaces, uDataTableUtils, uIEditorComision, uComisionesReportController,
|
uDAInterfaces, uDataTableUtils, uIEditorComision, uComisionesReportController,
|
||||||
uDateUtils, uROTypes, DateUtils, Controls, Windows;
|
uDateUtils, uROTypes, DateUtils, Controls, Windows, uDialogUtils;
|
||||||
|
|
||||||
{ TComisionesController }
|
{ TComisionesController }
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ begin
|
|||||||
AFacturasDesglosadas := Nil;
|
AFacturasDesglosadas := Nil;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Showmessage('Debe elegir primero el agente asociado a la liquidación');
|
ShowWarningMessage('Debe elegir primero el agente asociado a la liquidación');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TComisionesController.Eliminar(AComision: IBizComisiones): Boolean;
|
function TComisionesController.Eliminar(AComision: IBizComisiones): Boolean;
|
||||||
|
|||||||
@ -1,20 +1,9 @@
|
|||||||
inherited fEditorComisionesPreview: TfEditorComisionesPreview
|
inherited fEditorComisionesPreview: TfEditorComisionesPreview
|
||||||
Caption = 'Previsualizar la factura'
|
Caption = 'Previsualizar la factura'
|
||||||
ExplicitWidth = 658
|
ExplicitWidth = 320
|
||||||
ExplicitHeight = 492
|
ExplicitHeight = 240
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
|
||||||
ExplicitWidth = 650
|
|
||||||
inherited Image1: TImage
|
|
||||||
Left = 623
|
|
||||||
ExplicitLeft = 623
|
|
||||||
end
|
|
||||||
end
|
|
||||||
inherited StatusBar: TJvStatusBar
|
|
||||||
ExplicitTop = 439
|
|
||||||
ExplicitWidth = 650
|
|
||||||
end
|
|
||||||
object pnlFiltrar: TTBXDockablePanel [3]
|
object pnlFiltrar: TTBXDockablePanel [3]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 102
|
Top = 102
|
||||||
|
|||||||
@ -44,7 +44,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
uses uROTypes, uBizContactos, uAgentesController;
|
uses uROTypes, uDialogUtils, uBizContactos, uAgentesController;
|
||||||
|
|
||||||
procedure TfEditorComisionesPreview.Button1Click(Sender: TObject);
|
procedure TfEditorComisionesPreview.Button1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
@ -98,7 +98,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if (edtFechaFiltro1.EditValue > edtFechaFiltro2.EditValue) then
|
if (edtFechaFiltro1.EditValue > edtFechaFiltro2.EditValue) then
|
||||||
begin
|
begin
|
||||||
ShowMessage('La fecha de inicio debe ser anterior a la fecha final');
|
ShowWarningMessage('La fecha de inicio debe ser anterior a la fecha final');
|
||||||
edtFechaFiltro1.SetFocus;
|
edtFechaFiltro1.SetFocus;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@ -40,7 +40,7 @@ implementation
|
|||||||
{ TDetallesFacturaClienteController }
|
{ TDetallesFacturaClienteController }
|
||||||
|
|
||||||
uses Variants, uControllerDetallesDTO, uDataModuleFacturasCliente, uArticulosFacturaClienteController,
|
uses Variants, uControllerDetallesDTO, uDataModuleFacturasCliente, uArticulosFacturaClienteController,
|
||||||
uControllerDetallesBase, Dialogs, SysUtils;
|
uControllerDetallesBase, Dialogs, uDialogUtils, SysUtils;
|
||||||
|
|
||||||
procedure TDetallesFacturaClienteController.ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente);
|
procedure TDetallesFacturaClienteController.ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente);
|
||||||
var
|
var
|
||||||
@ -51,7 +51,7 @@ begin
|
|||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
||||||
ActualizarDetalles(ADetalles, AArticulos);
|
ActualizarDetalles(ADetalles, AArticulos);
|
||||||
ShowMessage('Se han actualizado los descuentos para el cliente seleccionado');
|
ShowInfoMessage('Se han actualizado los descuentos para el cliente seleccionado');
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -40,7 +40,7 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
ExplicitWidth = 656
|
ExplicitWidth = 656
|
||||||
end
|
end
|
||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
Top = 144
|
Top = 60
|
||||||
Width = 654
|
Width = 654
|
||||||
Caption = 'Lista de facturas de cliente para liquidar su comisi'#243'n'
|
Caption = 'Lista de facturas de cliente para liquidar su comisi'#243'n'
|
||||||
Visible = False
|
Visible = False
|
||||||
@ -52,14 +52,17 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
Top = 171
|
Top = 87
|
||||||
Width = 654
|
Width = 654
|
||||||
Height = 49
|
Height = 49
|
||||||
ExplicitTop = 171
|
ExplicitTop = 171
|
||||||
ExplicitWidth = 654
|
ExplicitWidth = 654
|
||||||
ExplicitHeight = 49
|
ExplicitHeight = 49
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
ExplicitWidth = 181
|
ExplicitWidth = 117
|
||||||
|
inherited TBXSubmenuItem2: TTBXSubmenuItem
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
inherited TBXItem5: TTBXItem
|
inherited TBXItem5: TTBXItem
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
@ -71,12 +74,12 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited tbxFiltro: TTBXToolbar
|
inherited tbxFiltro: TTBXToolbar
|
||||||
Left = 181
|
Left = 117
|
||||||
Top = 23
|
Top = 23
|
||||||
DockPos = 104
|
DockPos = 104
|
||||||
DockRow = 1
|
DockRow = 1
|
||||||
Visible = False
|
Visible = False
|
||||||
ExplicitLeft = 181
|
ExplicitLeft = 117
|
||||||
ExplicitTop = 23
|
ExplicitTop = 23
|
||||||
inherited TBXItem34: TTBXItem
|
inherited TBXItem34: TTBXItem
|
||||||
Action = actQuitarFiltro2
|
Action = actQuitarFiltro2
|
||||||
@ -136,15 +139,15 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited frViewFacturasCliente1: TfrViewFacturasCliente [5]
|
inherited frViewFacturasCliente1: TfrViewFacturasCliente [5]
|
||||||
Top = 220
|
Top = 136
|
||||||
Width = 654
|
Width = 654
|
||||||
Height = 391
|
Height = 475
|
||||||
ExplicitTop = 220
|
ExplicitTop = 220
|
||||||
ExplicitWidth = 654
|
ExplicitWidth = 654
|
||||||
ExplicitHeight = 391
|
ExplicitHeight = 391
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Width = 654
|
Width = 654
|
||||||
Height = 263
|
Height = 347
|
||||||
RootLevelOptions.DetailTabsPosition = dtpNone
|
RootLevelOptions.DetailTabsPosition = dtpNone
|
||||||
ExplicitWidth = 654
|
ExplicitWidth = 654
|
||||||
ExplicitHeight = 263
|
ExplicitHeight = 263
|
||||||
@ -171,6 +174,7 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
end
|
end
|
||||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||||
Width = 654
|
Width = 654
|
||||||
|
Visible = True
|
||||||
ExplicitWidth = 654
|
ExplicitWidth = 654
|
||||||
inherited TBXDock1: TTBXDock
|
inherited TBXDock1: TTBXDock
|
||||||
Width = 654
|
Width = 654
|
||||||
@ -180,6 +184,20 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
Width = 650
|
Width = 650
|
||||||
ExplicitWidth = 650
|
ExplicitWidth = 650
|
||||||
|
inherited txtFiltroTodo: TcxTextEdit
|
||||||
|
ExplicitWidth = 273
|
||||||
|
Width = 273
|
||||||
|
end
|
||||||
|
inherited edtFechaIniFiltro: TcxDateEdit
|
||||||
|
ExplicitWidth = 121
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
inherited edtFechaFinFiltro: TcxDateEdit
|
||||||
|
Left = 401
|
||||||
|
ExplicitLeft = 401
|
||||||
|
ExplicitWidth = 121
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
Width = 650
|
Width = 650
|
||||||
@ -193,13 +211,15 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||||
Top = 365
|
Top = 449
|
||||||
ExplicitTop = 365
|
ExplicitTop = 365
|
||||||
|
ExplicitWidth = 654
|
||||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
Width = 654
|
Width = 654
|
||||||
ExplicitWidth = 654
|
ExplicitWidth = 654
|
||||||
inherited TBXToolbar1: TTBXToolbar
|
inherited TBXToolbar1: TTBXToolbar
|
||||||
Width = 644
|
Width = 644
|
||||||
|
ExplicitWidth = 644
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -222,145 +242,7 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object pnlFiltrar: TTBXDockablePanel [6]
|
inherited EditorActionList: TActionList [8]
|
||||||
Left = 0
|
|
||||||
Top = 60
|
|
||||||
Align = alTop
|
|
||||||
Caption = 'Filtrar'
|
|
||||||
CaptionRotation = dpcrAlwaysVert
|
|
||||||
DockedHeight = 84
|
|
||||||
DockMode = dmCannotFloat
|
|
||||||
DockPos = 88
|
|
||||||
DockRow = 2
|
|
||||||
FloatingWidth = 128
|
|
||||||
FloatingHeight = 84
|
|
||||||
ShowCaptionWhenDocked = False
|
|
||||||
SupportedDocks = [dkStandardDock, dkMultiDock]
|
|
||||||
TabOrder = 5
|
|
||||||
object Label1: TLabel
|
|
||||||
Left = 296
|
|
||||||
Top = 50
|
|
||||||
Width = 17
|
|
||||||
Height = 13
|
|
||||||
Caption = 'y el'
|
|
||||||
end
|
|
||||||
object txtFiltroTodo: TcxTextEdit
|
|
||||||
Left = 168
|
|
||||||
Top = 16
|
|
||||||
Properties.OnChange = txtFiltroTodoPropertiesChange
|
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
|
||||||
Style.LookAndFeel.NativeStyle = True
|
|
||||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
|
||||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleFocused.LookAndFeel.NativeStyle = True
|
|
||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
|
||||||
TabOrder = 0
|
|
||||||
Width = 273
|
|
||||||
end
|
|
||||||
object edtFechaFiltro1: TcxDateEdit
|
|
||||||
Left = 168
|
|
||||||
Top = 46
|
|
||||||
Enabled = False
|
|
||||||
Properties.OnEditValueChanged = edtFechaFiltro1PropertiesEditValueChanged
|
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
|
||||||
Style.LookAndFeel.NativeStyle = True
|
|
||||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
|
||||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleFocused.LookAndFeel.NativeStyle = True
|
|
||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
|
||||||
TabOrder = 1
|
|
||||||
Width = 121
|
|
||||||
end
|
|
||||||
object edtFechaFiltro2: TcxDateEdit
|
|
||||||
Left = 320
|
|
||||||
Top = 46
|
|
||||||
Enabled = False
|
|
||||||
Properties.OnEditValueChanged = edtFechaFiltro1PropertiesEditValueChanged
|
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
|
||||||
Style.LookAndFeel.NativeStyle = True
|
|
||||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
|
||||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleFocused.LookAndFeel.NativeStyle = True
|
|
||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
|
||||||
TabOrder = 2
|
|
||||||
Width = 121
|
|
||||||
end
|
|
||||||
object rbTodo: TcxRadioButton
|
|
||||||
Left = 16
|
|
||||||
Top = 18
|
|
||||||
Width = 145
|
|
||||||
Height = 17
|
|
||||||
Caption = 'Facturas que contengan:'
|
|
||||||
Checked = True
|
|
||||||
TabOrder = 3
|
|
||||||
TabStop = True
|
|
||||||
OnClick = rbTodoClick
|
|
||||||
LookAndFeel.Kind = lfStandard
|
|
||||||
LookAndFeel.NativeStyle = True
|
|
||||||
end
|
|
||||||
object rbFechas: TcxRadioButton
|
|
||||||
Left = 16
|
|
||||||
Top = 48
|
|
||||||
Width = 145
|
|
||||||
Height = 17
|
|
||||||
Caption = 'Facturas con fechas entre:'
|
|
||||||
TabOrder = 4
|
|
||||||
OnClick = rbTodoClick
|
|
||||||
LookAndFeel.Kind = lfStandard
|
|
||||||
LookAndFeel.NativeStyle = True
|
|
||||||
end
|
|
||||||
object Button1: TBitBtn
|
|
||||||
Left = 470
|
|
||||||
Top = 43
|
|
||||||
Width = 163
|
|
||||||
Height = 25
|
|
||||||
Action = actQuitarFiltro2
|
|
||||||
Caption = 'Quitar filtro y ver todo'
|
|
||||||
TabOrder = 5
|
|
||||||
Glyph.Data = {
|
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
|
||||||
2000000000000004000000000000000000000000000000000000FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00A505
|
|
||||||
E1007204CA00FE00FF00FF00FF00FF00FF00E800F5003E09C100FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00AB17
|
|
||||||
F900161DC600C400E700FF00FF00FF00FF00520DC9000F30D600D71BCF00942A
|
|
||||||
8A004D493C004D493C00942A8A00D71BCF00FF00FF00FF00FF00D71BCF008B2C
|
|
||||||
92002843B900141B980070208D004615BA000F30D600C20BF80069605800F8D5
|
|
||||||
AD00F8C89000F8C89000E7AB63004D493C00FF00FF00FF00FF0069605800F8D5
|
|
||||||
AD00C8ACA6001036E4002125A6000F30D600B20EF600FF00FF0069605800FFD8
|
|
||||||
C000F8D5AD00F8C89000F8C890004D493C004D493C004D493C0069605800FFD8
|
|
||||||
C000EFCDAD005F65C6000A38ED002637A300927C6C00FF00FF0069605800F0F0
|
|
||||||
F000FFD8C000F8D5AD00F8C8900069605800696058006960580069605800FFF8
|
|
||||||
FF008372B1000F30D6002750F7000F30D60025256F00FF00FF00942A8A006960
|
|
||||||
58006960580069605800942A8A00D71BCF00FF00FF00FF00FF00D71BCF004F24
|
|
||||||
9E000F30D600434D8A00605D6C004D69E3000F30D6006D05CC00FF00FF006648
|
|
||||||
54004D493C00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000F30
|
|
||||||
D6008F1FF300FF00FF00FF00FF00C811FD003154EB000024D300FF00FF00FF00
|
|
||||||
FF00664854004D493C00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF004D493C004D493C00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF0066485400696058004D493C00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00696058004D493C00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF0066485400D419D000FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00A8658D0069605800FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
inherited EditorActionList: TActionList [9]
|
|
||||||
Left = 112
|
Left = 112
|
||||||
Top = 192
|
Top = 192
|
||||||
inherited actNuevo: TAction
|
inherited actNuevo: TAction
|
||||||
@ -383,19 +265,19 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
Left = 8
|
Left = 8
|
||||||
Top = 192
|
Top = 192
|
||||||
end
|
end
|
||||||
inherited JvFormStorage: TJvFormStorage [13]
|
inherited JvFormStorage: TJvFormStorage [12]
|
||||||
end
|
end
|
||||||
inherited GridPopupMenu: TPopupMenu [14]
|
inherited GridPopupMenu: TPopupMenu [13]
|
||||||
Left = 80
|
Left = 80
|
||||||
Top = 192
|
Top = 192
|
||||||
end
|
end
|
||||||
inherited JsNuevaFacturaDialog: TJSDialog [15]
|
inherited JsNuevaFacturaDialog: TJSDialog [14]
|
||||||
end
|
end
|
||||||
inherited JsListaFacturasGeneradas: TJSDialog [16]
|
inherited JsListaFacturasGeneradas: TJSDialog [15]
|
||||||
end
|
end
|
||||||
inherited JsPrevisualizarDialog: TJSDialog [17]
|
inherited JsPrevisualizarDialog: TJSDialog [16]
|
||||||
end
|
end
|
||||||
inherited JsImprimirDialog: TJSDialog [18]
|
inherited JsImprimirDialog: TJSDialog [17]
|
||||||
end
|
end
|
||||||
object EditorSeleccionActionList: TActionList
|
object EditorSeleccionActionList: TActionList
|
||||||
Images = SmallImages
|
Images = SmallImages
|
||||||
@ -411,7 +293,6 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
|
|||||||
Category = 'Buscar'
|
Category = 'Buscar'
|
||||||
Caption = 'Quitar filtro y ver todo'
|
Caption = 'Quitar filtro y ver todo'
|
||||||
ImageIndex = 19
|
ImageIndex = 19
|
||||||
OnExecute = actQuitarFiltro2Execute
|
|
||||||
end
|
end
|
||||||
object actAnchoAuto2: TAction
|
object actAnchoAuto2: TAction
|
||||||
Category = 'Ver'
|
Category = 'Ver'
|
||||||
|
|||||||
@ -48,23 +48,11 @@ type
|
|||||||
actBuscar2: TAction;
|
actBuscar2: TAction;
|
||||||
actQuitarFiltro2: TAction;
|
actQuitarFiltro2: TAction;
|
||||||
actAnchoAuto2: TAction;
|
actAnchoAuto2: TAction;
|
||||||
pnlFiltrar: TTBXDockablePanel;
|
|
||||||
Label1: TLabel;
|
|
||||||
txtFiltroTodo: TcxTextEdit;
|
|
||||||
edtFechaFiltro1: TcxDateEdit;
|
|
||||||
edtFechaFiltro2: TcxDateEdit;
|
|
||||||
rbTodo: TcxRadioButton;
|
|
||||||
rbFechas: TcxRadioButton;
|
|
||||||
Button1: TBitBtn;
|
|
||||||
procedure frViewBarraSeleccion1actSeleccionarUpdate(Sender: TObject);
|
procedure frViewBarraSeleccion1actSeleccionarUpdate(Sender: TObject);
|
||||||
procedure frViewBarraSeleccion1actCancelarExecute(Sender: TObject);
|
procedure frViewBarraSeleccion1actCancelarExecute(Sender: TObject);
|
||||||
procedure frViewBarraSeleccion1actSeleccionarExecute(Sender: TObject);
|
procedure frViewBarraSeleccion1actSeleccionarExecute(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure actAnchoAuto2Execute(Sender: TObject);
|
procedure actAnchoAuto2Execute(Sender: TObject);
|
||||||
procedure actQuitarFiltro2Execute(Sender: TObject);
|
|
||||||
procedure txtFiltroTodoPropertiesChange(Sender: TObject);
|
|
||||||
procedure edtFechaFiltro1PropertiesEditValueChanged(Sender: TObject);
|
|
||||||
procedure rbTodoClick(Sender: TObject);
|
|
||||||
protected
|
protected
|
||||||
procedure SetMultiSelect (AValue : Boolean);
|
procedure SetMultiSelect (AValue : Boolean);
|
||||||
function GetMultiSelect : Boolean;
|
function GetMultiSelect : Boolean;
|
||||||
@ -82,7 +70,7 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
uEditorGridBase, cxGridCustomTableView, uIntegerListUtils, uDBSelectionListUtils,
|
uEditorGridBase, cxGridCustomTableView, uIntegerListUtils, uDBSelectionListUtils,
|
||||||
uGridUtils, uEditorBase, uFacturasClienteController;
|
uGridUtils, uDialogUtils, uEditorBase, uFacturasClienteController, uDateUtils;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
@ -94,40 +82,13 @@ begin
|
|||||||
actAnchoAuto.Execute;
|
actAnchoAuto.Execute;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorElegirFacturasCliente.actQuitarFiltro2Execute(Sender: TObject);
|
|
||||||
begin
|
|
||||||
// inherited;
|
|
||||||
|
|
||||||
if Assigned(ViewGrid) then
|
|
||||||
begin
|
|
||||||
txtFiltroTodo.Clear;
|
|
||||||
edtFechaFiltro1.Clear;
|
|
||||||
edtFechaFiltro2.Clear;
|
|
||||||
// (ViewGrid as IViewFacturasCliente).FiltrarPorFechas(null, null);
|
|
||||||
inherited;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// actQuitarFiltro.Execute;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfEditorElegirFacturasCliente.edtFechaFiltro1PropertiesEditValueChanged(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if not VarIsNull(edtFechaFiltro1.EditValue) and not VarIsNull(edtFechaFiltro2.EditValue) then
|
|
||||||
begin
|
|
||||||
if (edtFechaFiltro1.EditValue > edtFechaFiltro2.EditValue) then
|
|
||||||
begin
|
|
||||||
ShowMessage('La fecha de inicio debe ser anterior a la fecha final');
|
|
||||||
edtFechaFiltro1.SetFocus;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
// (ViewGrid as IViewFacturasCliente).FiltrarPorFechas(edtFechaFiltro1.EditValue, edtFechaFiltro2.EditValue);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfEditorElegirFacturasCliente.FormShow(Sender: TObject);
|
procedure TfEditorElegirFacturasCliente.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
EditorActionList.State := asSuspended;
|
EditorActionList.State := asSuspended;
|
||||||
|
|
||||||
|
frViewFacturasCliente1.frViewFiltroBase1.edtFechaIniFiltro.EditValue := darFechaPrimerDia(now);
|
||||||
|
frViewFacturasCliente1.frViewFiltroBase1.edtFechaFinFiltro.EditValue := darFechaUltimoDia(now);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorElegirFacturasCliente.frViewBarraSeleccion1actCancelarExecute(
|
procedure TfEditorElegirFacturasCliente.frViewBarraSeleccion1actCancelarExecute(
|
||||||
@ -158,23 +119,6 @@ begin
|
|||||||
Result := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas) as IBizFacturaCliente;
|
Result := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas) as IBizFacturaCliente;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorElegirFacturasCliente.rbTodoClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
actQuitarFiltro.Execute;
|
|
||||||
|
|
||||||
if rbTodo.Checked then
|
|
||||||
begin
|
|
||||||
edtFechaFiltro1.Enabled := False;
|
|
||||||
edtFechaFiltro2.Enabled := False;
|
|
||||||
txtFiltroTodo.Enabled := True;
|
|
||||||
end
|
|
||||||
else begin
|
|
||||||
edtFechaFiltro1.Enabled := True;
|
|
||||||
edtFechaFiltro2.Enabled := True;
|
|
||||||
txtFiltroTodo.Enabled := False;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TfEditorElegirFacturasCliente.GetMensaje: String;
|
function TfEditorElegirFacturasCliente.GetMensaje: String;
|
||||||
begin
|
begin
|
||||||
Result := JvgWizardHeader1.Comments.Text;
|
Result := JvgWizardHeader1.Comments.Text;
|
||||||
@ -201,10 +145,4 @@ begin
|
|||||||
ViewGrid.OnDblClick := frViewBarraSeleccion1.actSeleccionar.OnExecute;
|
ViewGrid.OnDblClick := frViewBarraSeleccion1.actSeleccionar.OnExecute;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorElegirFacturasCliente.txtFiltroTodoPropertiesChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if Assigned(ViewGrid) then
|
|
||||||
ViewGrid.Filter := txtFiltroTodo.Text;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -127,6 +127,24 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
|||||||
ExplicitWidth = 332
|
ExplicitWidth = 332
|
||||||
inherited edtlNombre: TcxDBTextEdit
|
inherited edtlNombre: TcxDBTextEdit
|
||||||
Properties.OnChange = frViewClienteFacturaedtlNombrePropertiesChange
|
Properties.OnChange = frViewClienteFacturaedtlNombrePropertiesChange
|
||||||
|
ExplicitWidth = 224
|
||||||
|
Width = 224
|
||||||
|
end
|
||||||
|
inherited edtNIFCIF: TcxDBTextEdit
|
||||||
|
ExplicitWidth = 562
|
||||||
|
Width = 562
|
||||||
|
end
|
||||||
|
inherited edtCalle: TcxDBTextEdit
|
||||||
|
ExplicitWidth = 562
|
||||||
|
Width = 562
|
||||||
|
end
|
||||||
|
inherited edtPoblacion: TcxDBTextEdit
|
||||||
|
ExplicitWidth = 177
|
||||||
|
Width = 177
|
||||||
|
end
|
||||||
|
inherited edtProvincia: TcxDBTextEdit
|
||||||
|
ExplicitWidth = 327
|
||||||
|
Width = 327
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -295,7 +295,7 @@ begin
|
|||||||
ACadena := 'Antes debe elegir un cliente para esta factura'
|
ACadena := 'Antes debe elegir un cliente para esta factura'
|
||||||
else
|
else
|
||||||
ACadena := 'Antes debe elegir un cliente para este abono';
|
ACadena := 'Antes debe elegir un cliente para este abono';
|
||||||
Showmessage(ACadena);
|
ShowWarningMessage(ACadena);
|
||||||
AllowChange := False;
|
AllowChange := False;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -3,11 +3,14 @@ unit uIEditorElegirArticulosFacturasProveedor;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uIEditorElegirArticulos;
|
uIEditorElegirArticulos, uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
IEditorElegirArticulosFacturasProveedor = interface(IEditorElegirArticulos)
|
IEditorElegirArticulosFacturasProveedor = interface(IEditorElegirArticulos)
|
||||||
['{21C9BC41-C4B2-44CD-BCB3-F32A4BD5AC4E}']
|
['{21C9BC41-C4B2-44CD-BCB3-F32A4BD5AC4E}']
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,16 +3,17 @@ unit uArticulosFacturaProveedorController;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uDADataTable, uArticulosController, uBizArticulos;
|
uDADataTable, uArticulosController, uBizArticulos, uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
IArticulosFacturaProveedorController = interface(IArticulosController)
|
IArticulosFacturaProveedorController = interface(IArticulosController)
|
||||||
['{9B6F6963-D16F-43FE-B33F-47824A5FAFE7}']
|
['{9B6F6963-D16F-43FE-B33F-47824A5FAFE7}']
|
||||||
|
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TArticulosFacturaProveedorController = class(TArticulosController, IArticulosFacturaProveedorController)
|
TArticulosFacturaProveedorController = class(TArticulosController, IArticulosFacturaProveedorController)
|
||||||
public
|
public
|
||||||
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean): IBizArticulo; override;
|
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo; overload;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -22,7 +23,7 @@ implementation
|
|||||||
uses Controls, uIEditorElegirArticulosFacturasProveedor, uIEditorElegirArticulos;
|
uses Controls, uIEditorElegirArticulosFacturasProveedor, uIEditorElegirArticulos;
|
||||||
|
|
||||||
function TArticulosFacturaProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String;
|
function TArticulosFacturaProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String;
|
||||||
AMultiSelect: Boolean): IBizArticulo;
|
AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo;
|
||||||
var
|
var
|
||||||
AEditor : IEditorElegirArticulosFacturasProveedor;
|
AEditor : IEditorElegirArticulosFacturasProveedor;
|
||||||
begin
|
begin
|
||||||
@ -33,6 +34,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Controller := Self;
|
Controller := Self;
|
||||||
Articulos := AArticulos;
|
Articulos := AArticulos;
|
||||||
|
Proveedor := AProveedor;
|
||||||
MultiSelect := AMultiSelect;
|
MultiSelect := AMultiSelect;
|
||||||
Mensaje := AMensaje;
|
Mensaje := AMensaje;
|
||||||
if IsPositiveResult(ShowModal) then
|
if IsPositiveResult(ShowModal) then
|
||||||
|
|||||||
@ -37,7 +37,7 @@ implementation
|
|||||||
{ TDetallesFacturaProveedorController }
|
{ TDetallesFacturaProveedorController }
|
||||||
|
|
||||||
uses Variants, uControllerDetallesDTO, uDataModuleFacturasProveedor, uArticulosFacturaProveedorController,
|
uses Variants, uControllerDetallesDTO, uDataModuleFacturasProveedor, uArticulosFacturaProveedorController,
|
||||||
uControllerDetallesBase, Dialogs, SysUtils;
|
uControllerDetallesBase, Dialogs, SysUtils, uDialogUtils;
|
||||||
|
|
||||||
procedure TDetallesFacturaProveedorController.ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor);
|
procedure TDetallesFacturaProveedorController.ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor);
|
||||||
var
|
var
|
||||||
@ -48,7 +48,8 @@ begin
|
|||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos(AProveedor) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos(AProveedor) as IBizArticulo);
|
||||||
ActualizarDetalles(ADetalles, AArticulos);
|
ActualizarDetalles(ADetalles, AArticulos);
|
||||||
ShowMessage('Se han actualizado los descuentos para el Proveedor seleccionado');
|
EliminarArticulosProveedor(ADetalles);
|
||||||
|
ShowInfoMessage('Se han eliminado todos los artículos que no pertenecen al nuevo proveedor seleccionado, y los que pertenecen sus descuentos han sido adaptados al proveedor seleccionado');
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
@ -61,9 +62,9 @@ var
|
|||||||
begin
|
begin
|
||||||
if Assigned(ADetalles) then
|
if Assigned(ADetalles) then
|
||||||
begin
|
begin
|
||||||
AArticulos := (FArticulosController.BuscarTodos(AProveedor) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
|
||||||
try
|
try
|
||||||
AArticulos := (FArticulosController as IArticulosFacturaProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a esta factura de Proveedor', True);
|
AArticulos := (FArticulosController as IArticulosFacturaProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a esta factura de Proveedor', True, AProveedor);
|
||||||
Add(ADetalles, AArticulos);
|
Add(ADetalles, AArticulos);
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
inherited fEditorElegirArticulosFacturaProveedor: TfEditorElegirArticulosFacturaProveedor
|
inherited fEditorElegirArticulosFacturaProveedor: TfEditorElegirArticulosFacturaProveedor
|
||||||
Caption = 'fEditorElegirArticulosFacturaProveedor'
|
Caption = 'fEditorElegirArticulosFacturaProveedor'
|
||||||
ExplicitHeight = 478
|
ExplicitWidth = 320
|
||||||
|
ExplicitHeight = 240
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
end
|
end
|
||||||
|
|||||||
@ -9,12 +9,22 @@ uses
|
|||||||
StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
|
StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
|
||||||
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
|
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
|
||||||
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
|
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
|
||||||
JvgWizardHeader, uIEditorElegirArticulosFacturasProveedor;
|
JvgWizardHeader, uIEditorElegirArticulosFacturasProveedor, uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfEditorElegirArticulosFacturaProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosFacturasProveedor)
|
TfEditorElegirArticulosFacturaProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosFacturasProveedor)
|
||||||
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
|
private
|
||||||
|
FProveedor: IBizProveedor;
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
procedure AsignarVista; override;
|
procedure AsignarVista; override;
|
||||||
|
|
||||||
|
public
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -30,4 +40,26 @@ begin
|
|||||||
ViewGrid := CreateView(TfrViewElegirArticulosFacturasProveedor) as IViewElegirArticulosFacturasProveedor;
|
ViewGrid := CreateView(TfrViewElegirArticulosFacturasProveedor) as IViewElegirArticulosFacturasProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorElegirArticulosFacturaProveedor.FormCloseQuery(
|
||||||
|
Sender: TObject; var CanClose: Boolean);
|
||||||
|
begin
|
||||||
|
FProveedor := Nil;
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfEditorElegirArticulosFacturaProveedor.GetProveedor: IBizProveedor;
|
||||||
|
begin
|
||||||
|
Result := FProveedor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorElegirArticulosFacturaProveedor.SetProveedor(const Value: IBizProveedor);
|
||||||
|
begin
|
||||||
|
FProveedor := Value;
|
||||||
|
if Assigned(FProveedor) then
|
||||||
|
begin
|
||||||
|
if Assigned(Self.ViewGrid) then
|
||||||
|
(Self.ViewGrid as IViewElegirArticulosFacturasProveedor).Proveedor := FProveedor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -165,6 +165,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
object pagContenido: TTabSheet
|
object pagContenido: TTabSheet
|
||||||
Caption = 'Contenido'
|
Caption = 'Contenido'
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 0
|
||||||
|
ExplicitWidth = 0
|
||||||
|
ExplicitHeight = 0
|
||||||
inline frViewDetallesFacturaProveedor1: TfrViewDetallesFacturaProveedor
|
inline frViewDetallesFacturaProveedor1: TfrViewDetallesFacturaProveedor
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
|
|||||||
@ -292,7 +292,7 @@ begin
|
|||||||
AMensaje := 'Antes debe elegir un proveedor para esta factura'
|
AMensaje := 'Antes debe elegir un proveedor para esta factura'
|
||||||
else
|
else
|
||||||
AMensaje := 'Antes debe elegir un proveedor para este abono';
|
AMensaje := 'Antes debe elegir un proveedor para este abono';
|
||||||
Showmessage(AMensaje);
|
ShowWarningMessage(AMensaje);
|
||||||
AllowChange := False;
|
AllowChange := False;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1,7 +1,54 @@
|
|||||||
inherited frViewElegirArticulosFacturasProveedor: TfrViewElegirArticulosFacturasProveedor
|
inherited frViewElegirArticulosFacturasProveedor: TfrViewElegirArticulosFacturasProveedor
|
||||||
|
Height = 449
|
||||||
|
OnDestroy = CustomViewDestroy
|
||||||
|
ExplicitHeight = 449
|
||||||
|
inherited cxGrid: TcxGrid
|
||||||
|
Height = 321
|
||||||
|
RootLevelOptions.DetailTabsPosition = dtpTop
|
||||||
|
OnActiveTabChanged = cxGridActiveTabChanged
|
||||||
|
inherited cxGridView: TcxGridDBTableView
|
||||||
|
object cxGridViewID_PROVEEDOR: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'ID_PROVEEDOR'
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
Caption = 'Otros proveedores'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||||
|
inherited TBXDock1: TTBXDock
|
||||||
|
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||||
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
|
ExplicitWidth = 550
|
||||||
|
inherited txtFiltroTodo: TcxTextEdit
|
||||||
|
ExplicitWidth = 273
|
||||||
|
Width = 273
|
||||||
|
end
|
||||||
|
inherited edtFechaIniFiltro: TcxDateEdit
|
||||||
|
ExplicitWidth = 121
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
inherited edtFechaFinFiltro: TcxDateEdit
|
||||||
|
ExplicitWidth = 121
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||||
|
Top = 423
|
||||||
|
end
|
||||||
inherited dxComponentPrinter: TdxComponentPrinter
|
inherited dxComponentPrinter: TdxComponentPrinter
|
||||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||||
|
ReportDocument.CreationDate = 39252.442388773150000000
|
||||||
BuiltInReportLink = True
|
BuiltInReportLink = True
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited dxPrintStyleManager1: TdxPrintStyleManager
|
||||||
|
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
|
||||||
|
BuiltInStyle = True
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -10,17 +10,96 @@ uses
|
|||||||
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, ImgList, PngImageList,
|
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, ImgList, PngImageList,
|
||||||
cxGridCustomPopupMenu, cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGridLnk,
|
cxGridCustomPopupMenu, cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGridLnk,
|
||||||
uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||||
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid;
|
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, dxPgsDlg,
|
||||||
|
ActnList, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, uViewFiltroBase,
|
||||||
|
uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
IViewElegirArticulosFacturasProveedor = interface(IViewArticulos)
|
IViewElegirArticulosFacturasProveedor = interface(IViewArticulos)
|
||||||
['{8F2E6451-0A4E-4DF1-908A-62BB5785A150}']
|
['{8F2E6451-0A4E-4DF1-908A-62BB5785A150}']
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TfrViewElegirArticulosFacturasProveedor = class(TfrViewArticulos, IViewElegirArticulosFacturasProveedor)
|
TfrViewElegirArticulosFacturasProveedor = class(TfrViewArticulos, IViewElegirArticulosFacturasProveedor)
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridViewID_PROVEEDOR: TcxGridDBColumn;
|
||||||
|
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid;
|
||||||
|
ALevel: TcxGridLevel);
|
||||||
|
procedure CustomViewDestroy(Sender: TObject);
|
||||||
|
|
||||||
|
private
|
||||||
|
FProveedor: IBizProveedor;
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
|
||||||
|
//Filtros relativos a la vista
|
||||||
|
procedure AnadirFiltroProveedor;
|
||||||
|
|
||||||
|
public
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
|
procedure AnadirOtrosFiltros; override;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosFacturasProveedor.AnadirFiltroProveedor;
|
||||||
|
var
|
||||||
|
FFiltro : TcxFilterCriteriaItemList;
|
||||||
|
begin
|
||||||
|
FFiltro := AddFilterGrid(fboAnd);
|
||||||
|
|
||||||
|
case cxGrid.ActiveLevel.Index of
|
||||||
|
0 : if Assigned(FProveedor) then
|
||||||
|
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foEqual, FProveedor.ID, FProveedor.NOMBRE);
|
||||||
|
1 : if Assigned(FProveedor) then
|
||||||
|
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foNotEqual, FProveedor.ID, FProveedor.NOMBRE);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosFacturasProveedor.AnadirOtrosFiltros;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
AnadirFiltroProveedor;
|
||||||
|
|
||||||
|
//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;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosFacturasProveedor.CustomViewDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FProveedor := Nil;
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosFacturasProveedor.cxGridActiveTabChanged(
|
||||||
|
Sender: TcxCustomGrid; ALevel: TcxGridLevel);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
RefrescarFiltro;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrViewElegirArticulosFacturasProveedor.GetProveedor: IBizProveedor;
|
||||||
|
begin
|
||||||
|
Result := FProveedor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosFacturasProveedor.SetProveedor(
|
||||||
|
const Value: IBizProveedor);
|
||||||
|
begin
|
||||||
|
FProveedor := Value;
|
||||||
|
if Assigned(FProveedor) then
|
||||||
|
begin
|
||||||
|
cxGridLevel.Caption := FProveedor.NOMBRE;
|
||||||
|
RefrescarFiltro;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -174,7 +174,7 @@
|
|||||||
</Delphi.Personality>
|
</Delphi.Personality>
|
||||||
<!-- EurekaLog First Line
|
<!-- EurekaLog First Line
|
||||||
[Exception Log]
|
[Exception Log]
|
||||||
EurekaLog Version=5111
|
EurekaLog Version=519
|
||||||
Activate=1
|
Activate=1
|
||||||
Activate Handle=1
|
Activate Handle=1
|
||||||
Save Log File=1
|
Save Log File=1
|
||||||
|
|||||||
@ -51,7 +51,8 @@ requires
|
|||||||
Jcl,
|
Jcl,
|
||||||
JvSystemD10R,
|
JvSystemD10R,
|
||||||
JvCoreD10R,
|
JvCoreD10R,
|
||||||
Articulos_controller;
|
Articulos_controller,
|
||||||
|
Contactos_model;
|
||||||
|
|
||||||
contains
|
contains
|
||||||
uPedidosProveedorController in 'uPedidosProveedorController.pas',
|
uPedidosProveedorController in 'uPedidosProveedorController.pas',
|
||||||
|
|||||||
@ -3,11 +3,14 @@ unit uIEditorElegirArticulosPedidosProveedor;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uIEditorElegirArticulos;
|
uIEditorElegirArticulos, uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
IEditorElegirArticulosPedidosProveedor = interface(IEditorElegirArticulos)
|
IEditorElegirArticulosPedidosProveedor = interface(IEditorElegirArticulos)
|
||||||
['{4016D4CD-8C0C-494A-9CC4-256E3A00EAD3}']
|
['{4016D4CD-8C0C-494A-9CC4-256E3A00EAD3}']
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,16 +3,17 @@ unit uArticulosPedidoProveedorController;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uDADataTable, uArticulosController, uBizArticulos;
|
uDADataTable, uArticulosController, uBizArticulos, uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
IArticulosPedidoProveedorController = interface(IArticulosController)
|
IArticulosPedidoProveedorController = interface(IArticulosController)
|
||||||
['{8C8A8D8D-82D2-4434-81C3-36E4F43F3B3E}']
|
['{8C8A8D8D-82D2-4434-81C3-36E4F43F3B3E}']
|
||||||
|
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TArticulosPedidoProveedorController = class(TArticulosController, IArticulosPedidoProveedorController)
|
TArticulosPedidoProveedorController = class(TArticulosController, IArticulosPedidoProveedorController)
|
||||||
public
|
public
|
||||||
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean): IBizArticulo; override;
|
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo; overload;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -22,7 +23,7 @@ implementation
|
|||||||
uses Controls, uIEditorElegirArticulosPedidosProveedor, uIEditorElegirArticulos;
|
uses Controls, uIEditorElegirArticulosPedidosProveedor, uIEditorElegirArticulos;
|
||||||
|
|
||||||
function TArticulosPedidoProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String;
|
function TArticulosPedidoProveedorController.ElegirArticulos(AArticulos: IBizArticulo; AMensaje: String;
|
||||||
AMultiSelect: Boolean): IBizArticulo;
|
AMultiSelect: Boolean; const AProveedor: IBizProveedor): IBizArticulo;
|
||||||
var
|
var
|
||||||
AEditor : IEditorElegirArticulosPedidosProveedor;
|
AEditor : IEditorElegirArticulosPedidosProveedor;
|
||||||
begin
|
begin
|
||||||
@ -33,6 +34,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Controller := Self;
|
Controller := Self;
|
||||||
Articulos := AArticulos;
|
Articulos := AArticulos;
|
||||||
|
Proveedor := AProveedor;
|
||||||
MultiSelect := AMultiSelect;
|
MultiSelect := AMultiSelect;
|
||||||
Mensaje := AMensaje;
|
Mensaje := AMensaje;
|
||||||
if IsPositiveResult(ShowModal) then
|
if IsPositiveResult(ShowModal) then
|
||||||
|
|||||||
@ -60,8 +60,8 @@ begin
|
|||||||
if Assigned(ADetalles) then
|
if Assigned(ADetalles) then
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos(AProveedor) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
|
||||||
AArticulos := (FArticulosController as IArticulosPedidoProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este pedido a proveedor', True);
|
AArticulos := (FArticulosController as IArticulosPedidoProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este pedido a proveedor', True, AProveedor);
|
||||||
Add(ADetalles, AArticulos);
|
Add(ADetalles, AArticulos);
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
inherited fEditorElegirArticulosPedidoProveedor: TfEditorElegirArticulosPedidoProveedor
|
inherited fEditorElegirArticulosPedidoProveedor: TfEditorElegirArticulosPedidoProveedor
|
||||||
Caption = 'fEditorElegirArticulosPedidoProveedor'
|
Caption = 'fEditorElegirArticulosPedidoProveedor'
|
||||||
ExplicitHeight = 480
|
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
end
|
end
|
||||||
|
|||||||
@ -9,12 +9,21 @@ uses
|
|||||||
StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
|
StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
|
||||||
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
|
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
|
||||||
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
|
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
|
||||||
JvgWizardHeader, uIEditorElegirArticulosPedidosProveedor;
|
JvgWizardHeader, uIEditorElegirArticulosPedidosProveedor, uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfEditorElegirArticulosPedidoProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosPedidosProveedor)
|
TfEditorElegirArticulosPedidoProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosPedidosProveedor)
|
||||||
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
|
private
|
||||||
|
FProveedor: IBizProveedor;
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
procedure AsignarVista; override;
|
procedure AsignarVista; override;
|
||||||
|
|
||||||
|
public
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -30,4 +39,25 @@ begin
|
|||||||
ViewGrid := CreateView(TfrViewElegirArticulosPedidosProveedor) as IViewElegirArticulosPedidosProveedor;
|
ViewGrid := CreateView(TfrViewElegirArticulosPedidosProveedor) as IViewElegirArticulosPedidosProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorElegirArticulosPedidoProveedor.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
|
begin
|
||||||
|
FProveedor := Nil;
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfEditorElegirArticulosPedidoProveedor.GetProveedor: IBizProveedor;
|
||||||
|
begin
|
||||||
|
Result := FProveedor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorElegirArticulosPedidoProveedor.SetProveedor(const Value: IBizProveedor);
|
||||||
|
begin
|
||||||
|
FProveedor := Value;
|
||||||
|
if Assigned(FProveedor) then
|
||||||
|
begin
|
||||||
|
if Assigned(Self.ViewGrid) then
|
||||||
|
(Self.ViewGrid as IViewElegirArticulosPedidosProveedor).Proveedor := FProveedor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -64,6 +64,7 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
|
|||||||
inherited pgPaginas: TPageControl
|
inherited pgPaginas: TPageControl
|
||||||
Width = 765
|
Width = 765
|
||||||
Height = 476
|
Height = 476
|
||||||
|
ActivePage = pagContenido
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnChanging = pgPaginasChanging
|
OnChanging = pgPaginasChanging
|
||||||
ExplicitWidth = 765
|
ExplicitWidth = 765
|
||||||
@ -98,42 +99,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
|
|||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Width = 757
|
Width = 757
|
||||||
ExplicitWidth = 757
|
ExplicitWidth = 757
|
||||||
inherited UpDown1: TUpDown
|
|
||||||
Left = 237
|
|
||||||
ExplicitLeft = 237
|
|
||||||
end
|
|
||||||
inherited ToolButton13: TToolButton
|
|
||||||
Left = 254
|
|
||||||
ExplicitLeft = 254
|
|
||||||
end
|
|
||||||
inherited ToolButton6: TToolButton
|
|
||||||
Left = 262
|
|
||||||
ExplicitLeft = 262
|
|
||||||
end
|
|
||||||
inherited ToolButton7: TToolButton
|
|
||||||
Left = 296
|
|
||||||
ExplicitLeft = 296
|
|
||||||
end
|
|
||||||
inherited ToolButton8: TToolButton
|
|
||||||
Left = 330
|
|
||||||
ExplicitLeft = 330
|
|
||||||
end
|
|
||||||
inherited ToolButton12: TToolButton
|
|
||||||
Left = 364
|
|
||||||
ExplicitLeft = 364
|
|
||||||
end
|
|
||||||
inherited ToolButton9: TToolButton
|
|
||||||
Left = 372
|
|
||||||
ExplicitLeft = 372
|
|
||||||
end
|
|
||||||
inherited ToolButton10: TToolButton
|
|
||||||
Left = 406
|
|
||||||
ExplicitLeft = 406
|
|
||||||
end
|
|
||||||
inherited ToolButton11: TToolButton
|
|
||||||
Left = 440
|
|
||||||
ExplicitLeft = 440
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Width = 757
|
Width = 757
|
||||||
|
|||||||
@ -1,7 +1,74 @@
|
|||||||
inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosProveedor
|
inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosProveedor
|
||||||
|
Width = 565
|
||||||
|
Height = 407
|
||||||
|
OnDestroy = CustomViewDestroy
|
||||||
|
ExplicitWidth = 565
|
||||||
|
ExplicitHeight = 407
|
||||||
|
inherited cxGrid: TcxGrid
|
||||||
|
Width = 565
|
||||||
|
Height = 279
|
||||||
|
RootLevelOptions.DetailTabsPosition = dtpTop
|
||||||
|
OnActiveTabChanged = cxGridActiveTabChanged
|
||||||
|
inherited cxGridView: TcxGridDBTableView
|
||||||
|
object cxGridViewID_PROVEEDOR: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'ID_PROVEEDOR'
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
Caption = 'Otros proveedores'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||||
|
Width = 565
|
||||||
|
inherited TBXDock1: TTBXDock
|
||||||
|
Width = 565
|
||||||
|
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||||
|
ExplicitWidth = 565
|
||||||
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
|
Width = 561
|
||||||
|
inherited txtFiltroTodo: TcxTextEdit
|
||||||
|
ExplicitWidth = 273
|
||||||
|
Width = 273
|
||||||
|
end
|
||||||
|
inherited edtFechaIniFiltro: TcxDateEdit
|
||||||
|
ExplicitWidth = 121
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
inherited edtFechaFinFiltro: TcxDateEdit
|
||||||
|
Left = 348
|
||||||
|
ExplicitLeft = 348
|
||||||
|
ExplicitWidth = 121
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
|
Width = 561
|
||||||
|
inherited tbxBotones: TTBXToolbar
|
||||||
|
Width = 551
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||||
|
Top = 381
|
||||||
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
|
Width = 565
|
||||||
|
inherited TBXToolbar1: TTBXToolbar
|
||||||
|
Width = 555
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
inherited dxComponentPrinter: TdxComponentPrinter
|
inherited dxComponentPrinter: TdxComponentPrinter
|
||||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||||
|
ReportDocument.CreationDate = 39252.446797407400000000
|
||||||
BuiltInReportLink = True
|
BuiltInReportLink = True
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited dxPrintStyleManager1: TdxPrintStyleManager
|
||||||
|
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
|
||||||
|
BuiltInStyle = True
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -10,17 +10,98 @@ uses
|
|||||||
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, ImgList, PngImageList,
|
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, ImgList, PngImageList,
|
||||||
cxGridCustomPopupMenu, cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGridLnk,
|
cxGridCustomPopupMenu, cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGridLnk,
|
||||||
uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||||
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid;
|
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, dxPgsDlg,
|
||||||
|
ActnList, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, uViewFiltroBase,
|
||||||
|
uBizContactos;
|
||||||
|
|
||||||
type
|
type
|
||||||
IViewElegirArticulosPedidosProveedor = interface(IViewArticulos)
|
IViewElegirArticulosPedidosProveedor = interface(IViewArticulos)
|
||||||
['{5292A518-0797-4FFC-AC9B-90F0113AF3AF}']
|
['{5292A518-0797-4FFC-AC9B-90F0113AF3AF}']
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TfrViewElegirArticulosPedidosProveedor = class(TfrViewArticulos, IViewElegirArticulosPedidosProveedor)
|
TfrViewElegirArticulosPedidosProveedor = class(TfrViewArticulos, IViewElegirArticulosPedidosProveedor)
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridViewID_PROVEEDOR: TcxGridDBColumn;
|
||||||
|
|
||||||
|
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
|
||||||
|
procedure CustomViewDestroy(Sender: TObject);
|
||||||
|
|
||||||
|
private
|
||||||
|
FProveedor: IBizProveedor;
|
||||||
|
function GetProveedor: IBizProveedor;
|
||||||
|
procedure SetProveedor(const Value: IBizProveedor);
|
||||||
|
|
||||||
|
//Filtros relativos a la vista
|
||||||
|
procedure AnadirFiltroProveedor;
|
||||||
|
|
||||||
|
public
|
||||||
|
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
|
||||||
|
procedure AnadirOtrosFiltros; override;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
uses uViewGrid;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosPedidosProveedor.AnadirFiltroProveedor;
|
||||||
|
var
|
||||||
|
FFiltro : TcxFilterCriteriaItemList;
|
||||||
|
begin
|
||||||
|
FFiltro := AddFilterGrid(fboAnd);
|
||||||
|
|
||||||
|
case cxGrid.ActiveLevel.Index of
|
||||||
|
0 : if Assigned(FProveedor) then
|
||||||
|
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foEqual, FProveedor.ID, FProveedor.NOMBRE);
|
||||||
|
1 : if Assigned(FProveedor) then
|
||||||
|
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foNotEqual, FProveedor.ID, FProveedor.NOMBRE);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosPedidosProveedor.AnadirOtrosFiltros;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
AnadirFiltroProveedor;
|
||||||
|
|
||||||
|
//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;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosPedidosProveedor.CustomViewDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FProveedor := Nil;
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosPedidosProveedor.cxGridActiveTabChanged(
|
||||||
|
Sender: TcxCustomGrid; ALevel: TcxGridLevel);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
RefrescarFiltro;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrViewElegirArticulosPedidosProveedor.GetProveedor: IBizProveedor;
|
||||||
|
begin
|
||||||
|
Result := FProveedor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewElegirArticulosPedidosProveedor.SetProveedor(const Value: IBizProveedor);
|
||||||
|
begin
|
||||||
|
FProveedor := Value;
|
||||||
|
if Assigned(FProveedor) then
|
||||||
|
begin
|
||||||
|
cxGridLevel.Caption := FProveedor.NOMBRE;
|
||||||
|
RefrescarFiltro;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -31,7 +31,7 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses Dialogs, Variants, uControllerDetallesBase, uControllerDetallesDTO, uDataModulePedidosCliente, uArticulosPedidoClienteController;
|
uses Dialogs, uDialogUtils, Variants, uControllerDetallesBase, uControllerDetallesDTO, uDataModulePedidosCliente, uArticulosPedidoClienteController;
|
||||||
|
|
||||||
{ TDetallesPedidoClienteController }
|
{ TDetallesPedidoClienteController }
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ begin
|
|||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
||||||
ActualizarDetalles(ADetalles, AArticulos);
|
ActualizarDetalles(ADetalles, AArticulos);
|
||||||
ShowMessage('Se han actualizado los descuentos para el cliente seleccionado');
|
ShowInfoMessage('Se han actualizado los descuentos para el cliente seleccionado');
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -2,6 +2,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
|||||||
Caption = 'Seleccionar recibos de cliente'
|
Caption = 'Seleccionar recibos de cliente'
|
||||||
ClientWidth = 654
|
ClientWidth = 654
|
||||||
ExplicitWidth = 662
|
ExplicitWidth = 662
|
||||||
|
ExplicitHeight = 240
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object JvgWizardHeader1: TJvgWizardHeader [0]
|
object JvgWizardHeader1: TJvgWizardHeader [0]
|
||||||
@ -84,13 +85,13 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited StatusBar: TJvStatusBar
|
inherited StatusBar: TJvStatusBar
|
||||||
|
Top = 506
|
||||||
Width = 654
|
Width = 654
|
||||||
ExplicitTop = 645
|
|
||||||
ExplicitWidth = 654
|
ExplicitWidth = 654
|
||||||
end
|
end
|
||||||
inline frViewBarraSeleccion1: TfrViewBarraSeleccion [4]
|
inline frViewBarraSeleccion1: TfrViewBarraSeleccion [4]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 609
|
Top = 525
|
||||||
Width = 654
|
Width = 654
|
||||||
Height = 36
|
Height = 36
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
@ -102,7 +103,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
|||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
ReadOnly = False
|
ReadOnly = False
|
||||||
ExplicitTop = 609
|
ExplicitTop = 525
|
||||||
ExplicitWidth = 654
|
ExplicitWidth = 654
|
||||||
ExplicitHeight = 36
|
ExplicitHeight = 36
|
||||||
inherited JvFooter1: TJvFooter
|
inherited JvFooter1: TJvFooter
|
||||||
@ -136,16 +137,48 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
|||||||
inherited frViewRecibosCliente1: TfrViewRecibosCliente [5]
|
inherited frViewRecibosCliente1: TfrViewRecibosCliente [5]
|
||||||
Top = 220
|
Top = 220
|
||||||
Width = 654
|
Width = 654
|
||||||
Height = 389
|
Height = 286
|
||||||
ExplicitTop = 220
|
ExplicitTop = 220
|
||||||
ExplicitWidth = 654
|
ExplicitWidth = 654
|
||||||
ExplicitHeight = 389
|
ExplicitHeight = 286
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Width = 654
|
Width = 654
|
||||||
Height = 389
|
Height = 158
|
||||||
RootLevelOptions.DetailTabsPosition = dtpNone
|
RootLevelOptions.DetailTabsPosition = dtpNone
|
||||||
ExplicitWidth = 654
|
ExplicitWidth = 654
|
||||||
ExplicitHeight = 389
|
ExplicitHeight = 389
|
||||||
|
inherited cxGridView: TcxGridDBTableView
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = '0 recibos'
|
||||||
|
Kind = skCount
|
||||||
|
Column = frViewRecibosCliente1.cxGridViewFECHA_EMISION
|
||||||
|
end>
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||||
|
Width = 654
|
||||||
|
ExplicitWidth = 654
|
||||||
|
inherited TBXDock1: TTBXDock
|
||||||
|
Width = 654
|
||||||
|
ExplicitWidth = 654
|
||||||
|
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||||
|
ExplicitWidth = 654
|
||||||
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
|
Width = 650
|
||||||
|
end
|
||||||
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
|
Width = 650
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||||
|
Top = 260
|
||||||
end
|
end
|
||||||
inherited dxComponentPrinter: TdxComponentPrinter
|
inherited dxComponentPrinter: TdxComponentPrinter
|
||||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||||
@ -160,6 +193,11 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
|||||||
Index = 0
|
Index = 0
|
||||||
end>
|
end>
|
||||||
end
|
end
|
||||||
|
inherited dxPrintStyleManager1: TdxPrintStyleManager
|
||||||
|
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
|
||||||
|
BuiltInStyle = True
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object pnlFiltrar: TTBXDockablePanel [6]
|
object pnlFiltrar: TTBXDockablePanel [6]
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -176,6 +214,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
|||||||
ShowCaptionWhenDocked = False
|
ShowCaptionWhenDocked = False
|
||||||
SupportedDocks = [dkStandardDock, dkMultiDock]
|
SupportedDocks = [dkStandardDock, dkMultiDock]
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
ExplicitWidth = 128
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 296
|
Left = 296
|
||||||
Top = 50
|
Top = 50
|
||||||
@ -317,10 +356,12 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
|||||||
end
|
end
|
||||||
inherited JvFormStorage: TJvFormStorage [13]
|
inherited JvFormStorage: TJvFormStorage [13]
|
||||||
end
|
end
|
||||||
inherited GridPopupMenu: TPopupMenu
|
inherited GridPopupMenu: TPopupMenu [14]
|
||||||
Left = 80
|
Left = 80
|
||||||
Top = 192
|
Top = 192
|
||||||
end
|
end
|
||||||
|
inherited JsPrevisualizarDialog: TJSDialog [15]
|
||||||
|
end
|
||||||
object EditorSeleccionActionList: TActionList
|
object EditorSeleccionActionList: TActionList
|
||||||
Images = SmallImages
|
Images = SmallImages
|
||||||
Left = 152
|
Left = 152
|
||||||
|
|||||||
@ -37,7 +37,7 @@ uses
|
|||||||
|
|
||||||
uViewRecibosCliente, uEditorRecibosCliente, uBizRecibosCliente, uIEditorElegirRecibosCliente,
|
uViewRecibosCliente, uEditorRecibosCliente, uBizRecibosCliente, uIEditorElegirRecibosCliente,
|
||||||
Buttons, cxRadioGroup, cxMaskEdit, cxDropDownEdit, cxCalendar, cxControls,
|
Buttons, cxRadioGroup, cxMaskEdit, cxDropDownEdit, cxCalendar, cxControls,
|
||||||
cxContainer, cxEdit, cxTextEdit, TBXDkPanels;
|
cxContainer, cxEdit, cxTextEdit, TBXDkPanels, JSDialog;
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -82,7 +82,7 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
uEditorGridBase, cxGridCustomTableView, uIntegerListUtils, uDBSelectionListUtils,
|
uEditorGridBase, cxGridCustomTableView, uIntegerListUtils, uDBSelectionListUtils,
|
||||||
uGridUtils, uEditorBase, uRecibosClienteController;
|
uGridUtils, uDialogUtils, uEditorBase, uRecibosClienteController;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if (edtFechaFiltro1.EditValue > edtFechaFiltro2.EditValue) then
|
if (edtFechaFiltro1.EditValue > edtFechaFiltro2.EditValue) then
|
||||||
begin
|
begin
|
||||||
ShowMessage('La fecha de inicio debe ser anterior a la fecha final');
|
ShowWarningMessage('La fecha de inicio debe ser anterior a la fecha final');
|
||||||
edtFechaFiltro1.SetFocus;
|
edtFechaFiltro1.SetFocus;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user