diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index db5411a..80af2ea 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -82,6 +82,9 @@ VARCHAR(30); CREATE GENERATOR GEN_ALBARANES_CLI_DETALLES_ID; SET GENERATOR GEN_ALBARANES_CLI_DETALLES_ID TO 1; +CREATE GENERATOR GEN_ALBARANES_CLI_DET_COLOR_ID; +SET GENERATOR GEN_ALBARANES_CLI_DET_COLOR_ID TO 1; + CREATE GENERATOR GEN_ALBARANES_CLI_ID; SET GENERATOR GEN_ALBARANES_CLI_ID TO 1; @@ -310,6 +313,23 @@ CREATE TABLE ALBARANES_CLIENTE_DETALLES ( ID_PEDIDO TIPO_ID ); +CREATE TABLE ALBARANES_CLIENTE_DETALLE_COLOR ( + ID TIPO_ID NOT NULL, + ID_DETALLE TIPO_ID NOT NULL, + COLOR1 INTEGER Default 0, + COLOR2 INTEGER Default 0, + COLOR3 INTEGER Default 0, + COLOR4 INTEGER Default 0, + COLOR5 INTEGER Default 0, + COLOR6 INTEGER Default 0, + COLOR7 INTEGER Default 0, + COLOR8 INTEGER Default 0, + COLOR9 INTEGER Default 0, + COLOR10 INTEGER Default 0, + COLOR11 INTEGER Default 0, + COLOR12 INTEGER Default 0 +); + CREATE TABLE ALBARANES_PROVEEDOR ( ID TIPO_ID NOT NULL, ID_EMPRESA TIPO_ID, @@ -405,7 +425,11 @@ CREATE TABLE ARTICULOS ( PARAM_MARGEN FLOAT, TIEMPO INTEGER, PARAM_TIEMPO FLOAT, - MANO_OBRA TIPO_IMPORTE + MANO_OBRA TIPO_IMPORTE, + PRECIO NUMERIC(11,2) Default 0, + CAMPOTECNICO VARCHAR(200), + CODIGOTECNICO VARCHAR(15), + DISENOTECNICO VARCHAR(6) ); CREATE TABLE ARTICULOS_PROVEEDORES ( @@ -1624,7 +1648,13 @@ CREATE VIEW V_ARTICULOS_PARA_VENTA( TIEMPO, PARAM_TIEMPO, MANO_OBRA, - PRECIO_PVP_TOTAL) + PRECIO_PVP_TOTAL, + + CAMPOTECNICO, + CODIGOTECNICO, + DISENOTECNICO, + PRECIO +) AS SELECT ARTICULOS.ID, ARTICULOS.ID_EMPRESA, ARTICULOS.REFERENCIA, ARTICULOS.DESCRIPCION, ARTICULOS.UNIDAD_MEDIDA, ARTICULOS.FAMILIA, ARTICULOS.IMAGEN, @@ -1647,7 +1677,12 @@ SELECT ARTICULOS.ID, ARTICULOS.ID_EMPRESA, ARTICULOS.REFERENCIA, ARTICULOS.DESCR ARTICULOS.TIEMPO, ARTICULOS.PARAM_TIEMPO, ARTICULOS.MANO_OBRA, - V_ARTICULOS_PVP_MAX.PRECIO_PVP_TOTAL + V_ARTICULOS_PVP_MAX.PRECIO_PVP_TOTAL, + + ARTICULOS.CAMPOTECNICO, + ARTICULOS.CODIGOTECNICO, + ARTICULOS.DISENOTECNICO, + ARTICULOS.PRECIO FROM ARTICULOS LEFT OUTER JOIN V_ARTICULOS_PVP_MAX ON (V_ARTICULOS_PVP_MAX.ID_ARTICULO = ARTICULOS.ID) @@ -3514,6 +3549,7 @@ GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ALTER TABLE ALBARANES_CLIENTE ADD CONSTRAINT PK_ALBARAN_CLIENTE PRIMARY KEY (ID); ALTER TABLE ALBARANES_CLIENTE_DETALLES ADD CONSTRAINT PK_ALBARANES_CLIENTE_DETALLES PRIMARY KEY (ID); +ALTER TABLE ALBARANES_CLIENTE_DETALLE_COLOR ADD CONSTRAINT PK_ALBARANES_CLIENTE_DETALLE_CO PRIMARY KEY (ID); ALTER TABLE ALBARANES_PROVEEDOR ADD CONSTRAINT PK_ALBARAN_PROVEEDOR PRIMARY KEY (ID); ALTER TABLE ALBARANES_PROVEEDOR_DETALLES ADD CONSTRAINT PK_ALBARANES_PROVEEDOR_DETALLES PRIMARY KEY (ID); ALTER TABLE ALMACENES ADD CONSTRAINT PK_ALMACENES PRIMARY KEY (ID); diff --git a/Source/Base/Base.res b/Source/Base/Base.res index 1641339..8b251f3 100644 Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ diff --git a/Source/Cliente/FactuGES.identcache b/Source/Cliente/FactuGES.identcache index 1195a16..0cb13a5 100644 Binary files a/Source/Cliente/FactuGES.identcache and b/Source/Cliente/FactuGES.identcache differ diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc index 63b70dc..4d40a64 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Noviseda\Resources\Iconos\Factuges.ico" 1 VERSIONINFO -FILEVERSION 1,7,8,0 -PRODUCTVERSION 1,7,8,0 +FILEVERSION 2,0,0,0 +PRODUCTVERSION 2,0,0,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,10 +13,10 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "1.7.8.0\0" + VALUE "FileVersion", "2.0.0.0\0" VALUE "InternalName", "FactuGES\0" VALUE "ProductName", "FactuGES\0" - VALUE "ProductVersion", "1.7.8.0\0" + VALUE "ProductVersion", "2.0.0.0\0" END END BLOCK "VarFileInfo" diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index bbcb058..7764aa9 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/Cliente/uBootStrap.pas b/Source/Cliente/uBootStrap.pas index b237e5f..a500a64 100644 --- a/Source/Cliente/uBootStrap.pas +++ b/Source/Cliente/uBootStrap.pas @@ -23,7 +23,7 @@ begin LoadModule('Referencias_plugin.bpl'); LoadModule('FormasPago_plugin.bpl'); LoadModule('TiposIVA_plugin.bpl'); - LoadModule('Familias_plugin.bpl'); +// LoadModule('Familias_plugin.bpl'); // LoadModule('Fabricantes_plugin.bpl'); // LoadModule('UnidadesMedida_plugin.bpl'); @@ -34,7 +34,7 @@ begin LoadModule('Articulos_plugin.bpl'); // LoadModule(MODULENAME_PRESUPUESTOS_CLIENTE); -// LoadModule(MODULENAME_ALBARANES_CLIENTE); + LoadModule(MODULENAME_ALBARANES_CLIENTE); // LoadModule('RecibosCliente_plugin.bpl'); // LoadModule(MODULENAME_FACTURAS_CLIENTE); @@ -48,8 +48,8 @@ begin // LoadModule('RemesasCliente_plugin.bpl'); // LoadModule('RemesasProveedor_plugin.bpl'); -// LoadModule('Inventario_plugin.bpl'); -// LoadModule('HistoricoMovimientos_plugin.bpl'); + LoadModule('Inventario_plugin.bpl'); + LoadModule('HistoricoMovimientos_plugin.bpl'); // LoadModule('GestorInformes_plugin.bpl'); end; diff --git a/Source/GUIBase/GUIBase.dpk b/Source/GUIBase/GUIBase.dpk index 691c439..7b86b26 100644 --- a/Source/GUIBase/GUIBase.dpk +++ b/Source/GUIBase/GUIBase.dpk @@ -76,6 +76,7 @@ contains uViewGrid in 'uViewGrid.pas' {frViewGrid: TFrame}, uViewRichEditor in 'uViewRichEditor.pas' {frViewRichEditor: TCustomView}, uDialogElegirEMail in 'uDialogElegirEMail.pas' {fDialogElegirEMail}, - uViewDocumentos in 'uViewDocumentos.pas' {frViewDocumentos: TCustomView}; + uViewDocumentos in 'uViewDocumentos.pas' {frViewDocumentos: TCustomView}, + uEditorColores in 'uEditorColores.pas' {frEditorColores}; end. diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj index 991b81a..bf4b8b0 100644 --- a/Source/GUIBase/GUIBase.dproj +++ b/Source/GUIBase/GUIBase.dproj @@ -59,30 +59,30 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
@@ -96,6 +96,9 @@
fEditorBasico
+ +
frEditorColores
+
fEditorDBBase
TCustomEditor diff --git a/Source/GUIBase/GUIBase.drc b/Source/GUIBase/GUIBase.drc index 978adf2..36a8422 100644 --- a/Source/GUIBase/GUIBase.drc +++ b/Source/GUIBase/GUIBase.drc @@ -37,5 +37,6 @@ END /* C:\Codigo Noviseda\Source\GUIBase\uViewRichEditor.dfm */ /* C:\Codigo Noviseda\Source\GUIBase\uDialogElegirEMail.dfm */ /* C:\Codigo Noviseda\Source\GUIBase\uViewDocumentos.dfm */ +/* C:\Codigo Noviseda\Source\GUIBase\uEditorColores.dfm */ /* C:\Codigo Noviseda\Source\GUIBase\GUIBase.res */ /* C:\Codigo Noviseda\Source\GUIBase\GUIBase.drf */ diff --git a/Source/GUIBase/GUIBase.identcache b/Source/GUIBase/GUIBase.identcache index ae54da1..210f820 100644 Binary files a/Source/GUIBase/GUIBase.identcache and b/Source/GUIBase/GUIBase.identcache differ diff --git a/Source/GUIBase/GUIBase.res b/Source/GUIBase/GUIBase.res index 8b251f3..1641339 100644 Binary files a/Source/GUIBase/GUIBase.res and b/Source/GUIBase/GUIBase.res differ diff --git a/Source/GUIBase/uEditorColores.dfm b/Source/GUIBase/uEditorColores.dfm new file mode 100644 index 0000000..dff71ae --- /dev/null +++ b/Source/GUIBase/uEditorColores.dfm @@ -0,0 +1,439 @@ +object frEditorColores: TfrEditorColores + Left = 0 + Top = 0 + Caption = 'fEditorColores' + ClientHeight = 128 + ClientWidth = 771 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 + object dxLayoutControl1: TdxLayoutControl + Left = 0 + Top = 0 + Width = 771 + Height = 128 + Align = alClient + TabOrder = 0 + TabStop = False + object eColor1: TcxDBTextEdit + Left = 22 + Top = 46 + DataBinding.DataField = 'COLOR1' + DataBinding.DataSource = dsDataTable + 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 = '' + 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 = 55 + end + object eColor2: TcxDBTextEdit + Left = 83 + Top = 46 + DataBinding.DataField = 'COLOR2' + DataBinding.DataSource = dsDataTable + 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 = '' + 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 = 55 + end + object eColor3: TcxDBTextEdit + Left = 144 + Top = 46 + DataBinding.DataField = 'COLOR3' + DataBinding.DataSource = dsDataTable + 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 = '' + 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 = 55 + end + object eColor4: TcxDBTextEdit + Left = 205 + Top = 46 + DataBinding.DataField = 'COLOR4' + DataBinding.DataSource = dsDataTable + 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 = '' + 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 = 55 + end + object eColor5: TcxDBTextEdit + Left = 266 + Top = 46 + DataBinding.DataField = 'COLOR5' + DataBinding.DataSource = dsDataTable + 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 = '' + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 4 + Width = 55 + end + object eColor6: TcxDBTextEdit + Left = 327 + Top = 46 + DataBinding.DataField = 'COLOR6' + DataBinding.DataSource = dsDataTable + 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 = '' + 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 = 55 + end + object eColor7: TcxDBTextEdit + Left = 388 + Top = 46 + DataBinding.DataField = 'COLOR7' + DataBinding.DataSource = dsDataTable + 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 = '' + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 6 + Width = 55 + end + object eColor8: TcxDBTextEdit + Left = 449 + Top = 46 + DataBinding.DataField = 'COLOR8' + DataBinding.DataSource = dsDataTable + 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 = '' + 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 = 55 + end + object eColor9: TcxDBTextEdit + Left = 510 + Top = 46 + DataBinding.DataField = 'COLOR9' + DataBinding.DataSource = dsDataTable + 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 = '' + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 8 + Width = 55 + end + object eColor10: TcxDBTextEdit + Left = 571 + Top = 46 + DataBinding.DataField = 'COLOR10' + DataBinding.DataSource = dsDataTable + 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 = '' + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 9 + Width = 55 + end + object eColor11: TcxDBTextEdit + Left = 632 + Top = 46 + DataBinding.DataField = 'COLOR11' + DataBinding.DataSource = dsDataTable + 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 = '' + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 10 + Width = 55 + end + object eColor12: TcxDBTextEdit + Left = 693 + Top = 46 + DataBinding.DataField = 'COLOR12' + DataBinding.DataSource = dsDataTable + 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 = '' + 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 = 55 + end + object bAceptar: TButton + Left = 604 + Top = 85 + Width = 75 + Height = 25 + Align = alRight + Caption = 'Aceptar' + ModalResult = 1 + TabOrder = 12 + end + object bCancelar: TButton + Left = 685 + Top = 85 + Width = 75 + Height = 25 + Align = alRight + Cancel = True + Caption = 'Cancelar' + ModalResult = 2 + TabOrder = 13 + end + object dxLayoutControl1Group_Root: TdxLayoutGroup + ShowCaption = False + Hidden = True + ShowBorder = False + object dxLayoutControl1Group1: TdxLayoutGroup + Caption = 'Colores' + LayoutDirection = ldHorizontal + object dxLayoutControl1Item1: TdxLayoutItem + Caption = 'Color 1' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor1 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item2: TdxLayoutItem + Caption = 'Color 2' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor2 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item3: TdxLayoutItem + Caption = 'Color 3' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor3 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item4: TdxLayoutItem + Caption = 'Color 4' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor4 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item5: TdxLayoutItem + Caption = 'Color 5' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor5 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item6: TdxLayoutItem + Caption = 'Color 6' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor6 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item7: TdxLayoutItem + Caption = 'Color 7' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor7 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item8: TdxLayoutItem + Caption = 'Color 8' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor8 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item9: TdxLayoutItem + Caption = 'Color 9' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor9 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item10: TdxLayoutItem + Caption = 'Color 10' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor10 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item11: TdxLayoutItem + Caption = 'Color 11' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor11 + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item12: TdxLayoutItem + Caption = 'Color 12' + CaptionOptions.AlignHorz = taCenter + CaptionOptions.Layout = clTop + Control = eColor12 + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Group2: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item13: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + Caption = 'Button1' + ShowCaption = False + Control = bAceptar + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item14: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + Caption = 'Button2' + ShowCaption = False + Control = bCancelar + ControlOptions.ShowBorder = False + end + end + end + end + object dsDataTable: TDADataSource + end +end diff --git a/Source/GUIBase/uEditorColores.pas b/Source/GUIBase/uEditorColores.pas new file mode 100644 index 0000000..e799866 --- /dev/null +++ b/Source/GUIBase/uEditorColores.pas @@ -0,0 +1,104 @@ +unit uEditorColores; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, dxLayoutControl, cxControls, DB, uDAInterfaces, uDADataTable, + cxContainer, cxEdit, cxTextEdit, cxDBEdit, StdCtrls; + +type + TfrEditorColores = class(TForm) + dxLayoutControl1Group_Root: TdxLayoutGroup; + dxLayoutControl1: TdxLayoutControl; + dxLayoutControl1Item1: TdxLayoutItem; + eColor1: TcxDBTextEdit; + dsDataTable: TDADataSource; + dxLayoutControl1Group1: TdxLayoutGroup; + dxLayoutControl1Item2: TdxLayoutItem; + eColor2: TcxDBTextEdit; + dxLayoutControl1Item3: TdxLayoutItem; + eColor3: TcxDBTextEdit; + dxLayoutControl1Item4: TdxLayoutItem; + eColor4: TcxDBTextEdit; + dxLayoutControl1Item5: TdxLayoutItem; + eColor5: TcxDBTextEdit; + dxLayoutControl1Item6: TdxLayoutItem; + eColor6: TcxDBTextEdit; + dxLayoutControl1Item7: TdxLayoutItem; + eColor7: TcxDBTextEdit; + dxLayoutControl1Item8: TdxLayoutItem; + eColor8: TcxDBTextEdit; + dxLayoutControl1Item9: TdxLayoutItem; + eColor9: TcxDBTextEdit; + dxLayoutControl1Item10: TdxLayoutItem; + eColor10: TcxDBTextEdit; + dxLayoutControl1Item11: TdxLayoutItem; + eColor11: TcxDBTextEdit; + dxLayoutControl1Item12: TdxLayoutItem; + eColor12: TcxDBTextEdit; + bAceptar: TButton; + dxLayoutControl1Item13: TdxLayoutItem; + bCancelar: TButton; + dxLayoutControl1Item14: TdxLayoutItem; + dxLayoutControl1Group2: TdxLayoutGroup; + private + { Private declarations } + public + function GetTotal: Double; + end; + +var + frEditorColores: TfrEditorColores; + +implementation + +{$R *.dfm} + +{ TfrEditorColores } + +function TfrEditorColores.GetTotal: Double; +var + Total: Double; +begin + Total := 0; + if not VarIsNull(eColor1.EditValue) then + Total := Total + eColor1.EditValue; + + if not VarIsNull(eColor2.EditValue) then + Total := Total + eColor2.EditValue; + + if not VarIsNull(eColor3.EditValue) then + Total := Total + eColor3.EditValue; + + if not VarIsNull(eColor4.EditValue) then + Total := Total + eColor4.EditValue; + + if not VarIsNull(eColor5.EditValue) then + Total := Total + eColor5.EditValue; + + if not VarIsNull(eColor6.EditValue) then + Total := Total + eColor6.EditValue; + + if not VarIsNull(eColor7.EditValue) then + Total := Total + eColor7.EditValue; + + if not VarIsNull(eColor8.EditValue) then + Total := Total + eColor8.EditValue; + + if not VarIsNull(eColor9.EditValue) then + Total := Total + eColor9.EditValue; + + if not VarIsNull(eColor10.EditValue) then + Total := Total + eColor10.EditValue; + + if not VarIsNull(eColor11.EditValue) then + Total := Total + eColor11.EditValue; + + if not VarIsNull(eColor12.EditValue) then + Total := Total + eColor12.EditValue; + + Result := Total; +end; + +end. diff --git a/Source/Modulos/Albaranes de cliente/Controller/AlbaranesCliente_controller.drc b/Source/Modulos/Albaranes de cliente/Controller/AlbaranesCliente_controller.drc index 14fc5d0..cc3f7c4 100644 --- a/Source/Modulos/Albaranes de cliente/Controller/AlbaranesCliente_controller.drc +++ b/Source/Modulos/Albaranes de cliente/Controller/AlbaranesCliente_controller.drc @@ -13,4 +13,4 @@ BEGIN END /* C:\Codigo Noviseda\Source\Modulos\Albaranes de cliente\Controller\AlbaranesCliente_controller.res */ -/* E:\temp\dtfAB.tmp */ +/* C:\Codigo Noviseda\Source\Modulos\Albaranes de cliente\Controller\AlbaranesCliente_controller.drf */ diff --git a/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas index 475d91d..ee35037 100644 --- a/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas +++ b/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas @@ -13,6 +13,8 @@ type procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload; procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable); function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double; + + procedure ModificarCantidadColores(ADetalles: IDAStronglyTypedDataTable); end; TDetallesAlbaranClienteController = class(TControllerDetallesArticulos, IDetallesAlbaranClienteController) @@ -33,13 +35,15 @@ type public procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean = True; const ACantidad: Integer = 1); overload; procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload; + + procedure ModificarCantidadColores(ADetalles: IDAStronglyTypedDataTable); constructor Create; override; destructor Destroy; override; end; implementation -uses Dialogs, uDialogUtils, Variants, uControllerDetallesBase, +uses Controls, Dialogs, uDialogUtils, Variants, uControllerDetallesBase, uEditorColores, uCalculosUtils, uDataModuleAlbaranesCliente, uArticulosAlbaranClienteController; { TDetallesAlbaranClienteController } @@ -134,6 +138,31 @@ begin end; +procedure TDetallesAlbaranClienteController.ModificarCantidadColores(ADetalles: IDAStronglyTypedDataTable); +var + ADetallesAux: IBizDetallesAlbaranCliente; +begin + if Assigned(ADetalles) then + begin + ADetallesAux := (ADetalles as IBizDEtallesAlbaranCliente); + with TfrEditorColores.Create(NIL) do + begin + dsDataTable.DataTable := ADetallesAux.DetalleColores.DataTable; + if (showModal = mrOK) then + begin + ADetallesAux.DetalleColores.DataTable.Post; + ADetallesAux.DataTable.Edit; + ADetallesAux.CANTIDAD := GetTotal; + ADetallesAux.DataTable.post; + end + else + ADetallesAux.DetalleColores.DataTable.Cancel; + + Free; + end; + end; +end; + procedure TDetallesAlbaranClienteController.RellenarOtros(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); begin //En Tecsitel no se tiene en cuenta el descuento de cliente para el precio PVP diff --git a/Source/Modulos/Albaranes de cliente/Data/AlbaranesCliente_data.drc b/Source/Modulos/Albaranes de cliente/Data/AlbaranesCliente_data.drc index c2f3cba..0bab87f 100644 --- a/Source/Modulos/Albaranes de cliente/Data/AlbaranesCliente_data.drc +++ b/Source/Modulos/Albaranes de cliente/Data/AlbaranesCliente_data.drc @@ -12,6 +12,6 @@ STRINGTABLE BEGIN END -/* C:\Codigo Noviseda\Source\Modulos\Albaranes de cliente\Data\uDataModuleAlbaranesCliente.dfm */ +/* C:\Codigo Noviseda\Source\Modulos\Albaranes de cliente\Data\uDataModuleAlbaranesCliente.DFM */ /* C:\Codigo Noviseda\Source\Modulos\Albaranes de cliente\Data\AlbaranesCliente_data.res */ -/* E:\temp\dtfA9.tmp */ +/* C:\Codigo Noviseda\Source\Modulos\Albaranes de cliente\Data\AlbaranesCliente_data.drf */ diff --git a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm index 7d15a50..0e0fecf 100644 --- a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm @@ -10,12 +10,12 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente Top = 16 end object rda_AlbaranesCliente: TDARemoteDataAdapter + DataStreamer = Bin2DataStreamer GetSchemaCall.RemoteService = RORemoteService GetDataCall.RemoteService = RORemoteService UpdateDataCall.RemoteService = RORemoteService GetScriptsCall.RemoteService = RORemoteService RemoteService = RORemoteService - DataStreamer = Bin2DataStreamer Left = 43 Top = 151 end @@ -289,8 +289,6 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente Params = <> StreamingOptions = [soDisableEventsWhileStreaming] RemoteDataAdapter = rda_AlbaranesCliente - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'AlbaranesCliente' IndexDefs = <> Left = 232 @@ -408,8 +406,6 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente MasterSource = ds_AlbaranesCliente MasterFields = 'ID' DetailFields = 'ID_ALBARAN' - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'AlbaranesCliente_Detalles' IndexDefs = <> Left = 384 @@ -432,8 +428,6 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente Params = <> StreamingOptions = [soDisableEventsWhileStreaming] RemoteDataAdapter = rda_AlbaranesCliente - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'ListaAnosAlbaranes' IndexDefs = <> Left = 232 @@ -445,4 +439,110 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente Left = 232 Top = 192 end + object tbl_AlbaranesCliente_Detalle_Color: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID' + DataType = datAutoInc + GeneratorName = 'GEN_ALBARANES_CLI_DET_COLOR_ID' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_ID' + InPrimaryKey = True + end + item + Name = 'ID_DETALLE' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_ID_DETALLE' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_ID_DETALLE' + end + item + Name = 'COLOR1' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR1' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR1' + end + item + Name = 'COLOR2' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR2' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR2' + end + item + Name = 'COLOR3' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR3' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR3' + end + item + Name = 'COLOR4' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR4' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR4' + end + item + Name = 'COLOR5' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR5' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR5' + end + item + Name = 'COLOR6' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR6' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR6' + end + item + Name = 'COLOR7' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR7' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR7' + end + item + Name = 'COLOR8' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR8' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR8' + end + item + Name = 'COLOR9' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR9' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR9' + end + item + Name = 'COLOR10' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR10' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR10' + end + item + Name = 'COLOR11' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR11' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR11' + end + item + Name = 'COLOR12' + DataType = datInteger + DisplayLabel = 'AlbaranesCliente_Detalle_Color_COLOR12' + DictionaryEntry = 'AlbaranesCliente_Detalle_Color_COLOR12' + end> + Params = <> + MasterMappingMode = mmWhere + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteDataAdapter = rda_AlbaranesCliente + MasterSource = ds_AlbaranesCliente_Detalles + MasterFields = 'ID' + DetailFields = 'ID_DETALLE' + LogicalName = 'AlbaranesCliente_Detalle_Color' + IndexDefs = <> + Left = 384 + Top = 248 + end + object ds_AlbaranesCliente_Detalle_Color: TDADataSource + DataSet = tbl_AlbaranesCliente_Detalle_Color.Dataset + DataTable = tbl_AlbaranesCliente_Detalle_Color + Left = 384 + Top = 192 + end end diff --git a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas index 02f9e31..37d6939 100644 --- a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas @@ -7,7 +7,7 @@ uses uRORemoteService, uROClient, uROBinMessage, uDAScriptingProvider, uDACDSDataTable, uROWinInetHttpChannel, uDADataTable, uDABINAdapter, - uIDataModuleAlbaranesCliente, uBizAlbaranesCliente, uBizDetallesAlbaranCliente, + uIDataModuleAlbaranesCliente, uBizAlbaranesCliente, uBizDetallesAlbaranCliente, uBizDetalleColoresAlbaranCliente, uIDataModuleAlbaranesClienteReport, uDataModuleBase, uDABin2DataStreamer, uDAMemDataTable, uDAInterfaces, uDADataStreamer, uDARemoteDataAdapter, uIntegerListUtils; @@ -22,10 +22,13 @@ type ds_AlbaranesCliente_Detalles: TDADataSource; tbl_ListaAnosAlbaranes: TDAMemDataTable; ds_ListaAnosAlbaranes: TDADataSource; + tbl_AlbaranesCliente_Detalle_Color: TDAMemDataTable; + ds_AlbaranesCliente_Detalle_Color: TDADataSource; procedure DAClientDataModuleCreate(Sender: TObject); private function _GetDetalles : IBizDetallesAlbaranCliente; + function _GetDetalleColores : IBizDetalleColoresAlbaranCliente; protected procedure AsignarClaseNegocio(AAlbaran: TDADataTable); virtual; @@ -102,6 +105,24 @@ begin Result := GetItem(ID_NULO) end; +function TDataModuleAlbaranesCliente._GetDetalleColores: IBizDetalleColoresAlbaranCliente; +var + ADetalleColores : TDAMemDataTable; +begin + ShowHourglassCursor; + try + ADetalleColores := CloneDataTable(tbl_AlbaranesCliente_Detalle_Color); + with ADetalleColores do + begin + BusinessRulesID := BIZ_CLIENT_DETALLE_COLORES_ALBARAN_CLIENTE; + DetailOptions := DetailOptions - [dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]; + end; + Result := (ADetalleColores as IBizDetalleColoresAlbaranCliente); + finally + HideHourglassCursor; + end; +end; + function TDataModuleAlbaranesCliente._GetDetalles: IBizDetallesAlbaranCliente; var ADetalles : TDAMemDataTable; @@ -188,6 +209,7 @@ begin with TBizAlbaranCliente(AAlbaran.BusinessEventsObj) do begin Detalles := _GetDetalles; + Detalles.DetalleColores := _GetDetalleColores; end; Result := (AAlbaran as IBizAlbaranCliente); diff --git a/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dpk b/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dpk index ca686f3..40428c7 100644 Binary files a/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dpk and b/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dpk differ diff --git a/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj b/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj index a87f440..6ee6937 100644 --- a/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj +++ b/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj @@ -1,4 +1,5 @@ - + + {a7225a8d-f40d-4878-9a27-c5de0e7cb638} AlbaranesCliente_model.dpk @@ -51,15 +52,24 @@ MainSource + + + + + + + + +