Se adaptan las facturas de proveedor para poder añadir contratos de cliente y introducir el importe correspondiente a cada uno de la factura, para así sacar el beneficio a partir de los precios del contrato
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@534 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
d14c65c8bc
commit
9e3300451f
@ -0,0 +1,23 @@
|
||||
unit uIEditorContratosClienteBeneficios;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uEditorGridBase, uBizContratosCliente, uContratosClienteController;
|
||||
|
||||
type
|
||||
IEditorContratosClienteBeneficios = interface(IEditorGridBase)
|
||||
['{48FC707E-3C2C-4E83-94C2-E7D2B99DC003}']
|
||||
function GetContratos: IBizContratosClienteBeneficios;
|
||||
procedure SetContratos(const Value: IBizContratosClienteBeneficios);
|
||||
property Contratos: IBizContratosClienteBeneficios read GetContratos write SetContratos;
|
||||
|
||||
// function GetController : IContratosClienteController;
|
||||
// procedure SetController (const Value : IContratosClienteController);
|
||||
// property Controller : IContratosClienteController read GetController write SetController;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@ -0,0 +1,166 @@
|
||||
inherited fEditorContratosClienteBeneficios: TfEditorContratosClienteBeneficios
|
||||
Caption = 'fEditorContratosClienteBeneficios'
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
Caption = 'Lista de beneficios por contrato'
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 284
|
||||
end
|
||||
end
|
||||
inline frViewContratosClienteBeneficios1: TfrViewContratosClienteBeneficios [3]
|
||||
Left = 0
|
||||
Top = 102
|
||||
Width = 543
|
||||
Height = 323
|
||||
Align = alClient
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
ReadOnly = False
|
||||
ExplicitTop = 102
|
||||
ExplicitWidth = 543
|
||||
ExplicitHeight = 323
|
||||
inherited cxGrid: TcxGrid
|
||||
Width = 543
|
||||
Height = 195
|
||||
ExplicitWidth = 543
|
||||
ExplicitHeight = 195
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
inherited cxGridViewIMPORTE_NETO: TcxGridDBColumn
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
inherited cxGridViewIMPORTE_DESCUENTO: TcxGridDBColumn
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
inherited cxGridViewBASE_IMPONIBLE: TcxGridDBColumn
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
inherited cxGridViewIMPORTE_FACTURAS_PROVEEDOR: TcxGridDBColumn
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
inherited cxGridViewIMPORTE_BENEFICIO: TcxGridDBColumn
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
inherited cxGridViewPORCENTAJE_BENEFICIO: TcxGridDBColumn
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
Width = 543
|
||||
ExplicitWidth = 543
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
ExplicitWidth = 543
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 543
|
||||
ExplicitWidth = 543
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 337
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 337
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 543
|
||||
ExplicitWidth = 543
|
||||
inherited tbxBotones: TTBXToolbar
|
||||
Width = 533
|
||||
ExplicitWidth = 533
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||
Top = 297
|
||||
ExplicitTop = 297
|
||||
ExplicitWidth = 543
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 543
|
||||
ExplicitWidth = 543
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
Width = 533
|
||||
ExplicitWidth = 533
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited dxComponentPrinter: TdxComponentPrinter
|
||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||
ReportDocument.CreationDate = 40415.801745104170000000
|
||||
BuiltInReportLink = True
|
||||
end
|
||||
end
|
||||
inherited cxViewGridPopupMenu: TcxGridPopupMenu
|
||||
PopupMenus = <
|
||||
item
|
||||
GridView = frViewContratosClienteBeneficios1.cxGridView
|
||||
HitTypes = [gvhtCell]
|
||||
Index = 0
|
||||
end>
|
||||
end
|
||||
end
|
||||
inherited EditorActionList: TActionList [4]
|
||||
inherited actNuevo: TAction
|
||||
Enabled = False
|
||||
Visible = False
|
||||
end
|
||||
inherited actModificar: TAction
|
||||
Enabled = False
|
||||
Visible = False
|
||||
end
|
||||
inherited actEliminar: TAction
|
||||
Enabled = False
|
||||
Visible = False
|
||||
end
|
||||
inherited actPrevisualizar: TAction
|
||||
Visible = True
|
||||
end
|
||||
inherited actImprimir: TAction
|
||||
Visible = True
|
||||
end
|
||||
inherited actRefrescar: TAction
|
||||
Visible = False
|
||||
end
|
||||
inherited actDuplicar: TAction
|
||||
Enabled = False
|
||||
Visible = False
|
||||
end
|
||||
inherited actExportarExcel: TAction
|
||||
Enabled = False
|
||||
Visible = False
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList [5]
|
||||
end
|
||||
inherited LargeImages: TPngImageList [6]
|
||||
end
|
||||
inherited JvFormStorage: TJvFormStorage [7]
|
||||
end
|
||||
inherited dsDataTable: TDADataSource [8]
|
||||
end
|
||||
inherited JvAppRegistryStorage: TJvAppRegistryStorage [9]
|
||||
end
|
||||
inherited StatusBarImages: TPngImageList [10]
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,86 @@
|
||||
unit uEditorContratosClienteBeneficios;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uEditorGridBase, Menus, JvAppStorage, JvAppRegistryStorage, DB,
|
||||
uDAInterfaces, uDADataTable, JvComponentBase, JvFormPlacement, ImgList,
|
||||
PngImageList, StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TBX,
|
||||
TB2ExtItems, TBXExtItems, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls,
|
||||
JvExControls, JvNavigationPane, uIEditorContratosClienteBeneficios, uBizContratosCliente,
|
||||
uCustomView, uViewBase, uViewGridBase, uViewGrid,
|
||||
uViewContratosClienteBeneficios;
|
||||
|
||||
type
|
||||
TfEditorContratosClienteBeneficios = class(TfEditorGridBase, IEditorContratosClienteBeneficios)
|
||||
frViewContratosClienteBeneficios1: TfrViewContratosClienteBeneficios;
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
FContratos: IBizContratosClienteBeneficios;
|
||||
function GetContratos: IBizContratosClienteBeneficios;
|
||||
procedure SetContratos(const Value: IBizContratosClienteBeneficios);
|
||||
|
||||
protected
|
||||
procedure ImprimirInterno; override;
|
||||
procedure PrevisualizarInterno; override;
|
||||
|
||||
public
|
||||
property Contratos: IBizContratosClienteBeneficios read GetContratos write SetContratos;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
var
|
||||
fEditorContratosClienteBeneficios: TfEditorContratosClienteBeneficios;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
{ TfEditorContratosClienteBeneficios }
|
||||
|
||||
constructor TfEditorContratosClienteBeneficios.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FContratos := NIL;
|
||||
end;
|
||||
|
||||
destructor TfEditorContratosClienteBeneficios.Destroy;
|
||||
begin
|
||||
FContratos := NIL;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfEditorContratosClienteBeneficios.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ViewGrid := frViewContratosClienteBeneficios1;
|
||||
FContratos.Active := True;
|
||||
actAnchoAuto.Execute;
|
||||
end;
|
||||
|
||||
function TfEditorContratosClienteBeneficios.GetContratos: IBizContratosClienteBeneficios;
|
||||
begin
|
||||
Result := FContratos;
|
||||
end;
|
||||
|
||||
procedure TfEditorContratosClienteBeneficios.ImprimirInterno;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfEditorContratosClienteBeneficios.PrevisualizarInterno;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfEditorContratosClienteBeneficios.SetContratos(const Value: IBizContratosClienteBeneficios);
|
||||
begin
|
||||
FContratos := Value;
|
||||
frViewContratosClienteBeneficios1.Contratos := FContratos;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -0,0 +1,99 @@
|
||||
inherited frViewContratosClienteBeneficios: TfrViewContratosClienteBeneficios
|
||||
OnDestroy = CustomViewDestroy
|
||||
inherited cxGrid: TcxGrid
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
object cxGridViewID: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID'
|
||||
Visible = False
|
||||
VisibleForCustomization = False
|
||||
end
|
||||
object cxGridViewREFERENCIA: TcxGridDBColumn
|
||||
Caption = 'Referencia'
|
||||
DataBinding.FieldName = 'REFERENCIA'
|
||||
end
|
||||
object cxGridViewFECHA_CONTRATO: TcxGridDBColumn
|
||||
Caption = 'Fecha'
|
||||
DataBinding.FieldName = 'FECHA_CONTRATO'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
end
|
||||
object cxGridViewNOMBRE: TcxGridDBColumn
|
||||
Caption = 'Cliente'
|
||||
DataBinding.FieldName = 'NOMBRE'
|
||||
end
|
||||
object cxGridViewNIF_CIF: TcxGridDBColumn
|
||||
Caption = 'NIF/CIF'
|
||||
DataBinding.FieldName = 'NIF_CIF'
|
||||
end
|
||||
object cxGridViewIMPORTE_NETO: TcxGridDBColumn
|
||||
Caption = 'Importe neto'
|
||||
DataBinding.FieldName = 'IMPORTE_NETO'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
end
|
||||
object cxGridViewIMPORTE_DESCUENTO: TcxGridDBColumn
|
||||
Caption = 'Importe descuento'
|
||||
DataBinding.FieldName = 'IMPORTE_DESCUENTO'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
end
|
||||
object cxGridViewBASE_IMPONIBLE: TcxGridDBColumn
|
||||
Caption = 'Base imponible'
|
||||
DataBinding.FieldName = 'BASE_IMPONIBLE'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
end
|
||||
object cxGridViewIMPORTE_FACTURAS_PROVEEDOR: TcxGridDBColumn
|
||||
Caption = 'Importe facturas proveedor'
|
||||
DataBinding.FieldName = 'IMPORTE_FACTURAS_PROVEEDOR'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
end
|
||||
object cxGridViewIMPORTE_BENEFICIO: TcxGridDBColumn
|
||||
Caption = 'Importe beneficio'
|
||||
DataBinding.FieldName = 'IMPORTE_BENEFICIO'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
end
|
||||
object cxGridViewPORCENTAJE_BENEFICIO: TcxGridDBColumn
|
||||
Caption = 'Porcentaje beneficio'
|
||||
DataBinding.FieldName = 'PORCENTAJE_BENEFICIO'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||
ExplicitWidth = 554
|
||||
end
|
||||
inherited dxComponentPrinter: TdxComponentPrinter
|
||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||
ReportDocument.CreationDate = 40415.784062094910000000
|
||||
BuiltInReportLink = True
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,66 @@
|
||||
unit uViewContratosClienteBeneficios;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uViewGrid, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg,
|
||||
dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
|
||||
dxPSEdgePatterns, ImgList, PngImageList, ActnList, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk, uDAInterfaces,
|
||||
uDADataTable, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, uCustomView,
|
||||
uViewBase, uViewFiltroBase, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, uBizContratosCliente, cxCalendar, cxCurrencyEdit;
|
||||
|
||||
type
|
||||
TfrViewContratosClienteBeneficios = class(TfrViewGrid)
|
||||
cxGridViewID: TcxGridDBColumn;
|
||||
cxGridViewREFERENCIA: TcxGridDBColumn;
|
||||
cxGridViewFECHA_CONTRATO: TcxGridDBColumn;
|
||||
cxGridViewNOMBRE: TcxGridDBColumn;
|
||||
cxGridViewNIF_CIF: TcxGridDBColumn;
|
||||
cxGridViewIMPORTE_NETO: TcxGridDBColumn;
|
||||
cxGridViewIMPORTE_DESCUENTO: TcxGridDBColumn;
|
||||
cxGridViewBASE_IMPONIBLE: TcxGridDBColumn;
|
||||
cxGridViewIMPORTE_FACTURAS_PROVEEDOR: TcxGridDBColumn;
|
||||
cxGridViewIMPORTE_BENEFICIO: TcxGridDBColumn;
|
||||
cxGridViewPORCENTAJE_BENEFICIO: TcxGridDBColumn;
|
||||
procedure CustomViewDestroy(Sender: TObject);
|
||||
private
|
||||
FContratos: IBizContratosClienteBeneficios;
|
||||
function GetContratos: IBizContratosClienteBeneficios;
|
||||
procedure SetContratos(const Value: IBizContratosClienteBeneficios);
|
||||
|
||||
public
|
||||
property Contratos: IBizContratosClienteBeneficios read GetContratos write SetContratos;
|
||||
end;
|
||||
|
||||
var
|
||||
frViewContratosClienteBeneficios: TfrViewContratosClienteBeneficios;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
{ TfrViewContratosClienteBeneficios }
|
||||
|
||||
procedure TfrViewContratosClienteBeneficios.CustomViewDestroy(Sender: TObject);
|
||||
begin
|
||||
FContratos := NIL;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TfrViewContratosClienteBeneficios.GetContratos: IBizContratosClienteBeneficios;
|
||||
begin
|
||||
Result := FContratos;
|
||||
end;
|
||||
|
||||
procedure TfrViewContratosClienteBeneficios.SetContratos(const Value: IBizContratosClienteBeneficios);
|
||||
begin
|
||||
FContratos := Value;
|
||||
dsDataSource.DataTable := FContratos.DataTable;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -0,0 +1,63 @@
|
||||
unit uContratosFacturaProveedorController;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uControllerBase, uBizDetallesFacturaProveedor;
|
||||
|
||||
type
|
||||
IContratosFacturaProveedorController = interface(IControllerBase)
|
||||
['{44A70A63-4A6D-4255-9F8F-0EDBF0B4E9CC}']
|
||||
procedure AnadirContratos(const AContratosFacturaProveedor : IBizContratosFacturaProveedor);
|
||||
end;
|
||||
|
||||
TContratosFacturaProveedorController = class(TControllerBase, IContratosFacturaProveedorController)
|
||||
public
|
||||
procedure AnadirContratos(const AContratosFacturaProveedor : IBizContratosFacturaProveedor);
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Dialogs, uBizContratosCliente, uContratosClienteController;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ TContratosFacturaProveedorController }
|
||||
|
||||
procedure TContratosFacturaProveedorController.AnadirContratos(const AContratosFacturaProveedor: IBizContratosFacturaProveedor);
|
||||
var
|
||||
AContratosCliente: IBizContratoCliente;
|
||||
AContratosClienteController: IContratosClienteController;
|
||||
|
||||
begin
|
||||
AContratosClienteController := TContratosClienteController.Create;
|
||||
AContratosCliente := AContratosClienteController.ElegirContratos(AContratosClienteController.BuscarTodos,
|
||||
'Elija el contrato o contratos de cliente que desea utilizar para desglosar la factura.', True);
|
||||
|
||||
if assigned(AContratosCliente) then
|
||||
begin
|
||||
if not AContratosCliente.DataTable.Active then
|
||||
AContratosCliente.DataTable.Active := True;
|
||||
|
||||
AContratosCliente.DataTable.First;
|
||||
while not AContratosCliente.DataTable.EOF do
|
||||
begin
|
||||
AContratosFacturaProveedor.Insert;
|
||||
AContratosFacturaProveedor.ID_CONTRATO := AContratosCliente.ID;
|
||||
AContratosFacturaProveedor.REFERENCIA := AContratosCliente.REFERENCIA;
|
||||
AContratosFacturaProveedor.NIF_CIF := AContratosCliente.NIF_CIF;
|
||||
AContratosFacturaProveedor.NOMBRE := AContratosCliente.NOMBRE;
|
||||
AContratosFacturaProveedor.Post;
|
||||
AContratosCliente.DataTable.next;
|
||||
end;
|
||||
end;
|
||||
|
||||
AContratosCliente := Nil;
|
||||
AContratosClienteController := Nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -0,0 +1,66 @@
|
||||
inherited frViewContratosFacturaProveedor: TfrViewContratosFacturaProveedor
|
||||
OnCreate = CustomViewCreate
|
||||
OnDestroy = CustomViewDestroy
|
||||
inherited cxGrid: TcxGrid
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
object cxGridViewID_FACTURA: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID_FACTURA'
|
||||
Visible = False
|
||||
VisibleForCustomization = False
|
||||
end
|
||||
object cxGridViewID_CONTRATO: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID_CONTRATO'
|
||||
Visible = False
|
||||
VisibleForCustomization = False
|
||||
end
|
||||
object cxGridViewREFERENCIA: TcxGridDBColumn
|
||||
Caption = 'Referencia'
|
||||
DataBinding.FieldName = 'REFERENCIA'
|
||||
Options.Editing = False
|
||||
SortIndex = 0
|
||||
SortOrder = soAscending
|
||||
end
|
||||
object cxGridViewNIF_CIF: TcxGridDBColumn
|
||||
Caption = 'NIF/CIF'
|
||||
DataBinding.FieldName = 'NIF_CIF'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
Options.Editing = False
|
||||
end
|
||||
object cxGridViewNOMBRE: TcxGridDBColumn
|
||||
Caption = 'Cliente'
|
||||
DataBinding.FieldName = 'NOMBRE'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
Options.Editing = False
|
||||
end
|
||||
object cxGridViewIMPORTE: TcxGridDBColumn
|
||||
Caption = 'Importe'
|
||||
DataBinding.FieldName = 'IMPORTE'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ToolBar1: TToolBar
|
||||
inherited ToolButton1: TToolButton
|
||||
ExplicitWidth = 62
|
||||
end
|
||||
inherited ToolButton4: TToolButton
|
||||
ExplicitWidth = 74
|
||||
end
|
||||
inherited ToolButton2: TToolButton
|
||||
ExplicitWidth = 67
|
||||
end
|
||||
inherited ToolButton7: TToolButton
|
||||
ExplicitWidth = 117
|
||||
end
|
||||
end
|
||||
inherited ActionListContenido: TActionList
|
||||
inherited actModificar: TAction
|
||||
Enabled = False
|
||||
Visible = False
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,86 @@
|
||||
unit uViewContratosFacturaProveedor;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uViewDetallesGenerico, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
||||
cxData, cxDataStorage, cxEdit, DB, cxDBData, ActnList, ImgList, PngImageList,
|
||||
uDAInterfaces, uDADataTable, ComCtrls, ToolWin, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGrid, uBizDetallesFacturaProveedor, uContratosFacturaProveedorController,
|
||||
cxTextEdit, cxCurrencyEdit;
|
||||
|
||||
type
|
||||
TfrViewContratosFacturaProveedor = class(TfrViewDetallesGenerico)
|
||||
cxGridViewID_FACTURA: TcxGridDBColumn;
|
||||
cxGridViewID_CONTRATO: TcxGridDBColumn;
|
||||
cxGridViewNIF_CIF: TcxGridDBColumn;
|
||||
cxGridViewNOMBRE: TcxGridDBColumn;
|
||||
cxGridViewIMPORTE: TcxGridDBColumn;
|
||||
cxGridViewREFERENCIA: TcxGridDBColumn;
|
||||
procedure CustomViewCreate(Sender: TObject);
|
||||
procedure CustomViewDestroy(Sender: TObject);
|
||||
procedure actAnadirExecute(Sender: TObject);
|
||||
|
||||
protected
|
||||
FContratos: IBizContratosFacturaProveedor;
|
||||
FController : IContratosFacturaProveedorController;
|
||||
function GetContratos: IBizContratosFacturaProveedor;
|
||||
procedure SetContratos(const Value: IBizContratosFacturaProveedor);
|
||||
|
||||
function GetController : IContratosFacturaProveedorController;
|
||||
procedure SetController (const Value : IContratosFacturaProveedorController);
|
||||
|
||||
public
|
||||
property Contratos: IBizContratosFacturaProveedor read GetContratos write SetContratos;
|
||||
property Controller : IContratosFacturaProveedorController read GetController write SetController;
|
||||
end;
|
||||
|
||||
var
|
||||
frViewContratosFacturaProveedor: TfrViewContratosFacturaProveedor;
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
{ TfrViewContratosFacturaProveedor }
|
||||
|
||||
procedure TfrViewContratosFacturaProveedor.actAnadirExecute(Sender: TObject);
|
||||
begin
|
||||
Controller.AnadirContratos(Contratos);
|
||||
end;
|
||||
|
||||
procedure TfrViewContratosFacturaProveedor.CustomViewCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FContratos := Nil;
|
||||
end;
|
||||
|
||||
procedure TfrViewContratosFacturaProveedor.CustomViewDestroy(Sender: TObject);
|
||||
begin
|
||||
FContratos := Nil;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TfrViewContratosFacturaProveedor.GetContratos: IBizContratosFacturaProveedor;
|
||||
begin
|
||||
Result := FContratos;
|
||||
end;
|
||||
|
||||
function TfrViewContratosFacturaProveedor.GetController: IContratosFacturaProveedorController;
|
||||
begin
|
||||
Result := FController;
|
||||
end;
|
||||
|
||||
procedure TfrViewContratosFacturaProveedor.SetContratos(const Value: IBizContratosFacturaProveedor);
|
||||
begin
|
||||
FContratos := Value;
|
||||
dsDetalles.DataTable := FContratos.DataTable;
|
||||
end;
|
||||
|
||||
procedure TfrViewContratosFacturaProveedor.SetController(const Value: IContratosFacturaProveedorController);
|
||||
begin
|
||||
FController := Value;
|
||||
end;
|
||||
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user