diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index 2a418f26..7555020f 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -3762,7 +3762,8 @@ ALTER TABLE PEDIDOS_PROVEEDOR_DETALLES ADD CONSTRAINT FK_PEDIDOS_PROV_DET_ID_PED ALTER TABLE REMESAS_CLIENTE ADD CONSTRAINT FK_REMESAS_CLIENTE FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID); ALTER TABLE REMESAS_PROVEEDOR ADD CONSTRAINT FK_REMESAS_PROVEEDOR FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID); ALTER TABLE TIENDA_WEB ADD CONSTRAINT FK_EMPRESAS_TIENDA_WEB FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID) ON DELETE CASCADE ON UPDATE CASCADE; - +ALTER TABLE PAGOS_CLIENTE ADD CONSTRAINT FK_PAGOS_CLIENTE_1 FOREIGN KEY (ID_RECIBO) REFERENCES RECIBOS_CLIENTE (ID); +ALTER TABLE PAGOS_PROVEEDOR ADD CONSTRAINT FK_PAGOS_PROVEEDOR_1 FOREIGN KEY (ID_RECIBO) REFERENCES RECIBOS_PROVEEDOR (ID); /******************************************************************************/ /**** Indices ****/ diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index 4360e16b..e214b7d0 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -826,8 +826,14 @@ begin if bEliminado then begin - AFactura.DataTable.ApplyUpdates; - Result := True; + try + 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 else Result := False; diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm index 7e2ab2bc..72c06d3b 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm @@ -102,37 +102,17 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Height = 370 ExplicitWidth = 757 ExplicitHeight = 370 - inherited eReferencia: TcxDBTextEdit - ExplicitWidth = 159 - Width = 159 - end - inherited edtFecha: TcxDBDateEdit - ExplicitWidth = 159 - Width = 159 - end inherited memObservaciones: TcxDBMemo - ExplicitWidth = 301 - ExplicitHeight = 159 - Height = 159 - Width = 301 - end - inherited cbFormaPago: TcxDBLookupComboBox - ExplicitWidth = 78 - Width = 78 - end - inherited frViewTienda1: TfrViewTienda - inherited dxLayoutControl1: TdxLayoutControl - inherited cbTienda: TcxComboBox - ExplicitWidth = 399 - Width = 399 - end - end + ExplicitWidth = 713 + ExplicitHeight = 29 + Height = 29 + Width = 713 end inherited frViewClienteFactura1: TfrViewClienteFactura - Width = 314 - ExplicitWidth = 314 + Width = 334 + ExplicitWidth = 334 inherited dxLayoutControl1: TdxLayoutControl - Width = 314 + Width = 334 ExplicitWidth = 314 inherited Bevel1: TBevel Width = 266 @@ -140,28 +120,28 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end inherited edtlNombre: TcxDBTextEdit DataBinding.DataSource = dsDataTable - ExplicitWidth = 224 - Width = 224 + ExplicitWidth = 243 + Width = 243 end inherited edtNIFCIF: TcxDBTextEdit DataBinding.DataSource = dsDataTable - ExplicitWidth = 562 - Width = 562 + ExplicitWidth = 243 + Width = 243 end inherited edtCalle: TcxDBTextEdit DataBinding.DataSource = dsDataTable - ExplicitWidth = 562 - Width = 562 + ExplicitWidth = 243 + Width = 243 end inherited edtPoblacion: TcxDBTextEdit DataBinding.DataSource = dsDataTable - ExplicitWidth = 177 - Width = 177 + ExplicitWidth = 125 + Width = 125 end inherited edtProvincia: TcxDBTextEdit DataBinding.DataSource = dsDataTable - ExplicitWidth = 327 - Width = 327 + ExplicitWidth = 243 + Width = 243 end inherited edtCodigoPostal: TcxDBTextEdit Left = 242 @@ -173,8 +153,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitLeft = 132 end inherited cxDBTextEdit1: TcxDBTextEdit - ExplicitWidth = 283 - Width = 283 + ExplicitWidth = 243 + Width = 243 end end end @@ -302,14 +282,14 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente inherited cbSubCuentas: TcxComboBox Left = 85 ExplicitLeft = 85 - ExplicitWidth = 376 - Width = 376 + ExplicitWidth = 429 + Width = 429 end inherited eContabilizar: TcxCheckBox Left = 520 ExplicitLeft = 520 - ExplicitWidth = 203 - Width = 203 + ExplicitWidth = 227 + Width = 227 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Item1: TdxLayoutItem @@ -377,8 +357,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Top = 131 Style.IsFontAssigned = True ExplicitTop = 131 - ExplicitWidth = 93 - Width = 93 + ExplicitWidth = 220 + Width = 220 end inherited ImporteIVA: TcxDBCurrencyEdit Left = 594 @@ -386,8 +366,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Style.IsFontAssigned = True ExplicitLeft = 594 ExplicitTop = 57 - ExplicitWidth = 137 - Width = 137 + ExplicitWidth = 155 + Width = 155 end inherited ImporteTotal: TcxDBCurrencyEdit Left = 524 @@ -395,8 +375,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Style.IsFontAssigned = True ExplicitLeft = 524 ExplicitTop = 131 - ExplicitWidth = 137 - Width = 137 + ExplicitWidth = 225 + Width = 225 end inherited edtDescuento: TcxDBSpinEdit Top = 131 @@ -417,8 +397,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Style.IsFontAssigned = True ExplicitLeft = 523 ExplicitTop = 30 - ExplicitWidth = 92 - Width = 92 + ExplicitWidth = 226 + Width = 226 end inherited edtRE: TcxDBSpinEdit Left = 523 @@ -434,15 +414,15 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Style.IsFontAssigned = True ExplicitLeft = 594 ExplicitTop = 84 - ExplicitWidth = 56 - Width = 56 + ExplicitWidth = 155 + Width = 155 end inherited eImporteNeto: TcxDBCurrencyEdit Top = 30 Style.IsFontAssigned = True ExplicitTop = 30 - ExplicitWidth = 147 - Width = 147 + ExplicitWidth = 291 + Width = 291 end inherited ePorte: TcxDBCurrencyEdit Top = 158 @@ -451,16 +431,16 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Style.IsFontAssigned = True OnEditing = frViewTotales1ePorteEditing ExplicitTop = 158 - ExplicitWidth = 147 - Width = 147 + ExplicitWidth = 291 + Width = 291 end inherited eIVA: TcxDBLookupComboBox Top = 57 Properties.OnValidate = frViewTotales1eIVAPropertiesValidate Style.Color = clInfoBk ExplicitTop = 57 - ExplicitWidth = 134 - Width = 134 + ExplicitWidth = 153 + Width = 153 end inherited bTiposIVA: TButton Left = 263 @@ -473,8 +453,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Top = 84 Properties.OnEditValueChanged = frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged ExplicitTop = 84 - ExplicitWidth = 219 - Width = 219 + ExplicitWidth = 291 + Width = 291 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group1: TdxLayoutGroup diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas index 3a0f24f8..5ab6a158 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas @@ -143,7 +143,9 @@ begin if (Application.MessageBox(PChar(ACadena), 'Atención', MB_YESNO) = IDYES) then 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; end; end; diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index c5210607..d97593ce 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -38,7 +38,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Width = 640 ExplicitWidth = 640 inherited tbxMain: TTBXToolbar - ExplicitWidth = 632 + ExplicitWidth = 640 object TBXSubmenuItem2: TTBXSubmenuItem [0] Caption = 'Nuevo' DisplayMode = nbdmImageAndText @@ -133,18 +133,18 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Width = 640 ExplicitWidth = 640 inherited txtFiltroTodo: TcxTextEdit - ExplicitWidth = 457 - Width = 457 + ExplicitWidth = 543 + Width = 543 end inherited edtFechaIniFiltro: TcxDateEdit - ExplicitWidth = 240 - Width = 240 + ExplicitWidth = 263 + Width = 263 end inherited edtFechaFinFiltro: TcxDateEdit Left = 367 ExplicitLeft = 367 - ExplicitWidth = 244 - Width = 244 + ExplicitWidth = 263 + Width = 263 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -3355,8 +3355,8 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} Instruction.Text = - 'Las siguientes facturas no han podido ser eliminadas, porque est' + - #225'n parcialmente pagadas o totalmete pagadas' + 'Las siguientes facturas no han podido ser eliminadas, porque tie' + + 'nen recibos con pagos o devoluciones emitidas' Instruction.Glyph.Data = { 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 00001C0806000000720DDF940000000970485973000017120000171201679FD2 diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas index 037bf147..9d227f70 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas @@ -173,13 +173,21 @@ begin if Assigned(AFacturas) then 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 begin if (AFacturas.DataTable.RecordCount > 0) then begin with AFacturas.DataTable do begin + JsListaFacturasNoEliminadas.Content.Clear; First; while not EOF do begin diff --git a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas index 07b2c389..328d5b3e 100644 --- a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas +++ b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas @@ -833,8 +833,14 @@ begin if bEliminado then begin - AFactura.DataTable.ApplyUpdates; - Result := True; + try + 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 else Result := False; diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm index ea81ea6e..f6576efb 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm @@ -106,42 +106,44 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor 732 314) inherited eReferencia: TcxDBTextEdit - ExplicitWidth = 159 - Width = 159 + ExplicitWidth = 191 + Width = 191 end inherited edtFecha: TcxDBDateEdit - ExplicitWidth = 159 - Width = 159 + ExplicitWidth = 191 + Width = 191 end inherited memObservaciones: TcxDBMemo - ExplicitWidth = 301 - ExplicitHeight = 159 - Height = 159 - Width = 301 + ExplicitWidth = 671 + Width = 671 end inherited cbFormaPago: TcxDBLookupComboBox - ExplicitWidth = 169 - Width = 169 + ExplicitWidth = 53 + Width = 53 end inherited bFormasPago: TButton Left = 183 ExplicitLeft = 183 end inherited eReferenciaProveedor: TcxDBTextEdit - ExplicitWidth = 316 - Width = 316 + ExplicitWidth = 191 + Width = 191 end inherited frViewTienda1: TfrViewTienda - Width = 320 - ExplicitWidth = 320 + Width = 293 + ExplicitWidth = 293 inherited dxLayoutControl1: TdxLayoutControl - Width = 320 + Width = 293 inherited cbTienda: TcxComboBox - ExplicitWidth = 376 - Width = 376 + ExplicitWidth = 232 + Width = 232 end end end + inherited edtFechaVencimiento: TcxDBDateEdit + ExplicitWidth = 191 + Width = 191 + end inherited frViewProveedorFactura1: TfrViewProveedorFactura Left = 343 Width = 350 @@ -156,27 +158,27 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor end inherited edtlNombre: TcxDBTextEdit DataBinding.DataSource = dsDataTable - ExplicitWidth = 266 - Width = 266 + ExplicitWidth = 259 + Width = 259 end inherited edtNIFCIF: TcxDBTextEdit DataBinding.DataSource = dsDataTable - ExplicitWidth = 266 - Width = 266 + ExplicitWidth = 259 + Width = 259 end inherited edtCalle: TcxDBTextEdit DataBinding.DataSource = dsDataTable - ExplicitWidth = 266 - Width = 266 + ExplicitWidth = 259 + Width = 259 end inherited edtPoblacion: TcxDBTextEdit DataBinding.DataSource = dsDataTable - ExplicitWidth = 148 - Width = 148 + ExplicitWidth = 141 + Width = 141 end inherited edtProvincia: TcxDBTextEdit - ExplicitWidth = 266 - Width = 266 + ExplicitWidth = 259 + Width = 259 end inherited edtCodigoPostal: TcxDBTextEdit Left = 258 @@ -188,8 +190,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor ExplicitLeft = 142 end inherited cxDBTextEdit1: TcxDBTextEdit - ExplicitWidth = 276 - Width = 276 + ExplicitWidth = 259 + Width = 259 end end end @@ -199,10 +201,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor object pagContenido: TTabSheet Caption = 'Contenido' ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frViewDetallesFacturaProveedor1: TfrViewDetallesFacturaProveedor Left = 0 Top = 0 @@ -320,14 +318,14 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor inherited cbSubCuentas: TcxComboBox Left = 92 ExplicitLeft = 92 - ExplicitWidth = 376 - Width = 376 + ExplicitWidth = 407 + Width = 407 end inherited eContabilizar: TcxCheckBox Left = 505 ExplicitLeft = 505 - ExplicitWidth = 203 - Width = 203 + ExplicitWidth = 217 + Width = 217 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Item1: TdxLayoutItem @@ -394,8 +392,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Top = 131 Style.IsFontAssigned = True ExplicitTop = 131 - ExplicitWidth = 93 - Width = 93 + ExplicitWidth = 207 + Width = 207 end inherited ImporteIVA: TcxDBCurrencyEdit Left = 581 @@ -403,8 +401,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Style.IsFontAssigned = True ExplicitLeft = 581 ExplicitTop = 57 - ExplicitWidth = 137 - Width = 137 + ExplicitWidth = 143 + Width = 143 end inherited ImporteTotal: TcxDBCurrencyEdit Left = 511 @@ -412,8 +410,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Style.IsFontAssigned = True ExplicitLeft = 511 ExplicitTop = 131 - ExplicitWidth = 137 - Width = 137 + ExplicitWidth = 213 + Width = 213 end inherited edtDescuento: TcxDBSpinEdit Top = 131 @@ -434,8 +432,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Style.IsFontAssigned = True ExplicitLeft = 510 ExplicitTop = 30 - ExplicitWidth = 92 - Width = 92 + ExplicitWidth = 214 + Width = 214 end inherited edtRE: TcxDBSpinEdit Left = 510 @@ -451,15 +449,15 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Style.IsFontAssigned = True ExplicitLeft = 581 ExplicitTop = 84 - ExplicitWidth = 56 - Width = 56 + ExplicitWidth = 143 + Width = 143 end inherited eImporteNeto: TcxDBCurrencyEdit Top = 30 Style.IsFontAssigned = True ExplicitTop = 30 - ExplicitWidth = 147 - Width = 147 + ExplicitWidth = 278 + Width = 278 end inherited ePorte: TcxDBCurrencyEdit Top = 158 @@ -468,16 +466,16 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Style.IsFontAssigned = True OnEditing = frViewTotales1ePorteEditing ExplicitTop = 158 - ExplicitWidth = 147 - Width = 147 + ExplicitWidth = 278 + Width = 278 end inherited eIVA: TcxDBLookupComboBox Top = 57 Properties.OnValidate = frViewTotales1eIVAPropertiesValidate Style.Color = clInfoBk ExplicitTop = 57 - ExplicitWidth = 134 - Width = 134 + ExplicitWidth = 140 + Width = 140 end inherited bTiposIVA: TButton Left = 250 @@ -490,8 +488,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Top = 84 Properties.OnEditValueChanged = frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged ExplicitTop = 84 - ExplicitWidth = 219 - Width = 219 + ExplicitWidth = 278 + Width = 278 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup LookAndFeel = frViewFacturaProveedor1.dxLayoutOfficeLookAndFeel1 diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas index 7d2f528f..2c0408d1 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas @@ -140,7 +140,9 @@ begin if (Application.MessageBox(PChar(AMensaje), 'Atención', MB_YESNO) = IDYES) then 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; end; end; diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm index 29b51895..73a2fba7 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm @@ -38,7 +38,7 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor Width = 640 ExplicitWidth = 640 inherited tbxMain: TTBXToolbar - ExplicitWidth = 632 + ExplicitWidth = 640 object TBXSubmenuItem2: TTBXSubmenuItem [0] Caption = 'Nuevo' DisplayMode = nbdmImageAndText @@ -131,18 +131,18 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor Width = 640 ExplicitWidth = 640 inherited txtFiltroTodo: TcxTextEdit - ExplicitWidth = 457 - Width = 457 + ExplicitWidth = 543 + Width = 543 end inherited edtFechaIniFiltro: TcxDateEdit - ExplicitWidth = 240 - Width = 240 + ExplicitWidth = 263 + Width = 263 end inherited edtFechaFinFiltro: TcxDateEdit Left = 367 ExplicitLeft = 367 - ExplicitWidth = 244 - Width = 244 + ExplicitWidth = 263 + Width = 263 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -3353,8 +3353,8 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} Instruction.Text = - 'Las siguientes facturas no han podido ser eliminadas, porque est' + - #225'n parcialmente pagadas o totalmete pagadas' + 'Las siguientes facturas no han podido ser eliminadas, porque tie' + + 'nen recibos con pagos o devoluciones emitidas' Instruction.Glyph.Data = { 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 00001C0806000000720DDF940000000970485973000017120000171201679FD2 diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas index 632e2ac4..916a64c5 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas @@ -180,13 +180,21 @@ begin if Assigned(AFacturas) then 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 begin if (AFacturas.DataTable.RecordCount > 0) then begin with AFacturas.DataTable do begin + JsListaFacturasNoEliminadas.Content.Clear; First; while not EOF do begin diff --git a/Source/Modulos/Gestion de documentos/Controller/GestorDocumentos_controller.drc b/Source/Modulos/Gestion de documentos/Controller/GestorDocumentos_controller.drc index f6a1d26a..37e33b81 100644 --- a/Source/Modulos/Gestion de documentos/Controller/GestorDocumentos_controller.drc +++ b/Source/Modulos/Gestion de documentos/Controller/GestorDocumentos_controller.drc @@ -13,4 +13,4 @@ BEGIN END /* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Controller\GestorDocumentos_Controller.res */ -/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf36A.tmp */ +/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf1F7.tmp */ diff --git a/Source/Modulos/Gestion de documentos/Data/GestorDocumentos_data.drc b/Source/Modulos/Gestion de documentos/Data/GestorDocumentos_data.drc index 0febc65f..fe1e48bd 100644 --- a/Source/Modulos/Gestion de documentos/Data/GestorDocumentos_data.drc +++ b/Source/Modulos/Gestion de documentos/Data/GestorDocumentos_data.drc @@ -14,4 +14,4 @@ END /* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Data\uDataModuleGestorDocumentos.dfm */ /* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Data\GestorDocumentos_data.res */ -/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf368.tmp */ +/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf1F5.tmp */ diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index 139a5bda..f7d64c69 100644 Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index bbf79d4f..5c63ebc5 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -16,7 +16,7 @@ BEGIN VALUE "FileVersion", "2.2.4.0\0" VALUE "ProductName", "FactuGES (Servidor)\0" VALUE "ProductVersion", "2.2.4.0\0" - VALUE "CompileDate", "lunes, 08 de septiembre de 2008 18:46\0" + VALUE "CompileDate", "viernes, 19 de septiembre de 2008 11:50\0" END END BLOCK "VarFileInfo"