167 lines
5.0 KiB
ObjectPascal
167 lines
5.0 KiB
ObjectPascal
|
|
{
|
|||
|
|
===============================================================================
|
|||
|
|
Copyright (<EFBFBD>) 2002. Rodax Software.
|
|||
|
|
===============================================================================
|
|||
|
|
Los contenidos de este fichero son propiedad de Rodax Software titular del
|
|||
|
|
copyright. Este fichero s<EFBFBD>lo podr<EFBFBD> ser copiado, distribuido y utilizado,
|
|||
|
|
en su totalidad o en parte, con el permiso escrito de Rodax Software, o de
|
|||
|
|
acuerdo con los t<EFBFBD>rminos y condiciones establecidas en el acuerdo/contrato
|
|||
|
|
bajo el que se suministra.
|
|||
|
|
-----------------------------------------------------------------------------
|
|||
|
|
Web: www.rodax-software.com
|
|||
|
|
===============================================================================
|
|||
|
|
Fecha primera versi<EFBFBD>n: 31-12-2002
|
|||
|
|
Versi<EFBFBD>n actual: 1.0.0
|
|||
|
|
Fecha versi<EFBFBD>n actual: 31-12-2002
|
|||
|
|
===============================================================================
|
|||
|
|
Modificaciones:
|
|||
|
|
|
|||
|
|
Fecha Comentarios
|
|||
|
|
---------------------------------------------------------------------------
|
|||
|
|
===============================================================================
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
unit ImprimirPagoCliente;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
|||
|
|
RDXFRAME, StdCtrls, RdxComboBox, RdxBotones, RdxCampos,
|
|||
|
|
ExtCtrls, RdxBarras, RdxTitulos, Configuracion,
|
|||
|
|
Grids, DBGrids, RdxPaneles, RdxRadioButton, VistaPrevia, AdvPanel,
|
|||
|
|
cxDBEdit, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
|
|||
|
|
cxButtonEdit, InformePagoCliente;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
TfrImprimirPagoCliente = class(TRdxFrame)
|
|||
|
|
pnlTitulo: TRdxPanelTituloOperacion;
|
|||
|
|
pnlVistaPrevia: TPanel;
|
|||
|
|
pnlCuerpo: TPanel;
|
|||
|
|
pnlProveedor: TAdvPanel;
|
|||
|
|
eCodigo: TLabel;
|
|||
|
|
eCodigoCliente: TLabel;
|
|||
|
|
eNombre: TLabel;
|
|||
|
|
eFecha: TLabel;
|
|||
|
|
eNIFCIF: TLabel;
|
|||
|
|
CodCliente: TcxTextEdit;
|
|||
|
|
NIFCIF: TcxTextEdit;
|
|||
|
|
FechaFactura: TcxTextEdit;
|
|||
|
|
Nombre: TcxTextEdit;
|
|||
|
|
Codigo: TcxButtonEdit;
|
|||
|
|
procedure bCancelarClick(Sender: TObject);
|
|||
|
|
procedure CodPagoButtonClick(Sender: TObject);
|
|||
|
|
procedure bImprimirClick(Sender: TObject);
|
|||
|
|
procedure CodigoPropertiesButtonClick(Sender: TObject;AButtonIndex: Integer);
|
|||
|
|
private
|
|||
|
|
FCodigoPago : Variant;
|
|||
|
|
FInformePagoCliente : TdmInformePagoCliente;
|
|||
|
|
FVistaPrevia : TfrVistaPrevia;
|
|||
|
|
procedure SetCodigoPago (Value : Variant);
|
|||
|
|
procedure DarDatosPago;
|
|||
|
|
protected
|
|||
|
|
procedure FreeContenido; override;
|
|||
|
|
function CloseFrame : Boolean; override;
|
|||
|
|
public
|
|||
|
|
constructor Create(AOwner : TComponent); override;
|
|||
|
|
destructor Destroy; override;
|
|||
|
|
published
|
|||
|
|
property CodigoPago : Variant read FCodigoPago write SetCodigoPago;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
var
|
|||
|
|
frImprimirPagoCliente: TfrImprimirPagoCliente;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
{$R *.DFM}
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Variants, RdxFramePagos, Entidades, PagosClientes, BaseDatos,
|
|||
|
|
Clientes, TablaPagosCliente, Mensajes, StrFunc;
|
|||
|
|
|
|||
|
|
constructor TfrImprimirPagoCliente.Create(AOwner : TComponent);
|
|||
|
|
begin
|
|||
|
|
inherited Create(AOwner);
|
|||
|
|
FCodigoPago := NULL;
|
|||
|
|
FVistaPrevia := TfrVistaPrevia.Create(Self);
|
|||
|
|
FVistaPrevia.Parent := pnlVistaPrevia;
|
|||
|
|
FInformePagoCliente := TdmInformePagoCliente.Create(Self);
|
|||
|
|
FInformePagoCliente.Preview := FVistaPrevia.Preview;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrImprimirPagoCliente.bCancelarClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
CloseFrame;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrImprimirPagoCliente.FreeContenido;
|
|||
|
|
begin
|
|||
|
|
if (ContenidoModal is TRdxFramePagos) then
|
|||
|
|
CodigoPago := (ContenidoModal as TRdxFramePagos).CodigoPago;
|
|||
|
|
inherited FreeContenido;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrImprimirPagoCliente.CodPagoButtonClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
ContenidoModal := TfrPagosClientes.Create(Self);
|
|||
|
|
CodigoPago := FCodigoPago;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrImprimirPagoCliente.SetCodigoPago(Value: Variant);
|
|||
|
|
begin
|
|||
|
|
if EsCadenaVacia(Value) then
|
|||
|
|
Exit;
|
|||
|
|
if FCodigoPago <> Value then
|
|||
|
|
begin
|
|||
|
|
FCodigoPago := Value;
|
|||
|
|
DarDatosPago;
|
|||
|
|
FInformePagoCliente.CodigoPago := CodigoPago;
|
|||
|
|
FInformePagoCliente.Previsualizar;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
destructor TfrImprimirPagoCliente.Destroy;
|
|||
|
|
begin
|
|||
|
|
FInformePagoCliente.Free;
|
|||
|
|
inherited;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrImprimirPagoCliente.bImprimirClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
FInformePagoCliente.Imprimir;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrImprimirPagoCliente.DarDatosPago;
|
|||
|
|
var
|
|||
|
|
DatosPago : TDatosPagoCliente;
|
|||
|
|
begin
|
|||
|
|
DatosPago := TDatosPagoCliente.Create;
|
|||
|
|
try
|
|||
|
|
DatosPago.Codigo := FCodigoPago;
|
|||
|
|
dmTablaPagosCliente.DarDatosPagoCliente(DatosPago);
|
|||
|
|
Codigo.Text := DatosPago.Codigo;
|
|||
|
|
// Serie.Text := DatosPago.Serie;
|
|||
|
|
FechaFactura.Text := DatosPago.FechaPago;
|
|||
|
|
CodCliente.Text := DatosPago.CodigoCliente;
|
|||
|
|
NIFCIF.Text := DatosPago.NIFCIF;
|
|||
|
|
Nombre.Text := DatosPago.Nombre;
|
|||
|
|
finally
|
|||
|
|
DatosPago.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
function TfrImprimirPagoCliente.CloseFrame: Boolean;
|
|||
|
|
begin
|
|||
|
|
FInformePagoCliente.Preview := NIL;
|
|||
|
|
(FVistaPrevia as TRdxFrame).CloseFrame;
|
|||
|
|
Result := inherited CloseFrame;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrImprimirPagoCliente.CodigoPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
ContenidoModal := TfrPagosClientes.Create(Self);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|