From f15978b7d5b874056e214a7e09fc714472c7252b Mon Sep 17 00:00:00 2001 From: david Date: Thu, 18 Dec 2008 15:00:03 +0000 Subject: [PATCH] =?UTF-8?q?General=20->=20revisi=C3=B3n=20en=20presupuesto?= =?UTF-8?q?s,=20albaranes,=20facturas=20y=20recibos=20para=20poder=20indic?= =?UTF-8?q?ar=20otra=20direcci=C3=B3n=20de=20cliente/persona=20de=20contac?= =?UTF-8?q?to=20cuando=20proceda.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@366 f4e31baf-9722-1c47-927c-6f952f962d4b --- Database/scripts/factuges.sql | 12 +- Source/Base/Utiles/uDataTableUtils.pas | 14 +- Source/Cliente/FactuGES.dproj | 8 +- Source/GUIBase/GUIBase.dproj | 62 +- Source/GUIBase/GUIBase.res | Bin 384 -> 4748 bytes .../Data/uDataModuleAlbaranesCliente.dfm | 10 + .../Model/AlbaranesCliente_model.dproj | 20 +- .../Model/schAlbaranesClienteClient_Intf.pas | 95 ++- .../Model/schAlbaranesClienteServer_Intf.pas | 51 +- .../Reports/uRptAlbaranesCliente_Server.dfm | 113 ++-- .../Servidor/srvAlbaranesCliente_Impl.dfm | 96 ++- .../Views/AlbaranesCliente_view.dpk | 3 +- .../Views/AlbaranesCliente_view.dproj | 12 + .../Views/uEditorAlbaranCliente.dfm | 52 +- .../Views/uEditorAlbaranCliente.pas | 104 ++- .../Views/uEditorAlbaranesCliente.dfm | 1 + .../Views/uEditorAlbaranesCliente.pas | 4 +- .../uEditorElegirArticulosAlbaranCliente.dfm | 3 +- .../uEditorElegirArticulosAlbaranCliente.pas | 2 +- .../Views/uViewAlbaranCliente.dfm | 633 ++++++++++-------- .../Views/uViewAlbaranCliente.pas | 118 +--- .../Views/uViewAlbaranDevCliente.dfm | 229 +++++-- .../Views/uViewAlbaranDevCliente.pas | 3 +- .../uViewDatosYSeleccionClienteAlbaran.dfm | 495 ++++++++++++++ .../uViewDatosYSeleccionClienteAlbaran.pas | 418 ++++++++++++ .../Articulos/Views/Articulos_view.dproj | 10 +- .../Views/uEditorElegirArticulos.dfm | 7 +- .../Controller/uContactosController.pas | 42 +- .../uDireccionesContactoController.pas | 45 +- .../Contactos/Data/uDataModuleContactos.pas | 25 + .../Model/Data/uIDataModuleContactos.pas | 1 + .../Views/FacturasCliente_view.dproj | 58 +- .../Views/FacturasCliente_view.res | Bin 384 -> 4748 bytes .../Views/uEditorFacturaCliente.dfm | 30 +- .../Views/uEditorFacturaCliente.pas | 23 +- .../Views/uViewFacturaCliente.dfm | 30 +- .../Views/uViewFacturaCliente.pas | 1 - .../Views/uEditorFacturaProveedor.dfm | 36 +- .../Views/uEditorFacturaProveedor.pas | 19 +- .../GestorDocumentos_controller.drc | 16 - .../Data/GestorDocumentos_data.drc | 17 - .../Data/uDataModulePresupuestosCliente.dfm | 4 + .../Model/PresupuestosCliente_model.dpk | Bin 1075 -> 1075 bytes .../Model/PresupuestosCliente_model.dproj | 18 +- .../schPresupuestosClienteClient_Intf.pas | 95 ++- .../schPresupuestosClienteServer_Intf.pas | 51 +- .../Servidor/srvPresupuestosCliente_Impl.dfm | 69 +- .../Views/PresupuestosCliente_view.dpk | Bin 2182 -> 2174 bytes .../Views/PresupuestosCliente_view.dproj | 34 +- .../Views/uEditorPresupuestoCliente.dfm | 51 +- .../Views/uEditorPresupuestoCliente.pas | 35 +- ...uViewDatosYSeleccionClientePresupuesto.dfm | 443 ++++++++++++ ...uViewDatosYSeleccionClientePresupuesto.pas | 413 ++++++++++++ .../Views/uViewPresupuestoCliente.dfm | 302 +++++---- .../Views/uViewPresupuestoCliente.pas | 51 +- .../Views/uEditorReciboCliente.dfm | 184 +++-- .../Views/uEditorReciboCliente.pas | 17 +- .../Views/uViewReciboCliente.dfm | 143 +++- .../Views/uEditorReciboProveedor.dfm | 110 +++ .../Views/uEditorReciboProveedor.pas | 17 +- .../Views/uViewReciboProveedor.dfm | 117 +++- Source/Servidor/FactuGES_Server.RES | Bin 23360 -> 5244 bytes Source/Servidor/FactuGES_Server.dproj | 560 ++++++++-------- Source/Servidor/FactuGES_Server.rc | 1 - 64 files changed, 4151 insertions(+), 1482 deletions(-) create mode 100644 Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.dfm create mode 100644 Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas delete mode 100644 Source/Modulos/Gestion de documentos/Controller/GestorDocumentos_controller.drc delete mode 100644 Source/Modulos/Gestion de documentos/Data/GestorDocumentos_data.drc create mode 100644 Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.dfm create mode 100644 Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.pas diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index 3c32f334..fb637abc 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -417,6 +417,7 @@ CREATE TABLE ALBARANES_CLIENTE ( ID_FACTURA TIPO_ID, TIPO VARCHAR(1), REFERENCIA VARCHAR(255), + ID_DIRECCION TIPO_ID, CALLE VARCHAR(255), CODIGO_POSTAL VARCHAR(10), POBLACION VARCHAR(255), @@ -1158,6 +1159,8 @@ CREATE TABLE PRESUPUESTOS_CLIENTE ( ID TIPO_ID NOT NULL, ID_EMPRESA TIPO_ID, ID_CLIENTE TIPO_ID, + ID_DIRECCION TIPO_ID, + PERSONA_CONTACTO VARCHAR(255), REFERENCIA VARCHAR(255), FECHA_PRESUPUESTO DATE, FECHA_DECISION DATE, @@ -1495,6 +1498,7 @@ CREATE VIEW V_ALBARANES_CLIENTE( REF_PEDIDO, ID_FACTURA, REF_FACTURA, + ID_DIRECCION, CALLE, CODIGO_POSTAL, POBLACION, @@ -1538,6 +1542,7 @@ SELECT PEDIDOS_CLIENTE.REFERENCIA AS REF_PEDIDO, ALBARANES_CLIENTE.ID_FACTURA, FACTURAS_CLIENTE.REFERENCIA AS REF_FACTURA, + ALBARANES_CLIENTE.ID_DIRECCION, ALBARANES_CLIENTE.CALLE, ALBARANES_CLIENTE.CODIGO_POSTAL, ALBARANES_CLIENTE.POBLACION, @@ -3270,6 +3275,7 @@ CREATE VIEW V_PRESUPUESTOS_CLIENTE( FECHA_DECISION, REFERENCIA, SITUACION, + ID_DIRECCION, ID_CLIENTE, NIF_CIF, NOMBRE, @@ -3303,7 +3309,8 @@ SELECT PRESUPUESTOS_CLIENTE.FECHA_PRESUPUESTO, PRESUPUESTOS_CLIENTE.FECHA_DECISION, PRESUPUESTOS_CLIENTE.REFERENCIA, - PRESUPUESTOS_CLIENTE.SITUACION, + PRESUPUESTOS_CLIENTE.SITUACION, + PRESUPUESTOS_CLIENTE.ID_DIRECCION, PRESUPUESTOS_CLIENTE.ID_CLIENTE, CONTACTOS.NIF_CIF, CONTACTOS.NOMBRE, @@ -3326,11 +3333,10 @@ SELECT PRESUPUESTOS_CLIENTE.IMPORTE_IVA, PRESUPUESTOS_CLIENTE.IMPORTE_TOTAL, PRESUPUESTOS_CLIENTE.ID_FORMA_PAGO, - PRESUPUESTOS_CLIENTE.id_tienda, + PRESUPUESTOS_CLIENTE.ID_TIENDA, COALESCE(EMPRESAS_TIENDAS.NOMBRE, 'Todas') AS TIENDA, PRESUPUESTOS_CLIENTE.ID_VENDEDOR, CONTACTOS2.NOMBRE AS VENDEDOR - FROM PRESUPUESTOS_CLIENTE LEFT OUTER JOIN CONTACTOS ON (PRESUPUESTOS_CLIENTE.ID_CLIENTE = CONTACTOS.ID) diff --git a/Source/Base/Utiles/uDataTableUtils.pas b/Source/Base/Utiles/uDataTableUtils.pas index 294300e0..9035c674 100644 --- a/Source/Base/Utiles/uDataTableUtils.pas +++ b/Source/Base/Utiles/uDataTableUtils.pas @@ -31,10 +31,12 @@ function CloneDataTable(const ASource : TDAMemDataTable; procedure DuplicarRegistro(ASource : TDADataTable; ATarget : TDADataTable; - Const WithPKKey: Boolean = False; Const WithFKKey: Boolean = False); + const WithPKKey: Boolean = False; const WithFKKey: Boolean = False; + const Insertar: Boolean = True); + procedure DuplicarRegistros(ASource : TDADataTable; ATarget : TDADataTable; AModo : TModoDuplicarRegistros; APermitirRepetidos: Boolean = True; - Const WithDeltas: Boolean = True; Const WithPKKey: Boolean = False; Const WithFKKey: Boolean = False); + const WithDeltas: Boolean = True; const WithPKKey: Boolean = False; const WithFKKey: Boolean = False); procedure DeleteAllTable(const ADataTable : TDADataTable); @@ -347,7 +349,7 @@ begin end; -procedure DuplicarRegistro(ASource : TDADataTable; ATarget : TDADataTable; Const WithPKKey: Boolean = False; Const WithFKKey: Boolean = False); +procedure DuplicarRegistro(ASource : TDADataTable; ATarget : TDADataTable; const WithPKKey: Boolean = False; const WithFKKey: Boolean = False; const Insertar: Boolean = True); var i, j: Integer; ATargetField: TDAField; @@ -380,7 +382,11 @@ begin else ADetailFields := Nil; - ATarget.Insert; + if Insertar then + ATarget.Insert + else + ATarget.Edit; + { Hay que desactivar los eventos para que dejan de funcionar las reglas de negocio y no nos interfieran en la copia de valores de los campos. } diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index c05b563f..4fdcf4f9 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -60,12 +60,6 @@ - - - - - - RemObjects Data Abstract - SQLite Driver Microsoft Office 2000 Sample Automation Server Wrapper Components Microsoft Office XP Sample Automation Server Wrapper Components @@ -573,5 +567,5 @@ Count mtException_AntiFreeze=1 mtException_AntiFreeze0="The application seems to be frozen." Count mtInvalidEmailMsg=1 mtInvalidEmailMsg0="Invalid email." -TextsCollection=English +TextsCollection= EurekaLog Last Line --> diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj index a5a33a2b..14eaaaa9 100644 --- a/Source/GUIBase/GUIBase.dproj +++ b/Source/GUIBase/GUIBase.dproj @@ -58,37 +58,37 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
diff --git a/Source/GUIBase/GUIBase.res b/Source/GUIBase/GUIBase.res index 8b251f312bcccec5485024f6fe8d80e1cdf25746..1641339fcc482e7e3492d1b45813a86619622c33 100644 GIT binary patch literal 4748 zcmbW5&ub)A5XUPdpe&2#;C*uNAUVhgd+&(4um@dnom`vXF9g}ZuHJ;se=<3UNdFJg zbCw+UD9j$byGIXV`~6hC>h4S?F|k9X-j90q{Z_qtZ<;nUJCO8!h?p${kR>3GhM`oH*q zk=UsjOCIgA_4!`B+Gb&`I84R)bT4dy-BQV<-SyFz?R8ILEQ(+JB$u{sEXE@j@B*7W zT;iZH#|OJ<&DO$RCkM6VbK3(B(k{nbdv1lpc;E$xz9as|v3uE1V{hw2w~g3eD0an7 z{BT%G%irdMe*|oDJmgvJaA2`9B<6Xi*?M~Q;)@Sbfwf3uf zVaWkbUjU=;sL{BlYemIZXv%qZ{SZw{-TCU+;!nH6KDDIJumU+9{E0zXW4>7T)y|>$DQlv zRJe?TjSp{c!DqeayAnSMTtZZT;>LN7J0Rls+5m@q)MbyB*eL%Eu@(+$Cw}Pd@q7N| z%Q0*AHpCP^b9v`@jx-l_FD>khpW2W8(OU2&V5TrnoAY-m_hlcV?zq3;7{2gF{J#Hc z6R+o~mVenX?>@W0@_DVzyOFs(5464CY{!q9ChoF#_*eXi@4gFuV8?vhl=_w5$iKL0 zEV0nMBcN08xtRmsgJrqjh@s#|{?*ssnsG)mH*wa6{efF0JFWHok@kA5%b661{B38= zCcgJ|*ZFTpV$8<-&+AWpa)Q8*`wL&hMeNQ^v6I7$HSdLZhZ^&+6<@Uw_Zsml9^v3W zVvPDBKHh;i=RU4J_ta3E;)Mn>Y+L zKLZ0UQ+*km9FO-b?U4gmn-62iwzH6&*duKGo~aUV)bYDla8wWZ9+^7p-F<8lP@i!m z@vhbD_${F}h>^T;C(?(b*OJDk?{dEXB?nuehoON3HAb!7Mr7-ls!84-5V-jJugbu<_$}mU=Yd9!?TOX;|B-#B)+0x#9q*yqJiqS!`49d=7ztk$O+9=1i;?K_|J<8T z?0b7=-`Z3A#vV$4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP delta 11 ScmeBCZD5|Duvteife`=|>;pCc diff --git a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm index cece17d3..96458314 100644 --- a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm @@ -124,6 +124,12 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente DisplayLabel = 'Ref. factura cliente' DictionaryEntry = 'AlbaranesCliente_REF_FACTURA' end + item + Name = 'ID_DIRECCION' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_ID_DIRECCION' + DictionaryEntry = 'AlbaranesCliente_ID_DIRECCION' + end item Name = 'CALLE' DataType = datString @@ -287,12 +293,16 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente item Name = 'ID_TIENDA' DataType = datInteger + DisplayLabel = 'AlbaranesCliente_ID_TIENDA' + DictionaryEntry = 'AlbaranesCliente_ID_TIENDA' end item Name = 'TIENDA' DataType = datString Size = 255 + DisplayLabel = 'AlbaranesCliente_TIENDA' ServerAutoRefresh = True + DictionaryEntry = 'AlbaranesCliente_TIENDA' end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj b/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj index bc5eaf2a..3717080d 100644 --- a/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj +++ b/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj @@ -41,19 +41,7 @@ Delphi.Personality Package -FalseTrueFalseTrueFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 - - - - - - - - - - - - +FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 RemObjects Pascal Script - RemObjects SDK 3.0 Integration EurekaLog 5.1.9 AlbaranesCliente_model.dpk @@ -63,9 +51,9 @@ MainSource - - - + + + diff --git a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas index 047fc4d5..83083eb4 100644 --- a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas +++ b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas @@ -9,8 +9,8 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_AlbaranesCliente = '{01F506EA-EABE-4F52-9EAA-43EC08B5F96F}'; - RID_AlbaranesCliente_Detalles = '{88EE6D4A-FCA7-4055-952A-DFE5D4679C52}'; + RID_AlbaranesCliente = '{5C4C05DF-4F36-42A3-99B4-DFB3A7AD89CA}'; + RID_AlbaranesCliente_Detalles = '{B01769A9-4634-4893-BB47-AEA3E26FCF82}'; { Data table names } nme_AlbaranesCliente = 'AlbaranesCliente'; @@ -32,6 +32,7 @@ const fld_AlbaranesClienteREF_PEDIDO = 'REF_PEDIDO'; fld_AlbaranesClienteID_FACTURA = 'ID_FACTURA'; fld_AlbaranesClienteREF_FACTURA = 'REF_FACTURA'; + fld_AlbaranesClienteID_DIRECCION = 'ID_DIRECCION'; fld_AlbaranesClienteCALLE = 'CALLE'; fld_AlbaranesClienteCODIGO_POSTAL = 'CODIGO_POSTAL'; fld_AlbaranesClientePOBLACION = 'POBLACION'; @@ -75,32 +76,33 @@ const idx_AlbaranesClienteREF_PEDIDO = 12; idx_AlbaranesClienteID_FACTURA = 13; idx_AlbaranesClienteREF_FACTURA = 14; - idx_AlbaranesClienteCALLE = 15; - idx_AlbaranesClienteCODIGO_POSTAL = 16; - idx_AlbaranesClientePOBLACION = 17; - idx_AlbaranesClientePROVINCIA = 18; - idx_AlbaranesClientePERSONA_CONTACTO = 19; - idx_AlbaranesClienteTELEFONO = 20; - idx_AlbaranesClienteIMPORTE_NETO = 21; - idx_AlbaranesClienteIMPORTE_PORTE = 22; - idx_AlbaranesClienteDESCUENTO = 23; - idx_AlbaranesClienteIMPORTE_DESCUENTO = 24; - idx_AlbaranesClienteBASE_IMPONIBLE = 25; - idx_AlbaranesClienteIVA = 26; - idx_AlbaranesClienteIMPORTE_IVA = 27; - idx_AlbaranesClienteIMPORTE_TOTAL = 28; - idx_AlbaranesClienteOBSERVACIONES = 29; - idx_AlbaranesClienteINCIDENCIAS = 30; - idx_AlbaranesClienteINCIDENCIAS_ACTIVAS = 31; - idx_AlbaranesClienteFECHA_ALTA = 32; - idx_AlbaranesClienteFECHA_MODIFICACION = 33; - idx_AlbaranesClienteUSUARIO = 34; - idx_AlbaranesClienteID_FORMA_PAGO = 35; - idx_AlbaranesClienteFECHA_PREVISTA_ENVIO = 36; - idx_AlbaranesClienteFECHA_ENVIO = 37; - idx_AlbaranesClienteFECHA_RECEPCION = 38; - idx_AlbaranesClienteID_TIENDA = 39; - idx_AlbaranesClienteTIENDA = 40; + idx_AlbaranesClienteID_DIRECCION = 15; + idx_AlbaranesClienteCALLE = 16; + idx_AlbaranesClienteCODIGO_POSTAL = 17; + idx_AlbaranesClientePOBLACION = 18; + idx_AlbaranesClientePROVINCIA = 19; + idx_AlbaranesClientePERSONA_CONTACTO = 20; + idx_AlbaranesClienteTELEFONO = 21; + idx_AlbaranesClienteIMPORTE_NETO = 22; + idx_AlbaranesClienteIMPORTE_PORTE = 23; + idx_AlbaranesClienteDESCUENTO = 24; + idx_AlbaranesClienteIMPORTE_DESCUENTO = 25; + idx_AlbaranesClienteBASE_IMPONIBLE = 26; + idx_AlbaranesClienteIVA = 27; + idx_AlbaranesClienteIMPORTE_IVA = 28; + idx_AlbaranesClienteIMPORTE_TOTAL = 29; + idx_AlbaranesClienteOBSERVACIONES = 30; + idx_AlbaranesClienteINCIDENCIAS = 31; + idx_AlbaranesClienteINCIDENCIAS_ACTIVAS = 32; + idx_AlbaranesClienteFECHA_ALTA = 33; + idx_AlbaranesClienteFECHA_MODIFICACION = 34; + idx_AlbaranesClienteUSUARIO = 35; + idx_AlbaranesClienteID_FORMA_PAGO = 36; + idx_AlbaranesClienteFECHA_PREVISTA_ENVIO = 37; + idx_AlbaranesClienteFECHA_ENVIO = 38; + idx_AlbaranesClienteFECHA_RECEPCION = 39; + idx_AlbaranesClienteID_TIENDA = 40; + idx_AlbaranesClienteTIENDA = 41; { AlbaranesCliente_Detalles fields } fld_AlbaranesCliente_DetallesID = 'ID'; @@ -137,7 +139,7 @@ const type { IAlbaranesCliente } IAlbaranesCliente = interface(IDAStronglyTypedDataTable) - ['{4F964B2D-8C90-492D-9267-F5E2B3DDFB63}'] + ['{6AC3B22E-CE4C-4A1F-9373-B342F525C057}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -199,6 +201,10 @@ type procedure SetREF_FACTURAValue(const aValue: String); function GetREF_FACTURAIsNull: Boolean; procedure SetREF_FACTURAIsNull(const aValue: Boolean); + function GetID_DIRECCIONValue: Integer; + procedure SetID_DIRECCIONValue(const aValue: Integer); + function GetID_DIRECCIONIsNull: Boolean; + procedure SetID_DIRECCIONIsNull(const aValue: Boolean); function GetCALLEValue: String; procedure SetCALLEValue(const aValue: String); function GetCALLEIsNull: Boolean; @@ -334,6 +340,8 @@ type property ID_FACTURAIsNull: Boolean read GetID_FACTURAIsNull write SetID_FACTURAIsNull; property REF_FACTURA: String read GetREF_FACTURAValue write SetREF_FACTURAValue; property REF_FACTURAIsNull: Boolean read GetREF_FACTURAIsNull write SetREF_FACTURAIsNull; + property ID_DIRECCION: Integer read GetID_DIRECCIONValue write SetID_DIRECCIONValue; + property ID_DIRECCIONIsNull: Boolean read GetID_DIRECCIONIsNull write SetID_DIRECCIONIsNull; property CALLE: String read GetCALLEValue write SetCALLEValue; property CALLEIsNull: Boolean read GetCALLEIsNull write SetCALLEIsNull; property CODIGO_POSTAL: String read GetCODIGO_POSTALValue write SetCODIGO_POSTALValue; @@ -457,6 +465,10 @@ type procedure SetREF_FACTURAValue(const aValue: String); virtual; function GetREF_FACTURAIsNull: Boolean; virtual; procedure SetREF_FACTURAIsNull(const aValue: Boolean); virtual; + function GetID_DIRECCIONValue: Integer; virtual; + procedure SetID_DIRECCIONValue(const aValue: Integer); virtual; + function GetID_DIRECCIONIsNull: Boolean; virtual; + procedure SetID_DIRECCIONIsNull(const aValue: Boolean); virtual; function GetCALLEValue: String; virtual; procedure SetCALLEValue(const aValue: String); virtual; function GetCALLEIsNull: Boolean; virtual; @@ -591,6 +603,8 @@ type property ID_FACTURAIsNull: Boolean read GetID_FACTURAIsNull write SetID_FACTURAIsNull; property REF_FACTURA: String read GetREF_FACTURAValue write SetREF_FACTURAValue; property REF_FACTURAIsNull: Boolean read GetREF_FACTURAIsNull write SetREF_FACTURAIsNull; + property ID_DIRECCION: Integer read GetID_DIRECCIONValue write SetID_DIRECCIONValue; + property ID_DIRECCIONIsNull: Boolean read GetID_DIRECCIONIsNull write SetID_DIRECCIONIsNull; property CALLE: String read GetCALLEValue write SetCALLEValue; property CALLEIsNull: Boolean read GetCALLEIsNull write SetCALLEIsNull; property CODIGO_POSTAL: String read GetCODIGO_POSTALValue write SetCODIGO_POSTALValue; @@ -652,7 +666,7 @@ type { IAlbaranesCliente_Detalles } IAlbaranesCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{E8D3062A-A5CA-4AE5-828F-99FDD5587811}'] + ['{61E85E5C-B0EF-4350-A06D-5601DB03ADB2}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1191,6 +1205,27 @@ begin DataTable.Fields[idx_AlbaranesClienteREF_FACTURA].AsVariant := Null; end; +function TAlbaranesClienteDataTableRules.GetID_DIRECCIONValue: Integer; +begin + result := DataTable.Fields[idx_AlbaranesClienteID_DIRECCION].AsInteger; +end; + +procedure TAlbaranesClienteDataTableRules.SetID_DIRECCIONValue(const aValue: Integer); +begin + DataTable.Fields[idx_AlbaranesClienteID_DIRECCION].AsInteger := aValue; +end; + +function TAlbaranesClienteDataTableRules.GetID_DIRECCIONIsNull: boolean; +begin + result := DataTable.Fields[idx_AlbaranesClienteID_DIRECCION].IsNull; +end; + +procedure TAlbaranesClienteDataTableRules.SetID_DIRECCIONIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_AlbaranesClienteID_DIRECCION].AsVariant := Null; +end; + function TAlbaranesClienteDataTableRules.GetCALLEValue: String; begin result := DataTable.Fields[idx_AlbaranesClienteCALLE].AsString; diff --git a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas index 6718bcbd..37b0a6e1 100644 --- a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas +++ b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas @@ -9,13 +9,13 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_AlbaranesClienteDelta = '{63F763A7-8A93-4D0B-9931-17164BB987A7}'; - RID_AlbaranesCliente_DetallesDelta = '{2D200945-9A98-464A-AB39-1C3FE7E78CFC}'; + RID_AlbaranesClienteDelta = '{07089145-5284-4338-A434-D04FD6D3C95E}'; + RID_AlbaranesCliente_DetallesDelta = '{2B77EEBC-CEEE-4FED-A05D-8FBB11FAC5AA}'; type { IAlbaranesClienteDelta } IAlbaranesClienteDelta = interface(IAlbaranesCliente) - ['{63F763A7-8A93-4D0B-9931-17164BB987A7}'] + ['{07089145-5284-4338-A434-D04FD6D3C95E}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -32,6 +32,7 @@ type function GetOldREF_PEDIDOValue : String; function GetOldID_FACTURAValue : Integer; function GetOldREF_FACTURAValue : String; + function GetOldID_DIRECCIONValue : Integer; function GetOldCALLEValue : String; function GetOldCODIGO_POSTALValue : String; function GetOldPOBLACIONValue : String; @@ -75,6 +76,7 @@ type property OldREF_PEDIDO : String read GetOldREF_PEDIDOValue; property OldID_FACTURA : Integer read GetOldID_FACTURAValue; property OldREF_FACTURA : String read GetOldREF_FACTURAValue; + property OldID_DIRECCION : Integer read GetOldID_DIRECCIONValue; property OldCALLE : String read GetOldCALLEValue; property OldCODIGO_POSTAL : String read GetOldCODIGO_POSTALValue; property OldPOBLACION : String read GetOldPOBLACIONValue; @@ -202,6 +204,12 @@ type function GetOldREF_FACTURAIsNull: Boolean; virtual; procedure SetREF_FACTURAValue(const aValue: String); virtual; procedure SetREF_FACTURAIsNull(const aValue: Boolean); virtual; + function GetID_DIRECCIONValue: Integer; virtual; + function GetID_DIRECCIONIsNull: Boolean; virtual; + function GetOldID_DIRECCIONValue: Integer; virtual; + function GetOldID_DIRECCIONIsNull: Boolean; virtual; + procedure SetID_DIRECCIONValue(const aValue: Integer); virtual; + procedure SetID_DIRECCIONIsNull(const aValue: Boolean); virtual; function GetCALLEValue: String; virtual; function GetCALLEIsNull: Boolean; virtual; function GetOldCALLEValue: String; virtual; @@ -418,6 +426,10 @@ type property REF_FACTURAIsNull : Boolean read GetREF_FACTURAIsNull write SetREF_FACTURAIsNull; property OldREF_FACTURA : String read GetOldREF_FACTURAValue; property OldREF_FACTURAIsNull : Boolean read GetOldREF_FACTURAIsNull; + property ID_DIRECCION : Integer read GetID_DIRECCIONValue write SetID_DIRECCIONValue; + property ID_DIRECCIONIsNull : Boolean read GetID_DIRECCIONIsNull write SetID_DIRECCIONIsNull; + property OldID_DIRECCION : Integer read GetOldID_DIRECCIONValue; + property OldID_DIRECCIONIsNull : Boolean read GetOldID_DIRECCIONIsNull; property CALLE : String read GetCALLEValue write SetCALLEValue; property CALLEIsNull : Boolean read GetCALLEIsNull write SetCALLEIsNull; property OldCALLE : String read GetOldCALLEValue; @@ -531,7 +543,7 @@ type { IAlbaranesCliente_DetallesDelta } IAlbaranesCliente_DetallesDelta = interface(IAlbaranesCliente_Detalles) - ['{2D200945-9A98-464A-AB39-1C3FE7E78CFC}'] + ['{2B77EEBC-CEEE-4FED-A05D-8FBB11FAC5AA}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_ALBARANValue : Integer; @@ -1220,6 +1232,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteREF_FACTURA] := Null; end; +function TAlbaranesClienteBusinessProcessorRules.GetID_DIRECCIONValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_DIRECCION]; +end; + +function TAlbaranesClienteBusinessProcessorRules.GetID_DIRECCIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_DIRECCION]); +end; + +function TAlbaranesClienteBusinessProcessorRules.GetOldID_DIRECCIONValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteID_DIRECCION]; +end; + +function TAlbaranesClienteBusinessProcessorRules.GetOldID_DIRECCIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteID_DIRECCION]); +end; + +procedure TAlbaranesClienteBusinessProcessorRules.SetID_DIRECCIONValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_DIRECCION] := aValue; +end; + +procedure TAlbaranesClienteBusinessProcessorRules.SetID_DIRECCIONIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_DIRECCION] := Null; +end; + function TAlbaranesClienteBusinessProcessorRules.GetCALLEValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteCALLE]; diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm index d42d5655..cd4d9969 100644 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm +++ b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm @@ -40,7 +40,7 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Size = 255 end item - Name = 'NOMBRE_COMERCIAL' + Name = 'REFERENCIA_CLIENTE' DataType = datString Size = 255 end @@ -59,24 +59,10 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Size = 255 end item - Name = 'REFERENCIA_CLIENTE' + Name = 'CALLE' DataType = datString Size = 255 end - item - Name = 'ID_PEDIDO' - DataType = datInteger - end - item - Name = 'REF_PEDIDO' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end item Name = 'POBLACION' DataType = datString @@ -88,9 +74,9 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Size = 255 end item - Name = 'PERSONA_CONTACTO' + Name = 'CODIGO_POSTAL' DataType = datString - Size = 255 + Size = 10 end item Name = 'TELEFONO' @@ -98,7 +84,7 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Size = 25 end item - Name = 'CALLE' + Name = 'PERSONA_CONTACTO' DataType = datString Size = 255 end @@ -178,7 +164,7 @@ object RptAlbaranesCliente: TRptAlbaranesCliente item Name = 'ID' DataType = datInteger - Value = '' + Value = '2' ParamType = daptInput end> MasterMappingMode = mmDataRequest @@ -303,7 +289,7 @@ object RptAlbaranesCliente: TRptAlbaranesCliente item Name = 'ID' DataType = datInteger - Value = '' + Value = '2' ParamType = daptInput end> Statements = < @@ -311,29 +297,32 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Connection = 'IBX' TargetTable = 'ALBARANES_CLIENTE' SQL = - 'SELECT'#10' V_ALBARANES_CLIENTE.ID,'#10' V_ALBARANES_CLIENTE.ID_EMPRES' + - 'A,'#10' V_ALBARANES_CLIENTE.ID_TIENDA,'#10' V_ALBARANES_CLIENTE.ID_CLI' + - 'ENTE,'#10' V_ALBARANES_CLIENTE.NOMBRE,'#10' V_CLIENTES.NOMBRE_COMERCIA' + - 'L,'#10' V_CLIENTES.NIF_CIF,'#10' V_ALBARANES_CLIENTE.FECHA_ALBARAN,'#10' ' + - 'V_ALBARANES_CLIENTE.REFERENCIA,'#10' V_ALBARANES_CLIENTE.REFERENCIA' + - '_CLIENTE,'#10' V_ALBARANES_CLIENTE.ID_PEDIDO,'#10' V_ALBARANES_CLIENTE' + - '.REF_PEDIDO,'#10' V_ALBARANES_CLIENTE.CODIGO_POSTAL,'#10' V_ALBARANES_' + - 'CLIENTE.POBLACION,'#10' V_ALBARANES_CLIENTE.PROVINCIA,'#10' V_ALBARANE' + - 'S_CLIENTE.PERSONA_CONTACTO,'#10' V_ALBARANES_CLIENTE.TELEFONO,'#10' V_' + - 'ALBARANES_CLIENTE.CALLE,'#10' V_ALBARANES_CLIENTE.OBSERVACIONES,'#10' ' + - 'V_ALBARANES_CLIENTE.IMPORTE_TOTAL,'#10' V_ALBARANES_CLIENTE.FECHA_P' + - 'REVISTA_ENVIO,'#10' EMPRESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10' EMPRESAS' + - '.NOMBRE AS NOMBRE_EMPRESA,'#10' EMPRESAS.RAZON_SOCIAL AS RAZON_SOCI' + - 'AL_EMPRESA,'#10' EMPRESAS.CALLE AS CALLE_EMPRESA,'#10' EMPRESAS.CODIGO' + - '_POSTAL AS CODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.POBLACION AS POBLAC' + - 'ION_EMPRESA,'#10' EMPRESAS.PROVINCIA AS PROVINCIA_EMPRESA,'#10' EMPRES' + - 'AS.TELEFONO_1 AS TELEFONO_1_EMPRESA,'#10' EMPRESAS.FAX AS FAX_EMPRE' + - 'SA,'#10' EMPRESAS.MOVIL_1 AS MOVIL_1_EMPRESA,'#10' EMPRESAS.EMAIL_1 AS' + - ' EMAIL_1_EMPRESA,'#10' EMPRESAS.PAGINA_WEB AS PAGINA_WEB_EMPRESA'#10'FR' + - 'OM'#10' V_ALBARANES_CLIENTE'#10' LEFT OUTER JOIN V_CLIENTES ON (V_CL' + - 'IENTES.ID = V_ALBARANES_CLIENTE.ID_CLIENTE)'#10' LEFT OUTER JOIN EM' + - 'PRESAS ON (EMPRESAS.ID = V_ALBARANES_CLIENTE.ID_EMPRESA)'#10'WHERE V' + - '_ALBARANES_CLIENTE.ID = :ID'#10 + 'SELECT'#10' ALBARANES_CLIENTE.ID,'#10' ALBARANES_CLIENTE.ID_EMPRESA,'#10' ' + + ' ALBARANES_CLIENTE.ID_TIENDA,'#10' ALBARANES_CLIENTE.ID_CLIENTE,'#10' ' + + 'CONTACTOS.NOMBRE,'#10' CONTACTOS.REFERENCIA as REFERENCIA_CLIENTE,'#10 + + ' CONTACTOS.NIF_CIF,'#10' ALBARANES_CLIENTE.FECHA_ALBARAN,'#10' ALBARA' + + 'NES_CLIENTE.REFERENCIA,'#10' COALESCE(CONTACTOS_DIRECCIONES.CALLE, ' + + 'CONTACTOS.CALLE) AS CALLE,'#10' COALESCE(CONTACTOS_DIRECCIONES.POBL' + + 'ACION, CONTACTOS.POBLACION) AS POBLACION,'#10' COALESCE(CONTACTOS_D' + + 'IRECCIONES.PROVINCIA, CONTACTOS.PROVINCIA) AS PROVINCIA,'#10' COALE' + + 'SCE(CONTACTOS_DIRECCIONES.CODIGO_POSTAL, CONTACTOS.CODIGO_POSTAL' + + ') AS CODIGO_POSTAL,'#10' COALESCE(CONTACTOS_DIRECCIONES.TELEFONO, C' + + 'ONTACTOS.TELEFONO_1) AS TELEFONO,'#10' ALBARANES_CLIENTE.PERSONA_CO' + + 'NTACTO,'#10' ALBARANES_CLIENTE.OBSERVACIONES,'#10' ALBARANES_CLIENTE.I' + + 'MPORTE_TOTAL,'#10' ALBARANES_CLIENTE.FECHA_PREVISTA_ENVIO,'#10' EMPRES' + + 'AS.NIF_CIF AS NIF_CIF_EMPRESA,'#10' EMPRESAS.NOMBRE AS NOMBRE_EMPRE' + + 'SA,'#10' EMPRESAS.RAZON_SOCIAL AS RAZON_SOCIAL_EMPRESA,'#10' EMPRESAS.' + + 'CALLE AS CALLE_EMPRESA,'#10' EMPRESAS.CODIGO_POSTAL AS CODIGO_POSTA' + + 'L_EMPRESA,'#10' EMPRESAS.POBLACION AS POBLACION_EMPRESA,'#10' EMPRESAS' + + '.PROVINCIA AS PROVINCIA_EMPRESA,'#10' EMPRESAS.TELEFONO_1 AS TELEFO' + + 'NO_1_EMPRESA,'#10' EMPRESAS.FAX AS FAX_EMPRESA,'#10' EMPRESAS.MOVIL_1 ' + + 'AS MOVIL_1_EMPRESA,'#10' EMPRESAS.EMAIL_1 AS EMAIL_1_EMPRESA,'#10' EMP' + + 'RESAS.PAGINA_WEB AS PAGINA_WEB_EMPRESA'#10'FROM'#10' ALBARANES_CLIENTE'#10 + + ' INNER JOIN EMPRESAS ON (EMPRESAS.ID = ALBARANES_CLIENTE.ID_EMP' + + 'RESA)'#10' INNER JOIN CONTACTOS ON (CONTACTOS.ID = ALBARANES_CLIENT' + + 'E.ID_CLIENTE)'#10' LEFT OUTER JOIN CONTACTOS_DIRECCIONES ON (CONTAC' + + 'TOS_DIRECCIONES.ID = ALBARANES_CLIENTE.ID_DIRECCION)'#10'WHERE ALBAR' + + 'ANES_CLIENTE.ID = :ID'#10 StatementType = stSQL ColumnMappings = < item @@ -420,18 +409,6 @@ object RptAlbaranesCliente: TRptAlbaranesCliente DatasetField = 'FECHA_ALBARAN' TableField = 'FECHA_ALBARAN' end - item - DatasetField = 'ID_PEDIDO' - TableField = 'ID_PEDIDO' - end - item - DatasetField = 'NOMBRE_COMERCIAL' - TableField = 'NOMBRE_COMERCIAL' - end - item - DatasetField = 'REF_PEDIDO' - TableField = 'REF_PEDIDO' - end item DatasetField = 'IMPORTE_TOTAL' TableField = 'IMPORTE_TOTAL' @@ -494,7 +471,7 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Size = 255 end item - Name = 'NOMBRE_COMERCIAL' + Name = 'REFERENCIA_CLIENTE' DataType = datString Size = 255 end @@ -513,24 +490,10 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Size = 255 end item - Name = 'REFERENCIA_CLIENTE' + Name = 'CALLE' DataType = datString Size = 255 end - item - Name = 'ID_PEDIDO' - DataType = datInteger - end - item - Name = 'REF_PEDIDO' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end item Name = 'POBLACION' DataType = datString @@ -542,9 +505,9 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Size = 255 end item - Name = 'PERSONA_CONTACTO' + Name = 'CODIGO_POSTAL' DataType = datString - Size = 255 + Size = 10 end item Name = 'TELEFONO' @@ -552,7 +515,7 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Size = 25 end item - Name = 'CALLE' + Name = 'PERSONA_CONTACTO' DataType = datString Size = 255 end diff --git a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm index 4d249a40..7c2f1737 100644 --- a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm +++ b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm @@ -186,6 +186,10 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente item DatasetField = 'TIENDA' TableField = 'TIENDA' + end + item + DatasetField = 'ID_DIRECCION' + TableField = 'ID_DIRECCION' end> end> Name = 'AlbaranesCliente' @@ -278,6 +282,11 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente Size = 255 DictionaryEntry = 'AlbaranesCliente_REF_FACTURA' end + item + Name = 'ID_DIRECCION' + DataType = datInteger + DictionaryEntry = 'AlbaranesCliente_ID_DIRECCION' + end item Name = 'CALLE' DataType = datString @@ -414,12 +423,14 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente item Name = 'ID_TIENDA' DataType = datInteger + DictionaryEntry = 'AlbaranesCliente_ID_TIENDA' end item Name = 'TIENDA' DataType = datString Size = 255 ServerAutoRefresh = True + DictionaryEntry = 'AlbaranesCliente_TIENDA' end> end item @@ -626,6 +637,10 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente Name = 'ID_FACTURA' Value = '' end + item + Name = 'ID_DIRECCION' + Value = '' + end item Name = 'CALLE' Value = '' @@ -734,22 +749,22 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente SQL = 'INSERT'#10' INTO ALBARANES_CLIENTE'#10' (ID, ID_EMPRESA, ID_CLIENTE,' + ' FECHA_ALBARAN, TIPO, REFERENCIA,'#10' REFERENCIA_CLIENTE, ID_AL' + - 'MACEN, ID_PEDIDO, ID_FACTURA, CALLE,'#10' CODIGO_POSTAL, POBLACI' + - 'ON, PROVINCIA, PERSONA_CONTACTO, '#10' TELEFONO, IMPORTE_NETO, I' + - 'MPORTE_PORTE, DESCUENTO, IMPORTE_DESCUENTO, '#10' BASE_IMPONIBLE' + - ', IVA, IMPORTE_IVA, IMPORTE_TOTAL, OBSERVACIONES, '#10' INCIDENC' + - 'IAS, INCIDENCIAS_ACTIVAS, FECHA_ALTA, FECHA_MODIFICACION, '#10' ' + - 'USUARIO, ID_FORMA_PAGO, FECHA_PREVISTA_ENVIO, FECHA_ENVIO, '#10' ' + - ' FECHA_RECEPCION, ID_TIENDA)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :ID' + - '_CLIENTE, :FECHA_ALBARAN, :TIPO, :REFERENCIA,'#10' :REFERENCIA_C' + - 'LIENTE, :ID_ALMACEN, :ID_PEDIDO, :ID_FACTURA, :CALLE,'#10' :CODI' + - 'GO_POSTAL, :POBLACION, :PROVINCIA, :PERSONA_CONTACTO,'#10' :TELE' + - 'FONO, :IMPORTE_NETO, :IMPORTE_PORTE, :DESCUENTO, :IMPORTE_DESCUE' + - 'NTO,'#10' :BASE_IMPONIBLE, :IVA, :IMPORTE_IVA, :IMPORTE_TOTAL, :' + - 'OBSERVACIONES,'#10' :INCIDENCIAS, :INCIDENCIAS_ACTIVAS, :FECHA_A' + - 'LTA, :FECHA_MODIFICACION,'#10' :USUARIO, :ID_FORMA_PAGO, :FECHA_' + - 'PREVISTA_ENVIO, :FECHA_ENVIO, :FECHA_RECEPCION,'#10' :ID_TIENDA)' + - #10' '#10' '#10#10 + 'MACEN, ID_PEDIDO, ID_FACTURA, ID_DIRECCION,'#10' CALLE, CODIGO_P' + + 'OSTAL, POBLACION, PROVINCIA, PERSONA_CONTACTO,'#10' TELEFONO, IM' + + 'PORTE_NETO, IMPORTE_PORTE, DESCUENTO, IMPORTE_DESCUENTO, '#10' B' + + 'ASE_IMPONIBLE, IVA, IMPORTE_IVA, IMPORTE_TOTAL, OBSERVACIONES, '#10 + + ' INCIDENCIAS, INCIDENCIAS_ACTIVAS, FECHA_ALTA, FECHA_MODIFIC' + + 'ACION, '#10' USUARIO, ID_FORMA_PAGO, FECHA_PREVISTA_ENVIO, FECHA' + + '_ENVIO, '#10' FECHA_RECEPCION, ID_TIENDA)'#10' VALUES'#10' (:ID, :ID' + + '_EMPRESA, :ID_CLIENTE, :FECHA_ALBARAN, :TIPO, :REFERENCIA,'#10' ' + + ':REFERENCIA_CLIENTE, :ID_ALMACEN, :ID_PEDIDO, :ID_FACTURA, :ID_D' + + 'IRECCION,'#10' :CALLE, :CODIGO_POSTAL, :POBLACION, :PROVINCIA, :' + + 'PERSONA_CONTACTO,'#10' :TELEFONO, :IMPORTE_NETO, :IMPORTE_PORTE,' + + ' :DESCUENTO, :IMPORTE_DESCUENTO,'#10' :BASE_IMPONIBLE, :IVA, :IM' + + 'PORTE_IVA, :IMPORTE_TOTAL, :OBSERVACIONES,'#10' :INCIDENCIAS, :I' + + 'NCIDENCIAS_ACTIVAS, :FECHA_ALTA, :FECHA_MODIFICACION,'#10' :USUA' + + 'RIO, :ID_FORMA_PAGO, :FECHA_PREVISTA_ENVIO, :FECHA_ENVIO, :FECHA' + + '_RECEPCION,'#10' :ID_TIENDA)'#10' '#10' '#10#10 StatementType = stSQL ColumnMappings = <> end> @@ -810,6 +825,10 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente Name = 'ID_FACTURA' Value = '' end + item + Name = 'ID_DIRECCION' + Value = '' + end item Name = 'CALLE' Value = '' @@ -924,21 +943,22 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente ' ID_CLIENTE = :ID_CLIENTE, '#10' FECHA_ALBARAN = :FECHA_ALBARAN,' + #10' TIPO = :TIPO,'#10' REFERENCIA = :REFERENCIA, '#10' REFERENCIA' + '_CLIENTE = :REFERENCIA_CLIENTE, '#10' ID_ALMACEN = :ID_ALMACEN,'#10' ' + - ' ID_PEDIDO = :ID_PEDIDO,'#10' ID_FACTURA = :ID_FACTURA,'#10' CAL' + - 'LE = :CALLE,'#10' CODIGO_POSTAL = :CODIGO_POSTAL, '#10' POBLACION ' + - '= :POBLACION, '#10' PROVINCIA = :PROVINCIA, '#10' PERSONA_CONTACTO' + - ' = :PERSONA_CONTACTO, '#10' TELEFONO = :TELEFONO, '#10' IMPORTE_NE' + - 'TO = :IMPORTE_NETO, '#10' IMPORTE_PORTE = :IMPORTE_PORTE, '#10' DE' + - 'SCUENTO = :DESCUENTO, '#10' IMPORTE_DESCUENTO = :IMPORTE_DESCUENT' + - 'O, '#10' BASE_IMPONIBLE = :BASE_IMPONIBLE, '#10' IVA = :IVA, '#10' ' + - 'IMPORTE_IVA = :IMPORTE_IVA, '#10' IMPORTE_TOTAL = :IMPORTE_TOTAL,' + - ' '#10' OBSERVACIONES = :OBSERVACIONES, '#10' INCIDENCIAS = :INCIDE' + - 'NCIAS, '#10' INCIDENCIAS_ACTIVAS = :INCIDENCIAS_ACTIVAS, '#10' FEC' + - 'HA_ALTA = :FECHA_ALTA, '#10' FECHA_MODIFICACION = :FECHA_MODIFICA' + - 'CION, '#10' USUARIO = :USUARIO, '#10' ID_FORMA_PAGO = :ID_FORMA_PA' + - 'GO, '#10' FECHA_PREVISTA_ENVIO = :FECHA_PREVISTA_ENVIO, '#10' FECH' + - 'A_ENVIO = :FECHA_ENVIO, '#10' FECHA_RECEPCION = :FECHA_RECEPCION,' + - #10' ID_TIENDA = :ID_TIENDA'#10' WHERE'#10' (ID = :OLD_ID)'#10 + ' ID_PEDIDO = :ID_PEDIDO,'#10' ID_FACTURA = :ID_FACTURA,'#10' ID_' + + 'DIRECCION = :ID_DIRECCION,'#10' CALLE = :CALLE,'#10' CODIGO_POSTAL' + + ' = :CODIGO_POSTAL, '#10' POBLACION = :POBLACION, '#10' PROVINCIA =' + + ' :PROVINCIA, '#10' PERSONA_CONTACTO = :PERSONA_CONTACTO, '#10' TEL' + + 'EFONO = :TELEFONO, '#10' IMPORTE_NETO = :IMPORTE_NETO, '#10' IMPOR' + + 'TE_PORTE = :IMPORTE_PORTE, '#10' DESCUENTO = :DESCUENTO, '#10' IMP' + + 'ORTE_DESCUENTO = :IMPORTE_DESCUENTO, '#10' BASE_IMPONIBLE = :BASE' + + '_IMPONIBLE, '#10' IVA = :IVA, '#10' IMPORTE_IVA = :IMPORTE_IVA, '#10' ' + + ' IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10' OBSERVACIONES = :OBSERVA' + + 'CIONES, '#10' INCIDENCIAS = :INCIDENCIAS, '#10' INCIDENCIAS_ACTIVA' + + 'S = :INCIDENCIAS_ACTIVAS, '#10' FECHA_ALTA = :FECHA_ALTA, '#10' FE' + + 'CHA_MODIFICACION = :FECHA_MODIFICACION, '#10' USUARIO = :USUARIO,' + + ' '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO, '#10' FECHA_PREVISTA_ENVIO ' + + '= :FECHA_PREVISTA_ENVIO, '#10' FECHA_ENVIO = :FECHA_ENVIO, '#10' F' + + 'ECHA_RECEPCION = :FECHA_RECEPCION,'#10' ID_TIENDA = :ID_TIENDA'#10' ' + + 'WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -1522,6 +1542,20 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente Name = 'AlbaranesCliente_REFERENCIA_CLIENTE' DataType = datString Size = 255 + end + item + Name = 'AlbaranesCliente_ID_DIRECCION' + DataType = datInteger + end + item + Name = 'AlbaranesCliente_ID_TIENDA' + DataType = datInteger + end + item + Name = 'AlbaranesCliente_TIENDA' + DataType = datString + Size = 255 + ServerAutoRefresh = True end> Left = 48 Top = 136 diff --git a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk index fdef07e9..780c6ac5 100644 --- a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk +++ b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk @@ -49,6 +49,7 @@ contains uEditorAlbaranesDevCliente in 'uEditorAlbaranesDevCliente.pas' {fEditorAlbaranesDevCliente: TCustomEditor}, uViewAlbaranesDevCliente in 'uViewAlbaranesDevCliente.pas' {frViewAlbaranesDevCliente: TCustomView}, uEditorAlbaranDevCliente in 'uEditorAlbaranDevCliente.pas' {fEditorAlbaranDevCliente: TCustomEditor}, - uViewAlbaranDevCliente in 'uViewAlbaranDevCliente.pas' {frViewAlbaranDevCliente: TCustomView}; + uViewAlbaranDevCliente in 'uViewAlbaranDevCliente.pas' {frViewAlbaranDevCliente: TCustomView}, + uViewDatosYSeleccionClienteAlbaran in 'uViewDatosYSeleccionClienteAlbaran.pas' {frViewDatosYSeleccionClienteAlbaran: TCustomView}; end. diff --git a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj index fed058ee..89e30269 100644 --- a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj +++ b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj @@ -47,6 +47,14 @@ + + + + + + + + File c:\archivos de programa\borland\delphi10\Bin\dclIntraweb_80_100.bpl not found File c:\archivos de programa\borland\delphi10\Bin\dclnet100.bpl not found File c:\archivos de programa\borland\delphi10\Bin\dclsoap100.bpl not found @@ -111,6 +119,10 @@
frViewAlbaranesDevCliente
TCustomView
+ +
frViewDatosYSeleccionClienteAlbaran
+ TCustomView +
frViewDetallesAlbaranCliente
TFrame diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm index 1e207d8d..d5bd0d07 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm @@ -277,10 +277,8 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente inherited Bevel1: TBevel Left = 93 Top = 92 - Width = 73 ExplicitLeft = 93 ExplicitTop = 92 - ExplicitWidth = 73 end inherited Bevel3: TBevel Left = 368 @@ -295,15 +293,17 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente inherited Bevel4: TBevel Left = 484 Top = 92 - Width = 192 ExplicitLeft = 484 ExplicitTop = 92 - ExplicitWidth = 192 end inherited ImporteDto: TcxDBCurrencyEdit Left = 164 Top = 112 + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 164 ExplicitTop = 112 ExplicitWidth = 188 @@ -313,7 +313,11 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente Left = 555 Top = 38 DataBinding.DataField = '' + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 555 ExplicitTop = 38 ExplicitWidth = 182 @@ -322,7 +326,11 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente inherited ImporteTotal: TcxDBCurrencyEdit Left = 485 Top = 112 + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 485 ExplicitTop = 112 ExplicitWidth = 252 @@ -331,7 +339,11 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente inherited edtDescuento: TcxDBSpinEdit Left = 93 Top = 112 + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 93 ExplicitTop = 112 end @@ -339,14 +351,22 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente Left = 484 Top = 38 DataBinding.DataField = '' + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 484 ExplicitTop = 38 end inherited ImporteBase: TcxDBCurrencyEdit Left = 484 Top = 11 + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 484 ExplicitTop = 11 ExplicitWidth = 253 @@ -356,7 +376,11 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente Left = 484 Top = 65 DataBinding.DataField = '' + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 484 ExplicitTop = 65 end @@ -364,7 +388,11 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente Left = 555 Top = 65 DataBinding.DataField = '' + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 555 ExplicitTop = 65 ExplicitWidth = 182 @@ -373,7 +401,11 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente inherited eImporteNeto: TcxDBCurrencyEdit Left = 93 Top = 11 + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 93 ExplicitTop = 11 ExplicitWidth = 259 @@ -383,7 +415,11 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente Left = 93 Top = 139 Properties.OnValidate = frViewTotales1ePortePropertiesValidate + Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 93 ExplicitTop = 139 ExplicitWidth = 259 @@ -393,6 +429,10 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente Left = 93 Top = 38 DataBinding.DataField = '' + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 93 ExplicitTop = 38 ExplicitWidth = 121 @@ -409,6 +449,10 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente Top = 65 DataBinding.DataField = '' DataBinding.DataSource = nil + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 93 ExplicitTop = 65 ExplicitWidth = 259 diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas index ac7d9e3f..6f31b9f3 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas @@ -218,73 +218,58 @@ end; procedure TfEditorAlbaranCliente.ImprimirInterno; begin -AppFactuGES.ShowCapado; -{ inherited; FController.Print(FAlbaran); -} end; procedure TfEditorAlbaranCliente.OnClienteChanged(Sender: TObject); var - AClientesController : IClientesController; ADireccion : IBizDireccionesContacto; begin if Assigned(FAlbaran) then begin FAlbaran.Cliente := ViewAlbaran.ViewClienteAlbaran.Cliente; - AClientesController := TClientesController.Create; - try - // Avisar si no hay datos bancarios - //if not AClientesController.TieneDatosBancarios(FAlbaran.Cliente) then - // ShowWarningMessage('Este cliente no tiene datos bancarios en su ficha'); -{ - // Elegir la dirección de envio - case FAlbaran.Cliente.Direcciones.RecordCount of - 0 : begin - ADireccion := NIL; - ShowWarningMessage('Este cliente no tiene ' + #10#13 + 'ninguna dirección de envío en su ficha'); - end; - 1 : begin - ADireccion := FAlbaran.Cliente.Direcciones; - end - else begin - ADireccion := AClientesController.ElegirDireccionEntrega(FAlbaran.Cliente.Direcciones, 'Seleccione la dirección del cliente que quiere utilizar como dirección de envio de este albaran.'); - end; - end; + // Avisar si no hay datos bancarios + {if not AClientesController.TieneDatosBancarios(FAlbaran.Cliente) then + ShowWarningMessage('Este cliente no tiene datos bancarios en su ficha');} - // Si hay dirección de envio, copiarla al albarán y poner el coste del porte - if Assigned(ADireccion) then - begin - try - FAlbaran.Edit; - FAlbaran.IMPORTE_PORTE := ADireccion.PORTE; - FController.CopiarDireccionEnvio(ADireccion, FAlbaran); - finally - ADireccion := NIL; - end; - end - else begin - FController.QuitarDireccionEnvio(FAlbaran); - FAlbaran.Edit; - FAlbaran.IMPORTE_PORTE := 0; - end; -} - - // Si el pedido tiene detalles hay que mirar si los descuentos - // para los artículos hay que cambiarlos. - if (FAlbaran.Detalles.RecordCount > 0) then - begin - FController.DetallesController.ActualizarDetalles(FAlbaran.Detalles, FAlbaran.Cliente); - end; - - finally - AClientesController := NIL; + // Elegir la dirección de envio + case FAlbaran.Cliente.Direcciones.RecordCount of + 0 : begin + ADireccion := NIL; + //ShowWarningMessage('Este cliente no tiene ninguna dirección de envío en su ficha'); + end; + 1 : begin + ADireccion := FAlbaran.Cliente.Direcciones; + end end; + + // Si hay dirección de envio, copiarla al albarán y poner el coste del porte + if Assigned(ADireccion) then + begin + try + FAlbaran.Edit; + FAlbaran.IMPORTE_PORTE := ADireccion.PORTE; + FController.CopiarDireccionEnvio(ADireccion, FAlbaran); + finally + ADireccion := NIL; + end; + end + else begin + FController.QuitarDireccionEnvio(FAlbaran); + FAlbaran.Edit; + FAlbaran.IMPORTE_PORTE := 0; + end; + + // Si el pedido tiene detalles hay que mirar si los descuentos + // para los artículos hay que cambiarlos. + if (FAlbaran.Detalles.RecordCount > 0) then + FController.DetallesController.ActualizarDetalles(FAlbaran.Detalles, FAlbaran.Cliente); end; end; + procedure TfEditorAlbaranCliente.pgPaginasChanging(Sender: TObject; var AllowChange: Boolean); begin inherited; @@ -316,11 +301,8 @@ end; procedure TfEditorAlbaranCliente.PrevisualizarInterno; begin -AppFactuGES.ShowCapado; -{ inherited; FController.Preview(FAlbaran); - } end; procedure TfEditorAlbaranCliente.RecalcularPortePorUnidad; @@ -338,7 +320,6 @@ begin if Assigned(FController) then begin - ViewAlbaran.Controller := Controller; frViewDetallesAlbaranCliente1.Controller := Controller.DetallesController; end; end; @@ -353,13 +334,17 @@ begin frViewIncidenciasCli.DADataSource.DataTable := dsDataTable.DataTable; frViewTotales1.DADataSource.DataTable := dsDataTable.DataTable; + if Assigned(FViewAlbaran) then begin - FViewAlbaran.Albaran := FAlbaran; - ViewAlbaran.ViewClienteAlbaran.Cliente := FAlbaran.Cliente; - ViewAlbaran.ViewClienteAlbaran.OnClienteChanged := OnClienteChanged; - frViewDetallesAlbaranCliente1.Detalles := FAlbaran.Detalles; - frViewDetallesAlbaranCliente1.Albaran := FAlbaran; //Para poder sacar los descuento del articulos segun el cliente seleccionado + ViewAlbaran.ViewClienteAlbaran.OnClienteChanged := NIL; + try + FViewAlbaran.Albaran := FAlbaran; + frViewDetallesAlbaranCliente1.Detalles := FAlbaran.Detalles; + frViewDetallesAlbaranCliente1.Albaran := FAlbaran; //Para poder sacar los descuento del articulos segun el cliente seleccionado + finally + ViewAlbaran.ViewClienteAlbaran.OnClienteChanged := OnClienteChanged; + end; end; end else begin @@ -371,7 +356,6 @@ begin begin FViewAlbaran.Albaran := NIL; ViewAlbaran.ViewClienteAlbaran.OnClienteChanged := NIL; - ViewAlbaran.ViewClienteAlbaran.Cliente := NIL; frViewDetallesAlbaranCliente1.Detalles := NIL; frViewDetallesAlbaranCliente1.Albaran := NIL; end; diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm index 1fffaaaa..bba00f20 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm @@ -2,6 +2,7 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente Caption = 'Lista de albaranes de cliente' ClientWidth = 583 ExplicitWidth = 591 + ExplicitHeight = 240 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas index e628911c..f3e17ef5 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas @@ -430,10 +430,10 @@ begin end; procedure TfEditorAlbaranesCliente.NuevoInterno; -var +{var Respuesta : Integer; AAlbaran : IBizAlbaranCliente; - IDAlbaranAux: Integer; + IDAlbaranAux: Integer;} begin inherited; diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorElegirArticulosAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorElegirArticulosAlbaranCliente.dfm index bb2c5217..cd358ae6 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorElegirArticulosAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorElegirArticulosAlbaranCliente.dfm @@ -1,7 +1,6 @@ inherited fEditorElegirArticulosAlbaranCliente: TfEditorElegirArticulosAlbaranCliente Caption = 'fEditorElegirArticulosAlbaranCliente' - ExplicitWidth = 320 - ExplicitHeight = 480 + ExplicitHeight = 478 PixelsPerInch = 96 TextHeight = 13 end diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorElegirArticulosAlbaranCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uEditorElegirArticulosAlbaranCliente.pas index cc1b2b53..f24de4be 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorElegirArticulosAlbaranCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorElegirArticulosAlbaranCliente.pas @@ -9,7 +9,7 @@ uses StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls, JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane, - JvgWizardHeader, uIEditorElegirArticulosAlbaranesCliente; + JvgWizardHeader, uIEditorElegirArticulosAlbaranesCliente, uDAInterfaces; type TfEditorElegirArticulosAlbaranCliente = class(TfEditorElegirArticulos, IEditorElegirArticulosAlbaranesCliente) diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm index 7904468e..ed2affca 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm @@ -1,26 +1,27 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Width = 825 - Height = 620 + Height = 650 OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy ExplicitWidth = 825 - ExplicitHeight = 620 + ExplicitHeight = 650 object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 Width = 825 - Height = 620 + Height = 650 Align = alClient ParentBackground = True TabOrder = 0 TabStop = False AutoContentSizes = [acsWidth, acsHeight] + ExplicitHeight = 677 DesignSize = ( 825 - 620) + 650) object Label1: TLabel - Left = 22 - Top = 613 + Left = 428 + Top = 597 Width = 299 Height = 26 Caption = @@ -41,16 +42,20 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.Shadow = False Style.ButtonStyle = bts3D Style.ButtonTransparency = ebtNone Style.PopupBorderStyle = epbsFrame3D StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 2 Width = 284 end @@ -65,9 +70,13 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.BorderStyle = ebs3D Style.HotTrack = False Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 9 Height = 35 Width = 781 @@ -87,24 +96,26 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.Color = clMenuBar StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.TextColor = clWindowText StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 0 Width = 284 end - inline frViewClienteAlbaran: TfrViewDatosYSeleccionCliente - Left = 426 + inline frViewClienteAlbaran: TfrViewDatosYSeleccionClienteAlbaran + Left = 428 Top = 28 - Width = 754 - Height = 212 - Align = alTop - AutoSize = True + Width = 771 + Height = 196 Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 @@ -113,61 +124,65 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente ParentFont = False TabOrder = 10 ReadOnly = False - ExplicitLeft = 426 + ExplicitLeft = 428 ExplicitTop = 28 - ExplicitWidth = 754 + ExplicitWidth = 771 inherited dxLayoutControl1: TdxLayoutControl - Width = 754 - Align = alTop + Width = 771 + ExplicitWidth = 771 inherited edtlNombre: TcxDBTextEdit - ExplicitWidth = 299 - Width = 299 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 224 + Width = 224 end inherited edtNIFCIF: TcxDBTextEdit - ExplicitWidth = 299 - Width = 299 - end - inherited edtCalle: TcxDBTextEdit - ExplicitWidth = 299 - Width = 299 - end - inherited edtPoblacion: TcxDBTextEdit - ExplicitWidth = 181 - Width = 181 - end - inherited edtProvincia: TcxDBTextEdit - ExplicitWidth = 299 - Width = 299 - end - inherited edtCodigoPostal: TcxDBTextEdit - Left = 268 - ExplicitLeft = 268 + Left = 263 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 263 end inherited Button3: TBitBtn - Left = 158 - ExplicitLeft = 158 + Left = 174 + ExplicitLeft = 174 + end + inherited edtPersonaContacto: TcxDBTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 283 + Width = 283 + end + inherited edtDireccion: TcxMemo + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + inherited Button4: TButton + Left = 343 + ExplicitLeft = 343 + end + inherited Button5: TButton + Left = 343 + ExplicitLeft = 343 end - end - inherited DADataSource: TDADataSource - Left = 0 - Top = 65528 end inherited ActionList1: TActionList - Top = 65528 - inherited actElegirContacto: TAction - OnUpdate = frViewClienteAlbaranactElegirContactoUpdate - end - inherited actAnadirContacto: TAction - OnUpdate = frViewClienteAlbaranactAnadirContactoUpdate - end + Left = 306 end inherited PngImageList: TPngImageList - Top = 65528 + Left = 280 end end object eCalle: TcxDBTextEdit - Left = 520 - Top = 387 + Left = 522 + Top = 371 DataBinding.DataField = 'CALLE' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -175,18 +190,22 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 14 Width = 284 end object ePoblacion: TcxDBTextEdit - Left = 520 - Top = 414 + Left = 522 + Top = 398 DataBinding.DataField = 'POBLACION' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -194,18 +213,22 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 15 Width = 61 end object eCodigoPostal: TcxDBTextEdit - Left = 721 - Top = 414 + Left = 739 + Top = 398 DataBinding.DataField = 'CODIGO_POSTAL' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -213,18 +236,22 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 16 Width = 65 end object eProvincia: TcxDBTextEdit - Left = 520 - Top = 441 + Left = 522 + Top = 425 DataBinding.DataField = 'PROVINCIA' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -232,18 +259,22 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 17 Width = 406 end object ePersonaContacto: TcxDBTextEdit - Left = 520 - Top = 468 + Left = 522 + Top = 452 DataBinding.DataField = 'PERSONA_CONTACTO' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -252,18 +283,22 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 18 Width = 284 end object eTlfTrabajo: TcxDBTextEdit - Left = 520 - Top = 495 + Left = 522 + Top = 479 DataBinding.DataField = 'TELEFONO' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -271,18 +306,22 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 19 Width = 284 end object bElegirDireccion: TBitBtn - Left = 614 - Top = 522 + Left = 632 + Top = 506 Width = 172 Height = 23 Action = actElegirDireccion @@ -290,7 +329,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente TabOrder = 20 end object Button1: TButton - Left = 264 + Left = 266 Top = 138 Width = 132 Height = 23 @@ -310,13 +349,17 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.TextColor = clWindowText StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 5 Width = 146 end @@ -340,19 +383,23 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.ButtonStyle = bts3D Style.PopupBorderStyle = epbsFrame3D StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 3 Width = 146 end object bFormasPago: TButton - Left = 264 + Left = 266 Top = 109 Width = 132 Height = 23 @@ -361,8 +408,8 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente OnClick = bFormasPagoClick end object eFechaRecepcion: TcxDBDateEdit - Left = 560 - Top = 330 + Left = 562 + Top = 314 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_RECEPCION' DataBinding.DataSource = DADataSource @@ -374,20 +421,24 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.ButtonStyle = bts3D Style.PopupBorderStyle = epbsFrame3D StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 13 Width = 239 end object cbConAlmacen: TCheckBox - Left = 32 - Top = 581 + Left = 438 + Top = 565 Width = 179 Height = 21 Caption = 'Asociar este albar'#225'n al almac'#233'n:' @@ -395,8 +446,8 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente OnClick = cbConAlmacenClick end object cbAlmacen: TcxDBLookupComboBox - Left = 217 - Top = 581 + Left = 623 + Top = 565 DataBinding.DataField = 'ID_ALMACEN' DataBinding.DataSource = DADataSource Properties.KeyFieldNames = 'ID' @@ -413,14 +464,18 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.ButtonStyle = bts3D Style.PopupBorderStyle = epbsFrame3D StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 22 Width = 586 end @@ -439,20 +494,24 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.Color = clMenuBar StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.TextColor = clWindowText StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 7 Width = 284 end object eFechaPrevista: TcxDBDateEdit - Left = 560 - Top = 276 + Left = 562 + Top = 260 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_PREVISTA_ENVIO' DataBinding.DataSource = DADataSource @@ -464,16 +523,20 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.Shadow = False Style.ButtonStyle = bts3D Style.ButtonTransparency = ebtNone Style.PopupBorderStyle = epbsFrame3D StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 11 Width = 239 end @@ -491,20 +554,24 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.Color = clMenuBar StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.TextColor = clWindowText StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 1 Width = 284 end object eFechaEnvio: TcxDBDateEdit - Left = 560 - Top = 303 + Left = 562 + Top = 287 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_ENVIO' DataBinding.DataSource = DADataSource @@ -516,14 +583,18 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.ButtonStyle = bts3D Style.PopupBorderStyle = epbsFrame3D StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 12 Width = 239 end @@ -545,7 +616,12 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente ExplicitWidth = 373 inherited dxLayoutControl1: TdxLayoutControl Width = 373 + ExplicitWidth = 373 inherited cbTienda: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 312 Width = 312 end @@ -554,245 +630,242 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False Hidden = True + LayoutDirection = ldHorizontal ShowBorder = False - object dxLayoutControl1Group16: TdxLayoutGroup + object dxLayoutControl1Group6: TdxLayoutGroup + AutoAligns = [aaVertical] + AlignHorz = ahClient ShowCaption = False Hidden = True - LayoutDirection = ldHorizontal ShowBorder = False - object dxLayoutControl1Group6: TdxLayoutGroup - AutoAligns = [aaVertical] + object dxLayoutControl1Group1: TdxLayoutGroup + AutoAligns = [] AlignHorz = ahClient - ShowCaption = False - Hidden = True - ShowBorder = False - object dxLayoutControl1Group1: TdxLayoutGroup - AutoAligns = [] - AlignHorz = ahClient - Caption = 'Datos del albar'#225'n' - object dxLayoutControl1Item3: TdxLayoutItem - Caption = 'Referencia:' - Control = eReferencia - ControlOptions.ShowBorder = False + Caption = 'Datos del albar'#225'n' + object dxLayoutControl1Item3: TdxLayoutItem + Caption = 'Referencia:' + Control = eReferencia + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item23: TdxLayoutItem + Caption = 'Ref. cliente:' + Control = eRefCliente + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item2: TdxLayoutItem + Caption = 'Fecha del albar'#225'n:' + Control = edtFechaAlbaran + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Group5: TdxLayoutGroup + ShowCaption = False + Hidden = True + ShowBorder = False + object dxLayoutControl1Group14: TdxLayoutGroup + ShowCaption = False + Visible = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item4: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Forma de pago' + Control = cbFormaPago + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item15: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + ShowCaption = False + Control = bFormasPago + ControlOptions.ShowBorder = False + end end - object dxLayoutControl1Item23: TdxLayoutItem - Caption = 'Ref. cliente:' - Control = eRefCliente - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item2: TdxLayoutItem - Caption = 'Fecha del albar'#225'n:' - Control = edtFechaAlbaran - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Group5: TdxLayoutGroup + object dxLayoutControl1Group13: TdxLayoutGroup ShowCaption = False Hidden = True ShowBorder = False - object dxLayoutControl1Group14: TdxLayoutGroup + object dxLayoutControl1Group15: TdxLayoutGroup ShowCaption = False Visible = False Hidden = True LayoutDirection = ldHorizontal ShowBorder = False - object dxLayoutControl1Item4: TdxLayoutItem + object dxLayoutControl1Item7: TdxLayoutItem AutoAligns = [aaVertical] AlignHorz = ahClient - Caption = 'Forma de pago' - Control = cbFormaPago + Caption = 'Ref. del pedido:' + Control = eReferenciaPedidoCli ControlOptions.ShowBorder = False end - object dxLayoutControl1Item15: TdxLayoutItem + object dxLayoutControl1Item5: TdxLayoutItem AutoAligns = [aaVertical] AlignHorz = ahRight + Caption = 'Button1' ShowCaption = False - Control = bFormasPago + Control = Button1 ControlOptions.ShowBorder = False end end - object dxLayoutControl1Group13: TdxLayoutGroup - ShowCaption = False - Hidden = True - ShowBorder = False - object dxLayoutControl1Group15: TdxLayoutGroup - ShowCaption = False - Hidden = True - LayoutDirection = ldHorizontal - ShowBorder = False - object dxLayoutControl1Item7: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Ref. del pedido:' - Control = eReferenciaPedidoCli - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item5: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahRight - Caption = 'Button1' - ShowCaption = False - Control = Button1 - ControlOptions.ShowBorder = False - end - end - object dxLayoutControl1Item22: TdxLayoutItem - Caption = 'Ref. factura:' - Control = eRefFacturaCli - ControlOptions.ShowBorder = False - end - end - end - end - object dxLayoutControl1Group17: TdxLayoutGroup - Caption = 'El albar'#225'n pertenece a la tienda' - object dxLayoutControl1Item17: TdxLayoutItem - Caption = 'New Item' - ShowCaption = False - Control = frViewTienda1 - ControlOptions.AutoColor = True - ControlOptions.ShowBorder = False - end - end - object dxLayoutControl1Group7: TdxLayoutGroup - AutoAligns = [aaHorizontal] - AlignVert = avClient - Caption = 'Observaciones' - object dxLayoutControl1Item6: TdxLayoutItem - AutoAligns = [aaHorizontal] - AlignVert = avClient - Control = memObservaciones - ControlOptions.ShowBorder = False - end - end - end - object dxLayoutControl1Group3: TdxLayoutGroup - AutoAligns = [aaVertical] - AlignHorz = ahClient - ShowCaption = False - Hidden = True - ShowBorder = False - object dxLayoutControl1Group2: TdxLayoutGroup - Caption = 'Datos del cliente' - object dxLayoutControl1Item1: TdxLayoutItem - Control = frViewClienteAlbaran - ControlOptions.AutoColor = True - ControlOptions.ShowBorder = False - end - end - object dxLayoutControl1Group12: TdxLayoutGroup - Caption = 'Fechas de envio y recepci'#243'n' - object dxLayoutControl1Item24: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Fecha prevista de envio:' - Offsets.Left = 10 - Control = eFechaPrevista - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item21: TdxLayoutItem - Caption = 'Fecha de envio:' - Offsets.Left = 10 - Control = eFechaEnvio - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item16: TdxLayoutItem - AutoAligns = [] - AlignHorz = ahClient - Caption = 'Fecha de recepci'#243'n:' - Offsets.Left = 10 - Control = eFechaRecepcion - ControlOptions.ShowBorder = False - end - end - object dxLayoutControl1Group8: TdxLayoutGroup - AutoAligns = [] - AlignHorz = ahClient - Caption = 'Direcci'#243'n de entrega' - Visible = False - object dxLayoutControl1Item8: TdxLayoutItem - Caption = 'Calle:' - Control = eCalle - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Group4: TdxLayoutGroup - ShowCaption = False - Hidden = True - ShowBorder = False - object dxLayoutControl1Group9: TdxLayoutGroup - ShowCaption = False - Hidden = True - LayoutDirection = ldHorizontal - ShowBorder = False - object dxLayoutControl1Item9: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Poblaci'#243'n:' - Control = ePoblacion - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item10: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahRight - Caption = 'C.P.:' - Control = eCodigoPostal - ControlOptions.ShowBorder = False - end - end - object dxLayoutControl1Item11: TdxLayoutItem - Caption = 'Provincia:' - Control = eProvincia - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item12: TdxLayoutItem - Caption = 'Pers. de contacto:' - Control = ePersonaContacto - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item13: TdxLayoutItem - Caption = 'Tel'#233'fono:' - Control = eTlfTrabajo - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item14: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahRight - ShowCaption = False - Control = bElegirDireccion + object dxLayoutControl1Item22: TdxLayoutItem + Caption = 'Ref. factura:' + Control = eRefFacturaCli ControlOptions.ShowBorder = False end end end end - end - object dxLayoutControl1Group11: TdxLayoutGroup - Caption = 'Almac'#233'n de origen' - Visible = False - object dxLayoutControl1Group10: TdxLayoutGroup - ShowCaption = False - Hidden = True - LayoutDirection = ldHorizontal - ShowBorder = False - object dxLayoutControl1Item19: TdxLayoutItem - Offsets.Left = 10 + object dxLayoutControl1Group17: TdxLayoutGroup + Caption = 'El albar'#225'n pertenece a la tienda' + object dxLayoutControl1Item17: TdxLayoutItem + Caption = 'New Item' ShowCaption = False - Control = cbConAlmacen + Control = frViewTienda1 ControlOptions.AutoColor = True ControlOptions.ShowBorder = False end - object dxLayoutControl1Item20: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Control = cbAlmacen + end + object dxLayoutControl1Group7: TdxLayoutGroup + AutoAligns = [aaHorizontal] + AlignVert = avClient + Caption = 'Observaciones' + object dxLayoutControl1Item6: TdxLayoutItem + AutoAligns = [aaHorizontal] + AlignVert = avClient + Control = memObservaciones ControlOptions.ShowBorder = False end end - object dxLayoutControl1Item18: TdxLayoutItem - Offsets.Bottom = 5 - Offsets.Top = 5 - ShowCaption = False - Control = Label1 - ControlOptions.AutoColor = True - ControlOptions.ShowBorder = False + end + object dxLayoutControl1Group3: TdxLayoutGroup + AutoAligns = [aaVertical] + AlignHorz = ahClient + ShowCaption = False + Hidden = True + ShowBorder = False + object dxLayoutControl1Group2: TdxLayoutGroup + Caption = 'Datos del cliente' + object dxLayoutControl1Item1: TdxLayoutItem + Control = frViewClienteAlbaran + ControlOptions.AutoColor = True + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Group12: TdxLayoutGroup + Caption = 'Fechas de envio y recepci'#243'n' + Visible = False + object dxLayoutControl1Item24: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Fecha prevista de envio:' + Offsets.Left = 10 + Control = eFechaPrevista + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item21: TdxLayoutItem + Caption = 'Fecha de envio:' + Offsets.Left = 10 + Control = eFechaEnvio + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item16: TdxLayoutItem + AutoAligns = [] + AlignHorz = ahClient + Caption = 'Fecha de recepci'#243'n:' + Offsets.Left = 10 + Control = eFechaRecepcion + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Group8: TdxLayoutGroup + AutoAligns = [] + AlignHorz = ahClient + Caption = 'Direcci'#243'n de entrega' + Visible = False + object dxLayoutControl1Item8: TdxLayoutItem + Caption = 'Calle:' + Control = eCalle + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Group4: TdxLayoutGroup + ShowCaption = False + Hidden = True + ShowBorder = False + object dxLayoutControl1Group9: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item9: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Poblaci'#243'n:' + Control = ePoblacion + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item10: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + Caption = 'C.P.:' + Control = eCodigoPostal + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Item11: TdxLayoutItem + Caption = 'Provincia:' + Control = eProvincia + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item12: TdxLayoutItem + Caption = 'Pers. de contacto:' + Control = ePersonaContacto + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item13: TdxLayoutItem + Caption = 'Tel'#233'fono:' + Control = eTlfTrabajo + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item14: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + ShowCaption = False + Control = bElegirDireccion + ControlOptions.ShowBorder = False + end + end + end + object dxLayoutControl1Group11: TdxLayoutGroup + Caption = 'Almac'#233'n de origen' + Visible = False + object dxLayoutControl1Group10: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item19: TdxLayoutItem + Offsets.Left = 10 + ShowCaption = False + Control = cbConAlmacen + ControlOptions.AutoColor = True + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item20: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Control = cbAlmacen + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Item18: TdxLayoutItem + Offsets.Bottom = 5 + Offsets.Top = 5 + ShowCaption = False + Control = Label1 + ControlOptions.AutoColor = True + ControlOptions.ShowBorder = False + end end end end @@ -805,8 +878,6 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Top = 48 object actElegirDireccion: TAction Caption = 'Elegir una direcci'#243'n de env'#237'o...' - OnExecute = actElegirDireccionExecute - OnUpdate = actElegirDireccionUpdate end object actVerPedidoCli: TAction Caption = 'Ver el pedido de cliente...' diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.pas index 94626e5c..c33ea64b 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.pas @@ -7,7 +7,7 @@ uses Dialogs, uViewBase, uBizAlbaranesCliente, DB, uDADataTable, uCustomView, AppEvnts, StdCtrls, Mask, DBCtrls, - uViewObservaciones, uViewDatosYSeleccionCliente, + uViewObservaciones, uViewDatosYSeleccionClienteAlbaran, cxGraphics, cxDropDownEdit, cxImageComboBox, cxDBEdit, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxCalendar, dxLayoutControl, cxControls, cxMemo, uViewDireccionEntregaAlbaranCliente, Buttons, ActnList, @@ -16,22 +16,17 @@ uses ExtCtrls, cxLookupEdit, cxDBLookupEdit, uBizFormasPago, cxDBLookupComboBox, uFormasPagoController, uAlmacenesController, uDAInterfaces, - uViewTienda, uAlbaranesClienteController; + uViewTienda, uAlbaranesClienteController, uViewDatosYSeleccionCliente; type IViewAlbaranCliente = interface(IViewBase) ['{F4946DFE-B64C-47C8-96D6-24549E6DAC11}'] - function GetController : IAlbaranesClienteController; - procedure SetController (const Value : IAlbaranesClienteController); - property Controller : IAlbaranesClienteController read GetController write SetController; - function GetAlbaran: IBizAlbaranCliente; procedure SetAlbaran(const Value: IBizAlbaranCliente); property Albaran: IBizAlbaranCliente read GetAlbaran write SetAlbaran; - function GetViewClienteAlbaran: TfrViewDatosYSeleccionCliente; - procedure SetViewClienteAlbaran(const Value: TfrViewDatosYSeleccionCliente); - property ViewClienteAlbaran: TfrViewDatosYSeleccionCliente read GetViewClienteAlbaran write SetViewClienteAlbaran; + function GetViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran; + property ViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran read GetViewClienteAlbaran; end; TfrViewAlbaranCliente = class(TfrViewBase, IViewAlbaranCliente) @@ -51,7 +46,7 @@ type dxLayoutControl1Group8: TdxLayoutGroup; dxLayoutControl1Group3: TdxLayoutGroup; dxLayoutControl1Item1: TdxLayoutItem; - frViewClienteAlbaran: TfrViewDatosYSeleccionCliente; + frViewClienteAlbaran: TfrViewDatosYSeleccionClienteAlbaran; dxLayoutControl1Item8: TdxLayoutItem; eCalle: TcxDBTextEdit; dxLayoutControl1Item9: TdxLayoutItem; @@ -104,13 +99,11 @@ type eRefCliente: TcxDBTextEdit; dxLayoutControl1Item21: TdxLayoutItem; eFechaEnvio: TcxDBDateEdit; - dxLayoutControl1Group16: TdxLayoutGroup; dxLayoutControl1Group17: TdxLayoutGroup; frViewTienda1: TfrViewTienda; dxLayoutControl1Item17: TdxLayoutItem; procedure CustomViewCreate(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); - procedure actElegirDireccionExecute(Sender: TObject); procedure actVerPedidoCliExecute(Sender: TObject); procedure bFormasPagoClick(Sender: TObject); @@ -122,7 +115,6 @@ type procedure eFechaRecepcionPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); procedure frViewClienteAlbaranactElegirContactoUpdate(Sender: TObject); - procedure actElegirDireccionUpdate(Sender: TObject); procedure actVerPedidoCliUpdate(Sender: TObject); procedure frViewClienteAlbaranButton1Click(Sender: TObject); procedure frViewClienteAlbaranButton2Click(Sender: TObject); @@ -134,21 +126,18 @@ type FAlmacenesController : IAlmacenesController; // FPedidoAsociado : IBizPedidoCliente; // FPedidoController : IPedidosClienteController; - FViewClienteAlbaran : TfrViewDatosYSeleccionCliente; + FViewClienteAlbaran : IViewDatosYSeleccionClienteAlbaran; FFormasPago : IBizFormaPago; FFormasPagoController : IFormasPagoController; function GetAlbaran: IBizAlbaranCliente; procedure SetAlbaran(const Value: IBizAlbaranCliente); virtual; - function GetController : IAlbaranesClienteController; - procedure SetController (const Value : IAlbaranesClienteController); - function GetViewClienteAlbaran: TfrViewDatosYSeleccionCliente; - procedure SetViewClienteAlbaran(const Value: TfrViewDatosYSeleccionCliente); + function GetViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran; public property Albaran: IBizAlbaranCliente read GetAlbaran write SetAlbaran; - property Controller : IAlbaranesClienteController read GetController write SetController; - property ViewClienteAlbaran: TfrViewDatosYSeleccionCliente read GetViewClienteAlbaran; + property ViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran read GetViewClienteAlbaran; + end; implementation @@ -163,68 +152,6 @@ uses uDialogUtils, uFactuGES_App; -procedure TfrViewAlbaranCliente.actElegirDireccionExecute(Sender: TObject); -var - AClientesController : IClientesController; - AAlbaranController : IAlbaranesClienteController; - ADireccion : IBizDireccionesContacto; -begin - inherited; -{ - try - case FFactura.Cliente.Direcciones.RecordCount of - 0 : //No hay direcciones secundarias asociadas - else ADireccion := AClientesController.ElegirDireccion(FFactura.Cliente, 'Seleccione la dirección del proveedor que quiere utilizar como dirección fiscal de esta factura.'); - end; - - // Si hay dirección de envio, copiarla al albarán y poner el coste del porte - if Assigned(ADireccion) then - begin - try - FFactura.Edit; - FFactura.IMPORTE_PORTE := ADireccion.PORTE; - FController.CopiarDireccion(ADireccion, FFactura); - finally - ADireccion := NIL; - end; - end - finally - AClientesController := Nil; - end; -} -{ - AClientesController := TClientesController.Create; - AAlbaranController := TAlbaranesClienteController.Create; - try - ADireccion := AClientesController.ElegirDireccion(FAlbaran.Cliente, 'Seleccione la dirección del cliente que quiere utilizar como dirección de envio de este albaran.'); - if Assigned(ADireccion) then - begin - AAlbaranController.CopiarDireccionEnvio(ADireccion, FAlbaran); - FAlbaran.Edit; - FAlbaran.IMPORTE_PORTE := ADireccion.PORTE; - end; - finally - AClientesController := NIL; - AAlbaranController := NIL; - end; -} -end; - -procedure TfrViewAlbaranCliente.actElegirDireccionUpdate(Sender: TObject); -begin - inherited; - if (Sender as TAction).Enabled then - (Sender as TAction).Enabled := (not ReadOnly) and - Assigned(FAlbaran) and - Assigned(FViewClienteAlbaran) and - FAlbaran.DataTable.Active and - Assigned(FAlbaran.Cliente) and - Assigned(FAlbaran.Cliente) and - Assigned(FAlbaran.Cliente.Direcciones) and - FAlbaran.Cliente.Direcciones.DataTable.Active and - (FAlbaran.Cliente.Direcciones.DataTable.RecordCount > 0); -end; - procedure TfrViewAlbaranCliente.actVerPedidoCliExecute(Sender: TObject); begin inherited; @@ -274,7 +201,6 @@ begin // FPedidoAsociado := NIL; // FPedidoController := TPedidosClienteController.Create; FViewClienteAlbaran := frViewClienteAlbaran; - FViewClienteAlbaran.MsgElegirCliente := 'Elija el cliente al que se le realizará el Albaran.'; FAlmacenesController := TAlmacenesController.Create; end; @@ -387,12 +313,7 @@ begin Result := FAlbaran; end; -function TfrViewAlbaranCliente.GetController: IAlbaranesClienteController; -begin - Result := FController; -end; - -function TfrViewAlbaranCliente.GetViewClienteAlbaran: TfrViewDatosYSeleccionCliente; +function TfrViewAlbaranCliente.GetViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran; begin Result := FViewClienteAlbaran; end; @@ -404,7 +325,7 @@ begin begin DADataSource.DataTable := FAlbaran.DataTable; frViewTienda1.DataItem := FAlbaran.DataTable; - frViewClienteAlbaran.Cliente := FAlbaran.Cliente; + FViewClienteAlbaran.Albaran := FAlbaran; FFormasPago := FFormasPagoController.BuscarTodos; dsFormaPago.DataTable := FFormasPago.DataTable; @@ -456,26 +377,11 @@ begin end else begin DADataSource.DataTable := NIL; - frViewClienteAlbaran.Cliente := nil; + FViewClienteAlbaran.Albaran := nil; // FPedidoAsociado := NIL; dsFormaPago.DataTable := NIL; dsAlmacenes.DataTable := NIL; end; end; -procedure TfrViewAlbaranCliente.SetController(const Value: IAlbaranesClienteController); -begin - FController := Value; - - if Assigned(FController) - and Assigned(ViewClienteAlbaran) then - ViewClienteAlbaran.Controller := FController.ClienteController; - -end; - -procedure TfrViewAlbaranCliente.SetViewClienteAlbaran(const Value: TfrViewDatosYSeleccionCliente); -begin - FViewClienteAlbaran := Value; -end; - end. diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranDevCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranDevCliente.dfm index ec26cf2e..bdee0729 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranDevCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranDevCliente.dfm @@ -1,91 +1,235 @@ inherited frViewAlbaranDevCliente: TfrViewAlbaranDevCliente inherited dxLayoutControl1: TdxLayoutControl + ExplicitHeight = 650 + inherited Label1: TLabel + Left = 352 + Width = 299 + ExplicitLeft = 352 + ExplicitWidth = 299 + end inherited edtFechaAlbaran: TcxDBDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 431 Width = 431 end inherited memObservaciones: TcxDBMemo - ExplicitWidth = 515 - ExplicitHeight = 253 - Height = 253 - Width = 515 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 499 + Width = 499 end inherited eReferencia: TcxDBTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 431 Width = 431 end - inherited frViewClienteAlbaran: TfrViewDatosYSeleccionCliente - Width = 219 - ExplicitWidth = 219 + inherited frViewClienteAlbaran: TfrViewDatosYSeleccionClienteAlbaran + Left = 352 + Width = 145 + ExplicitLeft = 352 + ExplicitWidth = 145 inherited dxLayoutControl1: TdxLayoutControl - Width = 219 + Width = 145 + ExplicitWidth = 219 inherited edtlNombre: TcxDBTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 210 Width = 210 end inherited edtNIFCIF: TcxDBTextEdit + Left = 231 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 231 ExplicitWidth = 210 Width = 210 end - inherited edtCalle: TcxDBTextEdit - ExplicitWidth = 210 - Width = 210 + inherited Button3: TBitBtn + Left = 249 + ExplicitLeft = 249 end - inherited edtPoblacion: TcxDBTextEdit - ExplicitWidth = 92 - Width = 92 + inherited edtPersonaContacto: TcxDBTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 283 + Width = 283 end - inherited edtProvincia: TcxDBTextEdit - ExplicitWidth = 210 - Width = 210 + inherited edtDireccion: TcxMemo + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 403 + Width = 403 + end + inherited Button4: TButton + Left = 418 + ExplicitLeft = 418 + end + inherited Button5: TButton + Left = 418 + ExplicitLeft = 418 end end end inherited eCalle: TcxDBTextEdit + Left = 446 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 446 ExplicitWidth = 125 Width = 125 end inherited ePoblacion: TcxDBTextEdit + Left = 446 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 446 ExplicitWidth = 24 Width = 24 end + inherited eCodigoPostal: TcxDBTextEdit + Left = 738 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 738 + end inherited eProvincia: TcxDBTextEdit + Left = 446 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 446 ExplicitWidth = 125 Width = 125 end inherited ePersonaContacto: TcxDBTextEdit + Left = 446 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 446 ExplicitWidth = 125 Width = 125 end inherited eTlfTrabajo: TcxDBTextEdit + Left = 446 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 446 ExplicitWidth = 125 Width = 125 end + inherited bElegirDireccion: TBitBtn + Left = 631 + ExplicitLeft = 631 + end + inherited Button1: TButton + Left = 190 + ExplicitLeft = 190 + end inherited eReferenciaPedidoCli: TcxTextEdit - ExplicitWidth = 293 - Width = 293 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 245 + Width = 245 end inherited cbFormaPago: TcxDBLookupComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 293 Width = 293 end + inherited bFormasPago: TButton + Left = 190 + ExplicitLeft = 190 + end inherited eFechaRecepcion: TcxDBDateEdit + Left = 486 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 486 ExplicitWidth = 85 Width = 85 end + inherited cbConAlmacen: TCheckBox + Left = 362 + ExplicitLeft = 362 + end + inherited cbAlmacen: TcxDBLookupComboBox + Left = 547 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 547 + ExplicitWidth = 586 + Width = 586 + end inherited eRefFacturaCli: TcxDBTextEdit - ExplicitWidth = 431 - Width = 431 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 381 + Width = 381 end inherited eFechaPrevista: TcxDBDateEdit + Left = 486 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 486 ExplicitWidth = 85 Width = 85 end inherited eRefCliente: TcxDBTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 431 Width = 431 end inherited eFechaEnvio: TcxDBDateEdit + Left = 486 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 486 ExplicitWidth = 85 Width = 85 end @@ -94,50 +238,31 @@ inherited frViewAlbaranDevCliente: TfrViewAlbaranDevCliente ExplicitWidth = 515 inherited dxLayoutControl1: TdxLayoutControl Width = 515 - ExplicitWidth = 822 + ExplicitWidth = 515 inherited cbTienda: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 454 Width = 454 end end end inherited dxLayoutControl1Group_Root: TdxLayoutGroup - inherited dxLayoutControl1Group16: TdxLayoutGroup - inherited dxLayoutControl1Group6: TdxLayoutGroup - inherited dxLayoutControl1Group1: TdxLayoutGroup - Caption = 'Datos de la orden' - inherited dxLayoutControl1Item2: TdxLayoutItem - Caption = 'Fecha de orden:' - end - inherited dxLayoutControl1Group5: TdxLayoutGroup - inherited dxLayoutControl1Group13: TdxLayoutGroup - inherited dxLayoutControl1Group15: TdxLayoutGroup - Visible = False - end - inherited dxLayoutControl1Item22: TdxLayoutItem - Caption = 'Ref. abono:' - end - end + inherited dxLayoutControl1Group3: TdxLayoutGroup + inherited dxLayoutControl1Group11: TdxLayoutGroup + Caption = 'Almac'#233'n de entrada' + inherited dxLayoutControl1Group10: TdxLayoutGroup + inherited dxLayoutControl1Item19: TdxLayoutItem + Visible = False end end - end - inherited dxLayoutControl1Group3: TdxLayoutGroup - inherited dxLayoutControl1Group12: TdxLayoutGroup + inherited dxLayoutControl1Item18: TdxLayoutItem Visible = False end end end - inherited dxLayoutControl1Group11: TdxLayoutGroup - Caption = 'Almac'#233'n de entrada' - inherited dxLayoutControl1Group10: TdxLayoutGroup - inherited dxLayoutControl1Item19: TdxLayoutItem - Visible = False - end - end - inherited dxLayoutControl1Item18: TdxLayoutItem - Visible = False - end - end end end end diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranDevCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranDevCliente.pas index e030bab3..33160106 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranDevCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranDevCliente.pas @@ -8,7 +8,8 @@ uses dxLayoutControl, StdCtrls, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, cxTextEdit, Buttons, uCustomView, uViewBase, uViewDatosYSeleccionCliente, cxDBEdit, cxMemo, cxContainer, cxEdit, - cxMaskEdit, cxCalendar, cxControls, uDAInterfaces, uViewTienda; + cxMaskEdit, cxCalendar, cxControls, uDAInterfaces, uViewTienda, + uViewDatosYSeleccionClienteAlbaran; type TfrViewAlbaranDevCliente = class(TfrViewAlbaranCliente) diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.dfm new file mode 100644 index 00000000..621b9af3 --- /dev/null +++ b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.dfm @@ -0,0 +1,495 @@ +inherited frViewDatosYSeleccionClienteAlbaran: TfrViewDatosYSeleccionClienteAlbaran + Width = 505 + Height = 196 + ExplicitWidth = 505 + ExplicitHeight = 196 + object dxLayoutControl1: TdxLayoutControl + Left = 0 + Top = 0 + Width = 505 + Height = 196 + Margins.Left = 0 + Margins.Top = 0 + Margins.Right = 0 + Margins.Bottom = 0 + Align = alClient + ParentBackground = True + TabOrder = 0 + TabStop = False + AutoContentSizes = [acsWidth, acsHeight] + DesignSize = ( + 505 + 196) + object edtlNombre: TcxDBTextEdit + Left = 63 + Top = 41 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + DataBinding.DataField = 'NOMBRE' + DataBinding.DataSource = dsCliente + Enabled = False + ParentFont = False + Properties.ReadOnly = True + Properties.UseLeftAlignmentOnEditing = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 2 + Height = 21 + Width = 224 + end + object edtNIFCIF: TcxDBTextEdit + Left = 392 + Top = 41 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + DataBinding.DataField = 'NIF_CIF' + DataBinding.DataSource = dsCliente + Enabled = False + ParentFont = False + Properties.ReadOnly = True + Properties.UseLeftAlignmentOnEditing = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 3 + Height = 21 + Width = 103 + end + object Button1: TBitBtn + Left = 10 + Top = 10 + Width = 115 + Height = 25 + Action = actElegirContacto + Caption = 'Elegir un cliente' + TabOrder = 0 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000000000000000000000000000000000000FF00FF00FF00 + FF00FF00FF00EB00EB00C507C600AB13AD00A119A2009F19A000A215A400AA10 + AC00B608B800CE00CE00EF00EF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00B426B000526840004A823400478F310043962F0042992F0043972F004690 + 3100488533004B7237005A405100D201D200FF00FF00FF00FF00FF00FF00FF00 + FF0062654E004F81350047903100409C2E003AA62C0038AA2B0039A72B003E9E + 2D00459230004D84340056753800A0189F00FF00FF00FF00FF00FF00FF00FF00 + FF005F6B4C004B89330042992F0039A82B0032B428002EBB260031B6270037AB + 2A00409C2E00498C3200527B3600B015B100FF00FF00FF00FF00FF00FF00FF00 + FF0090488700488D32003E9E2D0035AF290035B631007ACB7B002DBF280033B2 + 28003DA12D0047903100576A4800EC01EC00FF00FF00FF00FF00FF00FF00FF00 + FF00F008F1005F7351003E9F2D0034B0290080AC8100D2D3D30081BB820032B2 + 28003DA22D004A863A00C519C500FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00EE09EF007861730036923E00598CAE00498CBB004A81A6002B70 + 3A00606D5900D613D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00EA0CF400608CD00054A2D80053A1D6004F9DD300488B + C2009D11AC00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF008C67DE005CA9DD005CA9DD005AA7DC0056A4D900519F + D400565FAB00EA00EA00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00EC0DF60060A7DE0063B0E30063B0E30061AEE1005CA9DD0056A4 + D9004E94CC00C105C600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00C532ED0066B2E5006BB7E9006BB7E90067B3E60061AEE1005AA7 + DC00539FD500A817BE00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00BA3AE7004989B1004A85AC005895BD0068B2E30064B0E4005CA9 + DE0053A0D400AA1BC300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00CA23E8005098C400539AC7004E93BE00437DA2005190BA005198 + C6003C79A000BE08C300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00F804FC006995D40062ACDA005DA6D3005299C6004284AD003C7F + A900535AA100F300F300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00C140ED0071BAEA0068B2E00059A1CF004990BC004378 + AA00C315D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00C83EF000808BDF00668BCC007C60C700D116 + E400FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00} + end + object Button2: TBitBtn + Left = 131 + Top = 10 + Width = 143 + Height = 25 + Action = actAnadirContacto + Caption = 'Dar de alta un cliente' + TabOrder = 1 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000000000000000000000000000000000000FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00D5BFB1006947 + 3100694731006947310069473100694731006947310069473100694731006947 + 3100694731006947310069473100694731006947310069473100D5BFB100F6F2 + EF00B7A29300B7A29300B7A29300B7A29300B7A29300B7A29300B7A29300B7A2 + 9300B7A29300B7A29300B7A29300B7A29300B7A2930069473100D5BFB1002A80 + 1E00136F0D00136F0D00136F0D00136F0D00136F0D00136F0D002A801E00E3D5 + CE00E0D1C900DFCFC600DCCBC100DBC9BF00B7A2930069473100D5BFB10059A8 + 5100448B2F003CA02C0032A4260032A526003D9E2C00438D2E00136F0D00E7DB + D500A1745C00A1745C00A1745C00A1745C00B7A2930069473100D5BFB10080BC + 790042952E0031A62600369B3200369E320032A727003E952C00136F0D00EAE0 + DA00E7DBD500E4D7D000E2D3CB00DFCFC600B7A2930069473100D5BFB100CFE8 + CD004CA741002D942F0071AB90006FA68E0030923100136F0D00EFE8E300EDE4 + DF00A1745C00A1745C00A1745C00A1745C00B7A2930069473100D5BFB100FFFF + FF00B9DDC2004F9DA000559BC8004E96C2004E8E8F00A8C2AA00F2ECE800EFE8 + E300EDE4DF00EAE0DA00E7DBD500E4D7D000B7A2930069473100D5BFB100FFFF + FF00A5CDE8005DAADD005CA9DD0057A4D900519ACC00A0BACA00F5F0ED00F2EC + E800EFE8E300EDE4DF00EAE0DA00E7DBD500B7A2930069473100D5BFB100ECF6 + FA006CB9DF0065B2E50065B1E5005FACDF0056A2D700689EBE00F7F4F100F5F0 + ED00F2ECE800006000000060000000600000B7A2930069473100D5BFB100E9F6 + FA005BB0D5005CA6D50065AFDF0062AFE20058A4D8003285A700FAF8F600F7F4 + F100F7A073000060000033CB510000600000B7A2930069473100D5BFB100F4FA + FC0078C0DD0056A0CD00569DCA00539CCA00448DBB003285A700FDFCFB000060 + 0000006000000060000040D86500006000000060000000600000D5BFB100FFFF + FF00CEEAF40062B5DE005DA7D5004B92BE003285A700C6DCE600FFFFFF000060 + 000060F898005AF28F004DE57A0040D865003AD25C0000600000D5BFB100FFFF + FF00FFFFFF00CEEAF400A5CDE800A5CDE800CEEAF400FFFFFF00FFFFFF000060 + 000000600000006000005AF28F00006000000060000000600000D5BFB100D5BF + B100D5BFB100D5BFB100D5BFB100D5BFB100D5BFB100D5BFB100D5BFB100D5BF + B100D5BFB1000060000060F8980000600000D5BFB100D5BFB100FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00006000000060000000600000FF00FF00FF00FF00} + end + object Button3: TBitBtn + Left = 303 + Top = 158 + Width = 192 + Height = 25 + Action = actVerContacto + Caption = 'Ver ficha completa del cliente...' + TabOrder = 8 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000000000000000000000000000000000000FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00D5BFB1006947 + 3100694731006947310069473100694731006947310069473100694731006947 + 3100694731006947310069473100694731006947310069473100D5BFB100F6F2 + EF00B7A29300B7A29300B7A29300B7A29300B7A29300B7A29300B7A29300B7A2 + 9300B7A29300B7A29300B7A29300B7A29300B7A2930069473100D5BFB1002A80 + 1E00136F0D00136F0D00136F0D00136F0D00136F0D00136F0D002A801E00E3D5 + CE00E0D1C900DFCFC600DCCBC100DBC9BF00B7A2930069473100D5BFB10059A8 + 5100448B2F003CA02C0032A4260032A526003D9E2C00438D2E00136F0D00E7DB + D500A1745C00A1745C00A1745C00A1745C00B7A2930069473100D5BFB10080BC + 790042952E0031A62600369B3200369E320032A727003E952C00136F0D00EAE0 + DA00E7DBD500E4D7D000E2D3CB00DFCFC600B7A2930069473100D5BFB100CFE8 + CD004CA741002D942F0071AB90006FA68E0030923100136F0D00EFE8E300EDE4 + DF00A1745C00A1745C00A1745C00A1745C00B7A2930069473100D5BFB100FFFF + FF00B9DDC2004F9DA000559BC8004E96C2004E8E8F00A8C2AA00F2ECE800EFE8 + E300EDE4DF00EAE0DA00E7DBD500E4D7D000B7A2930069473100D5BFB100FFFF + FF00A5CDE8005DAADD005CA9DD0057A4D900519ACC00A0BACA00F5F0ED00F2EC + E800EFE8E300EDE4DF00EAE0DA00E7DBD500B7A2930069473100D5BFB100ECF6 + FA006CB9DF0065B2E50065B1E5005FACDF0056A2D700689EBE00F7F4F100F5F0 + ED00F2ECE800EFE8E300EDE4DF00EAE0DA00B7A2930069473100D5BFB100E9F6 + FA005BB0D5005CA6D50065AFDF0062AFE20058A4D8003285A700FAF8F600F7F4 + F100F7A07300F7A07300F7A07300F7A07300B7A2930069473100D5BFB100F4FA + FC0078C0DD0056A0CD00569DCA00539CCA00448DBB003285A700FDFCFB00FAF8 + F600F7F4F100F5F0ED00F2ECE800EFE8E300B7A2930069473100D5BFB100FFFF + FF00CEEAF40062B5DE005DA7D5004B92BE003285A700C6DCE600FFFFFF00FDFC + FB00F7A07300F7A07300F7A07300F7A07300B7A2930069473100D5BFB100FFFF + FF00FFFFFF00CEEAF400A5CDE800A5CDE800CEEAF400FFFFFF00FFFFFF00FFFF + FF00FEFEFD00FCFAF900F9F6F400F6F2EF00F3EEEA0069473100D5BFB100D5BF + B100D5BFB100D5BFB100D5BFB100D5BFB100D5BFB100D5BFB100D5BFB100D5BF + B100D5BFB100D5BFB100D5BFB100D5BFB100D5BFB100D5BFB100FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00} + end + object edtPersonaContacto: TcxDBTextEdit + Left = 63 + Top = 129 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + DataBinding.DataField = 'PERSONA_CONTACTO' + DataBinding.DataSource = dsAlbaran + ParentFont = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 6 + Height = 21 + Width = 283 + end + object edtDireccion: TcxMemo + Left = 63 + Top = 68 + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 4 + Height = 53 + Width = 403 + end + object Button4: TButton + Left = 472 + Top = 68 + Width = 23 + Height = 25 + Action = actElegirDireccion + TabOrder = 5 + end + object Button5: TButton + Left = 472 + Top = 127 + Width = 23 + Height = 25 + Action = actElegirPersonaContacto + TabOrder = 7 + end + object dxLayoutControl1Group_Root: TdxLayoutGroup + ShowCaption = False + Hidden = True + ShowBorder = False + object dxLayoutControl1Group1: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item7: TdxLayoutItem + Caption = 'Button1' + ShowCaption = False + Control = Button1 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item8: TdxLayoutItem + Caption = 'Button2' + ShowCaption = False + Control = Button2 + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Group2: TdxLayoutGroup + ShowCaption = False + Hidden = True + ShowBorder = False + object dxLayoutControl1Group4: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item1: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Nombre:' + Control = edtlNombre + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item2: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + Caption = 'NIF/CIF:' + Control = edtNIFCIF + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Group3: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item4: TdxLayoutItem + AutoAligns = [] + AlignHorz = ahClient + AlignVert = avCenter + Caption = 'Direcci'#243'n' + CaptionOptions.AlignVert = tavTop + Control = edtDireccion + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item5: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + Caption = 'Button4' + ShowCaption = False + Control = Button4 + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Group5: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item3: TdxLayoutItem + AutoAligns = [] + AlignHorz = ahClient + AlignVert = avCenter + Caption = 'Contacto:' + Control = edtPersonaContacto + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item6: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + ShowCaption = False + Control = Button5 + ControlOptions.ShowBorder = False + end + end + end + object dxLayoutControl1Item9: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + Caption = 'Button3' + ShowCaption = False + Control = Button3 + ControlOptions.ShowBorder = False + end + end + end + object dsCliente: TDADataSource + Left = 400 + Top = 8 + end + object ActionList1: TActionList + Images = PngImageList + Left = 368 + Top = 8 + object actElegirContacto: TAction + Caption = 'Elegir un cliente' + ImageIndex = 1 + OnExecute = actElegirContactoExecute + end + object actAnadirContacto: TAction + Caption = 'Dar de alta un cliente' + ImageIndex = 0 + OnExecute = actAnadirContactoExecute + end + object actVerContacto: TAction + Caption = 'Ver ficha completa del cliente...' + ImageIndex = 2 + OnExecute = actVerContactoExecute + OnUpdate = actVerContactoUpdate + end + object actElegirDireccion: TAction + Caption = '...' + OnExecute = actElegirDireccionExecute + OnUpdate = actElegirDireccionUpdate + end + object actElegirPersonaContacto: TAction + Caption = '...' + OnExecute = actElegirPersonaContactoExecute + OnUpdate = actElegirPersonaContactoUpdate + end + end + object PngImageList: TPngImageList + PngImages = < + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD252000002224944415478DA + 95935D48936114C77FCB36584A6064161515DEA441108B240293E8A682246805 + DEA45020F40196505D081242DE94512B8C20169937056914D52E726B6083B114 + D44CD3D51A216BB6656B5FEF677B5FF31D23033DF070CE03CFFFF73F1CCE6362 + 29D1806AD44E4C5A32F5F58FAA8BD5D73DD8465757034D4D4EFA4E8C62000ED7 + 56E997647490DFE131BD2ED9584971D98EB9478D2603D279B39EE6733DC6DD00 + 68E2EF7E07E95F2291688C48629ABDC71DACABD8AD0334E7B420104D24F4A3D5 + DDD707E60087F66C2234D0CECF2F41643987556566676799C9C4387AD18FF964 + 91E178EA522DF73ADC851D1CA85ECD27D77948995861B552844C2A9962303441 + DD051FA22473E5095C735B3972DAC6D3DB016EED7BC9FD47CFE601E57CF3B661 + C966D1E62C880299549A696915B6639D4892A243D6B6AC349C0B00DA0C22EF7B + 484EBDCA015424512491125036D751B1CBAE8BB5330F12459937EF860A01DEA0 + 8BA0FB0E5B154BAE832C810CACDF594F4DD5C17FC45AF6FA87F3800D95022DFD + ADC47E84682CDF8F222A3C9CF1303915E6C3E5495DDC7AE379C14E546F5F9307 + F8E4C7BC187F4BA6344E49D24C6E8A24AD12E65809A1895102CD6386B3F8B793 + C0F0C73CC0196927188E2297651096A7D096D4922D6659DCC2E7AF43F8CE8C70 + F5AEEBFF1D9CF5D889C7230BAE6F696939BDF6D7BAABACA87A567279647C320F + A8B16DA1BBD7B3A47FA5850168EB702C596C6CA2AA2EFA332E187F0080F1503E + 182A98A90000000049454E44AE426082} + Name = 'PngImage0' + Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 61000000097048597300000AC400000AC401666D82D4000002A94944415478DA + 7D925D48536118C79FF3B5AF36DD66B639CB924243225010BC49BA914004CDE8 + E32228B482EA4689A22289C8CBA28B32B1061688902912D28D16991F6062B2DC + 45921FB954669BF39C9D6DE7EC9CF3EEBC9D2D8C2CB7079E9BF779FEBFF7F922 + 30C69034822060D3665F5F3A0B90B8C672FCAEC07AD8E35DF0DFBFE3F64EC05F + F647F72FC0DB75AED1E1B43D138438C9B26108B11C0443BC30ECF959D731303F + 9411D0D35C612C2ADBEF3319F5B992AC402412037F9003A4C8E05F17679BDA3E + 976BA9D1F4807B95552E877D90222910250556023170E66481D900F0CD17C0AD + 5DDE63F3CBFC505AC0685B6DE34654762B88009B350B8AF658815011C8521C04 + 518487DD530D9D83BECEB480C98EDA13F9798E5E9A61526F098440D1CA572409 + 24298EEFBA271B7BC756D203FA5A8FE49516EDF3313A5D8AA0AAAAD6BF929A01 + CFC7505DCBBBAAD590349C710BD3EEFA57D916D3A954920648249255283031B3 + 3A7BE1D164A5F61CCC0878D15C917FA8C43165D6334E558B25DBD80847E51BCF + A79B3E7D65DB33AEF1E04D570EE5723DB513C4C966E9006101ED0662043C6697 + 30B7DB3021CE6D5C5EEA58FAB22DE0F0ADBD36D25E38A6E6E2126413E00CAA81 + FAE27AE85FEB876EF10D30DC0E2083542432F3E3F8E2CBC5F7FF01CA5A8E3E21 + 6CC6AB8A264636110C7A80EADC2AE88B0E004474C0B026A035C76BF2B2A7ED43 + 29E671680BA0FC76B50F5BC902641501658B90304BA0EA11100A05544C0774D8 + 0834A7396B04DFE8C8E9B58FC19EAD80EB358B84852E44D9F1DF62930C9856B5 + 6320801419A0A27AA079430AB4303E722530EE6FDF3A838B15E729B3E50195C3 + D855B34A247F074A8BA91A40A2808C91803955E6E70233F36F3D0D58C6DEEDD6 + B8D35040179B9DA602305266AC028925A4A0B822A090C20BAB09BF96F35D736E + 53F70B90E997F07974AFDF0000000049454E44AE426082} + Name = 'PngImage1' + Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD252000001EC4944415478DA + A5934B6813511486BF541B88CD26620DA262A51BDB8520158308D5852055B01B + A3E8CEBD2E7CE063512852D09D2E82E04604AB1B5D4451B059D8A6010D84D842 + 5B6B6B1A8D414A4C9B18EB4C27F3F466D41943ED4233309C3BDC39DFFFDF9F7B + 3C9665D1C8E379323CD510C1061C3DD0697F48C531BEE7A7EDB57F6B072DADBB + 9C1F4DE154D74D34DD70DE43272FB9805AF3975484E56F1A856289C2D23CFB4F + 44D8D4BE17DD30B932A8D629B7358D70F7C1D39F8023FBB6917B35C0D78F590C + 43EC5A06954A8505A5C4B1CB2947F14F07D158D205F48436F03E761E640FEB7C + 3ED660204B3263B9597A2F24ED866B8F59DD414F28C8E7443FDE6A55A883AAA9 + 28F232F3FA7ABA8EDFAC53FEBD1E1A4DBB805A0685370F91E65E0880084BD358 + 9255CCB65EDAF784571E413378F97ABC1E90C8C6C88EDC6687E9150EAAA415D8 + BCFB14DD9D875734D76A2235E102B674A85C1CEEA3B498E374F020A666727F21 + 4E662ECFDBAB19BBB9EFD6B3BA0C423B37BA80A4F188E733A32881327EA91991 + 22924FA7B9E427373B45FADCB4A3ACFD72929E78E702EE1506C8E68B18AD0AEA + 5A595C2F44A02D3495BD7CF8344EF2CC24D7EFC4567770361EA65C2EFCF5AA06 + 0241A2E1215BD5302DBB9AA24ECE645C4077D77606A3F17F9E0307D07F23F2FF + C3D4E838FF008E7263BE13CA147C0000000049454E44AE426082} + Name = 'PngImage2' + Background = clWindow + end> + Left = 304 + Top = 8 + Bitmap = {} + end + object dsAlbaran: TDADataSource + Left = 336 + Top = 8 + end +end diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas new file mode 100644 index 00000000..a6a7f271 --- /dev/null +++ b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas @@ -0,0 +1,418 @@ +unit uViewDatosYSeleccionClienteAlbaran; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uViewBase, StdCtrls, cxControls, cxContainer, cxEdit, cxLabel, + cxDBLabel, ExtCtrls, DB, uDADataTable, uBizContactos, + ComCtrls, ToolWin, ActnList, ImgList, PngImageList, cxTextEdit, cxDBEdit, + pngimage, JvExControls, JvComponent, JvButton, JvTransparentButton, Mask, + DBCtrls, uClientesController, dxLayoutControl, Buttons, uDAInterfaces, + cxMaskEdit, cxButtonEdit, uBizAlbaranesCliente, uBizDireccionesContacto, + uDireccionesContactoController, Menus, cxLookAndFeelPainters, cxButtons, + cxMemo; + +type + IViewDatosYSeleccionClienteAlbaran = interface(IViewBase) + ['{02F0A00C-FAE7-43A4-B959-D2B929FF287A}'] + function GetAlbaran: IBizAlbaranCliente; + procedure SetAlbaran(const Value: IBizAlbaranCliente); + property Albaran: IBizAlbaranCliente read GetAlbaran write SetAlbaran; + + function GetCliente: IBizCliente; + procedure SetCliente(Value: IBizCliente); + property Cliente: IBizCliente read GetCliente write SetCliente; + + function GetID_Cliente: integer; + procedure SetID_Cliente(const Value: integer); + property ID_Cliente: integer read GetID_Cliente write SetID_Cliente; + + function GetOnClienteChanged : TNotifyEvent; + procedure SetOnClienteChanged (const Value : TNotifyEvent); + property OnClienteChanged : TNotifyEvent read GetOnClienteChanged + write SetOnClienteChanged; + + procedure ElegirPersonaContacto; + procedure ElegirDireccionCliente; + procedure ElegirCliente; + procedure VerFichaCliente; + procedure AnadirNuevoCliente; + procedure RefrescarDireccion; + end; + + TfrViewDatosYSeleccionClienteAlbaran = class(TfrViewBase, IViewDatosYSeleccionClienteAlbaran) + dsCliente: TDADataSource; + ActionList1: TActionList; + actElegirContacto: TAction; + actAnadirContacto: TAction; + actVerContacto: TAction; + PngImageList: TPngImageList; + dxLayoutControl1Group_Root: TdxLayoutGroup; + dxLayoutControl1: TdxLayoutControl; + dxLayoutControl1Item1: TdxLayoutItem; + edtlNombre: TcxDBTextEdit; + dxLayoutControl1Item2: TdxLayoutItem; + edtNIFCIF: TcxDBTextEdit; + Button1: TBitBtn; + dxLayoutControl1Item7: TdxLayoutItem; + Button2: TBitBtn; + dxLayoutControl1Item8: TdxLayoutItem; + Button3: TBitBtn; + dxLayoutControl1Item9: TdxLayoutItem; + dxLayoutControl1Group1: TdxLayoutGroup; + dxLayoutControl1Group2: TdxLayoutGroup; + dsAlbaran: TDADataSource; + actElegirDireccion: TAction; + actElegirPersonaContacto: TAction; + dxLayoutControl1Item3: TdxLayoutItem; + edtPersonaContacto: TcxDBTextEdit; + dxLayoutControl1Group4: TdxLayoutGroup; + dxLayoutControl1Item4: TdxLayoutItem; + edtDireccion: TcxMemo; + Button4: TButton; + dxLayoutControl1Item5: TdxLayoutItem; + dxLayoutControl1Group3: TdxLayoutGroup; + dxLayoutControl1Item6: TdxLayoutItem; + Button5: TButton; + dxLayoutControl1Group5: TdxLayoutGroup; + procedure actElegirContactoExecute(Sender: TObject); + procedure actAnadirContactoExecute(Sender: TObject); + procedure actVerContactoUpdate(Sender: TObject); + procedure edtPersonaContactoPropertiesButtonClick(Sender: TObject; + AButtonIndex: Integer); + procedure edtDireccionPropertiesButtonClick(Sender: TObject; + AButtonIndex: Integer); + procedure actVerContactoExecute(Sender: TObject); + procedure actElegirDireccionUpdate(Sender: TObject); + procedure actElegirDireccionExecute(Sender: TObject); + procedure actElegirPersonaContactoExecute(Sender: TObject); + procedure actElegirPersonaContactoUpdate(Sender: TObject); + + private + FOnClienteChanged : TNotifyEvent; + FMsgElegirCliente: String; + protected + FClientesController : IClientesController; + FDireccionesController : IDireccionesContactoController; + FAlbaran : IBizAlbaranCliente; + FCliente : IBizCliente; + FDireccion : IBizDireccionesContacto; + function GetCliente: IBizCliente; virtual; + procedure SetCliente(Value: IBizCliente); virtual; + function GetOnClienteChanged : TNotifyEvent; + procedure SetOnClienteChanged (const Value : TNotifyEvent); + procedure SetReadOnly(Value: Boolean); override; + function GetID_Cliente: integer; virtual; + procedure SetID_Cliente(const Value: integer); virtual; + function GetAlbaran: IBizAlbaranCliente; + procedure SetAlbaran(const Value: IBizAlbaranCliente); + procedure EscribirTextoDireccion; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure ElegirPersonaContacto; + procedure ElegirDireccionCliente; + procedure ElegirCliente; + procedure VerFichaCliente; + procedure AnadirNuevoCliente; + procedure RefrescarDireccion; + property Albaran: IBizAlbaranCliente read GetAlbaran write SetAlbaran; + property Cliente: IBizCliente read GetCliente write SetCliente; + property OnClienteChanged : TNotifyEvent read GetOnClienteChanged write SetOnClienteChanged; + property ID_Cliente: integer read GetID_Cliente write SetID_Cliente; + end; + +implementation + +{$R *.dfm} + +uses + uDataModuleClientes, Math, uCustomView, uBizContactosPersonal, uDialogUtils; + + +procedure TfrViewDatosYSeleccionClienteAlbaran.actElegirContactoExecute(Sender: TObject); +begin + ElegirCliente; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.actElegirDireccionExecute( + Sender: TObject); +begin + inherited; + ElegirDireccionCliente; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.actElegirDireccionUpdate( + Sender: TObject); +begin + inherited; + (Sender as TAction).Enabled := Assigned(FCliente.Direcciones) and + (FCliente.Direcciones.Active) and (FCliente.Direcciones.RecordCount > 0); +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.actElegirPersonaContactoExecute( + Sender: TObject); +begin + inherited; + ElegirPersonaContacto; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.actElegirPersonaContactoUpdate( + Sender: TObject); +begin + inherited; + (Sender as TAction).Enabled := Assigned(FCliente.Personal) and + (FCliente.Personal.Active) and (FCliente.Personal.RecordCount > 0); +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.actAnadirContactoExecute( + Sender: TObject); +begin + AnadirNuevoCliente; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.actVerContactoExecute( + Sender: TObject); +begin + inherited; + VerFichaCliente; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.actVerContactoUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Enabled := (Length(edtlNombre.Text) > 0); +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.AnadirNuevoCliente; +var + ACliente : IBizCliente; +begin + inherited; + ACliente := (FClientesController.Nuevo as IBizCliente); + FClientesController.Ver(ACliente); + Self.Cliente := ACliente; +end; + +constructor TfrViewDatosYSeleccionClienteAlbaran.Create(AOwner: TComponent); +begin + inherited; + FMsgElegirCliente := 'Elija el cliente al que se le realizará el presupuesto.'; + FClientesController := TClientesController.Create; + FDireccionesController := TDireccionesContactoController.Create; + + edtlNombre.Enabled := False; + edtNIFCIF.Enabled := False; + edtDireccion.Enabled := False; + edtPersonaContacto.Enabled := False; +end; + +destructor TfrViewDatosYSeleccionClienteAlbaran.Destroy; +begin + FClientesController := NIL; + FDireccionesController := NIL; + inherited; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.edtDireccionPropertiesButtonClick( + Sender: TObject; AButtonIndex: Integer); +begin + inherited; + ElegirDireccionCliente; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.edtPersonaContactoPropertiesButtonClick( + Sender: TObject; AButtonIndex: Integer); +begin + inherited; + ElegirPersonaContacto; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.ElegirCliente; +var + ACliente : IBizCliente; +begin + inherited; + + ACliente := (FClientesController.ElegirContacto(FClientesController.BuscarTodos, FMsgElegirCliente, False) as IBizCliente); + + if Assigned(ACliente) then + Self.Cliente := ACliente; + ACliente := Nil; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.ElegirDireccionCliente; +var + ADireccion : IBizDireccionesContacto; +begin + inherited; + ADireccion := FClientesController.ElegirDireccion(FCliente, ' '); + + if Assigned(ADireccion) then + begin + FDireccion := ADireccion; + FAlbaran.Edit; + + if FDireccion.IDIsNull then // Es la dirección de la razón social + begin + FAlbaran.ClearField('ID_DIRECCION'); + FAlbaran.ClearField('IMPORTE_PORTE'); + end + else begin + FAlbaran.ID_DIRECCION := FDireccion.ID; + FAlbaran.IMPORTE_PORTE := FDireccion.PORTE; + FAlbaran.PERSONA_CONTACTO := FDireccion.PERSONA_CONTACTO; + end; + EscribirTextoDireccion; + end; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.ElegirPersonaContacto; +var + APersona : IBizContactoPersonal; +begin + inherited; + APersona := FClientesController.ElegirPersonaContacto(FCliente.Personal, 'El cliente dispone de personas de contacto dadas de alta en su ficha. Seleccione la que quiere utilizar.'); + if Assigned(APersona) then + begin + FAlbaran.Edit; + FAlbaran.PERSONA_CONTACTO := APersona.NOMBRE; + end; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.EscribirTextoDireccion; +var + ACadena : String; +begin + ACadena := ''; + + if Assigned(FDireccion) then + ACadena := Format('%s %s %s %s', + [FDireccion.CALLE, FDireccion.POBLACION, + FDireccion.CODIGO_POSTAL, FDireccion.PROVINCIA]); + + edtDireccion.Text := ACadena; +end; + +function TfrViewDatosYSeleccionClienteAlbaran.GetCliente: IBizCliente; +begin + Result := FCliente; +end; + +function TfrViewDatosYSeleccionClienteAlbaran.GetID_Cliente: integer; +begin + Result := -1; + if Assigned(FCliente) then + Result := FCliente.ID; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.SetCliente(Value: IBizCliente); +begin + FCliente := Value; + if Assigned(FCliente) then + begin + dsCliente.DataTable := FCliente.DataTable; + + if not FCliente.DataTable.Active then + FCliente.DataTable.Active := True; + edtPersonaContacto.Enabled := True; + + if FCliente.Direcciones.RecordCount > 0 then + ElegirDireccionCliente + else begin + FAlbaran.Edit; + FAlbaran.PERSONA_CONTACTO := FCliente.PERSONA_CONTACTO; + RefrescarDireccion; + end; + end + else begin + dsCliente.DataTable := NIL; + FCliente := NIL; + FDireccion := NIL; + edtPersonaContacto.Enabled := False; + end; + + if Assigned(FOnClienteChanged) then + FOnClienteChanged(Self); +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.SetID_Cliente(const Value: integer); +begin + Self.Cliente := IBizCliente(FClientesController.Buscar(Value)); +end; + +function TfrViewDatosYSeleccionClienteAlbaran.GetOnClienteChanged: TNotifyEvent; +begin + Result := FOnClienteChanged; +end; + +function TfrViewDatosYSeleccionClienteAlbaran.GetAlbaran: IBizAlbaranCliente; +begin + Result := FAlbaran; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.RefrescarDireccion; +begin + FDireccion := FDireccionesController.Nuevo; + + if (not FAlbaran.ID_DIRECCIONIsNull) and + (FDireccionesController.Localizar(FCliente.Direcciones, FAlbaran.ID_DIRECCION)) then + FDireccionesController.CopiarDireccion(FCliente.Direcciones, FDireccion) + else + FDireccionesController.CopiarDireccionFiscal(FCliente, FDireccion); + + EscribirTextoDireccion; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.SetOnClienteChanged( + const Value: TNotifyEvent); +begin + FOnClienteChanged := Value; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.SetAlbaran( + const Value: IBizAlbaranCliente); +begin + FAlbaran := Value; + if Assigned(FAlbaran) then + begin + dsAlbaran.DataTable := FAlbaran.DataTable; + + FCliente := FAlbaran.Cliente; + dsCliente.DataTable := FCliente.DataTable; + + if not FCliente.DataTable.Active then + FCliente.DataTable.Active := True; + + edtPersonaContacto.Enabled := True; + RefrescarDireccion; + end + else begin + dsAlbaran.DataTable := NIL; + FCliente := NIL; + FDireccion := NIL; + end; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.SetReadOnly(Value: Boolean); +begin + inherited; + + if (csLoading in Self.ComponentState) then + Exit; + + actAnadirContacto.Enabled := not ReadOnly; + actElegirContacto.Enabled := not ReadOnly; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.VerFichaCliente; +begin + if not Assigned(Cliente) then + ShowErrorMessage('No se ha indicado un cliente', 'El presupuesto no tiene ningún cliente asociado a mostrar.') + else begin + FClientesController.Ver(Cliente); + end; +end; + +end. diff --git a/Source/Modulos/Articulos/Views/Articulos_view.dproj b/Source/Modulos/Articulos/Views/Articulos_view.dproj index f17807da..37ac0099 100644 --- a/Source/Modulos/Articulos/Views/Articulos_view.dproj +++ b/Source/Modulos/Articulos/Views/Articulos_view.dproj @@ -54,11 +54,11 @@ MainSource - - - - - + + + + +
fEditorArticulo
diff --git a/Source/Modulos/Articulos/Views/uEditorElegirArticulos.dfm b/Source/Modulos/Articulos/Views/uEditorElegirArticulos.dfm index a6c56ae6..6d0c6e26 100644 --- a/Source/Modulos/Articulos/Views/uEditorElegirArticulos.dfm +++ b/Source/Modulos/Articulos/Views/uEditorElegirArticulos.dfm @@ -2,6 +2,7 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos Caption = 'Seleccionar art'#237'culos' ClientWidth = 656 ExplicitWidth = 664 + ExplicitHeight = 240 PixelsPerInch = 96 TextHeight = 13 object JvgWizardHeader1: TJvgWizardHeader [0] @@ -53,7 +54,7 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos inherited tbxMain: TTBXToolbar Align = alLeft DockPos = -6 - ExplicitWidth = 126 + ExplicitWidth = 269 inherited TBXItem2: TTBXItem Visible = False end @@ -71,12 +72,12 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos end end inherited tbxFiltro: TTBXToolbar - Left = 126 + Left = 269 Top = 23 Align = alLeft DockPos = 101 DockRow = 1 - ExplicitLeft = 126 + ExplicitLeft = 269 ExplicitTop = 23 inherited TBXItem34: TTBXItem Action = actQuitarFiltro2 diff --git a/Source/Modulos/Contactos/Controller/uContactosController.pas b/Source/Modulos/Contactos/Controller/uContactosController.pas index 01441c90..fcdcaa4c 100644 --- a/Source/Modulos/Contactos/Controller/uContactosController.pas +++ b/Source/Modulos/Contactos/Controller/uContactosController.pas @@ -11,7 +11,7 @@ uses type IContactosController = interface(IControllerBase) - ['{43F9A4ED-6563-4F95-9A56-330CF9C66731}'] + ['{E91C24EB-D4D9-4203-809B-0AF90F41B32E}'] function Buscar(const ID: Integer): IBizContacto; function BuscarTodos: IBizContacto; procedure Ver(AContacto : IBizContacto); @@ -33,6 +33,7 @@ type function ElegirDireccion(AContacto: IBizContacto; AMensaje: String): IBizDireccionesContacto; function ElegirPersonaContacto(APersonal: IBizContactoPersonal; AMensaje: String): IBizContactoPersonal; + function DarDireccionSocial(AContacto : IBizContacto): IBizDireccionesContacto; end; TContactosController = class(TControllerBase, IContactosController) @@ -67,6 +68,7 @@ type function ElegirDireccion(AContacto: IBizContacto; AMensaje: String): IBizDireccionesContacto; function ElegirPersonaContacto(APersonal: IBizContactoPersonal; AMensaje: String): IBizContactoPersonal; + function DarDireccionSocial(AContacto : IBizContacto): IBizDireccionesContacto; end; implementation @@ -114,6 +116,36 @@ begin FDataModule := NIL; end; +function TContactosController.DarDireccionSocial( + AContacto: IBizContacto): IBizDireccionesContacto; +var + ADireccionesController : IDireccionesContactoController; +begin + if not Assigned(AContacto) then + raise Exception.Create ('Contacto no asignado'); + + ADireccionesController := TDireccionesContactoController.Create; + try + Result := ADireccionesController.Nuevo; + with Result do + begin + ClearField('ID'); + NOMBRE := AContacto.NOMBRE; + CALLE := AContacto.CALLE; + POBLACION := AContacto.POBLACION; + CODIGO_POSTAL := AContacto.CODIGO_POSTAL; + PROVINCIA := AContacto.PROVINCIA; + TELEFONO := AContacto.TELEFONO_1; + FAX := AContacto.FAX; + MOVIL := AContacto.MOVIL_1; + EMAIL := AContacto.EMAIL_1; + PERSONA_CONTACTO := AContacto.PERSONA_CONTACTO; + end; + finally + ADireccionesController := NIL; + end; +end; + procedure TContactosController.DescartarCambios(AContacto: IBizContacto); begin if not Assigned(AContacto) then @@ -144,7 +176,7 @@ begin JsDialog := TJSDialog.Create(nil); try JsDialog.Content.Add(AMensaje); - JsDialog.Instruction.Text := 'Elija una direci'#243'n...'; + JsDialog.Instruction.Text := 'Elija una direcci'#243'n.'; JsDialog.DialogOptions := [doCommandLinks, doModal]; JsDialog.ButtonBar.Buttons := [cbOk]; JsDialog.Width := 600; @@ -176,8 +208,14 @@ begin if JsDialog.Execute <> IDCANCEL then if JsDialog.CustomButtonResult > 0 then + begin if AContacto.Direcciones.DataTable.Locate(fld_DireccionesContactoID, JsDialog.CustomButtonResult, []) then Result := AContacto.Direcciones; + end + else begin + // Se ha elegido la dirección de la razón social + Result := DarDireccionSocial(AContacto) + end; finally FreeAndNIL(JsDialog); diff --git a/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas b/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas index 146ea629..50652c63 100644 --- a/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas +++ b/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas @@ -10,9 +10,11 @@ uses type IDireccionesContactoController = interface(IControllerBase) ['{9B6CB172-F32C-414F-A0E2-99920CAF88FB}'] - procedure CopiarDireccionFiscal(AContacto: IBizContacto; ADireccion: IBizDireccionesContacto; AAnadir : Boolean = True); + procedure CopiarDireccionFiscal(AContacto: IBizContacto; ADireccion: IBizDireccionesContacto; AAnadir : Boolean = True); + procedure CopiarDireccion(ADireccionOrigen: IBizDireccionesContacto; ADireccionDestino: IBizDireccionesContacto; AAnadir : Boolean = True); procedure Ver(ADireccion : IBizDireccionesContacto); - function Localizar(ADirecciones: IBizDireccionesContacto; const ID : Integer): Boolean; + function Localizar(ADirecciones: IBizDireccionesContacto; const ID : Integer): Boolean; + function Nuevo : IBizDireccionesContacto; end; TDireccionesContactoController = class(TControllerBase, IDireccionesContactoController) @@ -20,8 +22,10 @@ type FDataModule : IDataModuleContactos; public procedure CopiarDireccionFiscal(AContacto: IBizContacto; ADireccion: IBizDireccionesContacto; AAnadir : Boolean = True); + procedure CopiarDireccion(ADireccionOrigen: IBizDireccionesContacto; ADireccionDestino: IBizDireccionesContacto; AAnadir : Boolean = True); procedure Ver(ADireccion : IBizDireccionesContacto); function Localizar(ADirecciones: IBizDireccionesContacto; const ID : Integer): Boolean; + function Nuevo : IBizDireccionesContacto; constructor Create; override; destructor Destroy; override; end; @@ -32,9 +36,24 @@ implementation uses uDataModuleContactos, schContactosClient_Intf, uIEditorDireccionContacto, - uEditorRegistryUtils, cxControls; + uEditorRegistryUtils, cxControls, uDataTableUtils; +procedure TDireccionesContactoController.CopiarDireccion(ADireccionOrigen, + ADireccionDestino: IBizDireccionesContacto; AAnadir: Boolean); +begin + if not Assigned(ADireccionOrigen) then + raise Exception.Create ('Dirección de origen no asignada (CopiarDireccion)'); + + if not Assigned(ADireccionDestino) then + raise Exception.Create ('Dirección de destino no asignada (CopiarDireccion)'); + + ADireccionOrigen.Active := True; + ADireccionDestino.Active := True; + + DuplicarRegistro(ADireccionOrigen.DataTable, ADireccionDestino.DataTable, True, True, AAnadir); +end; + procedure TDireccionesContactoController.CopiarDireccionFiscal( AContacto: IBizContacto; ADireccion: IBizDireccionesContacto; AAnadir: Boolean); @@ -44,7 +63,10 @@ begin if not Assigned(ADireccion) then raise Exception.Create ('Dirección no asignada (CopiarDireccionFiscal)'); - + + AContacto.Active := True; + ADireccion.Active := True; + if AAnadir then ADireccion.DataTable.Insert else @@ -52,13 +74,16 @@ begin try with ADireccion do begin - NOMBRE := 'Dirección de entrega'; + NOMBRE := AContacto.NOMBRE; CALLE := AContacto.CALLE; POBLACION := AContacto.POBLACION; PROVINCIA := AContacto.PROVINCIA; CODIGO_POSTAL := AContacto.CODIGO_POSTAL; TELEFONO := AContacto.TELEFONO_1; + FAX := AContacto.FAX; + MOVIL := AContacto.MOVIL_1; EMAIL := AContacto.EMAIL_1; + PERSONA_CONTACTO := AContacto.PERSONA_CONTACTO; end; finally ADireccion.DataTable.Post; @@ -96,6 +121,16 @@ begin end; end; +function TDireccionesContactoController.Nuevo: IBizDireccionesContacto; +var + ADireccion : IBizDireccionesContacto; +begin + ADireccion := FDataModule.NewDireccion; + ADireccion.DataTable.Active := True; + ADireccion.Insert; + Result := ADireccion; +end; + procedure TDireccionesContactoController.Ver( ADireccion: IBizDireccionesContacto); var diff --git a/Source/Modulos/Contactos/Data/uDataModuleContactos.pas b/Source/Modulos/Contactos/Data/uDataModuleContactos.pas index 7b516381..90571452 100644 --- a/Source/Modulos/Contactos/Data/uDataModuleContactos.pas +++ b/Source/Modulos/Contactos/Data/uDataModuleContactos.pas @@ -33,6 +33,7 @@ type function _GetDirecciones: IBizDireccionesContacto; function _GetPersonal: IBizContactoPersonal; function _GetItems (IDCategoria : Integer): IBizContacto; virtual; + function NewDireccion : IBizDireccionesContacto; // Report function GetReport(const AContactosID: String): Binary; @@ -64,6 +65,30 @@ begin Result := (RORemoteService as IsrvContactos).GenerateEtiquetasReport(AContactosID); end; +function TDataModuleContactos.NewDireccion: IBizDireccionesContacto; +var + Condicion: TDAWhereExpression; +begin + ShowHourglassCursor; + try + Result := Self._GetDirecciones; + + with Result.DataTable.DynamicWhere do + begin + // (ID = :ID) + Condicion := NewBinaryExpression(NewField('', fld_DireccionesContactoID), NewConstant(ID_NULO, datInteger), dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + finally + HideHourglassCursor; + end; +end; + function TDataModuleContactos._GetDatosBancarios: IBizContactosDatosBancarios; var ADatosBancarios : TDAMemDataTable; diff --git a/Source/Modulos/Contactos/Model/Data/uIDataModuleContactos.pas b/Source/Modulos/Contactos/Model/Data/uIDataModuleContactos.pas index 29768278..796805bd 100644 --- a/Source/Modulos/Contactos/Model/Data/uIDataModuleContactos.pas +++ b/Source/Modulos/Contactos/Model/Data/uIDataModuleContactos.pas @@ -14,6 +14,7 @@ type function _GetDatosBancarios : IBizContactosDatosBancarios; function _GetDirecciones: IBizDireccionesContacto; function _GetPersonal: IBizContactoPersonal; + function NewDireccion : IBizDireccionesContacto; end; implementation diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj index 8f156091..29be5bf7 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj @@ -49,35 +49,35 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorElegirArticulosFacturaCliente
TForm diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.res b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.res index 8b251f312bcccec5485024f6fe8d80e1cdf25746..1641339fcc482e7e3492d1b45813a86619622c33 100644 GIT binary patch literal 4748 zcmbW5&ub)A5XUPdpe&2#;C*uNAUVhgd+&(4um@dnom`vXF9g}ZuHJ;se=<3UNdFJg zbCw+UD9j$byGIXV`~6hC>h4S?F|k9X-j90q{Z_qtZ<;nUJCO8!h?p${kR>3GhM`oH*q zk=UsjOCIgA_4!`B+Gb&`I84R)bT4dy-BQV<-SyFz?R8ILEQ(+JB$u{sEXE@j@B*7W zT;iZH#|OJ<&DO$RCkM6VbK3(B(k{nbdv1lpc;E$xz9as|v3uE1V{hw2w~g3eD0an7 z{BT%G%irdMe*|oDJmgvJaA2`9B<6Xi*?M~Q;)@Sbfwf3uf zVaWkbUjU=;sL{BlYemIZXv%qZ{SZw{-TCU+;!nH6KDDIJumU+9{E0zXW4>7T)y|>$DQlv zRJe?TjSp{c!DqeayAnSMTtZZT;>LN7J0Rls+5m@q)MbyB*eL%Eu@(+$Cw}Pd@q7N| z%Q0*AHpCP^b9v`@jx-l_FD>khpW2W8(OU2&V5TrnoAY-m_hlcV?zq3;7{2gF{J#Hc z6R+o~mVenX?>@W0@_DVzyOFs(5464CY{!q9ChoF#_*eXi@4gFuV8?vhl=_w5$iKL0 zEV0nMBcN08xtRmsgJrqjh@s#|{?*ssnsG)mH*wa6{efF0JFWHok@kA5%b661{B38= zCcgJ|*ZFTpV$8<-&+AWpa)Q8*`wL&hMeNQ^v6I7$HSdLZhZ^&+6<@Uw_Zsml9^v3W zVvPDBKHh;i=RU4J_ta3E;)Mn>Y+L zKLZ0UQ+*km9FO-b?U4gmn-62iwzH6&*duKGo~aUV)bYDla8wWZ9+^7p-F<8lP@i!m z@vhbD_${F}h>^T;C(?(b*OJDk?{dEXB?nuehoON3HAb!7Mr7-ls!84-5V-jJugbu<_$}mU=Yd9!?TOX;|B-#B)+0x#9q*yqJiqS!`49d=7ztk$O+9=1i;?K_|J<8T z?0b7=-`Z3A#vV$4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP delta 11 ScmeBCZD5|Duvteife`=|>;pCc diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm index b9bad89c..8036ad01 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm @@ -71,7 +71,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente inherited pgPaginas: TPageControl Width = 854 Height = 398 - ActivePage = pagContabilidad OnChanging = pgPaginasChanging ExplicitLeft = 3 ExplicitTop = 79 @@ -103,6 +102,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Height = 370 ExplicitWidth = 846 ExplicitHeight = 370 + DesignSize = ( + 846 + 370) inherited eReferencia: TcxDBTextEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' @@ -137,6 +139,10 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitWidth = 78 Width = 78 end + inherited bFormasPago: TButton + Left = 289 + ExplicitLeft = 289 + end inherited frViewTienda1: TfrViewTienda inherited dxLayoutControl1: TdxLayoutControl inherited cbTienda: TcxComboBox @@ -150,7 +156,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end end inherited frViewClienteFactura1: TfrViewClienteFactura + Left = 449 Width = 398 + ExplicitLeft = 449 ExplicitWidth = 398 inherited dxLayoutControl1: TdxLayoutControl Width = 398 @@ -199,16 +207,16 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Width = 276 end inherited edtCodigoPostal: TcxDBTextEdit - Left = 331 + Left = 283 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 331 + ExplicitLeft = 283 end inherited Button3: TBitBtn - Left = 221 - ExplicitLeft = 221 + Left = 173 + ExplicitLeft = 173 end inherited cxDBTextEdit1: TcxDBTextEdit Style.LookAndFeel.SkinName = '' @@ -220,12 +228,24 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end end end + inherited edtFechaVencimiento: TcxDBDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 310 + Width = 310 + end end end end object pagContenido: TTabSheet Caption = 'Contenido' ImageIndex = 1 + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente Left = 0 Top = 0 diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas index 185fc59c..9c1669ca 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas @@ -315,7 +315,7 @@ end; procedure TfEditorFacturaCliente.OnClienteChanged(Sender: TObject); var - FDetallesController : IDetallesFacturaClienteController; +// FDetallesController : IDetallesFacturaClienteController; AClientesController : IClientesController; ADireccion : IBizDireccionesContacto; begin @@ -335,20 +335,21 @@ begin AClientesController := TClientesController.Create; try case FFactura.Cliente.Direcciones.RecordCount of - 0 : //No hay direcciones secundarias asociadas - else ADireccion := AClientesController.ElegirDireccion(FFactura.Cliente, 'Seleccione la dirección del proveedor que quiere utilizar como dirección fiscal de esta factura.'); + 0 : //No hay direcciones secundarias asociadas + else ADireccion := AClientesController.ElegirDireccion(FFactura.Cliente, 'Seleccione la dirección del cliente que quiere utilizar como dirección fiscal de esta factura.'); end; - // Si hay dirección de envio, copiarla al albarán y poner el coste del porte + // Si hay dirección de envio, copiarla a la factura y poner el coste del porte if Assigned(ADireccion) then begin - try - FFactura.Edit; - FFactura.IMPORTE_PORTE := ADireccion.PORTE; - FController.CopiarDireccion(ADireccion, FFactura); - finally - ADireccion := NIL; - end; + if not ADireccion.IDIsNull then + try + FFactura.Edit; + FFactura.IMPORTE_PORTE := ADireccion.PORTE; + FController.CopiarDireccion(ADireccion, FFactura); + finally + ADireccion := NIL; + end; end finally AClientesController := Nil; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm index eef9fe07..eb5caea2 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm @@ -1,6 +1,6 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente - Width = 451 - Height = 304 + Width = 869 + Height = 546 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -9,17 +9,19 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 451 - Height = 304 + Width = 869 + Height = 546 Align = alClient ParentBackground = True TabOrder = 0 TabStop = False AutoContentSizes = [acsWidth, acsHeight] LookAndFeel = dxLayoutOfficeLookAndFeel1 + ExplicitWidth = 451 + ExplicitHeight = 304 DesignSize = ( - 451 - 304) + 869 + 546) object eReferencia: TcxDBTextEdit Left = 135 Top = 30 @@ -130,7 +132,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 78 end object bFormasPago: TButton - Left = 313 + Left = 301 Top = 108 Width = 132 Height = 23 @@ -171,7 +173,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente end end inline frViewClienteFactura1: TfrViewClienteFactura - Left = 473 + Left = 461 Top = 30 Width = 398 Height = 265 @@ -183,7 +185,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ParentFont = False TabOrder = 6 ReadOnly = False - ExplicitLeft = 473 + ExplicitLeft = 461 ExplicitTop = 30 ExplicitWidth = 398 ExplicitHeight = 265 @@ -233,16 +235,16 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 276 end inherited edtCodigoPostal: TcxDBTextEdit - Left = 192 + Left = 294 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 192 + ExplicitLeft = 294 end inherited Button3: TBitBtn - Left = 82 - ExplicitLeft = 82 + Left = 184 + ExplicitLeft = 184 end inherited cxDBTextEdit1: TcxDBTextEdit Style.LookAndFeel.SkinName = '' @@ -290,6 +292,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente LayoutDirection = ldHorizontal ShowBorder = False object dxLayoutControl1Group6: TdxLayoutGroup + AutoAligns = [aaVertical] + AlignHorz = ahClient ShowCaption = False Hidden = True ShowBorder = False diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas index 981ebf4a..52f33285 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas @@ -48,7 +48,6 @@ type frViewTienda1: TfrViewTienda; dxLayoutControl1Group4: TdxLayoutGroup; dxLayoutControl1Item3: TdxLayoutItem; - dxLayoutControl1Group7: TdxLayoutGroup; dxLayoutControl1Item6: TdxLayoutItem; frViewClienteFactura1: TfrViewClienteFactura; dxLayoutControl1Group8: TdxLayoutGroup; diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm index 39cf7b44..af0c3344 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm @@ -303,40 +303,40 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor ExplicitWidth = 57 end inherited UpDown1: TUpDown - Left = 218 - ExplicitLeft = 218 + Left = 202 + ExplicitLeft = 202 end inherited ToolButton13: TToolButton - Left = 235 - ExplicitLeft = 235 + Left = 219 + ExplicitLeft = 219 end inherited ToolButton6: TToolButton - Left = 243 - ExplicitLeft = 243 + Left = 227 + ExplicitLeft = 227 end inherited ToolButton7: TToolButton - Left = 277 - ExplicitLeft = 277 + Left = 261 + ExplicitLeft = 261 end inherited ToolButton8: TToolButton - Left = 311 - ExplicitLeft = 311 + Left = 295 + ExplicitLeft = 295 end inherited ToolButton12: TToolButton - Left = 345 - ExplicitLeft = 345 + Left = 329 + ExplicitLeft = 329 end inherited ToolButton9: TToolButton - Left = 353 - ExplicitLeft = 353 + Left = 337 + ExplicitLeft = 337 end inherited ToolButton10: TToolButton - Left = 387 - ExplicitLeft = 387 + Left = 371 + ExplicitLeft = 371 end inherited ToolButton11: TToolButton - Left = 421 - ExplicitLeft = 421 + Left = 405 + ExplicitLeft = 405 end end inherited cxGrid: TcxGrid diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas index c913ddad..57bec0ae 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas @@ -313,20 +313,21 @@ begin AProveedoresController := TProveedoresController.Create; try case FFactura.Proveedor.Direcciones.RecordCount of - 0 : //No hay direcciones secundarias asociadas - else ADireccion := AProveedoresController.ElegirDireccion(FFactura.Proveedor, 'Seleccione la dirección del proveedor que quiere utilizar como dirección fiscal de esta factura.'); + 0 : //No hay direcciones secundarias asociadas + else ADireccion := AProveedoresController.ElegirDireccion(FFactura.Proveedor, 'Seleccione la dirección del proveedor que quiere utilizar como dirección fiscal de esta factura.'); end; // Si hay dirección de envio, copiarla al albarán y poner el coste del porte if Assigned(ADireccion) then begin - try - FFactura.Edit; - FFactura.IMPORTE_PORTE := ADireccion.PORTE; - FController.CopiarDireccion(ADireccion, FFactura); - finally - ADireccion := NIL; - end; + if not ADireccion.IDIsNull then + try + FFactura.Edit; + FFactura.IMPORTE_PORTE := ADireccion.PORTE; + FController.CopiarDireccion(ADireccion, FFactura); + finally + ADireccion := NIL; + end; end finally AProveedoresController := Nil; diff --git a/Source/Modulos/Gestion de documentos/Controller/GestorDocumentos_controller.drc b/Source/Modulos/Gestion de documentos/Controller/GestorDocumentos_controller.drc deleted file mode 100644 index 5a230bee..00000000 --- a/Source/Modulos/Gestion de documentos/Controller/GestorDocumentos_controller.drc +++ /dev/null @@ -1,16 +0,0 @@ -/* VER185 - Generated by the CodeGear Delphi Pascal Compiler - because -GD or --drc was supplied to the compiler. - - This file contains compiler-generated resources that - were bound to the executable. - If this file is empty, then no compiler-generated - resources were bound to the produced executable. -*/ - -STRINGTABLE -BEGIN -END - -/* C:\Codigo Acana\Source\Modulos\Gestion de documentos\Controller\GestorDocumentos_Controller.res */ -/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf62.tmp */ diff --git a/Source/Modulos/Gestion de documentos/Data/GestorDocumentos_data.drc b/Source/Modulos/Gestion de documentos/Data/GestorDocumentos_data.drc deleted file mode 100644 index 8d4252df..00000000 --- a/Source/Modulos/Gestion de documentos/Data/GestorDocumentos_data.drc +++ /dev/null @@ -1,17 +0,0 @@ -/* VER185 - Generated by the CodeGear Delphi Pascal Compiler - because -GD or --drc was supplied to the compiler. - - This file contains compiler-generated resources that - were bound to the executable. - If this file is empty, then no compiler-generated - resources were bound to the produced executable. -*/ - -STRINGTABLE -BEGIN -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\dtf60.tmp */ diff --git a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm index cc95e87a..5b5dc354 100644 --- a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm @@ -66,6 +66,10 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente DisplayLabel = 'Situaci'#243'n' DictionaryEntry = 'PresupuestosCliente_SITUACION' end + item + Name = 'ID_DIRECCION' + DataType = datInteger + end item Name = 'ID_CLIENTE' DataType = datInteger diff --git a/Source/Modulos/Presupuestos de cliente/Model/PresupuestosCliente_model.dpk b/Source/Modulos/Presupuestos de cliente/Model/PresupuestosCliente_model.dpk index bec5306e9acd9edfc684faf29e886c63db58ef5e..e0de7b8f7db95b796b33e81889f572b4c1af82c3 100644 GIT binary patch delta 32 ocmdnYv6*AT0_Mpdnaw6&W0s!0fZ2@4nwN{0D>W}gkC%%90KUWtYXATM delta 32 ocmdnYv6*AT0_Mpdnaw6&W0s!0fZ2@4nwN{0D>W}gkC%%90KUWtYXATM diff --git a/Source/Modulos/Presupuestos de cliente/Model/PresupuestosCliente_model.dproj b/Source/Modulos/Presupuestos de cliente/Model/PresupuestosCliente_model.dproj index dcd476ce..7e4a6d75 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/PresupuestosCliente_model.dproj +++ b/Source/Modulos/Presupuestos de cliente/Model/PresupuestosCliente_model.dproj @@ -43,8 +43,6 @@ Package FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 - - RemObjects Pascal Script - RemObjects SDK 3.0 Integration EurekaLog 5.1.9 PresupuestosCliente_model.dpk @@ -54,20 +52,20 @@ MainSource - - - - - - - - + + + + + + + +