Arreglo, al eliminar una o varias facturas de cliente si tiene recibos con devoluciones la factura esta pendiente y se puede borar pero por integridad no se permite borrar, antes este caso no decia nada ahora se saca un mensaje

(Ya esta hecho en ACANA)

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@598 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2008-09-19 09:23:41 +00:00
parent a714cb0ecc
commit d143a31fc6
5 changed files with 156 additions and 36 deletions

View File

@ -107,7 +107,7 @@ type
function ElegirFacturas(AFacturas : IBizFacturaCliente; AMensaje: String; AMultiSelect: Boolean): IBizFacturaCliente; function ElegirFacturas(AFacturas : IBizFacturaCliente; AMensaje: String; AMultiSelect: Boolean): IBizFacturaCliente;
function ExtraerSeleccionados(AFacturasCliente: IBizFacturaCliente) : IBizFacturaCliente; function ExtraerSeleccionados(AFacturasCliente: IBizFacturaCliente) : IBizFacturaCliente;
procedure EnviarFacturaPorEMail(AFactura : IBizFacturaCliente); procedure EnviarFacturaPorEMail(AFactura : IBizFacturaCliente);
end; end;
implementation implementation
@ -121,7 +121,7 @@ uses
uBizDetallesAlbaranCliente, uFacturasClienteReportController, uBizDetallesAlbaranCliente, uFacturasClienteReportController,
DateUtils, Forms, uFormasPagoController, uBizFormasPago, uIEditorElegirFacturasCliente, DateUtils, Forms, uFormasPagoController, uBizFormasPago, uIEditorElegirFacturasCliente,
uRecibosClienteController, uBizRecibosCliente, uIntegerListUtils, uRecibosClienteController, uBizRecibosCliente, uIntegerListUtils,
uSistemaFunc, uDialogElegirEMail, uEMailUtils; uSistemaFunc, uDialogElegirEMail, uEMailUtils, Dialogs;
{procedure CopiarArticulosPedido(AOrigen: IBizDetallesPedidoCliente; {procedure CopiarArticulosPedido(AOrigen: IBizDetallesPedidoCliente;
@ -719,8 +719,14 @@ begin
if bEliminado then if bEliminado then
begin begin
AFactura.DataTable.ApplyUpdates; try
Result := True; AFactura.DataTable.ApplyUpdates;
Result := True
except
//En el caso de una factura que tiene recibos con devoluciones hechas no se puede borrar aunque la factura este en situacion de pendiente
AFactura.DataTable.CancelUpdates;
Result := False;
end;
end end
else else
Result := False; Result := False;

View File

@ -13,7 +13,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 812 Width = 812
Caption = 'Nueva factura de cliente' Caption = 'Nueva factura de cliente'
ExplicitWidth = 829 ExplicitWidth = 812
inherited Image1: TImage inherited Image1: TImage
Left = 785 Left = 785
Picture.Data = { Picture.Data = {
@ -40,7 +40,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
Width = 812 Width = 812
ExplicitWidth = 829 ExplicitWidth = 812
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 613 ExplicitWidth = 613
inherited TBXItem2: TTBXItem inherited TBXItem2: TTBXItem
@ -84,12 +84,12 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 806 Width = 806
Height = 344 Height = 344
OnChanging = pgPaginasChanging OnChanging = pgPaginasChanging
ExplicitWidth = 823 ExplicitWidth = 806
ExplicitHeight = 344 ExplicitHeight = 344
inherited pagGeneral: TTabSheet inherited pagGeneral: TTabSheet
ExplicitLeft = 4 ExplicitLeft = 4
ExplicitTop = 24 ExplicitTop = 24
ExplicitWidth = 815 ExplicitWidth = 798
ExplicitHeight = 316 ExplicitHeight = 316
inline frViewFacturaCliente1: TfrViewFacturaCliente inline frViewFacturaCliente1: TfrViewFacturaCliente
Left = 0 Left = 0
@ -105,25 +105,37 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 815 ExplicitWidth = 798
ExplicitHeight = 316 ExplicitHeight = 316
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 798 Width = 798
Height = 316 Height = 316
ExplicitWidth = 815 ExplicitWidth = 798
ExplicitHeight = 316 ExplicitHeight = 316
DesignSize = ( DesignSize = (
798 798
316) 316)
inherited eReferencia: TcxDBTextEdit inherited eReferencia: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 343 ExplicitWidth = 343
Width = 343 Width = 343
end end
inherited edtFecha: TcxDBDateEdit inherited edtFecha: TcxDBDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 343 ExplicitWidth = 343
Width = 343 Width = 343
end end
inherited memObservaciones: TcxDBMemo inherited memObservaciones: TcxDBMemo
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 445 ExplicitWidth = 445
ExplicitHeight = 136 ExplicitHeight = 136
Height = 136 Height = 136
@ -140,32 +152,56 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited edtlNombre: TcxDBTextEdit inherited edtlNombre: TcxDBTextEdit
DataBinding.DataSource = frViewFacturaCliente1.DADataSource DataBinding.DataSource = frViewFacturaCliente1.DADataSource
Properties.OnChange = frViewClienteFacturaedtlNombrePropertiesChange Properties.OnChange = frViewClienteFacturaedtlNombrePropertiesChange
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 224 ExplicitWidth = 224
Width = 224 Width = 224
end end
inherited edtNIFCIF: TcxDBTextEdit inherited edtNIFCIF: TcxDBTextEdit
DataBinding.DataSource = frViewFacturaCliente1.DADataSource DataBinding.DataSource = frViewFacturaCliente1.DADataSource
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 224 ExplicitWidth = 224
Width = 224 Width = 224
end end
inherited edtCalle: TcxDBTextEdit inherited edtCalle: TcxDBTextEdit
DataBinding.DataSource = frViewFacturaCliente1.DADataSource DataBinding.DataSource = frViewFacturaCliente1.DADataSource
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 224 ExplicitWidth = 224
Width = 224 Width = 224
end end
inherited edtPoblacion: TcxDBTextEdit inherited edtPoblacion: TcxDBTextEdit
DataBinding.DataSource = frViewFacturaCliente1.DADataSource DataBinding.DataSource = frViewFacturaCliente1.DADataSource
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 106 ExplicitWidth = 106
Width = 106 Width = 106
end end
inherited edtProvincia: TcxDBTextEdit inherited edtProvincia: TcxDBTextEdit
DataBinding.DataSource = frViewFacturaCliente1.DADataSource DataBinding.DataSource = frViewFacturaCliente1.DADataSource
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 224 ExplicitWidth = 224
Width = 224 Width = 224
end end
inherited edtCodigoPostal: TcxDBTextEdit inherited edtCodigoPostal: TcxDBTextEdit
Left = 199 Left = 199
DataBinding.DataSource = frViewFacturaCliente1.DADataSource DataBinding.DataSource = frViewFacturaCliente1.DADataSource
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 199 ExplicitLeft = 199
end end
inherited Button3: TBitBtn inherited Button3: TBitBtn
@ -175,6 +211,10 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
end end
inherited cbFormaPago: TcxDBLookupComboBox inherited cbFormaPago: TcxDBLookupComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 205 ExplicitWidth = 205
Width = 205 Width = 205
end end
@ -183,6 +223,10 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitLeft = 325 ExplicitLeft = 325
end end
inherited cbCuentaBancaria: TcxDBComboBox inherited cbCuentaBancaria: TcxDBComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 343 ExplicitWidth = 343
Width = 343 Width = 343
end end
@ -192,10 +236,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
object pagContenido: TTabSheet object pagContenido: TTabSheet
Caption = 'Contenido' Caption = 'Contenido'
ImageIndex = 1 ImageIndex = 1
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 815
ExplicitHeight = 0
inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente
Left = 0 Left = 0
Top = 0 Top = 0
@ -212,7 +252,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 815 ExplicitWidth = 798
ExplicitHeight = 316 ExplicitHeight = 316
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 798 Width = 798
@ -343,7 +383,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 200 Width = 200
end> end>
ExplicitTop = 589 ExplicitTop = 589
ExplicitWidth = 829 ExplicitWidth = 812
end end
inline frViewTotales1: TfrViewTotales [4] inline frViewTotales1: TfrViewTotales [4]
Left = 0 Left = 0
@ -360,12 +400,12 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
TabOrder = 4 TabOrder = 4
ReadOnly = False ReadOnly = False
ExplicitTop = 426 ExplicitTop = 426
ExplicitWidth = 829 ExplicitWidth = 812
ExplicitHeight = 163 ExplicitHeight = 163
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 812 Width = 812
LookAndFeel = frViewFacturaCliente1.dxLayoutOfficeLookAndFeel1 LookAndFeel = frViewFacturaCliente1.dxLayoutOfficeLookAndFeel1
ExplicitWidth = 829 ExplicitWidth = 812
inherited Bevel1: TBevel inherited Bevel1: TBevel
Top = 111 Top = 111
Width = 73 Width = 73
@ -390,7 +430,11 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
inherited ImporteDto: TcxDBCurrencyEdit inherited ImporteDto: TcxDBCurrencyEdit
Top = 131 Top = 131
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 131 ExplicitTop = 131
ExplicitWidth = 184 ExplicitWidth = 184
Width = 184 Width = 184
@ -398,7 +442,11 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited ImporteIVA: TcxDBCurrencyEdit inherited ImporteIVA: TcxDBCurrencyEdit
Left = 551 Left = 551
Top = 57 Top = 57
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 551 ExplicitLeft = 551
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 249 ExplicitWidth = 249
@ -407,7 +455,11 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited ImporteTotal: TcxDBCurrencyEdit inherited ImporteTotal: TcxDBCurrencyEdit
Left = 481 Left = 481
Top = 131 Top = 131
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 481 ExplicitLeft = 481
ExplicitTop = 131 ExplicitTop = 131
ExplicitWidth = 319 ExplicitWidth = 319
@ -415,20 +467,32 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
inherited edtDescuento: TcxDBSpinEdit inherited edtDescuento: TcxDBSpinEdit
Top = 131 Top = 131
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 131 ExplicitTop = 131
end end
inherited edtIVA: TcxDBSpinEdit inherited edtIVA: TcxDBSpinEdit
Left = 480 Left = 480
Top = 57 Top = 57
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 480 ExplicitLeft = 480
ExplicitTop = 57 ExplicitTop = 57
end end
inherited ImporteBase: TcxDBCurrencyEdit inherited ImporteBase: TcxDBCurrencyEdit
Left = 480 Left = 480
Top = 30 Top = 30
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 480 ExplicitLeft = 480
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 320 ExplicitWidth = 320
@ -437,14 +501,22 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited edtRE: TcxDBSpinEdit inherited edtRE: TcxDBSpinEdit
Left = 480 Left = 480
Top = 84 Top = 84
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 480 ExplicitLeft = 480
ExplicitTop = 84 ExplicitTop = 84
end end
inherited ImporteRE: TcxDBCurrencyEdit inherited ImporteRE: TcxDBCurrencyEdit
Left = 551 Left = 551
Top = 84 Top = 84
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 551 ExplicitLeft = 551
ExplicitTop = 84 ExplicitTop = 84
ExplicitWidth = 249 ExplicitWidth = 249
@ -452,20 +524,32 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
inherited eImporteNeto: TcxDBCurrencyEdit inherited eImporteNeto: TcxDBCurrencyEdit
Top = 30 Top = 30
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 255 ExplicitWidth = 255
Width = 255 Width = 255
end end
inherited ePorte: TcxDBCurrencyEdit inherited ePorte: TcxDBCurrencyEdit
Top = 158 Top = 158
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 158 ExplicitTop = 158
ExplicitWidth = 255 ExplicitWidth = 255
Width = 255 Width = 255
end end
inherited eIVA: TcxDBLookupComboBox inherited eIVA: TcxDBLookupComboBox
Top = 57 Top = 57
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 117 ExplicitWidth = 117
Width = 117 Width = 117
@ -478,6 +562,10 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end end
inherited cbRecargoEquivalencia: TcxDBCheckBox inherited cbRecargoEquivalencia: TcxDBCheckBox
Top = 84 Top = 84
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 84 ExplicitTop = 84
ExplicitWidth = 255 ExplicitWidth = 255
Width = 255 Width = 255

View File

@ -155,7 +155,9 @@ begin
if (Application.MessageBox(PChar(ACadena), 'Atención', MB_YESNO) = IDYES) then if (Application.MessageBox(PChar(ACadena), 'Atención', MB_YESNO) = IDYES) then
begin begin
FController.Eliminar(Factura); //Es el caso de querer borrar una factura pendiente cuyos recibos tienen devoluciones
if not FController.Eliminar(Factura) then
Application.MessageBox('La factura no ha podido ser eliminada porque tiene recibos con pagos o devoluciones emitidas.', 'Atención', MB_OK);
inherited; inherited;
end; end;
end; end;

View File

@ -9,7 +9,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 842 Width = 842
Caption = 'Lista de facturas de cliente' Caption = 'Lista de facturas de cliente'
ExplicitWidth = 640 ExplicitWidth = 842
inherited Image1: TImage inherited Image1: TImage
Left = 815 Left = 815
Picture.Data = { Picture.Data = {
@ -36,7 +36,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
end end
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
Width = 842 Width = 842
ExplicitWidth = 640 ExplicitWidth = 842
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 842 ExplicitWidth = 842
object TBXSubmenuItem2: TTBXSubmenuItem [0] object TBXSubmenuItem2: TTBXSubmenuItem [0]
@ -69,7 +69,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
Top = 647 Top = 647
Width = 842 Width = 842
ExplicitTop = 647 ExplicitTop = 647
ExplicitWidth = 640 ExplicitWidth = 842
end end
inline frViewFacturasCliente1: TfrViewFacturasCliente [3] inline frViewFacturasCliente1: TfrViewFacturasCliente [3]
Left = 0 Left = 0
@ -86,12 +86,12 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
TabOrder = 3 TabOrder = 3
ReadOnly = False ReadOnly = False
ExplicitTop = 102 ExplicitTop = 102
ExplicitWidth = 640 ExplicitWidth = 842
ExplicitHeight = 545 ExplicitHeight = 545
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 842 Width = 842
Height = 417 Height = 417
ExplicitWidth = 640 ExplicitWidth = 842
ExplicitHeight = 417 ExplicitHeight = 417
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = < DataController.Summary.DefaultGroupSummaryItems = <
@ -130,28 +130,44 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
end end
inherited frViewFiltroBase1: TfrViewFiltroBase inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 842 Width = 842
ExplicitWidth = 640 ExplicitWidth = 842
inherited TBXDockablePanel1: TTBXDockablePanel inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 640 ExplicitWidth = 842
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 842 Width = 842
ExplicitWidth = 640 ExplicitWidth = 842
inherited txtFiltroTodo: TcxTextEdit inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 600 ExplicitWidth = 600
Width = 600 Width = 600
end end
inherited edtFechaIniFiltro: TcxDateEdit inherited edtFechaIniFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 263 ExplicitWidth = 263
Width = 263 Width = 263
end end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 367 Left = 367
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 367 ExplicitLeft = 367
ExplicitWidth = 263 ExplicitWidth = 263
Width = 263 Width = 263
end end
inherited eLista: TcxComboBox inherited eLista: TcxComboBox
Left = 667 Left = 667
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 667 ExplicitLeft = 667
ExplicitWidth = 20 ExplicitWidth = 20
Width = 20 Width = 20
@ -159,10 +175,10 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 842 Width = 842
ExplicitWidth = 640 ExplicitWidth = 842
inherited tbxBotones: TTBXToolbar inherited tbxBotones: TTBXToolbar
Width = 832 Width = 832
ExplicitWidth = 630 ExplicitWidth = 832
end end
end end
end end
@ -170,13 +186,13 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
inherited pnlAgrupaciones: TTBXDockablePanel inherited pnlAgrupaciones: TTBXDockablePanel
Top = 519 Top = 519
ExplicitTop = 519 ExplicitTop = 519
ExplicitWidth = 640 ExplicitWidth = 842
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 842 Width = 842
ExplicitWidth = 640 ExplicitWidth = 842
inherited TBXToolbar1: TTBXToolbar inherited TBXToolbar1: TTBXToolbar
Width = 832 Width = 832
ExplicitWidth = 630 ExplicitWidth = 832
end end
end end
end end
@ -3382,8 +3398,8 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA
1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082}
Instruction.Text = Instruction.Text =
'Las siguientes facturas no han podido ser eliminadas, porque est' + 'Las siguientes facturas no han podido ser eliminadas, porque tie' +
#225'n parcialmente pagadas o totalmete pagadas' 'nen recibos con pagos o devoluciones emitidas'
Instruction.Glyph.Data = { Instruction.Glyph.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
00001C0806000000720DDF940000000970485973000017120000171201679FD2 00001C0806000000720DDF940000000970485973000017120000171201679FD2

View File

@ -197,13 +197,21 @@ begin
if Assigned(AFacturas) then if Assigned(AFacturas) then
begin begin
FController.Eliminar(AFacturas, AllItems); if (not FController.Eliminar(AFacturas, AllItems))
and (not AllItems) then //Es el caso de querer borrar una factura pendiente cuyos recibos tienen devoluciones
begin
JsListaFacturasNoEliminadas.Content.Clear;
JsListaFacturasNoEliminadas.Content.Add('Ref. factura: ' + AFacturas.REFERENCIA + ' ' + AFacturas.NOMBRE);
JsListaFacturasNoEliminadas.Execute;
end;
if AllItems then if AllItems then
begin begin
if (AFacturas.DataTable.RecordCount > 0) then if (AFacturas.DataTable.RecordCount > 0) then
begin begin
with AFacturas.DataTable do with AFacturas.DataTable do
begin begin
JsListaFacturasNoEliminadas.Content.Clear;
First; First;
while not EOF do while not EOF do
begin begin
@ -214,7 +222,7 @@ begin
JsListaFacturasNoEliminadas.Execute; JsListaFacturasNoEliminadas.Execute;
end; end;
actRefrescar.Execute; actRefrescar.Execute;
end; end
end; end;
ViewGrid.GotoFirst; ViewGrid.GotoFirst;