From 58d221d24ff976041fcd9ccd38cada5a60e94f22 Mon Sep 17 00:00:00 2001 From: roberto Date: Tue, 12 Aug 2008 14:02:15 +0000 Subject: [PATCH] Arreglos varios git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@513 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Database/scripts/factuges.sql | 3 + Source/Cliente/FactuGES.rc | 8 +- Source/Cliente/FactuGES.res | Bin 172156 -> 171984 bytes .../uAlbaranesClienteController.pas | 2 +- .../Views/uEditorAlbaranesCliente.dfm | 1 + .../Views/uEditorAlbaranesCliente.pas | 2 +- .../Views/uViewArticulosProveedores.dfm | 2 + .../Views/uViewDetallesArticulosParaVenta.dfm | 102 ++-- .../FacturasCliente_Group.groupproj | 36 +- .../Views/FacturasCliente_view.dpk | Bin 1709 -> 1736 bytes .../Views/FacturasCliente_view.dproj | 1 + .../Views/uEditorFacturasCliente.dfm | 35 +- .../Views/uEditorFacturasCliente.pas | 27 +- .../uPresupuestosClienteController.pas | 41 +- .../Views/uEditorPresupuestoCliente.dfm | 22 +- .../Views/uEditorPresupuestoCliente.pas | 17 +- .../Views/uEditorPresupuestosCliente.dfm | 20 +- .../Views/uEditorPresupuestosCliente.pas | 22 +- .../AlbCli_FacCli_relation.dpk | 2 +- .../AlbCli_FacCli_relation.dproj | 200 +----- .../AlbCli_FacCli_relation.rc | 22 + .../AlbCli_FacCli_relation.res | Bin 32 -> 384 bytes .../uGenerarFacturasCliAlbCliUtils.dfm | 2 +- .../uGenerarFacturasCliAlbCliUtils.pas | 32 +- .../uGenerarFacturasCliPreCliUtils.dfm | 8 +- .../uGenerarFacturasCliPreCliUtils.pas | 72 ++- Source/Servidor/FactuGES_Server.RES | Bin 23484 -> 23204 bytes Source/Servidor/FactuGES_Server.dproj | 572 +++++++++--------- Source/Servidor/FactuGES_Server.rc | 2 +- 29 files changed, 577 insertions(+), 676 deletions(-) diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index 5abaa879..5883cc8b 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -3105,6 +3105,9 @@ ALTER TABLE PAGOS_CLIENTE ADD CONSTRAINT FK_PAGOS_CLIENTE FOREIGN KEY (ID_RECIBO ALTER TABLE PAGOS_PROVEEDOR ADD CONSTRAINT FK_PAGOS_PROVEEDOR FOREIGN KEY (ID_RECIBO) REFERENCES RECIBOS_PROVEEDOR (ID); ALTER TABLE PEDIDOS_CLIENTE ADD CONSTRAINT FK_PEDIDOS_CLIENTE FOREIGN KEY (ID_CLIENTE) REFERENCES CONTACTOS (ID); ALTER TABLE PEDIDOS_CLIENTE ADD CONSTRAINT FK_PEDIDOS_CLIENTE_ID_EMPRESA FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID); +ALTER TABLE PRESUPUESTOS_CLIENTE ADD CONSTRAINT FK_PRESUPUESTOS_CLIENTE_1 FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID); +ALTER TABLE PRESUPUESTOS_CLIENTE ADD CONSTRAINT FK_PRESUPUESTOS_CLIENTE_2 FOREIGN KEY (ID_CLIENTE) REFERENCES CONTACTOS (ID); +ALTER TABLE PRESUPUESTOS_CLIENTE ADD CONSTRAINT FK_PRESUPUESTOS_CLIENTE_3 FOREIGN KEY (ID_FACTURA) REFERENCES FACTURAS_CLIENTE (ID) ON DELETE SET NULL ON UPDATE SET NULL; ALTER TABLE PEDIDOS_PROVEEDOR ADD CONSTRAINT FK_PEDIDOS_PROVEEDOR FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID); ALTER TABLE PEDIDOS_PROVEEDOR ADD CONSTRAINT FK_PEDIDOS_PROVEEDOR2 FOREIGN KEY (ID_PROVEEDOR) REFERENCES CONTACTOS (ID); ALTER TABLE RECIBOS_CLIENTE ADD CONSTRAINT FK_RECIBOS_CLIENTE FOREIGN KEY (ID_FACTURA) REFERENCES FACTURAS_CLIENTE (ID) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc index aa8cfae5..855f2de1 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Factuges.ico" 1 VERSIONINFO -FILEVERSION 1,2,1,0 -PRODUCTVERSION 1,2,1,0 +FILEVERSION 1,2,2,0 +PRODUCTVERSION 1,2,2,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,10 +13,10 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "1.2.1.0\0" + VALUE "FileVersion", "1.2.2.0\0" VALUE "InternalName", "FactuGES\0" VALUE "ProductName", "FactuGES\0" - VALUE "ProductVersion", "1.2.1.0\0" + VALUE "ProductVersion", "1.2.2.0\0" END END BLOCK "VarFileInfo" diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index aae749148340f18f990d36b41e4a98ed33180e0c..7918e9037c6fee7ee63cc06573b5369a84ef89b1 100644 GIT binary patch delta 284 zcmY+9u?m7v6o$Wh(^8WVS{#K48XA0oK$;vI+AC=2Eplk^0fIYeYeQpujg3A-b3+dh z)D=bPhr{9HKj(1%&)q3*PI3@eX=MA*b6gq;Ts#j1K0CAQ4H+Qu{mOfEq0>-mgFz5f z-q`}PC4H?+7}nkZdM%AvVG%`@Ihlh^99NVs!C}3w7mv^ilR>W142=e41!DdHmD>;tEIX)HG@NcfRLrFYZfmAo6~5nG^X zG>rCHg|(7-jB8-wc}B}@sFchjlWA3aztlEiy=08 + @@ -18,7 +19,9 @@ + + @@ -211,14 +214,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk index 087467d3a848916a68dd51c9aecf3c44017d662f..e93941aa4546f53b521b1e97b381190683abbe44 100644 GIT binary patch delta 21 ccmZ3>dxCdE4ikqCFPDNsKvC-ENTv`L07XFs#sB~S delta 12 TcmX@XyOwuD4%6m#CPx+kAK3&i diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj index 19da501b..c5c52675 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj @@ -54,6 +54,7 @@ +
fEditorElegirArticulosFacturaCliente
TForm diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index a7b36a22..02938df3 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -60,9 +60,6 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente inherited tbxMenu: TTBXToolbar ExplicitWidth = 640 end - inherited TBXTMain2: TTBXToolbar - Visible = True - end end inherited StatusBar: TJvStatusBar Top = 647 @@ -136,31 +133,25 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Width = 640 ExplicitWidth = 640 inherited txtFiltroTodo: TcxTextEdit - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 543 - Width = 543 + ExplicitWidth = 600 + Width = 600 end inherited edtFechaIniFiltro: TcxDateEdit - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 263 Width = 263 end inherited edtFechaFinFiltro: TcxDateEdit Left = 367 - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 367 ExplicitWidth = 263 Width = 263 end + inherited eLista: TcxComboBox + Left = 667 + ExplicitLeft = 667 + ExplicitWidth = 20 + Width = 20 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 640 @@ -1858,8 +1849,16 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Default = True end item - Caption = 'Utilizar uno o m'#225's albaranes de cliente.' + Caption = 'Utilizar uno o m'#225's presupuestos de cliente.' Value = 200 + Info.Strings = ( + + 'Puede utilizar uno o m'#225's presupuestos existentes para dar de alt' + + 'a una factura nueva.') + end + item + Caption = 'Utilizar uno o m'#225's albaranes de cliente.' + Value = 300 Info.Strings = ( 'Puede utilizar uno o m'#225's albaranes existentes para dar de alta l' + diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas index a65560b9..2256e7ae 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas @@ -72,8 +72,7 @@ implementation uses uDataModuleFacturasCliente, uDataModuleUsuarios, uAlbaranesClienteController, uFactuGES_App, -// uPedidosClienteController, uBizPedidosCliente, - uGenerarFacturasCliAlbCliUtils, + uGenerarFacturasCliAlbCliUtils, uGenerarFacturasCliPreCliUtils, uBizAlbaranesCliente, uEditorBase, uGridStatusUtils, uDBSelectionListUtils, udialogUtils; @@ -294,24 +293,12 @@ begin if Respuesta <> IDCANCEL then begin case JsNuevaFacturaDialog.CustomButtonResult of - 300 : begin // Utilizar un pedido - ShowMessage('A COMPLETAR'); - {FPedidosClienteController := TPedidosClienteController.Create; - try - APedido := FPedidosClienteController.ElegirPedidos(FPedidosClienteController.BuscarPendientes, - 'Elija el pedido de cliente que desea utilizar para dar de alta la factura.' - + #10#13 + 'Tenga en cuenta que sólo se podrán utilizar pedidos que no tengan ningún albarán ya asociado.', False); - if Assigned(APedido) then - begin - if FController.Anadir(Facturas, APedido) then - FController.Ver(Facturas); - end; - finally - FPedidosClienteController := NIL; - end;} - end; - 200 : begin // Utilizar albaranes - GenerarFacturaCli; + 200 : begin // Utilizar presupuestos + GenerarFacturaCliPre; + actRefrescar.Execute; + end; + 300 : begin // Utilizar albaranes + GenerarFacturaCliAlb; actRefrescar.Execute; end; 100 : begin // Albaran nuevo vacio diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas index 9ee37d87..63b548d4 100644 --- a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas +++ b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas @@ -23,7 +23,8 @@ type procedure RecuperarCliente(APresupuesto : IBizPresupuestoCliente); function Buscar(const ID: Integer): IBizPresupuestoCliente; function BuscarTodos: IBizPresupuestoCliente; - function BuscarPendientes : IBizPresupuestoCliente; + function BuscarAceptados : IBizPresupuestoCliente; + function BuscarSinFacturar : IBizPresupuestoCliente; procedure Ver(APresupuesto : IBizPresupuestoCliente); procedure VerTodos(APresupuestos: IBizPresupuestoCliente); procedure VerDireccionEntrega(APresupuesto : IBizPresupuestoCliente); @@ -92,7 +93,8 @@ type function Anadir(APresupuesto : IBizPresupuestoCliente) : Boolean; function Buscar(const ID: Integer): IBizPresupuestoCliente; function BuscarTodos: IBizPresupuestoCliente; - function BuscarPendientes : IBizPresupuestoCliente; + function BuscarAceptados : IBizPresupuestoCliente; + function BuscarSinFacturar : IBizPresupuestoCliente; function Nuevo : IBizPresupuestoCliente; procedure Ver(APresupuesto : IBizPresupuestoCliente); procedure VerTodos(APresupuestos: IBizPresupuestoCliente); @@ -152,7 +154,7 @@ begin FiltrarEmpresa(Result); end; -function TPresupuestosClienteController.BuscarPendientes: IBizPresupuestoCliente; +function TPresupuestosClienteController.BuscarAceptados: IBizPresupuestoCliente; var Condicion: TDAWhereExpression; begin @@ -163,7 +165,7 @@ begin with Result.DataTable.DynamicWhere do begin // (SITUACION <> RECIBIDO) - Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteSITUACION), NewConstant(SITUACION_PRESUPUESTO_PENDIENTE, datString), dboNotEqual); + Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteSITUACION), NewConstant(SITUACION_PRESUPUESTO_ACEPTADO, datString), dboEqual); if IsEmpty then Expression := Condicion @@ -175,6 +177,30 @@ begin end; end; +function TPresupuestosClienteController.BuscarSinFacturar: IBizPresupuestoCliente; +var + Condicion: TDAWhereExpression; +begin + ShowHourglassCursor; + try + Result := BuscarAceptados; + + with Result.DataTable.DynamicWhere do + begin + // (ID_FACTURA = NULL) + Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteID_FACTURA), NewNull(), dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + finally + HideHourglassCursor; + end; +end; + procedure TPresupuestosClienteController.CopiarDireccionEnvio( const ADireccionEnvio: IBizDireccionesContacto; APresupuesto: IBizPresupuestoCliente); {var @@ -300,9 +326,10 @@ begin if Assigned(APresupuesto.Cliente) then APresupuesto.Cliente.DataTable.Active := True; - if (APresupuesto.ID_Cliente < 0) or - (not Assigned(APresupuesto.Cliente)) or - (APresupuesto.Cliente.IsEmpty) then + if (APresupuesto.ID_Cliente <= 0) then + // Si hay altas automáticas no hay objeto Cliente pero sí hay ID_CLIENTE +{ (not Assigned(APresupuesto.Cliente)) or + (APresupuesto.Cliente.IsEmpty) then} raise Exception.Create('Debe indicar el cliente de este presupuesto'); if (EsFechaVacia(APresupuesto.FECHA_PRESUPUESTO)) then diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm index 4b46a351..5019f595 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm @@ -160,7 +160,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 743 Height = 414 TabOrder = 1 - OnChange = pgPaginasChange + OnChanging = pgPaginasChanging ExplicitWidth = 743 ExplicitHeight = 414 inherited pagGeneral: TTabSheet @@ -204,13 +204,14 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ExplicitLeft = 278 ExplicitTop = 0 end - inherited ToolButton14: TToolButton [4] + inherited ToolButton14: TToolButton Left = 334 Top = 0 + Wrap = False ExplicitLeft = 334 ExplicitTop = 0 end - inherited FontName: TJvFontComboBox [5] + inherited FontName: TJvFontComboBox Left = 399 Top = 0 ExplicitLeft = 399 @@ -238,44 +239,43 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ExplicitTop = 0 ExplicitHeight = 27 end - inherited ToolButton6: TToolButton [9] + inherited ToolButton6: TToolButton Left = 0 Top = 27 ExplicitLeft = 0 ExplicitTop = 27 end - inherited ToolButton7: TToolButton [10] + inherited ToolButton7: TToolButton Left = 66 Top = 27 ExplicitLeft = 66 ExplicitTop = 27 end - inherited ToolButton8: TToolButton [11] + inherited ToolButton8: TToolButton Left = 133 Top = 27 ExplicitLeft = 133 ExplicitTop = 27 end - inherited ToolButton12: TToolButton [12] + inherited ToolButton12: TToolButton Left = 216 Top = 27 ExplicitLeft = 216 ExplicitTop = 27 - ExplicitHeight = 22 end - inherited ToolButton9: TToolButton [13] + inherited ToolButton9: TToolButton Left = 224 Top = 27 ExplicitLeft = 224 ExplicitTop = 27 end - inherited ToolButton10: TToolButton [14] + inherited ToolButton10: TToolButton Left = 369 Top = 27 ExplicitLeft = 369 ExplicitTop = 27 end - inherited ToolButton11: TToolButton [15] + inherited ToolButton11: TToolButton Left = 494 Top = 27 ExplicitLeft = 494 diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas index aabe0046..42de6d04 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas @@ -46,9 +46,9 @@ type procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction); procedure frViewTotales1ePortePropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); - procedure pgPaginasChange(Sender: TObject); procedure actGenerarCertificadoExecute(Sender: TObject); procedure actGenerarCertificadoUpdate(Sender: TObject); + procedure pgPaginasChanging(Sender: TObject; var AllowChange: Boolean); private procedure RecalcularPortePorUnidad; @@ -287,19 +287,18 @@ begin end; end; -procedure TfEditorPresupuestoCliente.pgPaginasChange(Sender: TObject); +procedure TfEditorPresupuestoCliente.pgPaginasChanging(Sender: TObject; + var AllowChange: Boolean); +var + ACadena : String; begin inherited; if (not Assigned(FPresupuesto)) or (FPresupuesto.ID_CLIENTE = 0) then begin - if (pgPaginas.ActivePageIndex = pagContenido.PageIndex) then - begin - pagContenido.Enabled := False; - ShowWarningMessage('Antes de introducir conceptos debe elegir un cliente para este presupuesto'); - end; + ACadena := 'Antes de introducir conceptos debe elegir un cliente para este presupuesto'; + ShowWarningMessage(ACadena); + AllowChange := False; end - else - pagContenido.Enabled := True; end; procedure TfEditorPresupuestoCliente.PonerTitulos(const ATitulo: string); diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm index e65f8620..fca7a550 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm @@ -144,14 +144,17 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente end end inherited TBXTMain2: TTBXToolbar + Left = 343 + DockPos = 343 Visible = True + ExplicitLeft = 343 ExplicitWidth = 236 object TBXItem42: TTBXItem Action = actGenerarCertificado DisplayMode = nbdmImageAndText end object TBXItem40: TTBXItem - Action = actGenerar + Action = actGenerarFactura DisplayMode = nbdmImageAndText end end @@ -178,20 +181,11 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente end object actGenerarFactura: TAction Category = 'Acciones' - Caption = 'Generar factura de cliente' - Enabled = False + Caption = 'Generar factura' ImageIndex = 24 - Visible = False OnExecute = actGenerarFacturaExecute OnUpdate = actGenerarFacturaUpdate end - object actGenerar: TAction - Category = 'Acciones' - Caption = 'Generar factura' - ImageIndex = 26 - OnExecute = actGenerarExecute - OnUpdate = actGenerarUpdate - end object actGenerarCertificado: TAction Category = 'Acciones' Caption = 'Generar certificado' @@ -1883,7 +1877,9 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente Action = actGenerarCertificado end object Generar2: TMenuItem [7] - Action = actGenerar + Caption = 'Generar factura' + ImageIndex = 26 + OnClick = actGenerarExecute end object N4: TMenuItem [8] Caption = '-' diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas index aff34a71..4d7e071b 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas @@ -24,7 +24,6 @@ type TBXItem38: TTBXItem; TBXItem39: TTBXItem; N4: TMenuItem; - actGenerar: TAction; Generar2: TMenuItem; JsGenerarDialog: TJSDialog; JsPrevisualizarDialog: TJSDialog; @@ -42,7 +41,6 @@ type procedure actGenerarFacturaExecute(Sender: TObject); procedure actGenerarPresupuestoProvExecute(Sender: TObject); procedure actGenerarExecute(Sender: TObject); - procedure actGenerarUpdate(Sender: TObject); procedure actGenerarCertificadoUpdate(Sender: TObject); procedure actGenerarCertificadoExecute(Sender: TObject); @@ -148,8 +146,6 @@ procedure TfEditorPresupuestosCliente.actGenerarExecute(Sender: TObject); // Respuesta : Integer; begin inherited; - actGenerarFactura.Execute; - { Respuesta := JsGenerarDialog.Execute; @@ -173,9 +169,9 @@ begin inherited; if (ShowConfirmMessage('Generar factura', Format('¿Desea copiar todos los conceptos del presupuesto %s a la factura?', [Presupuestos.REFERENCIA])) = IDYES) then - GenerarFacturaCli(Presupuestos.ID) + GenerarFacturaCliPre(Presupuestos.ID) else - GenerarFacturaCli(Presupuestos.ID, False); + GenerarFacturaCliPre(Presupuestos.ID, False); actRefrescar.Execute; end; @@ -184,8 +180,10 @@ procedure TfEditorPresupuestosCliente.actGenerarFacturaUpdate(Sender: TObject); begin inherited; (Sender as TAction).Enabled := HayDatos + and not (ViewGrid.NumSeleccionados > 1) + and (FPresupuestos.FACTURA = '') and ViewGrid.esSeleccionCeldaDatos - and (FPresupuestos.SITUACION = SITUACION_PRESUPUESTO_PENDIENTE); + and (FPresupuestos.SITUACION = SITUACION_PRESUPUESTO_ACEPTADO); end; procedure TfEditorPresupuestosCliente.actGenerarPresupuestoProvExecute(Sender: TObject); @@ -194,16 +192,6 @@ begin // GenerarPresupuestosProv(FPresupuestos); end; -procedure TfEditorPresupuestosCliente.actGenerarUpdate(Sender: TObject); -begin - inherited; - - (Sender as TAction).Enabled := HayDatos and - not (ViewGrid.NumSeleccionados > 1) and - ViewGrid.esSeleccionCeldaDatos and - (FPresupuestos.SITUACION <> SITUACION_PRESUPUESTO_ANULADO); -end; - procedure TfEditorPresupuestosCliente.AsignarVista; begin ViewGrid := CreateView(TfrViewPresupuestosCliente) as IViewPresupuestosCliente; diff --git a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/AlbCli_FacCli_relation.dpk b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/AlbCli_FacCli_relation.dpk index 717b8ac8..d72b01ad 100644 --- a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/AlbCli_FacCli_relation.dpk +++ b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/AlbCli_FacCli_relation.dpk @@ -31,7 +31,7 @@ requires FacturasCliente_controller; contains - uGenerarFacturasCliAlbCliUtils in 'uGenerarFacturasCliAlbCliUtils.pas' {dmGenerarFacturasCli}, + uGenerarFacturasCliAlbCliUtils in 'uGenerarFacturasCliAlbCliUtils.pas' {dmGenerarFacturasCliAlb}, uGenerarAlbaranesCliFacCliUtils in 'uGenerarAlbaranesCliFacCliUtils.pas' {dmGenerarAlbaranesCli}; end. diff --git a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/AlbCli_FacCli_relation.dproj b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/AlbCli_FacCli_relation.dproj index cf649bc8..f907d9f6 100644 --- a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/AlbCli_FacCli_relation.dproj +++ b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/AlbCli_FacCli_relation.dproj @@ -39,188 +39,7 @@ Delphi.Personality Package - - False - True - False - - - False - False - False - - - True - False - 1 - 0 - 0 - 0 - False - False - False - False - False - 3082 - 1252 - - - - - 1.0.0.0 - - - - - - 1.0.0.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 Borland Sample Components Delphi 1.0 Compatibility Components Borland MyBase DataAccess Components @@ -257,30 +76,25 @@ SMExport suite: data export from dataset. Written by Mike Shkolnik/Scalabium, 1998-2004. Intraweb 8.0 Design Package for Borland Development Studio 2006 Internet Explorer Components - - - AlbCli_FacCli_relation.dpk - - + AlbCli_FacCli_relation.dpk MainSource - - - - + + + +
dmGenerarAlbaranesCli
-
dmGenerarFacturasCli
+
dmGenerarFacturasCliAlb
-