123 lines
3.8 KiB
ObjectPascal
123 lines
3.8 KiB
ObjectPascal
|
|
{
|
|||
|
|
===============================================================================
|
|||
|
|
Copyright (<EFBFBD>) 2001. 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: 01-10-2001
|
|||
|
|
Versi<EFBFBD>n actual: 1.0.3
|
|||
|
|
Fecha versi<EFBFBD>n actual: 02-08-2002
|
|||
|
|
===============================================================================
|
|||
|
|
Modificaciones:
|
|||
|
|
|
|||
|
|
Fecha Comentarios
|
|||
|
|
---------------------------------------------------------------------------
|
|||
|
|
20-10-2001 Se ha ampliado el campo 'F. de pago' porque pasa a tener
|
|||
|
|
50 caracteres.
|
|||
|
|
15-05-2002 No se guardaban los cambios cuando se aceptaba la situaci<EFBFBD>n.
|
|||
|
|
|
|||
|
|
02-08-2002 P233. Poder cambiar la situaci<EFBFBD>n a muchas facturas a la vez.
|
|||
|
|
===============================================================================
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
unit PagarFacturaCliente;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
|||
|
|
RdxFrame, RdxBotones, ExtCtrls, RdxPaneles, RdxBarras, RdxCheckBox,
|
|||
|
|
StdCtrls, RdxCampos, RdxTitulos, RdxComboBox;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
TfrPagarFacturaCliente = class(TRdxFrame)
|
|||
|
|
eInformacion: TLabel;
|
|||
|
|
brOperacion: TRdxBarraInferior;
|
|||
|
|
bAceptar: TRdxBoton;
|
|||
|
|
bCancelar: TRdxBoton;
|
|||
|
|
Label1: TLabel;
|
|||
|
|
cbxSituacion: TRdxComboBox;
|
|||
|
|
eFormaPago: TLabel;
|
|||
|
|
cbxFormaPago: TRdxComboBox;
|
|||
|
|
procedure bAceptarClick(Sender: TObject);
|
|||
|
|
procedure bCancelarClick(Sender: TObject);
|
|||
|
|
private
|
|||
|
|
FListaFacturas : TStringList;
|
|||
|
|
procedure SetListaFacturas(Value : TStringList);
|
|||
|
|
public
|
|||
|
|
property ListaFacturas : TStringList read FListaFacturas write SetListaFacturas;
|
|||
|
|
constructor Create (AOwner : TComponent); override;
|
|||
|
|
destructor Destroy; override;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
var
|
|||
|
|
frPagarFacturaCliente: TfrPagarFacturaCliente;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
{$R *.DFM}
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
TablaFacturasCliente, Tipos, TablaFormasPago, BaseDatos, RdxEmpresaActiva;
|
|||
|
|
|
|||
|
|
constructor TfrPagarFacturaCliente.Create(AOwner: TComponent);
|
|||
|
|
begin
|
|||
|
|
inherited;
|
|||
|
|
FListaFacturas := TStringList.Create;
|
|||
|
|
cbxSituacion.Items := dmTablaFacturasCliente.darSituaciones;
|
|||
|
|
cbxFormaPago.Items := dmTablaFormasPago.darFormasPago;
|
|||
|
|
cbxFormaPago.ItemIndex := 0;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrPagarFacturaCliente.bAceptarClick(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
iAux : integer;
|
|||
|
|
begin
|
|||
|
|
for iAux := 0 to FListaFacturas.Count - 1 do
|
|||
|
|
begin
|
|||
|
|
if not dmTablaFacturasCliente.ModificarSituacionFactura(EmpresaActiva.Codigo, FListaFacturas.Strings[iAux], cbxSituacion.Text, cbxFormaPago.Text) then
|
|||
|
|
begin
|
|||
|
|
dmBaseDatos.Rollback;
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
dmBaseDatos.Commit;
|
|||
|
|
CloseFrame;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrPagarFacturaCliente.bCancelarClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
CloseFrame;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrPagarFacturaCliente.SetListaFacturas(Value: TStringList);
|
|||
|
|
var
|
|||
|
|
Situacion : String;
|
|||
|
|
iAux : integer;
|
|||
|
|
begin
|
|||
|
|
if (Value = NIL) or (Value.Count = 0) then
|
|||
|
|
exit;
|
|||
|
|
|
|||
|
|
FListaFacturas.Clear;
|
|||
|
|
FListaFacturas.Assign(Value);
|
|||
|
|
|
|||
|
|
Situacion := dmTablaFacturasCliente.DarSituacionFactura(EmpresaActiva.Codigo, FListaFacturas.Strings[0]);
|
|||
|
|
if Situacion <> '-1' then
|
|||
|
|
cbxSituacion.ItemIndex := cbxSituacion.Items.indexof(Situacion);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
destructor TfrPagarFacturaCliente.Destroy;
|
|||
|
|
begin
|
|||
|
|
FListaFacturas.Free;
|
|||
|
|
FListaFacturas := NIL;
|
|||
|
|
inherited;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|