diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index b24066d..d5867e7 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -178,6 +178,9 @@ SET GENERATOR GEN_INFORMES_ID TO 1; CREATE GENERATOR GEN_MOVIMIENTOS_ID; SET GENERATOR GEN_MOVIMIENTOS_ID TO 1; +CREATE GENERATOR GEN_MOVIMIENTOS_DET_COLOR_ID; +SET GENERATOR GEN_MOVIMIENTOS_DET_COLOR_ID TO 1; + CREATE GENERATOR GEN_OBRAS_EJECUCIONES_ID; SET GENERATOR GEN_OBRAS_EJECUCIONES_ID TO 1; @@ -836,6 +839,23 @@ CREATE TABLE MOVIMIENTOS ( ID_ALMACEN_RESERVA TIPO_ID ); +CREATE TABLE MOVIMIENTOS_DETALLE_COLOR ( + ID TIPO_ID NOT NULL /* TIPO_ID = INTEGER */, + ID_MOVIMIENTO TIPO_ID NOT NULL /* TIPO_ID = INTEGER */, + 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 OBRAS_DATOS ( ID_ALMACEN TIPO_ID NOT NULL, ID_CLIENTE TIPO_ID @@ -2559,7 +2579,79 @@ WHERE TIPO = 'E' GROUP BY ID_ALMACEN, ID_ARTICULO ; +CREATE VIEW V_INV_ENTRADAS_MOV_COLOR( + ID_ALMACEN, + ID_ARTICULO, + COLOR1, + COLOR2, + COLOR3, + COLOR4, + COLOR5, + COLOR6, + COLOR7, + COLOR8, + COLOR9, + COLOR10, + COLOR11, + COLOR12) +AS +SELECT MOVIMIENTOS.ID_ALMACEN, MOVIMIENTOS.ID_ARTICULO, +SUM(COLOR1), +SUM(COLOR2), +SUM(COLOR3), +SUM(COLOR4), +SUM(COLOR5), +SUM(COLOR6), +SUM(COLOR7), +SUM(COLOR8), +SUM(COLOR9), +SUM(COLOR10), +SUM(COLOR11), +SUM(COLOR12) +FROM MOVIMIENTOS_DETALLE_COLOR +LEFT JOIN MOVIMIENTOS ON (MOVIMIENTOS.ID = MOVIMIENTOS_DETALLE_COLOR.ID_MOVIMIENTO) +WHERE TIPO = 'E' +GROUP BY 1, 2 +; + +CREATE VIEW V_INV_ENTRADAS_COLOR( + ID_ALMACEN, + ID_ARTICULO, + COLOR1, + COLOR2, + COLOR3, + COLOR4, + COLOR5, + COLOR6, + COLOR7, + COLOR8, + COLOR9, + COLOR10, + COLOR11, + COLOR12) +AS +SELECT +ID_ALMACEN, +ID_ARTICULO, +SUM(COLOR1), +SUM(COLOR2), +SUM(COLOR3), +SUM(COLOR4), +SUM(COLOR5), +SUM(COLOR6), +SUM(COLOR7), +SUM(COLOR8), +SUM(COLOR9), +SUM(COLOR10), +SUM(COLOR11), +SUM(COLOR12) + +FROM V_INV_ENTRADAS_MOV_COLOR + +GROUP BY ID_ALMACEN, + ID_ARTICULO +; /* View: V_INV_ENTRADAS_AUX */ CREATE VIEW V_INV_ENTRADAS_AUX( @@ -2770,6 +2862,45 @@ AND (SITUACION in ('ENVIADO', 'SERVIDO')) GROUP BY ID_ALMACEN, ID_ARTICULO ; +CREATE VIEW V_INV_SALIDAS_ALB_COLOR( + ID_ALMACEN, + ID_ARTICULO, + COLOR1, + COLOR2, + COLOR3, + COLOR4, + COLOR5, + COLOR6, + COLOR7, + COLOR8, + COLOR9, + COLOR10, + COLOR11, + COLOR12) +AS +SELECT ALBARANES_CLIENTE.ID_ALMACEN, ALBARANES_CLIENTE_DETALLES.ID_ARTICULO, +SUM(COLOR1) as COLOR1, +SUM(COLOR2) as COLOR2, +SUM(COLOR3) as COLOR3, +SUM(COLOR4) as COLOR4, +SUM(COLOR5) as COLOR5, +SUM(COLOR6) as COLOR6, +SUM(COLOR7) as COLOR7, +SUM(COLOR8) as COLOR8, +SUM(COLOR9) as COLOR9, +SUM(COLOR10) as COLOR10, +SUM(COLOR11) as COLOR11, +SUM(COLOR12) as COLOR12 +/* +SUM(COLOR1)+SUM(COLOR2)+SUM(COLOR3)+SUM(COLOR4)+SUM(COLOR5)+SUM(COLOR6)+SUM(COLOR7)+SUM(COLOR8)+SUM(COLOR9)+SUM(COLOR10)+SUM(COLOR11)+SUM(COLOR12) as TOTAL +*/ +FROM ALBARANES_CLIENTE_DETALLES +LEFT JOIN ALBARANES_CLIENTE ON (ALBARANES_CLIENTE.ID = ALBARANES_CLIENTE_DETALLES.ID_ALBARAN) +LEFT JOIN ALBARANES_CLIENTE_DETALLE_COLOR ON (ALBARANES_CLIENTE_DETALLE_COLOR.ID_DETALLE = ALBARANES_CLIENTE_DETALLES.ID) +WHERE (ALBARANES_CLIENTE.ID_ALMACEN IS NOT NULL) +GROUP BY 1, 2 +; + /* View: V_INV_SALIDAS_MOV */ @@ -2784,7 +2915,41 @@ WHERE TIPO = 'S' GROUP BY ID_ALMACEN, ID_ARTICULO ; +CREATE VIEW V_INV_SALIDAS_MOV_COLOR( + ID_ALMACEN, + ID_ARTICULO, + COLOR1, + COLOR2, + COLOR3, + COLOR4, + COLOR5, + COLOR6, + COLOR7, + COLOR8, + COLOR9, + COLOR10, + COLOR11, + COLOR12) +AS +SELECT MOVIMIENTOS.ID_ALMACEN, MOVIMIENTOS.ID_ARTICULO, +SUM(COLOR1), +SUM(COLOR2), +SUM(COLOR3), +SUM(COLOR4), +SUM(COLOR5), +SUM(COLOR6), +SUM(COLOR7), +SUM(COLOR8), +SUM(COLOR9), +SUM(COLOR10), +SUM(COLOR11), +SUM(COLOR12) +FROM MOVIMIENTOS_DETALLE_COLOR +LEFT JOIN MOVIMIENTOS ON (MOVIMIENTOS.ID = MOVIMIENTOS_DETALLE_COLOR.ID_MOVIMIENTO) +WHERE TIPO = 'S' +GROUP BY 1, 2 +; /* View: V_INV_SALIDAS_AUX */ CREATE VIEW V_INV_SALIDAS_AUX( @@ -2803,7 +2968,54 @@ SELECT ID_ALMACEN, FROM V_INV_SALIDAS_MOV ; - +CREATE VIEW V_INV_SALIDAS_AUX_COLOR( + ID_ALMACEN, + ID_ARTICULO, + COLOR1, + COLOR2, + COLOR3, + COLOR4, + COLOR5, + COLOR6, + COLOR7, + COLOR8, + COLOR9, + COLOR10, + COLOR11, + COLOR12) +AS +SELECT ID_ALMACEN, + ID_ARTICULO, + COLOR1, + COLOR2, + COLOR3, + COLOR4, + COLOR5, + COLOR6, + COLOR7, + COLOR8, + COLOR9, + COLOR10, + COLOR11, + COLOR12 +FROM V_INV_SALIDAS_ALB_COLOR +UNION ALL +SELECT ID_ALMACEN, + ID_ARTICULO, + COLOR1, + COLOR2, + COLOR3, + COLOR4, + COLOR5, + COLOR6, + COLOR7, + COLOR8, + COLOR9, + COLOR10, + COLOR11, + COLOR12 +FROM V_INV_SALIDAS_MOV_COLOR +; /* View: V_INV_SALIDAS */ CREATE VIEW V_INV_SALIDAS( @@ -2821,7 +3033,42 @@ GROUP BY ID_ALMACEN, ID_ARTICULO ; +CREATE VIEW V_INV_SALIDAS_COLOR( + ID_ALMACEN, + ID_ARTICULO, + COLOR1, + COLOR2, + COLOR3, + COLOR4, + COLOR5, + COLOR6, + COLOR7, + COLOR8, + COLOR9, + COLOR10, + COLOR11, + COLOR12) +AS +SELECT +ID_ALMACEN, +ID_ARTICULO, +SUM(COLOR1), +SUM(COLOR2), +SUM(COLOR3), +SUM(COLOR4), +SUM(COLOR5), +SUM(COLOR6), +SUM(COLOR7), +SUM(COLOR8), +SUM(COLOR9), +SUM(COLOR10), +SUM(COLOR11), +SUM(COLOR12) +FROM V_INV_SALIDAS_AUX_COLOR +GROUP BY ID_ALMACEN, + ID_ARTICULO +; /* View: V_INV_STOCK_AUX */ CREATE VIEW V_INV_STOCK_AUX( @@ -2843,7 +3090,90 @@ SELECT ID_ALMACEN, FROM V_INV_SALIDAS ; - +CREATE VIEW V_INV_STOCK_AUX_COLOR( + ID_ALMACEN, + ID_ARTICULO, + COLOR1_ENTRADA, + COLOR2_ENTRADA, + COLOR3_ENTRADA, + COLOR4_ENTRADA, + COLOR5_ENTRADA, + COLOR6_ENTRADA, + COLOR7_ENTRADA, + COLOR8_ENTRADA, + COLOR9_ENTRADA, + COLOR10_ENTRADA, + COLOR11_ENTRADA, + COLOR12_ENTRADA, + COLOR1_SALIDA, + COLOR2_SALIDA, + COLOR3_SALIDA, + COLOR4_SALIDA, + COLOR5_SALIDA, + COLOR6_SALIDA, + COLOR7_SALIDA, + COLOR8_SALIDA, + COLOR9_SALIDA, + COLOR10_SALIDA, + COLOR11_SALIDA, + COLOR12_SALIDA) +AS +SELECT ID_ALMACEN, + ID_ARTICULO, + COLOR1 as COLOR1_ENTRADA, + COLOR2 as COLOR2_ENTRADA, + COLOR3 as COLOR3_ENTRADA, + COLOR4 as COLOR4_ENTRADA, + COLOR5 as COLOR5_ENTRADA, + COLOR6 as COLOR6_ENTRADA, + COLOR7 as COLOR7_ENTRADA, + COLOR8 as COLOR8_ENTRADA, + COLOR9 as COLOR9_ENTRADA, + COLOR10 as COLOR10_ENTRADA, + COLOR11 as COLOR11_ENTRADA, + COLOR12 as COLOR12_ENTRADA, + 0 as COLOR1_SALIDA, + 0 as COLOR2_SALIDA, + 0 as COLOR3_SALIDA, + 0 as COLOR4_SALIDA, + 0 as COLOR5_SALIDA, + 0 as COLOR6_SALIDA, + 0 as COLOR7_SALIDA, + 0 as COLOR8_SALIDA, + 0 as COLOR9_SALIDA, + 0 as COLOR10_SALIDA, + 0 as COLOR11_SALIDA, + 0 as COLOR12_SALIDA +FROM V_INV_ENTRADAS_COLOR +UNION ALL +SELECT ID_ALMACEN, + ID_ARTICULO, + 0 as COLOR1_ENTRADA, + 0 as COLOR2_ENTRADA, + 0 as COLOR3_ENTRADA, + 0 as COLOR4_ENTRADA, + 0 as COLOR5_ENTRADA, + 0 as COLOR6_ENTRADA, + 0 as COLOR7_ENTRADA, + 0 as COLOR8_ENTRADA, + 0 as COLOR9_ENTRADA, + 0 as COLOR10_ENTRADA, + 0 as COLOR11_ENTRADA, + 0 as COLOR12_ENTRADA, + COLOR1 as COLOR1_SALIDA, + COLOR2 as COLOR2_SALIDA, + COLOR3 as COLOR3_SALIDA, + COLOR4 as COLOR4_SALIDA, + COLOR5 as COLOR5_SALIDA, + COLOR6 as COLOR6_SALIDA, + COLOR7 as COLOR7_SALIDA, + COLOR8 as COLOR8_SALIDA, + COLOR9 as COLOR9_SALIDA, + COLOR10 as COLOR10_SALIDA, + COLOR11 as COLOR11_SALIDA, + COLOR12 as COLOR12_SALIDA +FROM V_INV_SALIDAS_COLOR +; /* View: V_INV_STOCK */ CREATE VIEW V_INV_STOCK( @@ -2860,7 +3190,42 @@ GROUP BY ID_ALMACEN, ID_ARTICULO ; +CREATE VIEW V_INV_STOCK_COLOR( + ID_ALMACEN, + ID_ARTICULO, + COLOR1, + COLOR2, + COLOR3, + COLOR4, + COLOR5, + COLOR6, + COLOR7, + COLOR8, + COLOR9, + COLOR10, + COLOR11, + COLOR12) +AS +SELECT +ID_ALMACEN, +ID_ARTICULO, +(SUM(COLOR1_ENTRADA) - SUM(COLOR1_SALIDA)) as COLOR1, +(SUM(COLOR2_ENTRADA) - SUM(COLOR2_SALIDA)) as COLOR2, +(SUM(COLOR3_ENTRADA) - SUM(COLOR3_SALIDA)) as COLOR3, +(SUM(COLOR4_ENTRADA) - SUM(COLOR4_SALIDA)) as COLOR4, +(SUM(COLOR5_ENTRADA) - SUM(COLOR5_SALIDA)) as COLOR5, +(SUM(COLOR6_ENTRADA) - SUM(COLOR6_SALIDA)) as COLOR6, +(SUM(COLOR7_ENTRADA) - SUM(COLOR7_SALIDA)) as COLOR7, +(SUM(COLOR8_ENTRADA) - SUM(COLOR8_SALIDA)) as COLOR8, +(SUM(COLOR9_ENTRADA) - SUM(COLOR9_SALIDA)) as COLOR9, +(SUM(COLOR10_ENTRADA) - SUM(COLOR10_SALIDA)) as COLOR10, +(SUM(COLOR11_ENTRADA) - SUM(COLOR11_SALIDA)) as COLOR11, +(SUM(COLOR12_ENTRADA) - SUM(COLOR12_SALIDA)) as COLOR12 +FROM V_INV_STOCK_AUX_COLOR +GROUP BY ID_ALMACEN, + ID_ARTICULO +; /* View: V_INVENTARIO_AUX */ CREATE VIEW V_INVENTARIO_AUX( @@ -4050,6 +4415,20 @@ from v_ped_cli_detalle_colores left join v_alb_cli_detalle_colores on ((v_alb_cli_detalle_colores .ID_PEDIDO = v_ped_cli_detalle_colores.id_pedido) and (v_alb_cli_detalle_colores .id_articulo = v_ped_cli_detalle_colores.id_articulo)) + +where +((v_ped_cli_detalle_colores.COLOR1 - coalesce(v_alb_cli_detalle_colores.COLOR1, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR2 - coalesce(v_alb_cli_detalle_colores.COLOR2, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR3 - coalesce(v_alb_cli_detalle_colores.COLOR3, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR4 - coalesce(v_alb_cli_detalle_colores.COLOR4, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR5 - coalesce(v_alb_cli_detalle_colores.COLOR5, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR6 - coalesce(v_alb_cli_detalle_colores.COLOR6, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR7 - coalesce(v_alb_cli_detalle_colores.COLOR7, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR8 - coalesce(v_alb_cli_detalle_colores.COLOR8, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR9 - coalesce(v_alb_cli_detalle_colores.COLOR9, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR10 - coalesce(v_alb_cli_detalle_colores.COLOR10, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR11 - coalesce(v_alb_cli_detalle_colores.COLOR11, 0)) <> 0) +or ((v_ped_cli_detalle_colores.COLOR12 - coalesce(v_alb_cli_detalle_colores.COLOR12, 0)) <> 0) ; @@ -4094,6 +4473,7 @@ ALTER TABLE FORMAS_PAGO ADD PRIMARY KEY (ID); ALTER TABLE FORMAS_PAGO_PLAZOS ADD PRIMARY KEY (ID); ALTER TABLE INFORMES ADD CONSTRAINT PK_INFORMES PRIMARY KEY (ID); ALTER TABLE MOVIMIENTOS ADD CONSTRAINT PK_MOVIMIENTOS PRIMARY KEY (ID); +ALTER TABLE MOVIMIENTOS_DETALLE_COLOR ADD CONSTRAINT PK_MOVIMIENTOS_DETALLE_COLOR PRIMARY KEY (ID); ALTER TABLE OBRAS_EJECUCIONES ADD CONSTRAINT PK_OBRAS_EJE PRIMARY KEY (ID); ALTER TABLE OBRAS_EJECUCIONES_PRESUPUESTOS ADD CONSTRAINT PK_OBRAS_EJE_PRE PRIMARY KEY (ID); ALTER TABLE OBRAS_EJECUCIONES_PEDIDOS_PROV ADD CONSTRAINT PK_OBRAS_EJE_PED_PROV PRIMARY KEY (ID); @@ -4180,6 +4560,7 @@ CREATE INDEX ALBARANES_CLIENTE_IDX3 ON ALBARANES_CLIENTE (FECHA_ALBARAN); CREATE INDEX IDX_ALBARANES_CLIENTE_DETALLES ON ALBARANES_CLIENTE_DETALLES (ID_ARTICULO); CREATE INDEX IDX_ALBARANES_CLIENTE_DETALLES1 ON ALBARANES_CLIENTE_DETALLES (ID_ALBARAN); CREATE INDEX ALBARANES_CLIENTE_DETALLES_IDX1 ON ALBARANES_CLIENTE_DETALLES (ID_PEDIDO); +CREATE INDEX ALBARANES_CLIENTE_DETALLE__IDX1 ON ALBARANES_CLIENTE_DETALLE_COLOR (ID_DETALLE); CREATE INDEX IDX_ALBARANES_PROVEEDOR1 ON ALBARANES_PROVEEDOR (ID_ALMACEN); CREATE INDEX IDX_ALBARANES_PROVEEDOR2 ON ALBARANES_PROVEEDOR (ID_FORMA_PAGO); CREATE INDEX IDX_ALBARANES_PROVEEDOR3 ON ALBARANES_PROVEEDOR (TIPO); diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 040f139..990c17d 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -45,10 +45,6 @@ Package FalseTrueFalseLibreria base de FactuGESFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 - - - - RemObjects SDK - Indy Library Base.dpk diff --git a/Source/GUIBase/uEditorColores.dfm b/Source/GUIBase/uEditorColores.dfm index 686b144..e7b547e 100644 --- a/Source/GUIBase/uEditorColores.dfm +++ b/Source/GUIBase/uEditorColores.dfm @@ -2,6 +2,7 @@ inherited fEditorColores: TfEditorColores Caption = 'Edici'#243'n de cantidades por colores del art'#237'culo' ClientHeight = 221 ClientWidth = 767 + OnCreate = FormCreate ExplicitWidth = 773 ExplicitHeight = 253 PixelsPerInch = 96 diff --git a/Source/GUIBase/uEditorColores.pas b/Source/GUIBase/uEditorColores.pas index a54b508..d4cff19 100644 --- a/Source/GUIBase/uEditorColores.pas +++ b/Source/GUIBase/uEditorColores.pas @@ -40,17 +40,21 @@ type procedure actAceptarExecute(Sender: TObject); procedure actCancelarExecute(Sender: TObject); procedure FormShow(Sender: TObject); + procedure FormCreate(Sender: TObject); private FReferencia : String; FDescripcion : String; + FModoEdicion: Boolean; function GetTotal: Double; procedure SetDescripcion(const Value: String); procedure SetReferencia(const Value: String); - procedure PonerTituloArticulo; + procedure SetModoEdicion(const Value: Boolean); + procedure PonerTituloArticulo; public property Total : Double read GetTotal; property Referencia : String read FReferencia write SetReferencia; property Descripcion : String read FDescripcion write SetDescripcion; + property ModoEdicion: Boolean read FModoEdicion write SetModoEdicion; end; implementation @@ -74,6 +78,12 @@ begin ModalResult := mrCancel; end; +procedure TfEditorColores.FormCreate(Sender: TObject); +begin + inherited; + FModoEdicion := True; +end; + procedure TfEditorColores.FormShow(Sender: TObject); begin inherited; @@ -127,9 +137,24 @@ end; procedure TfEditorColores.PonerTituloArticulo; begin - lblInstruccion.Caption := 'Indique las cantidades por colores para el artículo'; + if ModoEdicion then + begin + Self.Caption := 'Edición de cantidades por colores del artículo'; + lblInstruccion.Caption := 'Indique las cantidades por colores para el artículo'; + Self.btnAceptar.Visible:= true; + Self.btnCancelar.Visible:= true; + end + else + begin + Self.Caption := 'Cantidades por colores del artículo'; + lblInstruccion.Caption := 'Estas son las cantidades por colores del artículo'; + Self.btnAceptar.Visible:= true; + Self.btnAceptar.Left := Self.btnCancelar.Left; + Self.btnCancelar.Visible:= false; + end; + if not EsCadenaVacia(FReferencia) then - lblInstruccion.Caption := lblInstruccion.Caption + ' de referencia ' + FReferencia; + lblInstruccion.Caption := lblInstruccion.Caption + ' de referencia ' + FReferencia; RichEdit1.Text := FDescripcion; end; @@ -139,6 +164,11 @@ begin FDescripcion := Value; end; +procedure TfEditorColores.SetModoEdicion(const Value: Boolean); +begin + FModoEdicion := Value; +end; + procedure TfEditorColores.SetReferencia(const Value: String); begin FReferencia := Value; diff --git a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm index 1bfe09e..1ab4f55 100644 --- a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm +++ b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm @@ -1297,7 +1297,7 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente Params = < item Name = 'ID' - DataType = datLargeInt + DataType = datAutoInc GeneratorName = 'GEN_ALBARANES_CLI_DETALLES_ID' Value = '' end diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm index d092d36..30aefff 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm @@ -203,21 +203,8 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente Height = 51 ExplicitWidth = 841 ExplicitHeight = 51 - inherited ToolButton3: TToolButton - Wrap = False - end - inherited ToolButton4: TToolButton - Left = 278 - Top = 0 - ExplicitLeft = 278 - ExplicitTop = 0 - end inherited ToolButton14: TToolButton - Left = 334 - Top = 0 Wrap = False - ExplicitLeft = 334 - ExplicitTop = 0 end inherited FontName: TJvFontComboBox Left = 399 @@ -225,69 +212,65 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente ExplicitLeft = 399 ExplicitTop = 0 end - inherited FontSize: TEdit + inherited ToolButton13: TToolButton [6] Left = 544 Top = 0 - Width = 234 + Wrap = False ExplicitLeft = 544 ExplicitTop = 0 - ExplicitWidth = 234 + ExplicitHeight = 22 end - inherited ToolButton13: TToolButton [7] - Left = 0 + inherited ToolButton6: TToolButton [7] + Left = 552 Top = 0 - Wrap = True - ExplicitLeft = 0 + ExplicitLeft = 552 ExplicitTop = 0 - ExplicitHeight = 27 end - inherited UpDown1: TUpDown [8] + inherited ToolButton7: TToolButton [8] + Left = 618 + Top = 0 + ExplicitLeft = 618 + ExplicitTop = 0 + end + inherited ToolButton8: TToolButton [9] Left = 0 - Top = 27 + Top = 22 ExplicitLeft = 0 - ExplicitTop = 27 + ExplicitTop = 22 end - inherited ToolButton6: TToolButton - Left = 17 - Top = 27 - ExplicitLeft = 17 - ExplicitTop = 27 + inherited ToolButton12: TToolButton [10] + Top = 22 + ExplicitTop = 22 end - inherited ToolButton7: TToolButton - Left = 83 - Top = 27 - ExplicitLeft = 83 - ExplicitTop = 27 + inherited FontSize: TEdit [11] + Left = 0 + Top = 49 + Width = 250 + ExplicitLeft = 0 + ExplicitTop = 49 + ExplicitWidth = 250 end - inherited ToolButton8: TToolButton - Left = 150 - Top = 27 - ExplicitLeft = 150 - ExplicitTop = 27 - end - inherited ToolButton12: TToolButton - Left = 233 - Top = 27 - ExplicitLeft = 233 - ExplicitTop = 27 + inherited UpDown1: TUpDown [12] + Left = 250 + ExplicitLeft = 250 end inherited ToolButton9: TToolButton - Left = 241 - Top = 27 - ExplicitLeft = 241 - ExplicitTop = 27 + Left = 267 + Top = 49 + ExplicitLeft = 267 + ExplicitTop = 49 end inherited ToolButton10: TToolButton - Left = 386 - Top = 27 - ExplicitLeft = 386 - ExplicitTop = 27 + Left = 412 + Top = 49 + ExplicitLeft = 412 + ExplicitTop = 49 end inherited ToolButton11: TToolButton - Left = 511 - Top = 27 - ExplicitLeft = 511 - ExplicitTop = 27 + Left = 537 + Top = 49 + ExplicitLeft = 537 + ExplicitTop = 49 end end inherited cxGrid: TcxGrid diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewDetallesAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewDetallesAlbaranCliente.dfm index c987c0f..a0cb342 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewDetallesAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewDetallesAlbaranCliente.dfm @@ -1,82 +1,95 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente - Width = 701 inherited ToolBar1: TToolBar - Width = 701 - Height = 78 - ExplicitHeight = 78 - inherited ToolButton14: TToolButton [3] - Left = 220 + Height = 100 + ExplicitHeight = 100 + inherited ToolButton3: TToolButton + Wrap = False + end + inherited ToolButton4: TToolButton + Left = 278 Top = 0 - ExplicitLeft = 220 + ExplicitLeft = 278 ExplicitTop = 0 end - inherited FontName: TJvFontComboBox [4] - Left = 285 + inherited ToolButton14: TToolButton + Left = 334 Top = 0 - ExplicitLeft = 285 + ExplicitLeft = 334 ExplicitTop = 0 end - inherited FontSize: TEdit [5] - Left = 430 - Top = 0 - Width = 154 - ExplicitLeft = 430 - ExplicitTop = 0 - ExplicitWidth = 154 + inherited FontName: TJvFontComboBox + Top = 22 + ExplicitTop = 22 end - inherited ToolButton13: TToolButton - Top = 0 - ExplicitTop = 0 + inherited FontSize: TEdit + Top = 22 + Width = 170 + ExplicitTop = 22 + ExplicitWidth = 170 end - inherited ToolButton2: TToolButton [7] + inherited ToolButton13: TToolButton [7] + Left = 0 + Top = 22 + Wrap = True + ExplicitLeft = 0 + ExplicitTop = 22 + ExplicitHeight = 27 end inherited UpDown1: TUpDown [8] - Left = 114 - Top = 27 - ExplicitLeft = 114 - ExplicitTop = 27 - end - inherited ToolButton6: TToolButton [9] - Left = 131 - Top = 27 - ExplicitLeft = 131 - ExplicitTop = 27 - end - inherited ToolButton7: TToolButton [10] - Left = 197 - Top = 27 - ExplicitLeft = 197 - ExplicitTop = 27 - end - inherited ToolButton8: TToolButton [11] - Left = 264 - Top = 27 - ExplicitLeft = 264 - ExplicitTop = 27 - end - inherited ToolButton12: TToolButton [12] - Top = 27 - ExplicitTop = 27 - end - inherited ToolButton9: TToolButton [13] Left = 0 - Top = 54 + Top = 49 ExplicitLeft = 0 - ExplicitTop = 54 + ExplicitTop = 49 end - inherited ToolButton10: TToolButton [14] + inherited ToolButton6: TToolButton + Left = 17 + Top = 49 + ExplicitLeft = 17 + ExplicitTop = 49 end - inherited ToolButton11: TToolButton [15] + inherited ToolButton7: TToolButton + Left = 83 + Top = 49 + ExplicitLeft = 83 + ExplicitTop = 49 + end + inherited ToolButton8: TToolButton + Left = 150 + Top = 49 + ExplicitLeft = 150 + ExplicitTop = 49 + end + inherited ToolButton12: TToolButton + Left = 0 + Top = 49 + Wrap = True + ExplicitLeft = 0 + ExplicitTop = 49 + ExplicitHeight = 27 + end + inherited ToolButton9: TToolButton + Left = 0 + Top = 76 + ExplicitLeft = 0 + ExplicitTop = 76 + end + inherited ToolButton10: TToolButton + Left = 145 + Top = 76 + ExplicitLeft = 145 + ExplicitTop = 76 + end + inherited ToolButton11: TToolButton Left = 270 - Top = 54 + Top = 76 ExplicitLeft = 270 - ExplicitTop = 54 + ExplicitTop = 76 end end inherited cxGrid: TcxGrid - Top = 104 - Width = 701 - Height = 200 + Top = 126 + Height = 178 + ExplicitTop = 126 ExplicitHeight = 178 inherited cxGridView: TcxGridDBTableView inherited cxGridViewTIPO: TcxGridDBColumn @@ -127,8 +140,7 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente end end inherited TBXDock1: TSpTBXDock - Top = 78 - Width = 701 + Top = 100 ExplicitTop = 100 inherited TBXToolbar1: TSpTBXToolbar DockPos = 0 diff --git a/Source/Modulos/Inventario/Controller/uInventarioController.pas b/Source/Modulos/Inventario/Controller/uInventarioController.pas index 70d1e0c..e9d79a8 100644 --- a/Source/Modulos/Inventario/Controller/uInventarioController.pas +++ b/Source/Modulos/Inventario/Controller/uInventarioController.pas @@ -23,6 +23,7 @@ type function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; procedure VerTodos(AInventario: IBizInventario; const pTipoInventario: String); procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String; Const IdAlmacenObra: Integer); + procedure VerDetallesColor(const AInventario: IBizInventario); function BuscarTodos: IBizInventario; function BuscarTodosAlmacenes: IBizInventario; @@ -139,6 +140,7 @@ type function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String; Const IdAlmacenObra: Integer); + procedure VerDetallesColor(const AInventario: IBizInventario); function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String; AValidar:Boolean = True): Boolean; @@ -156,7 +158,7 @@ uses uControllerDetallesBase, uDialogUtils, uFactuGES_App, uIEditorEntradaSalidaArticulos, schArticulosClient_Intf, uIEditorElegirArticulosAlmacen, uInventarioUtils, - uIEditorDetalleReservas, schAlmacenesClient_Intf; + uIEditorDetalleReservas, schAlmacenesClient_Intf, uEditorColores; const CTE_NULA = -1000; //No se utiliza ID_NULO porque en los albaranes de cliente se está asignando ID_NULO y esto ocasiona que se devuelvan tuplas @@ -549,6 +551,29 @@ begin end; end; +procedure TInventarioController.VerDetallesColor(const AInventario: IBizInventario); +var + ADetallesColor : IBizInventarioColor; +begin + if Assigned(AInventario) then + begin + ADetallesColor := FDataModule.GetInventarioColor(AInventario.ID_ALMACEN, AInventario.ID_ARTICULO); + ADetallesColor.DataTable.ReadOnly := True; + ADetallesColor.DataTable.Active := True; + + with TfEditorColores.Create(NIL) do + try + dsDataTable.DataTable := ADetallesColor.DataTable; + Referencia := AInventario.REFERENCIA; + Descripcion := AInventario.DESCRIPCION; + ModoEdicion := False; + ShowModal; + finally + Release; + end; + end; +end; + procedure TInventarioController.VerReservas(AArticulo: IBizInventario; const ATipoReservas: String; Const IdAlmacenObra: Integer); var AEditor : IEditorDetalleReservas; diff --git a/Source/Modulos/Inventario/Data/uDataModuleInventario.dfm b/Source/Modulos/Inventario/Data/uDataModuleInventario.dfm index 6f8c141..2dc3b8b 100644 --- a/Source/Modulos/Inventario/Data/uDataModuleInventario.dfm +++ b/Source/Modulos/Inventario/Data/uDataModuleInventario.dfm @@ -1,7 +1,7 @@ inherited DataModuleInventario: TDataModuleInventario OnCreate = DAClientDataModuleCreate - Height = 238 - Width = 518 + Height = 315 + Width = 599 object RORemoteService: TRORemoteService Message = dmConexion.ROMessage Channel = dmConexion.ROChannel @@ -367,4 +367,77 @@ inherited DataModuleInventario: TDataModuleInventario Left = 304 Top = 72 end + object tbl_Inventario_Color: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID_ALMACEN' + DataType = datInteger + end + item + Name = 'ID_ARTICULO' + DataType = datInteger + end + item + Name = 'COLOR1' + DataType = datLargeInt + end + item + Name = 'COLOR2' + DataType = datLargeInt + end + item + Name = 'COLOR3' + DataType = datLargeInt + end + item + Name = 'COLOR4' + DataType = datLargeInt + end + item + Name = 'COLOR5' + DataType = datLargeInt + end + item + Name = 'COLOR6' + DataType = datLargeInt + end + item + Name = 'COLOR7' + DataType = datLargeInt + end + item + Name = 'COLOR8' + DataType = datLargeInt + end + item + Name = 'COLOR9' + DataType = datLargeInt + end + item + Name = 'COLOR10' + DataType = datLargeInt + end + item + Name = 'COLOR11' + DataType = datLargeInt + end + item + Name = 'COLOR12' + DataType = datLargeInt + end> + Params = <> + StreamingOptions = [soDisableEventsWhileStreaming, soDisableFiltering] + RemoteDataAdapter = rda_Inventario + LogicalName = 'Inventario_Color' + IndexDefs = <> + Left = 440 + Top = 208 + end + object ds_Inventario_Color: TDADataSource + DataSet = tbl_Inventario_Color.Dataset + DataTable = tbl_Inventario_Color + Left = 440 + Top = 152 + end end diff --git a/Source/Modulos/Inventario/Data/uDataModuleInventario.pas b/Source/Modulos/Inventario/Data/uDataModuleInventario.pas index 39b8567..98185c1 100644 --- a/Source/Modulos/Inventario/Data/uDataModuleInventario.pas +++ b/Source/Modulos/Inventario/Data/uDataModuleInventario.pas @@ -21,6 +21,8 @@ type ds_Inventario: TDADataSource; tbl_Movimientos_Detalle_Color: TDAMemDataTable; ds_Movimientos_Detalle_Color: TDADataSource; + tbl_Inventario_Color: TDAMemDataTable; + ds_Inventario_Color: TDADataSource; procedure DAClientDataModuleCreate(Sender: TObject); private function _GetDetalleColores : IBizMovimientosDetalleColor; @@ -30,6 +32,7 @@ type function GetItems(const ID_ALMACEN : Integer) : IBizInventario; overload; function GetDetalleReservas: IBizDetalleReservas; function GetDetalleReservasVacio: IBizDetalleReservas; + function GetInventarioColor(const ID_ALMACEN, ID_ARTICULO : Integer) : IBizInventarioColor; end; implementation @@ -81,6 +84,46 @@ begin end; end; +function TDataModuleInventario.GetInventarioColor(const ID_ALMACEN, ID_ARTICULO : Integer): IBizInventarioColor; +var + AInventarioColor : TDAMemDataTable; + Condicion: TDAWhereExpression; +begin + ShowHourglassCursor; + try + AInventarioColor := CloneDataTable(tbl_Inventario_Color); + AInventarioColor.BusinessRulesID := BIZ_CLIENT_INVENTARIO_COLOR; + Result := (AInventarioColor as IBizInventarioColor); + + with Result.DataTable.DynamicWhere do + begin + // (ID_ALMACEN = :ID_ALMACEN) + Condicion := NewBinaryExpression(NewField('', fld_Inventario_ColorID_ALMACEN), NewConstant(ID_ALMACEN, datInteger), dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + with Result.DataTable.DynamicWhere do + begin + // (ID_ARTICULO = :ID_ARTICULO) + Condicion := NewBinaryExpression(NewField('', fld_Inventario_ColorID_ARTICULO), NewConstant(ID_ARTICULO, datInteger), dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + finally + HideHourglassCursor; + end; + + +end; + function TDataModuleInventario.GetItems(const ID_ALMACEN: Integer): IBizInventario; var Condicion: TDAWhereExpression; diff --git a/Source/Modulos/Inventario/Model/Data/uIDataModuleInventario.pas b/Source/Modulos/Inventario/Model/Data/uIDataModuleInventario.pas index 217abd4..c1db313 100644 --- a/Source/Modulos/Inventario/Model/Data/uIDataModuleInventario.pas +++ b/Source/Modulos/Inventario/Model/Data/uIDataModuleInventario.pas @@ -11,7 +11,8 @@ type function GetItems: IBizInventario; overload; function GetItems(const ID_ALMACEN : Integer) : IBizInventario; overload; function GetDetalleReservas: IBizDetalleReservas; - function GetDetalleReservasVacio: IBizDetalleReservas; + function GetDetalleReservasVacio: IBizDetalleReservas; + function GetInventarioColor(const ID_ALMACEN, ID_ARTICULO : Integer) : IBizInventarioColor; end; implementation diff --git a/Source/Modulos/Inventario/Model/schInventarioClient_Intf.pas b/Source/Modulos/Inventario/Model/schInventarioClient_Intf.pas index 81e2fbc..e29a5c2 100644 --- a/Source/Modulos/Inventario/Model/schInventarioClient_Intf.pas +++ b/Source/Modulos/Inventario/Model/schInventarioClient_Intf.pas @@ -10,14 +10,16 @@ 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_Inventario = '{93499318-D59A-462A-9C13-BB123DCF4B52}'; - RID_Movimientos_Detalle_Color = '{FCA12CB3-239D-41A7-BFB9-CC56290B001A}'; - RID_DetalleReservas = '{2EE7CD8A-783F-4E0D-A1D6-92322C593CA2}'; + RID_Inventario = '{88FDC46A-5C64-47DE-9A7C-05A1EF1BB733}'; + RID_Movimientos_Detalle_Color = '{D2195FD9-C966-4692-A94E-85ED2F809B9A}'; + RID_DetalleReservas = '{8C6483AD-1A1E-470B-9E0E-95F976CFB950}'; + RID_Inventario_Color = '{7CBD3AF6-7665-482B-8751-7F0FACBC0A01}'; { Data table names } nme_Inventario = 'Inventario'; nme_Movimientos_Detalle_Color = 'Movimientos_Detalle_Color'; nme_DetalleReservas = 'DetalleReservas'; + nme_Inventario_Color = 'Inventario_Color'; { Inventario fields } fld_InventarioID_ALMACEN = 'ID_ALMACEN'; @@ -137,10 +139,42 @@ const idx_DetalleReservasNOMBRE_ALMACEN_RESERVA = 15; idx_DetalleReservasID_EMPRESA_ALMACEN_RESERVA = 16; + { Inventario_Color fields } + fld_Inventario_ColorID_ALMACEN = 'ID_ALMACEN'; + fld_Inventario_ColorID_ARTICULO = 'ID_ARTICULO'; + fld_Inventario_ColorCOLOR1 = 'COLOR1'; + fld_Inventario_ColorCOLOR2 = 'COLOR2'; + fld_Inventario_ColorCOLOR3 = 'COLOR3'; + fld_Inventario_ColorCOLOR4 = 'COLOR4'; + fld_Inventario_ColorCOLOR5 = 'COLOR5'; + fld_Inventario_ColorCOLOR6 = 'COLOR6'; + fld_Inventario_ColorCOLOR7 = 'COLOR7'; + fld_Inventario_ColorCOLOR8 = 'COLOR8'; + fld_Inventario_ColorCOLOR9 = 'COLOR9'; + fld_Inventario_ColorCOLOR10 = 'COLOR10'; + fld_Inventario_ColorCOLOR11 = 'COLOR11'; + fld_Inventario_ColorCOLOR12 = 'COLOR12'; + + { Inventario_Color field indexes } + idx_Inventario_ColorID_ALMACEN = 0; + idx_Inventario_ColorID_ARTICULO = 1; + idx_Inventario_ColorCOLOR1 = 2; + idx_Inventario_ColorCOLOR2 = 3; + idx_Inventario_ColorCOLOR3 = 4; + idx_Inventario_ColorCOLOR4 = 5; + idx_Inventario_ColorCOLOR5 = 6; + idx_Inventario_ColorCOLOR6 = 7; + idx_Inventario_ColorCOLOR7 = 8; + idx_Inventario_ColorCOLOR8 = 9; + idx_Inventario_ColorCOLOR9 = 10; + idx_Inventario_ColorCOLOR10 = 11; + idx_Inventario_ColorCOLOR11 = 12; + idx_Inventario_ColorCOLOR12 = 13; + type { IInventario } IInventario = interface(IDAStronglyTypedDataTable) - ['{A7EEDE91-8661-4933-B962-0E95C99F7EEE}'] + ['{939DCD46-A13E-4B35-90B0-F28192F5C41E}'] { Property getters and setters } function GetID_ALMACENValue: Integer; procedure SetID_ALMACENValue(const aValue: Integer); @@ -427,7 +461,7 @@ type { IMovimientos_Detalle_Color } IMovimientos_Detalle_Color = interface(IDAStronglyTypedDataTable) - ['{70321F06-A1BF-48BE-B73B-BED105679170}'] + ['{E8729FC0-DE70-4AFD-B0AB-A8161008DB6E}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -618,7 +652,7 @@ type { IDetalleReservas } IDetalleReservas = interface(IDAStronglyTypedDataTable) - ['{CBB42F4A-4545-4E85-885C-3C83C7BE2D49}'] + ['{A6431949-92D9-45BE-A8E4-7FC7FD486182}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -843,6 +877,197 @@ type end; + { IInventario_Color } + IInventario_Color = interface(IDAStronglyTypedDataTable) + ['{D06D1829-B413-48F1-8267-0D2C6937660E}'] + { Property getters and setters } + function GetID_ALMACENValue: Integer; + procedure SetID_ALMACENValue(const aValue: Integer); + function GetID_ALMACENIsNull: Boolean; + procedure SetID_ALMACENIsNull(const aValue: Boolean); + function GetID_ARTICULOValue: Integer; + procedure SetID_ARTICULOValue(const aValue: Integer); + function GetID_ARTICULOIsNull: Boolean; + procedure SetID_ARTICULOIsNull(const aValue: Boolean); + function GetCOLOR1Value: Int64; + procedure SetCOLOR1Value(const aValue: Int64); + function GetCOLOR1IsNull: Boolean; + procedure SetCOLOR1IsNull(const aValue: Boolean); + function GetCOLOR2Value: Int64; + procedure SetCOLOR2Value(const aValue: Int64); + function GetCOLOR2IsNull: Boolean; + procedure SetCOLOR2IsNull(const aValue: Boolean); + function GetCOLOR3Value: Int64; + procedure SetCOLOR3Value(const aValue: Int64); + function GetCOLOR3IsNull: Boolean; + procedure SetCOLOR3IsNull(const aValue: Boolean); + function GetCOLOR4Value: Int64; + procedure SetCOLOR4Value(const aValue: Int64); + function GetCOLOR4IsNull: Boolean; + procedure SetCOLOR4IsNull(const aValue: Boolean); + function GetCOLOR5Value: Int64; + procedure SetCOLOR5Value(const aValue: Int64); + function GetCOLOR5IsNull: Boolean; + procedure SetCOLOR5IsNull(const aValue: Boolean); + function GetCOLOR6Value: Int64; + procedure SetCOLOR6Value(const aValue: Int64); + function GetCOLOR6IsNull: Boolean; + procedure SetCOLOR6IsNull(const aValue: Boolean); + function GetCOLOR7Value: Int64; + procedure SetCOLOR7Value(const aValue: Int64); + function GetCOLOR7IsNull: Boolean; + procedure SetCOLOR7IsNull(const aValue: Boolean); + function GetCOLOR8Value: Int64; + procedure SetCOLOR8Value(const aValue: Int64); + function GetCOLOR8IsNull: Boolean; + procedure SetCOLOR8IsNull(const aValue: Boolean); + function GetCOLOR9Value: Int64; + procedure SetCOLOR9Value(const aValue: Int64); + function GetCOLOR9IsNull: Boolean; + procedure SetCOLOR9IsNull(const aValue: Boolean); + function GetCOLOR10Value: Int64; + procedure SetCOLOR10Value(const aValue: Int64); + function GetCOLOR10IsNull: Boolean; + procedure SetCOLOR10IsNull(const aValue: Boolean); + function GetCOLOR11Value: Int64; + procedure SetCOLOR11Value(const aValue: Int64); + function GetCOLOR11IsNull: Boolean; + procedure SetCOLOR11IsNull(const aValue: Boolean); + function GetCOLOR12Value: Int64; + procedure SetCOLOR12Value(const aValue: Int64); + function GetCOLOR12IsNull: Boolean; + procedure SetCOLOR12IsNull(const aValue: Boolean); + + + { Properties } + property ID_ALMACEN: Integer read GetID_ALMACENValue write SetID_ALMACENValue; + property ID_ALMACENIsNull: Boolean read GetID_ALMACENIsNull write SetID_ALMACENIsNull; + property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue; + property ID_ARTICULOIsNull: Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull; + property COLOR1: Int64 read GetCOLOR1Value write SetCOLOR1Value; + property COLOR1IsNull: Boolean read GetCOLOR1IsNull write SetCOLOR1IsNull; + property COLOR2: Int64 read GetCOLOR2Value write SetCOLOR2Value; + property COLOR2IsNull: Boolean read GetCOLOR2IsNull write SetCOLOR2IsNull; + property COLOR3: Int64 read GetCOLOR3Value write SetCOLOR3Value; + property COLOR3IsNull: Boolean read GetCOLOR3IsNull write SetCOLOR3IsNull; + property COLOR4: Int64 read GetCOLOR4Value write SetCOLOR4Value; + property COLOR4IsNull: Boolean read GetCOLOR4IsNull write SetCOLOR4IsNull; + property COLOR5: Int64 read GetCOLOR5Value write SetCOLOR5Value; + property COLOR5IsNull: Boolean read GetCOLOR5IsNull write SetCOLOR5IsNull; + property COLOR6: Int64 read GetCOLOR6Value write SetCOLOR6Value; + property COLOR6IsNull: Boolean read GetCOLOR6IsNull write SetCOLOR6IsNull; + property COLOR7: Int64 read GetCOLOR7Value write SetCOLOR7Value; + property COLOR7IsNull: Boolean read GetCOLOR7IsNull write SetCOLOR7IsNull; + property COLOR8: Int64 read GetCOLOR8Value write SetCOLOR8Value; + property COLOR8IsNull: Boolean read GetCOLOR8IsNull write SetCOLOR8IsNull; + property COLOR9: Int64 read GetCOLOR9Value write SetCOLOR9Value; + property COLOR9IsNull: Boolean read GetCOLOR9IsNull write SetCOLOR9IsNull; + property COLOR10: Int64 read GetCOLOR10Value write SetCOLOR10Value; + property COLOR10IsNull: Boolean read GetCOLOR10IsNull write SetCOLOR10IsNull; + property COLOR11: Int64 read GetCOLOR11Value write SetCOLOR11Value; + property COLOR11IsNull: Boolean read GetCOLOR11IsNull write SetCOLOR11IsNull; + property COLOR12: Int64 read GetCOLOR12Value write SetCOLOR12Value; + property COLOR12IsNull: Boolean read GetCOLOR12IsNull write SetCOLOR12IsNull; + end; + + { TInventario_ColorDataTableRules } + TInventario_ColorDataTableRules = class(TDADataTableRules, IInventario_Color) + private + protected + { Property getters and setters } + function GetID_ALMACENValue: Integer; virtual; + procedure SetID_ALMACENValue(const aValue: Integer); virtual; + function GetID_ALMACENIsNull: Boolean; virtual; + procedure SetID_ALMACENIsNull(const aValue: Boolean); virtual; + function GetID_ARTICULOValue: Integer; virtual; + procedure SetID_ARTICULOValue(const aValue: Integer); virtual; + function GetID_ARTICULOIsNull: Boolean; virtual; + procedure SetID_ARTICULOIsNull(const aValue: Boolean); virtual; + function GetCOLOR1Value: Int64; virtual; + procedure SetCOLOR1Value(const aValue: Int64); virtual; + function GetCOLOR1IsNull: Boolean; virtual; + procedure SetCOLOR1IsNull(const aValue: Boolean); virtual; + function GetCOLOR2Value: Int64; virtual; + procedure SetCOLOR2Value(const aValue: Int64); virtual; + function GetCOLOR2IsNull: Boolean; virtual; + procedure SetCOLOR2IsNull(const aValue: Boolean); virtual; + function GetCOLOR3Value: Int64; virtual; + procedure SetCOLOR3Value(const aValue: Int64); virtual; + function GetCOLOR3IsNull: Boolean; virtual; + procedure SetCOLOR3IsNull(const aValue: Boolean); virtual; + function GetCOLOR4Value: Int64; virtual; + procedure SetCOLOR4Value(const aValue: Int64); virtual; + function GetCOLOR4IsNull: Boolean; virtual; + procedure SetCOLOR4IsNull(const aValue: Boolean); virtual; + function GetCOLOR5Value: Int64; virtual; + procedure SetCOLOR5Value(const aValue: Int64); virtual; + function GetCOLOR5IsNull: Boolean; virtual; + procedure SetCOLOR5IsNull(const aValue: Boolean); virtual; + function GetCOLOR6Value: Int64; virtual; + procedure SetCOLOR6Value(const aValue: Int64); virtual; + function GetCOLOR6IsNull: Boolean; virtual; + procedure SetCOLOR6IsNull(const aValue: Boolean); virtual; + function GetCOLOR7Value: Int64; virtual; + procedure SetCOLOR7Value(const aValue: Int64); virtual; + function GetCOLOR7IsNull: Boolean; virtual; + procedure SetCOLOR7IsNull(const aValue: Boolean); virtual; + function GetCOLOR8Value: Int64; virtual; + procedure SetCOLOR8Value(const aValue: Int64); virtual; + function GetCOLOR8IsNull: Boolean; virtual; + procedure SetCOLOR8IsNull(const aValue: Boolean); virtual; + function GetCOLOR9Value: Int64; virtual; + procedure SetCOLOR9Value(const aValue: Int64); virtual; + function GetCOLOR9IsNull: Boolean; virtual; + procedure SetCOLOR9IsNull(const aValue: Boolean); virtual; + function GetCOLOR10Value: Int64; virtual; + procedure SetCOLOR10Value(const aValue: Int64); virtual; + function GetCOLOR10IsNull: Boolean; virtual; + procedure SetCOLOR10IsNull(const aValue: Boolean); virtual; + function GetCOLOR11Value: Int64; virtual; + procedure SetCOLOR11Value(const aValue: Int64); virtual; + function GetCOLOR11IsNull: Boolean; virtual; + procedure SetCOLOR11IsNull(const aValue: Boolean); virtual; + function GetCOLOR12Value: Int64; virtual; + procedure SetCOLOR12Value(const aValue: Int64); virtual; + function GetCOLOR12IsNull: Boolean; virtual; + procedure SetCOLOR12IsNull(const aValue: Boolean); virtual; + + { Properties } + property ID_ALMACEN: Integer read GetID_ALMACENValue write SetID_ALMACENValue; + property ID_ALMACENIsNull: Boolean read GetID_ALMACENIsNull write SetID_ALMACENIsNull; + property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue; + property ID_ARTICULOIsNull: Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull; + property COLOR1: Int64 read GetCOLOR1Value write SetCOLOR1Value; + property COLOR1IsNull: Boolean read GetCOLOR1IsNull write SetCOLOR1IsNull; + property COLOR2: Int64 read GetCOLOR2Value write SetCOLOR2Value; + property COLOR2IsNull: Boolean read GetCOLOR2IsNull write SetCOLOR2IsNull; + property COLOR3: Int64 read GetCOLOR3Value write SetCOLOR3Value; + property COLOR3IsNull: Boolean read GetCOLOR3IsNull write SetCOLOR3IsNull; + property COLOR4: Int64 read GetCOLOR4Value write SetCOLOR4Value; + property COLOR4IsNull: Boolean read GetCOLOR4IsNull write SetCOLOR4IsNull; + property COLOR5: Int64 read GetCOLOR5Value write SetCOLOR5Value; + property COLOR5IsNull: Boolean read GetCOLOR5IsNull write SetCOLOR5IsNull; + property COLOR6: Int64 read GetCOLOR6Value write SetCOLOR6Value; + property COLOR6IsNull: Boolean read GetCOLOR6IsNull write SetCOLOR6IsNull; + property COLOR7: Int64 read GetCOLOR7Value write SetCOLOR7Value; + property COLOR7IsNull: Boolean read GetCOLOR7IsNull write SetCOLOR7IsNull; + property COLOR8: Int64 read GetCOLOR8Value write SetCOLOR8Value; + property COLOR8IsNull: Boolean read GetCOLOR8IsNull write SetCOLOR8IsNull; + property COLOR9: Int64 read GetCOLOR9Value write SetCOLOR9Value; + property COLOR9IsNull: Boolean read GetCOLOR9IsNull write SetCOLOR9IsNull; + property COLOR10: Int64 read GetCOLOR10Value write SetCOLOR10Value; + property COLOR10IsNull: Boolean read GetCOLOR10IsNull write SetCOLOR10IsNull; + property COLOR11: Int64 read GetCOLOR11Value write SetCOLOR11Value; + property COLOR11IsNull: Boolean read GetCOLOR11IsNull write SetCOLOR11IsNull; + property COLOR12: Int64 read GetCOLOR12Value write SetCOLOR12Value; + property COLOR12IsNull: Boolean read GetCOLOR12IsNull write SetCOLOR12IsNull; + + public + constructor Create(aDataTable: TDADataTable); override; + destructor Destroy; override; + + end; + implementation uses Variants, uROBinaryHelpers; @@ -1996,9 +2221,316 @@ begin end; +{ TInventario_ColorDataTableRules } +constructor TInventario_ColorDataTableRules.Create(aDataTable: TDADataTable); +begin + inherited; +end; + +destructor TInventario_ColorDataTableRules.Destroy; +begin + inherited; +end; + +function TInventario_ColorDataTableRules.GetID_ALMACENValue: Integer; +begin + result := DataTable.Fields[idx_Inventario_ColorID_ALMACEN].AsInteger; +end; + +procedure TInventario_ColorDataTableRules.SetID_ALMACENValue(const aValue: Integer); +begin + DataTable.Fields[idx_Inventario_ColorID_ALMACEN].AsInteger := aValue; +end; + +function TInventario_ColorDataTableRules.GetID_ALMACENIsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorID_ALMACEN].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetID_ALMACENIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorID_ALMACEN].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetID_ARTICULOValue: Integer; +begin + result := DataTable.Fields[idx_Inventario_ColorID_ARTICULO].AsInteger; +end; + +procedure TInventario_ColorDataTableRules.SetID_ARTICULOValue(const aValue: Integer); +begin + DataTable.Fields[idx_Inventario_ColorID_ARTICULO].AsInteger := aValue; +end; + +function TInventario_ColorDataTableRules.GetID_ARTICULOIsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorID_ARTICULO].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetID_ARTICULOIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorID_ARTICULO].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR1Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR1].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR1Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR1].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR1IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR1].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR1IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR1].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR2Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR2].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR2Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR2].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR2IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR2].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR2IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR2].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR3Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR3].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR3Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR3].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR3IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR3].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR3IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR3].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR4Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR4].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR4Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR4].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR4IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR4].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR4IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR4].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR5Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR5].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR5Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR5].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR5IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR5].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR5IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR5].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR6Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR6].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR6Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR6].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR6IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR6].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR6IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR6].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR7Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR7].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR7Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR7].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR7IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR7].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR7IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR7].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR8Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR8].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR8Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR8].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR8IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR8].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR8IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR8].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR9Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR9].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR9Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR9].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR9IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR9].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR9IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR9].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR10Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR10].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR10Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR10].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR10IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR10].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR10IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR10].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR11Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR11].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR11Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR11].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR11IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR11].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR11IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR11].AsVariant := Null; +end; + +function TInventario_ColorDataTableRules.GetCOLOR12Value: Int64; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR12].AsLargeInt; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR12Value(const aValue: Int64); +begin + DataTable.Fields[idx_Inventario_ColorCOLOR12].AsLargeInt := aValue; +end; + +function TInventario_ColorDataTableRules.GetCOLOR12IsNull: boolean; +begin + result := DataTable.Fields[idx_Inventario_ColorCOLOR12].IsNull; +end; + +procedure TInventario_ColorDataTableRules.SetCOLOR12IsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_Inventario_ColorCOLOR12].AsVariant := Null; +end; + + initialization RegisterDataTableRules(RID_Inventario, TInventarioDataTableRules); RegisterDataTableRules(RID_Movimientos_Detalle_Color, TMovimientos_Detalle_ColorDataTableRules); RegisterDataTableRules(RID_DetalleReservas, TDetalleReservasDataTableRules); + RegisterDataTableRules(RID_Inventario_Color, TInventario_ColorDataTableRules); end. diff --git a/Source/Modulos/Inventario/Model/schInventarioServer_Intf.pas b/Source/Modulos/Inventario/Model/schInventarioServer_Intf.pas index 158321f..21ef5d0 100644 --- a/Source/Modulos/Inventario/Model/schInventarioServer_Intf.pas +++ b/Source/Modulos/Inventario/Model/schInventarioServer_Intf.pas @@ -10,14 +10,15 @@ 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_InventarioDelta = '{B1745CBC-C9F8-463E-97A8-382CF332673D}'; - RID_Movimientos_Detalle_ColorDelta = '{3E603B30-BF7C-46E6-8544-020CB77C09BB}'; - RID_DetalleReservasDelta = '{D651D2E2-590A-4E70-8235-DDD1A2FA5927}'; + RID_InventarioDelta = '{DB1931D9-F42E-491B-998C-E8AC0081DFC2}'; + RID_Movimientos_Detalle_ColorDelta = '{00816D03-8F02-4E0A-9999-AF6FC7F4FB0B}'; + RID_DetalleReservasDelta = '{3E9E6CAB-DC33-43FF-9A3C-3BFEEB6FE7C4}'; + RID_Inventario_ColorDelta = '{D063845D-38A5-4EA5-A0BE-257ED7073F0C}'; type { IInventarioDelta } IInventarioDelta = interface(IInventario) - ['{B1745CBC-C9F8-463E-97A8-382CF332673D}'] + ['{DB1931D9-F42E-491B-998C-E8AC0081DFC2}'] { Property getters and setters } function GetOldID_ALMACENValue : Integer; function GetOldID_ARTICULOValue : Integer; @@ -303,7 +304,7 @@ type { IMovimientos_Detalle_ColorDelta } IMovimientos_Detalle_ColorDelta = interface(IMovimientos_Detalle_Color) - ['{3E603B30-BF7C-46E6-8544-020CB77C09BB}'] + ['{00816D03-8F02-4E0A-9999-AF6FC7F4FB0B}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_MOVIMIENTOValue : Integer; @@ -493,7 +494,7 @@ type { IDetalleReservasDelta } IDetalleReservasDelta = interface(IDetalleReservas) - ['{D651D2E2-590A-4E70-8235-DDD1A2FA5927}'] + ['{3E9E6CAB-DC33-43FF-9A3C-3BFEEB6FE7C4}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -717,6 +718,196 @@ type end; + { IInventario_ColorDelta } + IInventario_ColorDelta = interface(IInventario_Color) + ['{D063845D-38A5-4EA5-A0BE-257ED7073F0C}'] + { Property getters and setters } + function GetOldID_ALMACENValue : Integer; + function GetOldID_ARTICULOValue : Integer; + function GetOldCOLOR1Value : Int64; + function GetOldCOLOR2Value : Int64; + function GetOldCOLOR3Value : Int64; + function GetOldCOLOR4Value : Int64; + function GetOldCOLOR5Value : Int64; + function GetOldCOLOR6Value : Int64; + function GetOldCOLOR7Value : Int64; + function GetOldCOLOR8Value : Int64; + function GetOldCOLOR9Value : Int64; + function GetOldCOLOR10Value : Int64; + function GetOldCOLOR11Value : Int64; + function GetOldCOLOR12Value : Int64; + + { Properties } + property OldID_ALMACEN : Integer read GetOldID_ALMACENValue; + property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue; + property OldCOLOR1 : Int64 read GetOldCOLOR1Value; + property OldCOLOR2 : Int64 read GetOldCOLOR2Value; + property OldCOLOR3 : Int64 read GetOldCOLOR3Value; + property OldCOLOR4 : Int64 read GetOldCOLOR4Value; + property OldCOLOR5 : Int64 read GetOldCOLOR5Value; + property OldCOLOR6 : Int64 read GetOldCOLOR6Value; + property OldCOLOR7 : Int64 read GetOldCOLOR7Value; + property OldCOLOR8 : Int64 read GetOldCOLOR8Value; + property OldCOLOR9 : Int64 read GetOldCOLOR9Value; + property OldCOLOR10 : Int64 read GetOldCOLOR10Value; + property OldCOLOR11 : Int64 read GetOldCOLOR11Value; + property OldCOLOR12 : Int64 read GetOldCOLOR12Value; + end; + + { TInventario_ColorBusinessProcessorRules } + TInventario_ColorBusinessProcessorRules = class(TDABusinessProcessorRules, IInventario_Color, IInventario_ColorDelta) + private + protected + { Property getters and setters } + function GetID_ALMACENValue: Integer; virtual; + function GetID_ALMACENIsNull: Boolean; virtual; + function GetOldID_ALMACENValue: Integer; virtual; + function GetOldID_ALMACENIsNull: Boolean; virtual; + procedure SetID_ALMACENValue(const aValue: Integer); virtual; + procedure SetID_ALMACENIsNull(const aValue: Boolean); virtual; + function GetID_ARTICULOValue: Integer; virtual; + function GetID_ARTICULOIsNull: Boolean; virtual; + function GetOldID_ARTICULOValue: Integer; virtual; + function GetOldID_ARTICULOIsNull: Boolean; virtual; + procedure SetID_ARTICULOValue(const aValue: Integer); virtual; + procedure SetID_ARTICULOIsNull(const aValue: Boolean); virtual; + function GetCOLOR1Value: Int64; virtual; + function GetCOLOR1IsNull: Boolean; virtual; + function GetOldCOLOR1Value: Int64; virtual; + function GetOldCOLOR1IsNull: Boolean; virtual; + procedure SetCOLOR1Value(const aValue: Int64); virtual; + procedure SetCOLOR1IsNull(const aValue: Boolean); virtual; + function GetCOLOR2Value: Int64; virtual; + function GetCOLOR2IsNull: Boolean; virtual; + function GetOldCOLOR2Value: Int64; virtual; + function GetOldCOLOR2IsNull: Boolean; virtual; + procedure SetCOLOR2Value(const aValue: Int64); virtual; + procedure SetCOLOR2IsNull(const aValue: Boolean); virtual; + function GetCOLOR3Value: Int64; virtual; + function GetCOLOR3IsNull: Boolean; virtual; + function GetOldCOLOR3Value: Int64; virtual; + function GetOldCOLOR3IsNull: Boolean; virtual; + procedure SetCOLOR3Value(const aValue: Int64); virtual; + procedure SetCOLOR3IsNull(const aValue: Boolean); virtual; + function GetCOLOR4Value: Int64; virtual; + function GetCOLOR4IsNull: Boolean; virtual; + function GetOldCOLOR4Value: Int64; virtual; + function GetOldCOLOR4IsNull: Boolean; virtual; + procedure SetCOLOR4Value(const aValue: Int64); virtual; + procedure SetCOLOR4IsNull(const aValue: Boolean); virtual; + function GetCOLOR5Value: Int64; virtual; + function GetCOLOR5IsNull: Boolean; virtual; + function GetOldCOLOR5Value: Int64; virtual; + function GetOldCOLOR5IsNull: Boolean; virtual; + procedure SetCOLOR5Value(const aValue: Int64); virtual; + procedure SetCOLOR5IsNull(const aValue: Boolean); virtual; + function GetCOLOR6Value: Int64; virtual; + function GetCOLOR6IsNull: Boolean; virtual; + function GetOldCOLOR6Value: Int64; virtual; + function GetOldCOLOR6IsNull: Boolean; virtual; + procedure SetCOLOR6Value(const aValue: Int64); virtual; + procedure SetCOLOR6IsNull(const aValue: Boolean); virtual; + function GetCOLOR7Value: Int64; virtual; + function GetCOLOR7IsNull: Boolean; virtual; + function GetOldCOLOR7Value: Int64; virtual; + function GetOldCOLOR7IsNull: Boolean; virtual; + procedure SetCOLOR7Value(const aValue: Int64); virtual; + procedure SetCOLOR7IsNull(const aValue: Boolean); virtual; + function GetCOLOR8Value: Int64; virtual; + function GetCOLOR8IsNull: Boolean; virtual; + function GetOldCOLOR8Value: Int64; virtual; + function GetOldCOLOR8IsNull: Boolean; virtual; + procedure SetCOLOR8Value(const aValue: Int64); virtual; + procedure SetCOLOR8IsNull(const aValue: Boolean); virtual; + function GetCOLOR9Value: Int64; virtual; + function GetCOLOR9IsNull: Boolean; virtual; + function GetOldCOLOR9Value: Int64; virtual; + function GetOldCOLOR9IsNull: Boolean; virtual; + procedure SetCOLOR9Value(const aValue: Int64); virtual; + procedure SetCOLOR9IsNull(const aValue: Boolean); virtual; + function GetCOLOR10Value: Int64; virtual; + function GetCOLOR10IsNull: Boolean; virtual; + function GetOldCOLOR10Value: Int64; virtual; + function GetOldCOLOR10IsNull: Boolean; virtual; + procedure SetCOLOR10Value(const aValue: Int64); virtual; + procedure SetCOLOR10IsNull(const aValue: Boolean); virtual; + function GetCOLOR11Value: Int64; virtual; + function GetCOLOR11IsNull: Boolean; virtual; + function GetOldCOLOR11Value: Int64; virtual; + function GetOldCOLOR11IsNull: Boolean; virtual; + procedure SetCOLOR11Value(const aValue: Int64); virtual; + procedure SetCOLOR11IsNull(const aValue: Boolean); virtual; + function GetCOLOR12Value: Int64; virtual; + function GetCOLOR12IsNull: Boolean; virtual; + function GetOldCOLOR12Value: Int64; virtual; + function GetOldCOLOR12IsNull: Boolean; virtual; + procedure SetCOLOR12Value(const aValue: Int64); virtual; + procedure SetCOLOR12IsNull(const aValue: Boolean); virtual; + + { Properties } + property ID_ALMACEN : Integer read GetID_ALMACENValue write SetID_ALMACENValue; + property ID_ALMACENIsNull : Boolean read GetID_ALMACENIsNull write SetID_ALMACENIsNull; + property OldID_ALMACEN : Integer read GetOldID_ALMACENValue; + property OldID_ALMACENIsNull : Boolean read GetOldID_ALMACENIsNull; + property ID_ARTICULO : Integer read GetID_ARTICULOValue write SetID_ARTICULOValue; + property ID_ARTICULOIsNull : Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull; + property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue; + property OldID_ARTICULOIsNull : Boolean read GetOldID_ARTICULOIsNull; + property COLOR1 : Int64 read GetCOLOR1Value write SetCOLOR1Value; + property COLOR1IsNull : Boolean read GetCOLOR1IsNull write SetCOLOR1IsNull; + property OldCOLOR1 : Int64 read GetOldCOLOR1Value; + property OldCOLOR1IsNull : Boolean read GetOldCOLOR1IsNull; + property COLOR2 : Int64 read GetCOLOR2Value write SetCOLOR2Value; + property COLOR2IsNull : Boolean read GetCOLOR2IsNull write SetCOLOR2IsNull; + property OldCOLOR2 : Int64 read GetOldCOLOR2Value; + property OldCOLOR2IsNull : Boolean read GetOldCOLOR2IsNull; + property COLOR3 : Int64 read GetCOLOR3Value write SetCOLOR3Value; + property COLOR3IsNull : Boolean read GetCOLOR3IsNull write SetCOLOR3IsNull; + property OldCOLOR3 : Int64 read GetOldCOLOR3Value; + property OldCOLOR3IsNull : Boolean read GetOldCOLOR3IsNull; + property COLOR4 : Int64 read GetCOLOR4Value write SetCOLOR4Value; + property COLOR4IsNull : Boolean read GetCOLOR4IsNull write SetCOLOR4IsNull; + property OldCOLOR4 : Int64 read GetOldCOLOR4Value; + property OldCOLOR4IsNull : Boolean read GetOldCOLOR4IsNull; + property COLOR5 : Int64 read GetCOLOR5Value write SetCOLOR5Value; + property COLOR5IsNull : Boolean read GetCOLOR5IsNull write SetCOLOR5IsNull; + property OldCOLOR5 : Int64 read GetOldCOLOR5Value; + property OldCOLOR5IsNull : Boolean read GetOldCOLOR5IsNull; + property COLOR6 : Int64 read GetCOLOR6Value write SetCOLOR6Value; + property COLOR6IsNull : Boolean read GetCOLOR6IsNull write SetCOLOR6IsNull; + property OldCOLOR6 : Int64 read GetOldCOLOR6Value; + property OldCOLOR6IsNull : Boolean read GetOldCOLOR6IsNull; + property COLOR7 : Int64 read GetCOLOR7Value write SetCOLOR7Value; + property COLOR7IsNull : Boolean read GetCOLOR7IsNull write SetCOLOR7IsNull; + property OldCOLOR7 : Int64 read GetOldCOLOR7Value; + property OldCOLOR7IsNull : Boolean read GetOldCOLOR7IsNull; + property COLOR8 : Int64 read GetCOLOR8Value write SetCOLOR8Value; + property COLOR8IsNull : Boolean read GetCOLOR8IsNull write SetCOLOR8IsNull; + property OldCOLOR8 : Int64 read GetOldCOLOR8Value; + property OldCOLOR8IsNull : Boolean read GetOldCOLOR8IsNull; + property COLOR9 : Int64 read GetCOLOR9Value write SetCOLOR9Value; + property COLOR9IsNull : Boolean read GetCOLOR9IsNull write SetCOLOR9IsNull; + property OldCOLOR9 : Int64 read GetOldCOLOR9Value; + property OldCOLOR9IsNull : Boolean read GetOldCOLOR9IsNull; + property COLOR10 : Int64 read GetCOLOR10Value write SetCOLOR10Value; + property COLOR10IsNull : Boolean read GetCOLOR10IsNull write SetCOLOR10IsNull; + property OldCOLOR10 : Int64 read GetOldCOLOR10Value; + property OldCOLOR10IsNull : Boolean read GetOldCOLOR10IsNull; + property COLOR11 : Int64 read GetCOLOR11Value write SetCOLOR11Value; + property COLOR11IsNull : Boolean read GetCOLOR11IsNull write SetCOLOR11IsNull; + property OldCOLOR11 : Int64 read GetOldCOLOR11Value; + property OldCOLOR11IsNull : Boolean read GetOldCOLOR11IsNull; + property COLOR12 : Int64 read GetCOLOR12Value write SetCOLOR12Value; + property COLOR12IsNull : Boolean read GetCOLOR12IsNull write SetCOLOR12IsNull; + property OldCOLOR12 : Int64 read GetOldCOLOR12Value; + property OldCOLOR12IsNull : Boolean read GetOldCOLOR12IsNull; + + public + constructor Create(aBusinessProcessor: TDABusinessProcessor); override; + destructor Destroy; override; + + end; + implementation uses @@ -2613,9 +2804,512 @@ begin end; +{ TInventario_ColorBusinessProcessorRules } +constructor TInventario_ColorBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); +begin + inherited; +end; + +destructor TInventario_ColorBusinessProcessorRules.Destroy; +begin + inherited; +end; + +function TInventario_ColorBusinessProcessorRules.GetID_ALMACENValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorID_ALMACEN]; +end; + +function TInventario_ColorBusinessProcessorRules.GetID_ALMACENIsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorID_ALMACEN]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldID_ALMACENValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorID_ALMACEN]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldID_ALMACENIsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorID_ALMACEN]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetID_ALMACENValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorID_ALMACEN] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetID_ALMACENIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorID_ALMACEN] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetID_ARTICULOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorID_ARTICULO]; +end; + +function TInventario_ColorBusinessProcessorRules.GetID_ARTICULOIsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorID_ARTICULO]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldID_ARTICULOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorID_ARTICULO]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldID_ARTICULOIsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorID_ARTICULO]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetID_ARTICULOValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorID_ARTICULO] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetID_ARTICULOIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorID_ARTICULO] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR1Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR1]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR1IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR1]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR1Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR1]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR1IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR1]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR1Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR1] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR1IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR1] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR2Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR2]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR2IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR2]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR2Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR2]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR2IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR2]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR2Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR2] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR2IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR2] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR3Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR3]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR3IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR3]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR3Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR3]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR3IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR3]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR3Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR3] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR3IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR3] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR4Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR4]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR4IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR4]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR4Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR4]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR4IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR4]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR4Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR4] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR4IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR4] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR5Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR5]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR5IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR5]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR5Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR5]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR5IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR5]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR5Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR5] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR5IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR5] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR6Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR6]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR6IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR6]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR6Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR6]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR6IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR6]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR6Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR6] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR6IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR6] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR7Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR7]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR7IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR7]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR7Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR7]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR7IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR7]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR7Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR7] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR7IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR7] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR8Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR8]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR8IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR8]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR8Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR8]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR8IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR8]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR8Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR8] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR8IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR8] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR9Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR9]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR9IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR9]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR9Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR9]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR9IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR9]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR9Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR9] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR9IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR9] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR10Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR10]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR10IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR10]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR10Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR10]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR10IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR10]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR10Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR10] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR10IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR10] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR11Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR11]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR11IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR11]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR11Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR11]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR11IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR11]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR11Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR11] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR11IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR11] := Null; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR12Value: Int64; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR12]; +end; + +function TInventario_ColorBusinessProcessorRules.GetCOLOR12IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR12]; + result := VarIsNull(v) or VarIsClear(v); +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR12Value: Int64; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR12]; +end; + +function TInventario_ColorBusinessProcessorRules.GetOldCOLOR12IsNull: Boolean; +var v: variant; +begin + v := BusinessProcessor.CurrentChange.OldValueByName[fld_Inventario_ColorCOLOR12]; + result := VarIsNull(v) or VarIsClear(v); +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR12Value(const aValue: Int64); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR12] := aValue; +end; + +procedure TInventario_ColorBusinessProcessorRules.SetCOLOR12IsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_Inventario_ColorCOLOR12] := Null; +end; + + initialization RegisterBusinessProcessorRules(RID_InventarioDelta, TInventarioBusinessProcessorRules); RegisterBusinessProcessorRules(RID_Movimientos_Detalle_ColorDelta, TMovimientos_Detalle_ColorBusinessProcessorRules); RegisterBusinessProcessorRules(RID_DetalleReservasDelta, TDetalleReservasBusinessProcessorRules); + RegisterBusinessProcessorRules(RID_Inventario_ColorDelta, TInventario_ColorBusinessProcessorRules); end. diff --git a/Source/Modulos/Inventario/Model/uBizInventario.pas b/Source/Modulos/Inventario/Model/uBizInventario.pas index 2bf7e22..b854976 100644 --- a/Source/Modulos/Inventario/Model/uBizInventario.pas +++ b/Source/Modulos/Inventario/Model/uBizInventario.pas @@ -9,6 +9,7 @@ uses const BIZ_CLIENT_INVENTARIO = 'Client.Inventario'; BIZ_CLIENT_DETALLE_RESERVAS_INV = 'Client.DetallesReservasInv'; + BIZ_CLIENT_INVENTARIO_COLOR = 'Client.InventarioColor'; CTE_INV_ALMACEN = 'ALMACEN'; CTE_INV_OBRA = 'OBRA'; @@ -29,6 +30,10 @@ type ['{7E718670-DDC1-411B-B8DF-A28B81F9B8C3}'] end; + IBizInventarioColor = interface(IInventario_Color) + ['{5542F4D8-16C1-498F-B853-1BF1C22EBA42}'] + end; + IBizInventario = interface(IInventario) ['{12051CDB-9BB1-43C5-AC89-181A27A35513}'] function GetIDAlmacenOrigen: Integer; @@ -59,6 +64,9 @@ type destructor Destroy; override; end; + TBizInventarioColor = class(TInventario_ColorDataTableRules, IBizInventarioColor) + end; + TBizInventario = class(TInventarioDataTableRules, IBizInventario, ISeleccionable) private FIDAlmacenOrigen : Integer; @@ -231,5 +239,6 @@ end; initialization RegisterDataTableRules(BIZ_CLIENT_INVENTARIO, TBizInventario); RegisterDataTableRules(BIZ_CLIENT_DETALLE_RESERVAS_INV, TBizDetalleReservas); + RegisterDataTableRules(BIZ_CLIENT_INVENTARIO_COLOR, TBizInventarioColor); end. diff --git a/Source/Modulos/Inventario/Servidor/srvInventario_Impl.dfm b/Source/Modulos/Inventario/Servidor/srvInventario_Impl.dfm index 3bb8aa9..407f3dc 100644 --- a/Source/Modulos/Inventario/Servidor/srvInventario_Impl.dfm +++ b/Source/Modulos/Inventario/Servidor/srvInventario_Impl.dfm @@ -544,6 +544,130 @@ object srvInventario: TsrvInventario Name = 'ID_EMPRESA_ALMACEN_RESERVA' DataType = datInteger end> + end + item + Params = <> + Statements = < + item + Connection = 'IBX' + TargetTable = 'V_INV_STOCK_COLOR' + StatementType = stAutoSQL + ColumnMappings = < + item + DatasetField = 'ID_ALMACEN' + TableField = 'ID_ALMACEN' + end + item + DatasetField = 'ID_ARTICULO' + TableField = 'ID_ARTICULO' + end + item + DatasetField = 'COLOR1' + TableField = 'COLOR1' + end + item + DatasetField = 'COLOR2' + TableField = 'COLOR2' + end + item + DatasetField = 'COLOR3' + TableField = 'COLOR3' + end + item + DatasetField = 'COLOR4' + TableField = 'COLOR4' + end + item + DatasetField = 'COLOR5' + TableField = 'COLOR5' + end + item + DatasetField = 'COLOR6' + TableField = 'COLOR6' + end + item + DatasetField = 'COLOR7' + TableField = 'COLOR7' + end + item + DatasetField = 'COLOR8' + TableField = 'COLOR8' + end + item + DatasetField = 'COLOR9' + TableField = 'COLOR9' + end + item + DatasetField = 'COLOR10' + TableField = 'COLOR10' + end + item + DatasetField = 'COLOR11' + TableField = 'COLOR11' + end + item + DatasetField = 'COLOR12' + TableField = 'COLOR12' + end> + end> + Name = 'Inventario_Color' + Fields = < + item + Name = 'ID_ALMACEN' + DataType = datInteger + end + item + Name = 'ID_ARTICULO' + DataType = datInteger + end + item + Name = 'COLOR1' + DataType = datLargeInt + end + item + Name = 'COLOR2' + DataType = datLargeInt + end + item + Name = 'COLOR3' + DataType = datLargeInt + end + item + Name = 'COLOR4' + DataType = datLargeInt + end + item + Name = 'COLOR5' + DataType = datLargeInt + end + item + Name = 'COLOR6' + DataType = datLargeInt + end + item + Name = 'COLOR7' + DataType = datLargeInt + end + item + Name = 'COLOR8' + DataType = datLargeInt + end + item + Name = 'COLOR9' + DataType = datLargeInt + end + item + Name = 'COLOR10' + DataType = datLargeInt + end + item + Name = 'COLOR11' + DataType = datLargeInt + end + item + Name = 'COLOR12' + DataType = datLargeInt + end> end> JoinDataTables = <> UnionDataTables = <> diff --git a/Source/Modulos/Inventario/Views/uEditorEntradaSalidaArticulos.dfm b/Source/Modulos/Inventario/Views/uEditorEntradaSalidaArticulos.dfm index 21e1cdb..d668a02 100644 --- a/Source/Modulos/Inventario/Views/uEditorEntradaSalidaArticulos.dfm +++ b/Source/Modulos/Inventario/Views/uEditorEntradaSalidaArticulos.dfm @@ -3,20 +3,20 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos Top = 196 Caption = 'Entrada de art'#237'culos en almac'#233'n' ClientHeight = 556 - ClientWidth = 853 + ClientWidth = 704 OnClose = CustomEditorClose - ExplicitWidth = 861 + ExplicitWidth = 712 ExplicitHeight = 590 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader Top = 177 - Width = 853 + Width = 704 Caption = 'Entrada de art'#237'culos en ' ExplicitTop = 177 ExplicitWidth = 853 inherited Image1: TImage - Left = 720 + Left = 571 Picture.Data = { 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800 0000180806000000E0773DF80000000970485973000017120000171201679FD2 @@ -37,14 +37,14 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos ExplicitLeft = 625 end inherited lblDesbloquear: TcxLabel - Left = 755 + Left = 606 ExplicitLeft = 755 - AnchorX = 800 + AnchorX = 651 AnchorY = 14 end end inherited TBXDock: TSpTBXDock - Width = 853 + Width = 704 ExplicitWidth = 853 inherited tbxMain: TSpTBXToolbar ExplicitWidth = 164 @@ -55,7 +55,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos end end inherited tbxMenu: TSpTBXToolbar - ExplicitWidth = 853 + ExplicitWidth = 704 inherited TBXSubmenuItem4: TSpTBXSubmenuItem object TBXItem33: TSpTBXItem [11] Action = actGuardarCerrar @@ -67,10 +67,11 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos end end inherited pgPaginas: TPageControl - Top = 324 - Width = 847 - Height = 210 + Top = 295 + Width = 698 + Height = 239 MultiLine = True + TabOrder = 1 Visible = False ExplicitTop = 324 ExplicitWidth = 847 @@ -84,7 +85,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos end inherited StatusBar: TJvStatusBar Top = 537 - Width = 853 + Width = 704 Panels = < item Width = 200 @@ -95,8 +96,8 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos object ToolBar1: TToolBar [4] AlignWithMargins = True Left = 5 - Top = 291 - Width = 843 + Top = 262 + Width = 694 Height = 30 Margins.Left = 5 Margins.Top = 2 @@ -112,8 +113,10 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos ParentShowHint = False ShowCaptions = True ShowHint = True - TabOrder = 4 + TabOrder = 3 Transparent = True + ExplicitTop = 291 + ExplicitWidth = 843 object ToolButton1: TToolButton Left = 0 Top = 0 @@ -141,81 +144,11 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos AutoSize = True end end - object pnlMovimiento: TSpTBXDockablePanel [5] + inline frViewEntradaSalidaArticulos1: TfrViewEntradaSalidaArticulos [5] Left = 0 - Top = 204 - Width = 853 - Height = 85 - Caption = 'Filtrar' - Align = alTop - DockMode = dmCannotFloat - DockPos = 3 - DockRow = 1 - TabOrder = 0 - Visible = False - ShowCaptionWhenDocked = False - DesignSize = ( - 853 - 85) - object Label1: TLabel - Left = 266 - Top = 17 - Width = 36 - Height = 13 - Margins.Bottom = 0 - Caption = 'Motivo:' - end - object Label2: TLabel - Left = 12 - Top = 17 - Width = 107 - Height = 13 - Margins.Bottom = 0 - Caption = 'Fecha del movimiento:' - Color = 16054521 - ParentColor = False - end - object eFechaMovimiento: TcxDateEdit - Left = 126 - Top = 14 - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.HotTrack = False - Style.LookAndFeel.NativeStyle = True - Style.ButtonStyle = bts3D - Style.PopupBorderStyle = epbsFrame3D - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 0 - Width = 121 - end - object eCausa: TcxTextEdit - Left = 308 - Top = 14 - Anchors = [akLeft, akTop, akRight] - AutoSize = False - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.HotTrack = False - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = True - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 1 - Height = 21 - Width = 1977 - end - end - inline frViewEntradaSalidaArticulos1: TfrViewEntradaSalidaArticulos [6] - Left = 0 - Top = 321 - Width = 853 - Height = 216 + Top = 292 + Width = 704 + Height = 245 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -223,14 +156,14 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 6 + TabOrder = 5 ReadOnly = False ExplicitTop = 321 ExplicitWidth = 853 ExplicitHeight = 216 inherited cxGrid: TcxGrid - Width = 837 - Height = 72 + Width = 688 + Height = 101 ExplicitWidth = 837 ExplicitHeight = 72 inherited cxGridView: TcxGridDBTableView @@ -241,13 +174,13 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos end end inherited frViewFiltroBase1: TfrViewFiltroBase - Width = 853 + Width = 704 ExplicitWidth = 853 inherited TBXDockablePanel1: TSpTBXDockablePanel - Width = 853 + Width = 704 ExplicitWidth = 853 inherited dxLayoutControl1: TdxLayoutControl - Width = 853 + Width = 704 ExplicitWidth = 853 inherited txtFiltroTodo: TcxTextEdit Style.LookAndFeel.SkinName = '' @@ -264,44 +197,44 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos StyleHot.LookAndFeel.SkinName = '' end inherited edtFechaFinFiltro: TcxDateEdit - Left = 246 + Left = 207 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 246 + ExplicitLeft = 207 end inherited eLista: TcxComboBox - Left = 419 + Left = 352 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 419 + ExplicitLeft = 352 ExplicitWidth = 380 Width = 380 end end inherited TBXAlignmentPanel1: TSpTBXDockablePanel - Width = 843 + Width = 694 ExplicitWidth = 843 inherited tbxBotones: TSpTBXToolbar - Width = 843 + Width = 694 ExplicitWidth = 843 end end end end inherited pnlAgrupaciones: TSpTBXDockablePanel - Top = 190 - Width = 853 + Top = 219 + Width = 704 ExplicitTop = 190 ExplicitWidth = 853 inherited TBXAlignmentPanel1: TSpTBXDockablePanel - Width = 853 + Width = 704 ExplicitWidth = 853 inherited TBXToolbar1: TSpTBXToolbar - Width = 853 + Width = 704 ExplicitWidth = 853 end end @@ -312,6 +245,9 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos BuiltInReportLink = True end end + inherited dxPSEngineController1: TdxPSEngineController + Active = True + end inherited cxViewGridPopupMenu: TcxGridPopupMenu PopupMenus = < item @@ -321,18 +257,19 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos end> end end - object pnlEntradaPedido: TSpTBXDockablePanel [7] + object pnlEntradaPedido: TSpTBXDockablePanel [6] Left = 0 Top = 49 - Width = 853 + Width = 704 Height = 128 Caption = 'Filtrar' Align = alTop DockMode = dmCannotFloat DockPos = 0 - TabOrder = 1 + TabOrder = 0 Visible = False ShowCaptionWhenDocked = False + ExplicitWidth = 853 object Label3: TLabel Left = 202 Top = 17 @@ -430,6 +367,74 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos ParentFont = False end end + object pnlMovimiento: TPanel [7] + Left = 0 + Top = 204 + Width = 704 + Height = 56 + Align = alTop + BevelOuter = bvNone + TabOrder = 7 + ExplicitTop = 289 + ExplicitWidth = 853 + DesignSize = ( + 704 + 56) + object Label2: TLabel + Left = 12 + Top = 17 + Width = 107 + Height = 13 + Margins.Bottom = 0 + Caption = 'Fecha del movimiento:' + end + object Label1: TLabel + Left = 266 + Top = 17 + Width = 36 + Height = 13 + Margins.Bottom = 0 + Caption = 'Motivo:' + end + object eFechaMovimiento: TcxDateEdit + Left = 126 + Top = 14 + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.ButtonStyle = bts3D + Style.PopupBorderStyle = epbsFrame3D + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 0 + Width = 121 + end + object eCausa: TcxTextEdit + Left = 308 + Top = 14 + Anchors = [akLeft, akTop, akRight] + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 1 + ExplicitWidth = 535 + Width = 386 + end + end inherited SmallImages: TPngImageList PngImages = < item diff --git a/Source/Modulos/Inventario/Views/uEditorEntradaSalidaArticulos.pas b/Source/Modulos/Inventario/Views/uEditorEntradaSalidaArticulos.pas index 441e43f..0ad1d81 100644 --- a/Source/Modulos/Inventario/Views/uEditorEntradaSalidaArticulos.pas +++ b/Source/Modulos/Inventario/Views/uEditorEntradaSalidaArticulos.pas @@ -28,11 +28,6 @@ type ToolButton6: TToolButton; ToolButton7: TToolButton; TBXItem33: TSpTBXItem; - pnlMovimiento: TSpTBXDockablePanel; - Label1: TLabel; - eFechaMovimiento: TcxDateEdit; - eCausa: TcxTextEdit; - Label2: TLabel; pnlEntradaPedido: TSpTBXDockablePanel; Label3: TLabel; Label4: TLabel; @@ -43,6 +38,11 @@ type Label7: TLabel; edtProveedor: TLabel; frViewEntradaSalidaArticulos1: TfrViewEntradaSalidaArticulos; + pnlMovimiento: TPanel; + Label2: TLabel; + eFechaMovimiento: TcxDateEdit; + Label1: TLabel; + eCausa: TcxTextEdit; procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction); procedure actAnadirInventarioExecute(Sender: TObject); procedure actEliminarInventarioExecute(Sender: TObject); @@ -339,6 +339,8 @@ begin FTitulo := ''; FHayCambios:= False; FResultadoModalOK := False; + lblDesbloquear.Enabled := False; + lblDesbloquear.Visible := False; end; end. diff --git a/Source/Modulos/Inventario/Views/uEditorInventario.dfm b/Source/Modulos/Inventario/Views/uEditorInventario.dfm index 45d37e3..32929e8 100644 --- a/Source/Modulos/Inventario/Views/uEditorInventario.dfm +++ b/Source/Modulos/Inventario/Views/uEditorInventario.dfm @@ -83,7 +83,7 @@ inherited fEditorInventario: TfEditorInventario Width = 669 ExplicitWidth = 669 inherited tbxMain: TSpTBXToolbar - ExplicitWidth = 490 + ExplicitWidth = 576 object TBXSeparatorItem84: TSpTBXSeparatorItem [6] end object TBXItem54: TSpTBXItem [7] @@ -104,6 +104,10 @@ inherited fEditorInventario: TfEditorInventario Action = actReservar DisplayMode = nbdmImageAndText end + object SpTBXItem1: TSpTBXItem [14] + Action = actDetalleColores + DisplayMode = nbdmImageAndText + end end inherited tbxFiltro: TSpTBXToolbar ExplicitWidth = 328 @@ -155,6 +159,7 @@ inherited fEditorInventario: TfEditorInventario ExplicitWidth = 669 ExplicitHeight = 250 inherited cxGridView: TcxGridDBTableView + OnDblClick = actDetalleColoresExecute DataController.Summary.DefaultGroupSummaryItems = < item Format = ',0.00 '#8364';-,0.00 '#8364 @@ -299,7 +304,6 @@ inherited fEditorInventario: TfEditorInventario Width = 669 Enabled = False Visible = False - ExplicitTop = 96 ExplicitWidth = 669 DesignSize = ( 669 @@ -399,6 +403,12 @@ inherited fEditorInventario: TfEditorInventario OnExecute = actReservadosExecute OnUpdate = actReservadosUpdate end + object actDetalleColores: TAction + Caption = 'Ver colores' + ImageIndex = 24 + OnExecute = actDetalleColoresExecute + OnUpdate = actDetalleColoresUpdate + end end inherited SmallImages: TPngImageList [5] PngImages = < diff --git a/Source/Modulos/Inventario/Views/uEditorInventario.pas b/Source/Modulos/Inventario/Views/uEditorInventario.pas index 860152b..cdfd8f3 100644 --- a/Source/Modulos/Inventario/Views/uEditorInventario.pas +++ b/Source/Modulos/Inventario/Views/uEditorInventario.pas @@ -31,6 +31,8 @@ type actReservados: TAction; TBXItem38: TSpTBXItem; Image2: TImage; + actDetalleColores: TAction; + SpTBXItem1: TSpTBXItem; procedure actModificarExecute(Sender: TObject); procedure actRecibirPedidoExecute(Sender: TObject); procedure actTrasladarExecute(Sender: TObject); @@ -48,6 +50,8 @@ type procedure actEliminarUpdate(Sender: TObject); procedure actRecibirPedidoUpdate(Sender: TObject); procedure actReservarUpdate(Sender: TObject); + procedure actDetalleColoresExecute(Sender: TObject); + procedure actDetalleColoresUpdate(Sender: TObject); private function Seleccionar(Descripcion: String; TipoSeleccion: TEnumSeleccion): Variant; @@ -435,6 +439,20 @@ begin ViewGrid.ContraerTodo; end; +procedure TfEditorInventario.actDetalleColoresExecute(Sender: TObject); +begin + inherited; + if Assigned(Inventario) and (not Inventario.IsEmpty) then + FController.VerDetallesColor(Inventario); +end; + +procedure TfEditorInventario.actDetalleColoresUpdate(Sender: TObject); +begin + inherited; + if (Sender as TAction).Enabled then + (Sender as TAction).Enabled := Assigned(Inventario) and (not Inventario.IsEmpty); +end; + procedure TfEditorInventario.actEliminarUpdate(Sender: TObject); begin inherited; diff --git a/Source/Modulos/Inventario/Views/uViewEntradaSalidaArticulos.dfm b/Source/Modulos/Inventario/Views/uViewEntradaSalidaArticulos.dfm index a705f9c..0fdafaf 100644 --- a/Source/Modulos/Inventario/Views/uViewEntradaSalidaArticulos.dfm +++ b/Source/Modulos/Inventario/Views/uViewEntradaSalidaArticulos.dfm @@ -26,29 +26,40 @@ inherited frViewEntradaSalidaArticulos: TfrViewEntradaSalidaArticulos OptionsSelection.CellSelect = True object cxGridViewRecID: TcxGridDBColumn DataBinding.FieldName = 'RecID' + Visible = False + VisibleForCustomization = False end object cxGridViewID: TcxGridDBColumn DataBinding.FieldName = 'ID' + Visible = False + VisibleForCustomization = False end object cxGridViewID_ARTICULO: TcxGridDBColumn DataBinding.FieldName = 'ID_ARTICULO' + Visible = False + VisibleForCustomization = False end object cxGridViewID_PEDIDO_PROVEEDOR: TcxGridDBColumn DataBinding.FieldName = 'ID_PEDIDO_PROVEEDOR' Visible = False + VisibleForCustomization = False end object cxGridViewID_PEDIDO_CLIENTE: TcxGridDBColumn DataBinding.FieldName = 'ID_PEDIDO_CLIENTE' Visible = False + VisibleForCustomization = False end object cxGridViewREFERENCIA_PED_CLI: TcxGridDBColumn DataBinding.FieldName = 'REFERENCIA_PED_CLI' Visible = False + VisibleForCustomization = False Width = 55 end object cxGridViewREFERENCIA: TcxGridDBColumn Caption = 'Referencia' DataBinding.FieldName = 'REFERENCIA' + PropertiesClassName = 'TcxTextEditProperties' + Properties.ReadOnly = True Width = 65 end object cxGridViewREFERENCIA_PROV: TcxGridDBColumn @@ -62,6 +73,7 @@ inherited frViewEntradaSalidaArticulos: TfrViewEntradaSalidaArticulos Caption = 'Descripci'#243'n' DataBinding.FieldName = 'DESCRIPCION' PropertiesClassName = 'TcxRichEditProperties' + Properties.ReadOnly = True Width = 303 end object cxGridViewSTOCK: TcxGridDBColumn @@ -101,6 +113,8 @@ inherited frViewEntradaSalidaArticulos: TfrViewEntradaSalidaArticulos end object cxGridViewID_EMPRESA: TcxGridDBColumn DataBinding.FieldName = 'ID_EMPRESA' + Visible = False + VisibleForCustomization = False end end end @@ -174,19 +188,6 @@ inherited frViewEntradaSalidaArticulos: TfrViewEntradaSalidaArticulos end end end - object DBGrid1: TDBGrid [3] - Left = 48 - Top = 272 - Width = 488 - Height = 120 - DataSource = DADataSource1 - TabOrder = 3 - TitleFont.Charset = DEFAULT_CHARSET - TitleFont.Color = clWindowText - TitleFont.Height = -11 - TitleFont.Name = 'Tahoma' - TitleFont.Style = [] - end inherited dxComponentPrinter: TdxComponentPrinter inherited dxComponentPrinterLink: TdxGridReportLink ReportDocument.CreationDate = 39253.500748333330000000 @@ -207,8 +208,4 @@ inherited frViewEntradaSalidaArticulos: TfrViewEntradaSalidaArticulos Left = 56 Top = 16 end - object DADataSource1: TDADataSource - Left = 32 - Top = 264 - end end diff --git a/Source/Modulos/Inventario/Views/uViewEntradaSalidaArticulos.pas b/Source/Modulos/Inventario/Views/uViewEntradaSalidaArticulos.pas index 3148063..d4e17ef 100644 --- a/Source/Modulos/Inventario/Views/uViewEntradaSalidaArticulos.pas +++ b/Source/Modulos/Inventario/Views/uViewEntradaSalidaArticulos.pas @@ -47,8 +47,6 @@ type cxStyle_CANTIDAD_IMPAR: TcxStyle; cxStyle_CANTIDAD_PAR: TcxStyle; cxGridViewCANTIDAD2: TcxGridDBColumn; - DBGrid1: TDBGrid; - DADataSource1: TDADataSource; procedure cxGridViewStylesGetContentStyle( Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); @@ -161,8 +159,6 @@ procedure TfrViewEntradaSalidaArticulos.SetInventario(const Value: IBizInventari begin FInventario := Value; dsDataSource.DataTable := FInventario.DataTable; - - DADataSource1.DataTable := FInventario.DetalleColores.DataTable; end; end. diff --git a/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc b/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc index 1e34a1d..c43ab23 100644 --- a/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc +++ b/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc @@ -13,4 +13,4 @@ BEGIN END /* C:\Codigo noviseda\Source\Modulos\Pedidos de cliente\Controller\PedidosCliente_controller.res */ -/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtfA2.tmp */ +/* C:\Codigo noviseda\Source\Modulos\Pedidos de cliente\Controller\PedidosCliente_controller.drf */ diff --git a/Source/Modulos/Pedidos de cliente/PedidosCliente_Group.groupproj b/Source/Modulos/Pedidos de cliente/PedidosCliente_Group.groupproj index 02acf7e..f549976 100644 --- a/Source/Modulos/Pedidos de cliente/PedidosCliente_Group.groupproj +++ b/Source/Modulos/Pedidos de cliente/PedidosCliente_Group.groupproj @@ -9,6 +9,8 @@ + + @@ -171,14 +173,32 @@ + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc b/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc index 50aebcb..f2e8b21 100644 --- a/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc +++ b/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc @@ -25,4 +25,4 @@ END /* C:\Codigo noviseda\Source\Modulos\Pedidos de cliente\Views\uEditorElegirArticulosPedidoCliente.dfm */ /* C:\Codigo noviseda\Source\Modulos\Pedidos de cliente\Views\uEditorPedidosClienteReport.dfm */ /* C:\Codigo noviseda\Source\Modulos\Pedidos de cliente\Views\PedidosCliente_view.res */ -/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf110.tmp */ +/* C:\Codigo noviseda\Source\Modulos\Pedidos de cliente\Views\PedidosCliente_view.drf */ diff --git a/Source/Modulos/Pedidos de cliente/Views/uEditorPedidoCliente.dfm b/Source/Modulos/Pedidos de cliente/Views/uEditorPedidoCliente.dfm index df64eff..ffc9d01 100644 --- a/Source/Modulos/Pedidos de cliente/Views/uEditorPedidoCliente.dfm +++ b/Source/Modulos/Pedidos de cliente/Views/uEditorPedidoCliente.dfm @@ -144,6 +144,7 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente inherited pgPaginas: TPageControl Width = 626 Height = 364 + ActivePage = pagContenido TabOrder = 1 OnChanging = pgPaginasChanging ExplicitWidth = 626 @@ -178,26 +179,6 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente inherited ToolBar1: TToolBar Width = 618 ExplicitWidth = 618 - inherited UpDown1: TUpDown - Left = 203 - ExplicitLeft = 203 - end - inherited ToolButton13: TToolButton - Left = 220 - ExplicitLeft = 220 - end - inherited ToolButton6: TToolButton - Left = 228 - ExplicitLeft = 228 - end - inherited ToolButton7: TToolButton - Left = 294 - ExplicitLeft = 294 - end - inherited ToolButton8: TToolButton - Left = 361 - ExplicitLeft = 361 - end end inherited cxGrid: TcxGrid Width = 618 diff --git a/Source/Modulos/Pedidos de cliente/Views/uEditorPedidosCliente.pas b/Source/Modulos/Pedidos de cliente/Views/uEditorPedidosCliente.pas index f668932..0ec2f33 100644 --- a/Source/Modulos/Pedidos de cliente/Views/uEditorPedidosCliente.pas +++ b/Source/Modulos/Pedidos de cliente/Views/uEditorPedidosCliente.pas @@ -137,6 +137,7 @@ var begin inherited; GenerarAlbaranCli(FPedidos.ID, IDAlbaranAux); + actRefrescar.Execute; end; procedure TfEditorPedidosCliente.actGenerarExecute(Sender: TObject); diff --git a/Source/Modulos/Pedidos de cliente/Views/uViewDetallesPedidoCliente.pas b/Source/Modulos/Pedidos de cliente/Views/uViewDetallesPedidoCliente.pas index 984f5ab..3fee91f 100644 --- a/Source/Modulos/Pedidos de cliente/Views/uViewDetallesPedidoCliente.pas +++ b/Source/Modulos/Pedidos de cliente/Views/uViewDetallesPedidoCliente.pas @@ -13,7 +13,7 @@ uses cxLookAndFeelPainters, cxButtonEdit, cxDropDownEdit, cxEditRepositoryItems, Menus, cxGridCustomPopupMenu, cxGridPopupMenu, uDAInterfaces, SpTBXItem, cxRichEdit, StdActns, ExtActns, TB2Item, TB2Dock, TB2Toolbar, StdCtrls, - JvExStdCtrls, JvCombobox, JvColorCombo, uViewDetallesArticulos; + JvExStdCtrls, JvCombobox, JvColorCombo, uViewDetallesArticulos, Grids, DBGrids; type IViewDetallesPedidoCliente = interface(IViewDetallesArticulos) diff --git a/Source/Modulos/Relaciones/Pedidos de cliente - Albaranes de cliente/uGenerarAlbaranesCliUtils.pas b/Source/Modulos/Relaciones/Pedidos de cliente - Albaranes de cliente/uGenerarAlbaranesCliUtils.pas index 9cac0a6..0f0b6fc 100644 --- a/Source/Modulos/Relaciones/Pedidos de cliente - Albaranes de cliente/uGenerarAlbaranesCliUtils.pas +++ b/Source/Modulos/Relaciones/Pedidos de cliente - Albaranes de cliente/uGenerarAlbaranesCliUtils.pas @@ -127,7 +127,7 @@ begin AArtColoresPendientes.First; if AArtColoresPendientes.Locate('ID_ARTICULO', AArticulosPendientes.ID_ARTICULO, []) then begin - ADetalles.DetalleColores.Edit; + ADetalles.DetalleColores.Append; ADetalles.DetalleColores.COLOR1 := AArtColoresPendientes.COLOR1; ADetalles.DetalleColores.COLOR2 := AArtColoresPendientes.COLOR2; ADetalles.DetalleColores.COLOR3 := AArtColoresPendientes.COLOR3; @@ -200,7 +200,7 @@ end; function GenerarAlbaranCli(APedido : IBizPedidoCliente; var AAlbaran: IBizAlbaranCliente) : Boolean; overload; var ARespuesta : Integer; - AuxAlbaran : IBizAlbaranCliente; + AuxAlbaran, AuxAlbaran2 : IBizAlbaranCliente; AArticulosPendientes: IBizPedidoClienteArticulosPend; AArtColoresPendientes: IBizPedidoClienteArtColoresPend; begin @@ -257,8 +257,10 @@ begin ARespuesta := CustomButtonResult; case ARespuesta of 100 : begin - // Ver el albarán - AAlbaranesClienteController.Ver(AuxAlbaran); + // Ver el albarán se cambia porque si visualizamos el mismo que hemos generado al cambiar los detalles de objeto falla + AuxAlbaran2 :=AAlbaranesClienteController.Buscar(AuxAlbaran.ID); + AuxAlbaran2.Active := True; + AAlbaranesClienteController.Ver(AuxAlbaran2); end; 200 : // Continuar; end; @@ -269,6 +271,8 @@ begin finally AArticulosPendientes := NIL; AArtColoresPendientes := NIL; + AuxAlbaran := NIL; + AuxAlbaran2 := NIL; if Assigned(APedidosClienteController) then Finalizar; end;