From 8da845aa8260833c931bdf8d28962d746cd44d3a Mon Sep 17 00:00:00 2001 From: roberto Date: Thu, 23 Oct 2014 09:16:09 +0000 Subject: [PATCH] Mascara libra git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES2/trunk@233 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2 --- Source/Informes/6/en/InfFacturaCliente.fr3 | 6 ++-- .../Views/uViewFacturasCliente.dfm | 16 ++++++--- .../Views/uViewFacturasCliente.pas | 23 +++++++------ .../uGenerarFacturasProPreCliUtils.pas | 1 - .../uGenerarPedidosCliUtils.dfm | 6 ++-- .../uGenerarPedidosCliUtils.pas | 32 +++++++++++++++--- .../Controller/TiposDocumento_controller.dcu | Bin 16263 -> 16263 bytes Source/Servidor/FactuGES_Server.RES | Bin 23208 -> 23208 bytes Source/Servidor/FactuGES_Server.rc | 2 +- 9 files changed, 57 insertions(+), 29 deletions(-) diff --git a/Source/Informes/6/en/InfFacturaCliente.fr3 b/Source/Informes/6/en/InfFacturaCliente.fr3 index fdc4d1b..d95f675 100644 --- a/Source/Informes/6/en/InfFacturaCliente.fr3 +++ b/Source/Informes/6/en/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -62,9 +62,9 @@ - + - + diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm index 7810dfe..5db86a5 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm @@ -185,6 +185,10 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente DataBinding.FieldName = 'REFERENCIA_COMISION' Width = 54 end + object cxGridViewPAIS: TcxGridDBColumn + Caption = 'Pa'#237's' + DataBinding.FieldName = 'PAIS' + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todas' @@ -273,7 +277,7 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente object TBXSeparatorItem1: TTBXSeparatorItem end object TBXItem2: TTBXItem - Action = actProvincia + Action = actPais end end end @@ -303,15 +307,17 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente end end inherited ActionList1: TActionList + Left = 192 + Top = 368 object actCliente: TAction Caption = 'Cliente' OnExecute = actClienteExecute OnUpdate = actClienteUpdate end - object actProvincia: TAction - Caption = 'Provincia' - OnExecute = actProvinciaExecute - OnUpdate = actProvinciaUpdate + object actPais: TAction + Caption = 'Pa'#237's' + OnExecute = actPaisExecute + OnUpdate = actPaisUpdate end end inherited GridPNGImageList: TPngImageList diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas index 2d81329..d9a0239 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas @@ -50,7 +50,7 @@ type cxStylePendientes: TcxStyle; cxStyleParciales: TcxStyle; actCliente: TAction; - actProvincia: TAction; + actPais: TAction; TBXItem2: TTBXItem; TBXSeparatorItem1: TTBXSeparatorItem; TBXItem3: TTBXItem; @@ -60,13 +60,14 @@ type cxGridViewIMPORTE_RETENCION: TcxGridDBColumn; cxGridViewRE: TcxGridDBColumn; cxGridViewIMPORTE_RE: TcxGridDBColumn; + cxGridViewPAIS: TcxGridDBColumn; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure actClienteExecute(Sender: TObject); - procedure actProvinciaExecute(Sender: TObject); - procedure actProvinciaUpdate(Sender: TObject); + procedure actPaisExecute(Sender: TObject); + procedure actPaisUpdate(Sender: TObject); procedure actClienteUpdate(Sender: TObject); procedure cxGridViewDataControllerCompare( ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2, @@ -124,24 +125,24 @@ begin (Sender as TAction).Checked := not (cxGridViewNOMBRE.GroupIndex < 0); end; -procedure TfrViewFacturasCliente.actProvinciaExecute(Sender: TObject); +procedure TfrViewFacturasCliente.actPaisExecute(Sender: TObject); begin - if (cxGridViewPROVINCIA.GroupIndex < 0) then + if (cxGridViewPAIS.GroupIndex < 0) then begin - cxGridViewPROVINCIA.GroupIndex := cxGridView.GroupedColumnCount; - cxGridViewPROVINCIA.Visible := False; + cxGridViewPAIS.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewPAIS.Visible := False; end else begin - cxGridViewPROVINCIA.GroupIndex := -1; - cxGridViewPROVINCIA.Visible := True; + cxGridViewPAIS.GroupIndex := -1; + cxGridViewPAIS.Visible := True; end; end; -procedure TfrViewFacturasCliente.actProvinciaUpdate(Sender: TObject); +procedure TfrViewFacturasCliente.actPaisUpdate(Sender: TObject); begin inherited; - (Sender as TAction).Checked := not (cxGridViewPROVINCIA.GroupIndex < 0); + (Sender as TAction).Checked := not (cxGridViewPAIS.GroupIndex < 0); end; procedure TfrViewFacturasCliente.AnadirFiltroFechas; diff --git a/Source/Modulos/Relaciones/Presupuestos de cliente - Facturas proforma/uGenerarFacturasProPreCliUtils.pas b/Source/Modulos/Relaciones/Presupuestos de cliente - Facturas proforma/uGenerarFacturasProPreCliUtils.pas index 726274a..dff5d6c 100644 --- a/Source/Modulos/Relaciones/Presupuestos de cliente - Facturas proforma/uGenerarFacturasProPreCliUtils.pas +++ b/Source/Modulos/Relaciones/Presupuestos de cliente - Facturas proforma/uGenerarFacturasProPreCliUtils.pas @@ -157,7 +157,6 @@ begin end; dmGenerarFacturasProPre.JsListaFacturasGeneradas.Execute; end; - Result := True; end; diff --git a/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.dfm b/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.dfm index d459e9b..02c1315 100644 --- a/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.dfm +++ b/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.dfm @@ -33,7 +33,7 @@ object dmGenerarPedidosCli: TdmGenerarPedidosCli FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} - Instruction.Text = 'Se ha generado el albar'#225'n de cliente' + Instruction.Text = 'Se ha generado el pedido de cliente' Instruction.Glyph.Data = { 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 00001C0806000000720DDF940000000970485973000017120000171201679FD2 @@ -66,10 +66,10 @@ object dmGenerarPedidosCli: TdmGenerarPedidosCli Instruction.Icon = tdiCustom CustomButtons = < item - Caption = 'Ver el albar'#225'n' + Caption = 'Ver el pedido' Value = 100 Info.Strings = ( - 'Mostrar el albar'#225'n que se ha creado') + 'Mostrar el pedido que se ha creado') end> ButtonBar.Buttons = [cbOK] ButtonBar.Cancel = cbOK diff --git a/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.pas b/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.pas index ff8b202..8c3f541 100644 --- a/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.pas +++ b/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.pas @@ -73,7 +73,6 @@ begin APedido.PAIS := APedido.Cliente.Direcciones.PAIS; APedido.PERSONA_CONTACTO := APedido.Cliente.Direcciones.PERSONA_CONTACTO; APedido.TELEFONO := APedido.Cliente.Direcciones.TELEFONO; - end; procedure CopiarArticulosPresupuesto(AOrigen: IBizDetallesPresupuestoCliente; @@ -173,7 +172,7 @@ end; function GenerarPedidoCliPre(APresupuesto : IBizPresupuestoCliente) : Boolean; overload; var - i: Integer; + ARespuesta : Integer; PedidosNuevos: IBizPedidoCliente; begin @@ -195,11 +194,33 @@ begin CopiarPresupuestoAPedido(APresupuesto, PedidosNuevos); CopiarArticulosPresupuesto(APresupuesto.Detalles, PedidosNuevos.Detalles); // PedidosNuevos.CalcularImporteTotal; - APedidosClienteController.Guardar(PedidosNuevos); +// APedidosClienteController.Guardar(PedidosNuevos); + //Sustituir por if de guardar + if APedidosClienteController.Guardar(PedidosNuevos) then + begin + with dmGenerarPedidosCli.JsListaPedidosGenerados do + begin + Instruction.Text := 'Se ha generado el pedido'; + Content.Clear; + Content.Add(Format('Se ha generado correctamente el pedido %s a partir del presupuesto de cliente' + #10#13, [PedidosNuevos.REFERENCIA])); + Execute; + + ARespuesta := CustomButtonResult; + case ARespuesta of + 100 : begin + // Ver el albarán + APedidosClienteController.Ver(PedidosNuevos); + end; + 200 : // Continuar; + end; + end; + end; + +{ if PedidosNuevos.DataTable.RecordCount = 1 then ShowInfoMessage('El pedido se ha dado de alta con el código ' + PedidosNuevos.REFERENCIA); -{ + else begin with dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Content do begin @@ -218,8 +239,9 @@ begin Result := True; end; } + finally - PedidosNuevos := NIL; +// PedidosNuevos := NIL; if Assigned(APresupuestosClienteController) then Finalizar; end; diff --git a/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu b/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu index 8079361ab003963c1e7ca86466558dccc57f87e9..54605f76a1b10d1879edbc5aed1ed3f3a1e9d82f 100644 GIT binary patch delta 36 pcmZp#Z?ET3W?&F%w`XAZ(Btenk;jPH(8*+?qXr9zyD?YF9stGR3km=L delta 36 pcmZp#Z?ET3W?&F%w`X9`nRn4;B99TXg`4q2M-3JbcVn)UJpjL?3d#Tg diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index ce9526bf8bebb5918eb8e4bfd9cbcbcd8eb1907e..5cfab3199ae4b716a89268dab66b3341c4f7cd3f 100644 GIT binary patch delta 15 WcmZ3nm2t&Z#tjisjOLRgqx=ChWCiR1 delta 15 WcmZ3nm2t&Z#tjisjAoM~qx=ChUj^#` diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index 2cf8d1c..e02defe 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -14,7 +14,7 @@ BEGIN BEGIN VALUE "FileVersion", "4.4.1.0\0" VALUE "ProductVersion", "4.4.1.0\0" - VALUE "CompileDate", "viernes, 03 de octubre de 2014 16:38\0" + VALUE "CompileDate", "viernes, 03 de octubre de 2014 17:38\0" END END BLOCK "VarFileInfo"