diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql
index 73a5ecc7..39947f4f 100644
--- a/Database/scripts/factuges.sql
+++ b/Database/scripts/factuges.sql
@@ -416,13 +416,18 @@ begin
/*Si los ejercicios no estan abiertos no hacemos nada*/
if ((estado_ejercicio_cierre = 'ABIERTO') and (estado_ejercicio_apertura = 'ABIERTO')) then
begin
- /* Añadimos asiento de cierre*/
- insert into CONT_ASIENTOS (ID, FECHA_ASIENTO, TIPO)
- values (:id_asiento_cierre, current_date, 'x');
+ select COALESCE(max(V_CONT_DIARIO.ORDEN_ASIENTO),0) + 1
+ from V_CONT_DIARIO
+ into :num_orden;
+ /* Añadimos asiento de cierre*/
+ insert into CONT_ASIENTOS (ID, FECHA_ASIENTO, ORDEN, TIPO)
+ values (:id_asiento_cierre, current_date, :num_orden, 'x');
+
+ num_orden = num_orden + 1;
/* Añadimos asiento de apertura*/
- insert into CONT_ASIENTOS (ID, FECHA_ASIENTO, TIPO)
- values (:id_asiento_apertura, current_date, 'a');
+ insert into CONT_ASIENTOS (ID, FECHA_ASIENTO, ORDEN, TIPO)
+ values (:id_asiento_apertura, current_date, :num_orden, 'a');
num_orden = 1;
@@ -2158,25 +2163,55 @@ CREATE VIEW V_CONT_FAC_CLI_VENTAS(
ID_SUBCUENTA,
SUBCUENTA,
ID_EJERCICIO,
- ESTADO)
+ ESTADO_EJERCICIO,
+ ASIENTO_PUNTEADO)
AS
select
CONT_ASIENTOS.ID_FACTURA,
CONT_SUBCUENTAS.ID as ID_SUBCUENTA,
CONT_SUBCUENTAS.DESCRIPCION as SUBCUENTA,
CONT_SUBCUENTAS.ID_EJERCICIO,
- CONT_EJERCICIOS.ESTADO
+ CONT_EJERCICIOS.ESTADO,
+ CONT_APUNTES.PUNTEADO
from CONT_ASIENTOS
LEFT JOIN CONT_APUNTES ON (CONT_APUNTES.ID_ASIENTO = CONT_ASIENTOS.ID)
LEFT JOIN CONT_SUBCUENTAS ON (CONT_SUBCUENTAS.ID = CONT_APUNTES.ID_SUBCUENTA)
LEFT JOIN CONT_CUENTAS ON (CONT_CUENTAS.ID = CONT_SUBCUENTAS.ID_CUENTA)
LEFT JOIN CONT_EJERCICIOS ON (CONT_EJERCICIOS.ID = CONT_SUBCUENTAS.ID_EJERCICIO)
+ left join CONT_EPIGRAFES CONT_EPI1 on (CONT_EPI1.ID = CONT_CUENTAS.ID_EPIGRAFE)
+ left join CONT_EPIGRAFES CONT_EPI2 on (CONT_EPI2.ID = CONT_EPI1.ID_PADRE)
/* Solo sacaremos aquellas tuplas de apuntes cuya subcuenta contable pertenezca ventas*/
- where (CONT_ASIENTOS.ID_FACTURA is not null) and (CONT_CUENTAS.ref_cuenta = 700)
+ where (CONT_ASIENTOS.ID_FACTURA is not null) and (CONT_ASIENTOS.TIPO = 'c')
+ and (COALESCE(CONT_EPI2.REF_EPIGRAFE, CONT_EPI1.REF_EPIGRAFE) = 7)
;
+CREATE VIEW V_CONT_PAGOS_CLI_VENTAS(
+ ID_PAGO,
+ ID_SUBCUENTA,
+ SUBCUENTA,
+ ID_EJERCICIO,
+ ESTADO_EJERCICIO,
+ ASIENTO_PUNTEADO)
+AS
+select
+ CONT_ASIENTOS.ID_PAGO,
+ CONT_SUBCUENTAS.ID as ID_SUBCUENTA,
+ CONT_SUBCUENTAS.DESCRIPCION as SUBCUENTA,
+ CONT_SUBCUENTAS.ID_EJERCICIO,
+ CONT_EJERCICIOS.ESTADO,
+ CONT_APUNTES.PUNTEADO
+from CONT_ASIENTOS
+ LEFT JOIN CONT_APUNTES ON (CONT_APUNTES.ID_ASIENTO = CONT_ASIENTOS.ID)
+ LEFT JOIN CONT_SUBCUENTAS ON (CONT_SUBCUENTAS.ID = CONT_APUNTES.ID_SUBCUENTA)
+ LEFT JOIN CONT_CUENTAS ON (CONT_CUENTAS.ID = CONT_SUBCUENTAS.ID_CUENTA)
+ LEFT JOIN CONT_EJERCICIOS ON (CONT_EJERCICIOS.ID = CONT_SUBCUENTAS.ID_EJERCICIO)
+ left join CONT_EPIGRAFES CONT_EPI1 on (CONT_EPI1.ID = CONT_CUENTAS.ID_EPIGRAFE)
+ left join CONT_EPIGRAFES CONT_EPI2 on (CONT_EPI2.ID = CONT_EPI1.ID_PADRE)
+/* Solo sacaremos aquellas tuplas de apuntes cuya subcuenta contable pertenezca ventas*/
+ where (CONT_ASIENTOS.ID_PAGO is not null) and (CONT_ASIENTOS.TIPO = 'c')
+ and (COALESCE(CONT_EPI2.REF_EPIGRAFE, CONT_EPI1.REF_EPIGRAFE) = 5);
/* View: V_CONT_FAC_PRO_COMPRAS */
CREATE VIEW V_CONT_FAC_PRO_COMPRAS(
@@ -2184,24 +2219,145 @@ CREATE VIEW V_CONT_FAC_PRO_COMPRAS(
ID_SUBCUENTA,
SUBCUENTA,
ID_EJERCICIO,
- ESTADO)
+ ESTADO_EJERCICIO,
+ ASIENTO_PUNTEADO)
AS
select
CONT_ASIENTOS.ID_FACTURA,
CONT_SUBCUENTAS.ID as ID_SUBCUENTA,
CONT_SUBCUENTAS.DESCRIPCION as SUBCUENTA,
CONT_SUBCUENTAS.ID_EJERCICIO,
- CONT_EJERCICIOS.ESTADO
+ CONT_EJERCICIOS.ESTADO,
+ CONT_APUNTES.PUNTEADO
from CONT_ASIENTOS
LEFT JOIN CONT_APUNTES ON (CONT_APUNTES.ID_ASIENTO = CONT_ASIENTOS.ID)
LEFT JOIN CONT_SUBCUENTAS ON (CONT_SUBCUENTAS.ID = CONT_APUNTES.ID_SUBCUENTA)
LEFT JOIN CONT_CUENTAS ON (CONT_CUENTAS.ID = CONT_SUBCUENTAS.ID_CUENTA)
LEFT JOIN CONT_EJERCICIOS ON (CONT_EJERCICIOS.ID = CONT_SUBCUENTAS.ID_EJERCICIO)
+ left join CONT_EPIGRAFES CONT_EPI1 on (CONT_EPI1.ID = CONT_CUENTAS.ID_EPIGRAFE)
+ left join CONT_EPIGRAFES CONT_EPI2 on (CONT_EPI2.ID = CONT_EPI1.ID_PADRE)
/* Solo sacaremos aquellas tuplas de apuntes cuya subcuenta contable pertenezca compras*/
- where (CONT_ASIENTOS.ID_FACTURA is not null) and (CONT_CUENTAS.ref_cuenta = 600);
+ where (CONT_ASIENTOS.ID_FACTURA is not null) and (CONT_ASIENTOS.TIPO = 'p')
+ and (COALESCE(CONT_EPI2.REF_EPIGRAFE, CONT_EPI1.REF_EPIGRAFE) = 6);
+CREATE VIEW V_CONT_PAGOS_PRO_COMPRAS(
+ ID_PAGO,
+ ID_SUBCUENTA,
+ SUBCUENTA,
+ ID_EJERCICIO,
+ ESTADO_EJERCICIO,
+ ASIENTO_PUNTEADO)
+AS
+select
+ CONT_ASIENTOS.ID_PAGO,
+ CONT_SUBCUENTAS.ID as ID_SUBCUENTA,
+ CONT_SUBCUENTAS.DESCRIPCION as SUBCUENTA,
+ CONT_SUBCUENTAS.ID_EJERCICIO,
+ CONT_EJERCICIOS.ESTADO,
+ CONT_APUNTES.PUNTEADO
+
+from CONT_ASIENTOS
+ LEFT JOIN CONT_APUNTES ON (CONT_APUNTES.ID_ASIENTO = CONT_ASIENTOS.ID)
+ LEFT JOIN CONT_SUBCUENTAS ON (CONT_SUBCUENTAS.ID = CONT_APUNTES.ID_SUBCUENTA)
+ LEFT JOIN CONT_CUENTAS ON (CONT_CUENTAS.ID = CONT_SUBCUENTAS.ID_CUENTA)
+ LEFT JOIN CONT_EJERCICIOS ON (CONT_EJERCICIOS.ID = CONT_SUBCUENTAS.ID_EJERCICIO)
+ left join CONT_EPIGRAFES CONT_EPI1 on (CONT_EPI1.ID = CONT_CUENTAS.ID_EPIGRAFE)
+ left join CONT_EPIGRAFES CONT_EPI2 on (CONT_EPI2.ID = CONT_EPI1.ID_PADRE)
+/* Solo sacaremos aquellas tuplas de apuntes cuya subcuenta contable pertenezca compras*/
+ where (CONT_ASIENTOS.ID_PAGO is not null) and (CONT_ASIENTOS.TIPO = 'p')
+ and (COALESCE(CONT_EPI2.REF_EPIGRAFE, CONT_EPI1.REF_EPIGRAFE) = 5);
+
+
+CREATE VIEW V_PAGOS_PROVEEDOR(
+ ID,
+ ID_RECIBO,
+ TIPO,
+ FECHA_PAGO,
+ TITULAR,
+ ENTIDAD,
+ SUCURSAL,
+ DC,
+ CUENTA,
+ FECHA_ALTA,
+ FECHA_MODIFICACION,
+ USUARIO,
+ IGNORAR_CONTABILIDAD,
+ ID_SUBCUENTA,
+ SUBCUENTA,
+ ID_EJERCICIO,
+ ESTADO_EJERCICIO,
+ ASIENTO_PUNTEADO)
+AS
+SELECT PAGOS_PROVEEDOR.ID,
+ PAGOS_PROVEEDOR.ID_RECIBO,
+ PAGOS_PROVEEDOR.TIPO,
+ PAGOS_PROVEEDOR.FECHA_PAGO,
+ PAGOS_PROVEEDOR.TITULAR,
+ PAGOS_PROVEEDOR.ENTIDAD,
+ PAGOS_PROVEEDOR.SUCURSAL,
+ PAGOS_PROVEEDOR.DC,
+ PAGOS_PROVEEDOR.CUENTA,
+ PAGOS_PROVEEDOR.FECHA_ALTA,
+ PAGOS_PROVEEDOR.FECHA_MODIFICACION,
+ PAGOS_PROVEEDOR.USUARIO,
+ PAGOS_PROVEEDOR.IGNORAR_CONTABILIDAD,
+ V_CONT_PAGOS_PRO_COMPRAS.ID_SUBCUENTA,
+ V_CONT_PAGOS_PRO_COMPRAS.SUBCUENTA,
+ V_CONT_PAGOS_PRO_COMPRAS.ID_EJERCICIO,
+ V_CONT_PAGOS_PRO_COMPRAS.ESTADO_EJERCICIO,
+ V_CONT_PAGOS_PRO_COMPRAS.ASIENTO_PUNTEADO
+
+ FROM PAGOS_PROVEEDOR
+ LEFT JOIN V_CONT_PAGOS_PRO_COMPRAS ON (V_CONT_PAGOS_PRO_COMPRAS.ID_PAGO = PAGOS_PROVEEDOR.ID)
+;
+
+CREATE VIEW V_PAGOS_CLIENTE(
+ ID,
+ ID_RECIBO,
+ TIPO,
+ FECHA_PAGO,
+ TITULAR,
+ ENTIDAD,
+ SUCURSAL,
+ DC,
+ CUENTA,
+ FECHA_ALTA,
+ FECHA_MODIFICACION,
+ USUARIO,
+ IGNORAR_CONTABILIDAD,
+ ID_SUBCUENTA,
+ SUBCUENTA,
+ ID_EJERCICIO,
+ ESTADO_EJERCICIO,
+ ASIENTO_PUNTEADO)
+AS
+SELECT PAGOS_CLIENTE.ID,
+ PAGOS_CLIENTE.ID_RECIBO,
+ PAGOS_CLIENTE.TIPO,
+ PAGOS_CLIENTE.FECHA_PAGO,
+ PAGOS_CLIENTE.TITULAR,
+ PAGOS_CLIENTE.ENTIDAD,
+ PAGOS_CLIENTE.SUCURSAL,
+ PAGOS_CLIENTE.DC,
+ PAGOS_CLIENTE.CUENTA,
+ PAGOS_CLIENTE.FECHA_ALTA,
+ PAGOS_CLIENTE.FECHA_MODIFICACION,
+ PAGOS_CLIENTE.USUARIO,
+ PAGOS_CLIENTE.IGNORAR_CONTABILIDAD,
+ V_CONT_PAGOS_CLI_VENTAS.ID_SUBCUENTA,
+ V_CONT_PAGOS_CLI_VENTAS.SUBCUENTA,
+ V_CONT_PAGOS_CLI_VENTAS.ID_EJERCICIO,
+ V_CONT_PAGOS_CLI_VENTAS.ESTADO_EJERCICIO,
+ V_CONT_PAGOS_CLI_VENTAS.ASIENTO_PUNTEADO
+
+ FROM PAGOS_CLIENTE
+ LEFT JOIN V_CONT_PAGOS_CLI_VENTAS ON (V_CONT_PAGOS_CLI_VENTAS.ID_PAGO = PAGOS_CLIENTE.ID)
+;
+
+
+
/* View: V_CONT_SUBCUENTAS_SALDO */
CREATE VIEW V_CONT_SUBCUENTAS_SALDO(
ID_SUBCUENTA,
@@ -2347,6 +2503,7 @@ SELECT RECIBOS_CLIENTE.ID_FACTURA, COUNT(V_REC_CLI_SITUACION.ID_RECIBO)
FROM V_REC_CLI_SITUACION LEFT JOIN RECIBOS_CLIENTE ON
(RECIBOS_CLIENTE.ID = V_REC_CLI_SITUACION.ID_RECIBO)
WHERE (TRIM(V_REC_CLI_SITUACION.SITUACION) = 'COBRADO')
+AND (RECIBOS_CLIENTE.ID_FACTURA IS NOT NULL)
GROUP BY RECIBOS_CLIENTE.ID_FACTURA;
;
@@ -2409,6 +2566,7 @@ SELECT RECIBOS_PROVEEDOR.ID_FACTURA, COUNT(V_REC_PRO_SITUACION.ID_RECIBO)
FROM V_REC_PRO_SITUACION LEFT JOIN RECIBOS_PROVEEDOR ON
(RECIBOS_PROVEEDOR.ID = V_REC_PRO_SITUACION.ID_RECIBO)
WHERE (TRIM(V_REC_PRO_SITUACION.SITUACION) = 'PAGADO')
+AND (RECIBOS_PROVEEDOR.ID_FACTURA IS NOT NULL)
GROUP BY RECIBOS_PROVEEDOR.ID_FACTURA;
@@ -2480,7 +2638,8 @@ CREATE VIEW V_FACTURAS_CLIENTE(
ID_SUBCUENTA,
SUBCUENTA,
ID_EJERCICIO,
- ESTADO)
+ ESTADO_EJERCICIO,
+ ASIENTO_PUNTEADO)
AS
SELECT FACTURAS_CLIENTE.ID,
FACTURAS_CLIENTE.ID_EMPRESA,
@@ -2524,7 +2683,8 @@ SELECT FACTURAS_CLIENTE.ID,
V_CONT_FAC_CLI_VENTAS.ID_SUBCUENTA,
V_CONT_FAC_CLI_VENTAS.SUBCUENTA,
V_CONT_FAC_CLI_VENTAS.ID_EJERCICIO,
- V_CONT_FAC_CLI_VENTAS.ESTADO
+ V_CONT_FAC_CLI_VENTAS.ESTADO_EJERCICIO,
+ V_CONT_FAC_CLI_VENTAS.ASIENTO_PUNTEADO
FROM V_FAC_CLI_SITUACION
LEFT JOIN FACTURAS_CLIENTE
@@ -2580,7 +2740,8 @@ CREATE VIEW V_FACTURAS_PROVEEDOR(
ID_SUBCUENTA,
SUBCUENTA,
ID_EJERCICIO,
- ESTADO)
+ ESTADO_EJERCICIO,
+ ASIENTO_PUNTEADO)
AS
SELECT FACTURAS_PROVEEDOR.ID,
FACTURAS_PROVEEDOR.ID_EMPRESA,
@@ -2622,7 +2783,8 @@ SELECT FACTURAS_PROVEEDOR.ID,
V_CONT_FAC_PRO_COMPRAS.ID_SUBCUENTA,
V_CONT_FAC_PRO_COMPRAS.SUBCUENTA,
V_CONT_FAC_PRO_COMPRAS.ID_EJERCICIO,
- V_CONT_FAC_PRO_COMPRAS.ESTADO
+ V_CONT_FAC_PRO_COMPRAS.ESTADO_EJERCICIO,
+ V_CONT_FAC_PRO_COMPRAS.ASIENTO_PUNTEADO
FROM V_FAC_PRO_SITUACION
LEFT JOIN FACTURAS_PROVEEDOR
@@ -4445,12 +4607,12 @@ begin
HABER = :IMPORTE;
end
- INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DOCUMENTO, DEBE, HABER)
- VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTA, 1, :TIPOPAGO,
+ INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, PUNTEADO, CONCEPTO, DOCUMENTO, DEBE, HABER)
+ VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTA, 1, -1, :TIPOPAGO,
:REFERENCIARECIBO, :DEBE, :HABER);
- INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DOCUMENTO, DEBE, HABER)
- VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTAPAGO, 1, :TIPOPAGO,
+ INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, PUNTEADO, CONCEPTO, DOCUMENTO, DEBE, HABER)
+ VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTAPAGO, 2, -1, :TIPOPAGO,
:REFERENCIARECIBO, :HABER, :DEBE);
END
@@ -4549,12 +4711,12 @@ begin
HABER = NULL;
end
- INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DOCUMENTO, DEBE, HABER)
- VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTA, 1, :TIPOPAGO,
+ INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, PUNTEADO, CONCEPTO, DOCUMENTO, DEBE, HABER)
+ VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTA, 1, -1, :TIPOPAGO,
:REFERENCIARECIBO, :DEBE, :HABER);
- INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DOCUMENTO, DEBE, HABER)
- VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTAPAGO, 1, :TIPOPAGO,
+ INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, PUNTEADO, CONCEPTO, DOCUMENTO, DEBE, HABER)
+ VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTAPAGO, 2, -1, :TIPOPAGO,
:REFERENCIARECIBO, :HABER, :DEBE);
END
@@ -4693,14 +4855,15 @@ end
^
ALTER PROCEDURE PROC_NEW_SUBCUENTAS (
- ID_EJERCICIO_COPIA INTEGER,
- ID_EJERCICIO INTEGER,
- ID_CUENTA_COPIA INTEGER,
- ID_CUENTA INTEGER)
-AS
+ id_ejercicio_copia integer,
+ id_ejercicio integer,
+ id_cuenta_copia integer,
+ id_cuenta integer)
+as
declare variable descripcion varchar(255);
declare variable ref_subcuenta varchar(15);
declare variable id_subcuenta integer;
+declare variable id_contacto integer;
begin
if (id_ejercicio_copia = 0) then
begin
@@ -4716,14 +4879,14 @@ begin
end
else
begin
- for select GEN_ID(gen_cont_subcuentas_id, 1), REF_SUBCUENTA, DESCRIPCION
+ for select GEN_ID(gen_cont_subcuentas_id, 1), REF_SUBCUENTA, DESCRIPCION, ID_CONTACTO
from CONT_SUBCUENTAS
where (ID_EJERCICIO = :id_ejercicio_copia) and (ID_CUENTA = :id_cuenta_copia)
order by ID
- into :id_subcuenta, :ref_subcuenta, :descripcion do
+ into :id_subcuenta, :ref_subcuenta, :descripcion, :id_contacto do
begin
- insert into CONT_SUBCUENTAS (ID, REF_SUBCUENTA, DESCRIPCION, ID_EJERCICIO, ID_CUENTA)
- values (:id_subcuenta, :ref_subcuenta, :descripcion, :id_ejercicio, :id_cuenta);
+ insert into CONT_SUBCUENTAS (ID, REF_SUBCUENTA, DESCRIPCION, ID_EJERCICIO, ID_CUENTA, ID_CONTACTO)
+ values (:id_subcuenta, :ref_subcuenta, :descripcion, :id_ejercicio, :id_cuenta, :id_contacto);
end
end
suspend;
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index e4f9e426..d8a586c6 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -51,13 +51,6 @@
-
-
-
-
-
-
-
VCL for the Web Design Package for CodeGear RAD Studio
CodeGear WebSnap Components
CodeGear SOAP Components
@@ -72,52 +65,52 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index 68e7fe82..7710dc4b 100644
--- a/Source/GUIBase/GUIBase.dproj
+++ b/Source/GUIBase/GUIBase.dproj
@@ -58,37 +58,37 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/GUIBase/GUIBase.res b/Source/GUIBase/GUIBase.res
index 1641339f..8b251f31 100644
Binary files a/Source/GUIBase/GUIBase.res and b/Source/GUIBase/GUIBase.res differ
diff --git a/Source/GUIBase/uEditorDBBase.dfm b/Source/GUIBase/uEditorDBBase.dfm
index aedba9e3..ac98e86e 100644
--- a/Source/GUIBase/uEditorDBBase.dfm
+++ b/Source/GUIBase/uEditorDBBase.dfm
@@ -10,9 +10,9 @@ inherited fEditorDBBase: TfEditorDBBase
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 646
- ExplicitWidth = 648
+ ExplicitWidth = 646
inherited Image1: TImage
- Left = 621
+ Left = 619
ExplicitLeft = 625
end
end
@@ -30,7 +30,7 @@ inherited fEditorDBBase: TfEditorDBBase
Top = 435
Width = 646
ExplicitTop = 435
- ExplicitWidth = 648
+ ExplicitWidth = 646
end
inherited EditorActionList: TActionList
inherited actPrevisualizar: TAction
diff --git a/Source/GUIBase/uEditorDBBase.pas b/Source/GUIBase/uEditorDBBase.pas
index e8224570..84cee110 100644
--- a/Source/GUIBase/uEditorDBBase.pas
+++ b/Source/GUIBase/uEditorDBBase.pas
@@ -10,7 +10,7 @@ uses
uDAScriptingProvider, uDACDSDataTable, AppEvnts, uCustomView, uViewBase,
JvAppStorage, JvAppRegistryStorage, JvFormPlacement,
pngimage, ExtCtrls, dxLayoutLookAndFeels, JvComponentBase, TBXStatusBars,
- JvExComCtrls, JvStatusBar, uDAInterfaces;
+ JvExComCtrls, JvStatusBar, uDAInterfaces, JvgWizardHeader;
type
IEditorDBBase = interface(IEditorBase)
@@ -191,17 +191,17 @@ begin
with dsDataTable.DataTable do
begin
- AID := RecIDValue;
- DisableControls; //<- No descomentar
-
- ShowHourglassCursor;
- try
- Refresh;
- Locate(RecIDField.FieldName, AID, []);
- finally
- EnableControls; //<- No descomentar
- HideHourglassCursor;
- end;
+ AID := RecIDValue;
+ DisableControls; //<- No descomentar
+
+ ShowHourglassCursor;
+ try
+ Refresh;
+ Locate(RecIDField.FieldName, AID, []);
+ finally
+ EnableControls; //<- No descomentar
+ HideHourglassCursor;
+ end;
end;
end;
end;
diff --git a/Source/GUIBase/uEditorDBItem.dfm b/Source/GUIBase/uEditorDBItem.dfm
index 750b5ef5..b4fcffba 100644
--- a/Source/GUIBase/uEditorDBItem.dfm
+++ b/Source/GUIBase/uEditorDBItem.dfm
@@ -10,9 +10,9 @@ inherited fEditorDBItem: TfEditorDBItem
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 650
- ExplicitWidth = 652
+ ExplicitWidth = 650
inherited Image1: TImage
- Left = 625
+ Left = 623
ExplicitLeft = 627
ExplicitHeight = 19
end
@@ -36,27 +36,6 @@ inherited fEditorDBItem: TfEditorDBItem
end
end
end
- object pgPaginas: TPageControl [2]
- AlignWithMargins = True
- Left = 3
- Top = 79
- Width = 644
- Height = 358
- ActivePage = pagGeneral
- Align = alClient
- TabOrder = 2
- ExplicitLeft = 0
- ExplicitTop = 76
- ExplicitWidth = 652
- ExplicitHeight = 366
- object pagGeneral: TTabSheet
- Caption = 'General'
- ExplicitLeft = 0
- ExplicitTop = 0
- ExplicitWidth = 644
- ExplicitHeight = 338
- end
- end
inherited StatusBar: TJvStatusBar
Top = 440
Width = 650
@@ -95,6 +74,47 @@ inherited fEditorDBItem: TfEditorDBItem
Transparent = True
end
end
+ object pgPaginas: TPageControl [3]
+ AlignWithMargins = True
+ Left = 3
+ Top = 109
+ Width = 644
+ Height = 328
+ ActivePage = pagGeneral
+ Align = alClient
+ TabOrder = 2
+ ExplicitTop = 117
+ ExplicitHeight = 320
+ object pagGeneral: TTabSheet
+ Caption = 'General'
+ ExplicitHeight = 292
+ end
+ end
+ object PnlComentario: TPanel [4]
+ Left = 0
+ Top = 76
+ Width = 650
+ Height = 30
+ Align = alTop
+ Alignment = taLeftJustify
+ AutoSize = True
+ Color = 13499902
+ ParentBackground = False
+ TabOrder = 4
+ VerticalAlignment = taAlignTop
+ object lbComentario: TLabel
+ AlignWithMargins = True
+ Left = 6
+ Top = 4
+ Width = 640
+ Height = 25
+ Margins.Left = 5
+ Align = alClient
+ Caption = 'Comentario'
+ WordWrap = True
+ ExplicitHeight = 30
+ end
+ end
inherited EditorActionList: TActionList
Top = 112
inherited actEliminar: TAction
diff --git a/Source/GUIBase/uEditorDBItem.pas b/Source/GUIBase/uEditorDBItem.pas
index 9ce1e0ad..3ff216c2 100644
--- a/Source/GUIBase/uEditorDBItem.pas
+++ b/Source/GUIBase/uEditorDBItem.pas
@@ -10,22 +10,36 @@ uses
StdCtrls, uDAScriptingProvider, uDACDSDataTable, AppEvnts, uCustomView,
uViewBase, JvAppStorage, JvAppRegistryStorage,
JvFormPlacement, pngimage, ExtCtrls, JvComponentBase, dxLayoutLookAndFeels,
- JvExComCtrls, JvStatusBar, uDAInterfaces;
+ JvExComCtrls, JvStatusBar, uDAInterfaces, JvgWizardHeader;
type
IEditorDBItem = interface(IEditorDBBase)
['{497AE4CE-D061-4F75-A29A-320F8565FF54}']
+ function GetComentario: Variant;
+ procedure SetComentario(const Value: Variant);
+ property Comentario: Variant read GetComentario write SetComentario;
end;
TfEditorDBItem = class(TfEditorDBBase, IEditorDBItem)
pgPaginas: TPageControl;
pagGeneral: TTabSheet;
imgStatus: TImage;
+ PnlComentario: TPanel;
+ lbComentario: TLabel;
+
protected
+ FComentario: Variant;
+ function GetComentario: Variant;
+ procedure SetComentario(const Value: Variant);
+
procedure EliminarInterno; override;
procedure PrevisualizarInterno; override;
procedure ImprimirInterno; override;
procedure ActualizarEstadoEditor; override;
+
+ public
+ property Comentario: Variant read GetComentario write SetComentario;
+ constructor Create(AOwner: TComponent); override;
end;
implementation
@@ -52,12 +66,23 @@ begin
end;
end;
+constructor TfEditorDBItem.Create(AOwner: TComponent);
+begin
+ inherited;
+ Comentario := Null;
+end;
+
procedure TfEditorDBItem.EliminarInterno;
begin
inherited;
actCerrar.Execute;
end;
+function TfEditorDBItem.GetComentario: Variant;
+begin
+ Result := FComentario;
+end;
+
procedure TfEditorDBItem.ImprimirInterno;
begin
inherited;
@@ -84,6 +109,18 @@ begin
end;
end;
+procedure TfEditorDBItem.SetComentario(const Value: Variant);
+begin
+ FComentario := Value;
+ lbComentario.Caption := '';
+ lbComentario.Caption := VarToStr(FComentario);
+
+ if VarIsNull(FComentario) then
+ PnlComentario.Visible := False
+ else
+ PnlComentario.Visible := True;
+end;
+
initialization
RegisterClass(TfEditorDBItem);
diff --git a/Source/GUIBase/uEditorItem.dfm b/Source/GUIBase/uEditorItem.dfm
index 0fe3f5dc..406f3d38 100644
--- a/Source/GUIBase/uEditorItem.dfm
+++ b/Source/GUIBase/uEditorItem.dfm
@@ -26,14 +26,8 @@ inherited fEditorItem: TfEditorItem
ActivePage = pagGeneral
Align = alClient
TabOrder = 1
- ExplicitLeft = 0
- ExplicitTop = 70
- ExplicitWidth = 678
- ExplicitHeight = 406
object pagGeneral: TTabSheet
Caption = 'General'
- ExplicitWidth = 670
- ExplicitHeight = 378
end
end
inherited TBXDock: TTBXDock
diff --git a/Source/GUIBase/uViewFiltroBase.dfm b/Source/GUIBase/uViewFiltroBase.dfm
index 92de290f..7c6b0497 100644
--- a/Source/GUIBase/uViewFiltroBase.dfm
+++ b/Source/GUIBase/uViewFiltroBase.dfm
@@ -42,12 +42,16 @@ object frViewFiltroBase: TfrViewFiltroBase
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
TabOrder = 0
Width = 273
end
@@ -60,14 +64,18 @@ object frViewFiltroBase: TfrViewFiltroBase
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
TabOrder = 1
Width = 121
end
@@ -80,14 +88,18 @@ object frViewFiltroBase: TfrViewFiltroBase
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
TabOrder = 2
Width = 121
end
diff --git a/Source/GUIBase/uViewGrid.dfm b/Source/GUIBase/uViewGrid.dfm
index 0443ad18..7a270327 100644
--- a/Source/GUIBase/uViewGrid.dfm
+++ b/Source/GUIBase/uViewGrid.dfm
@@ -128,6 +128,7 @@ inherited frViewGrid: TfrViewGrid
SupportedDocks = [dkStandardDock, dkMultiDock]
TabOrder = 2
Visible = False
+ ExplicitWidth = 128
object TBXAlignmentPanel1: TTBXAlignmentPanel
Left = 0
Top = 0
@@ -175,7 +176,7 @@ inherited frViewGrid: TfrViewGrid
PrinterPage.ScaleMode = smFit
PrinterPage._dxMeasurementUnits_ = 0
PrinterPage._dxLastMU_ = 2
- ReportDocument.CreationDate = 39764.713522488430000000
+ ReportDocument.CreationDate = 39855.714797442130000000
StyleManager = dmBase.dxPrintStyleManager1
OptionsCards.Shadow.Depth = 0
OptionsExpanding.ExpandGroupRows = True
diff --git a/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm b/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm
index a977ccc3..06fb9c47 100644
--- a/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm
+++ b/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm
@@ -6,7 +6,7 @@ object srvArticulos: TsrvArticulos
ConnectionName = 'IBX'
ServiceSchema = schArticulos
ServiceDataStreamer = Bin2DataStreamer
- AllowWhereSQL = True
+ AllowWhereSQL = True
ExportedDataTables = <>
BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
Height = 229
diff --git a/Source/Modulos/Articulos/Views/Articulos_view.dproj b/Source/Modulos/Articulos/Views/Articulos_view.dproj
index 37ac0099..3bd6774b 100644
--- a/Source/Modulos/Articulos/Views/Articulos_view.dproj
+++ b/Source/Modulos/Articulos/Views/Articulos_view.dproj
@@ -54,11 +54,11 @@
MainSource
-
-
-
-
-
+
+
+
+
+
diff --git a/Source/Modulos/Contabilidad/Controller/uAsientosController.pas b/Source/Modulos/Contabilidad/Controller/uAsientosController.pas
index 91d87405..9994131e 100644
--- a/Source/Modulos/Contabilidad/Controller/uAsientosController.pas
+++ b/Source/Modulos/Contabilidad/Controller/uAsientosController.pas
@@ -21,6 +21,7 @@ type
function Eliminar(AAsiento : IBizAsiento): Boolean; overload;
function Guardar(AAsiento : IBizAsiento): Boolean;
procedure DescartarCambios(AAsiento : IBizAsiento);
+ procedure Puntear(ADiario: IBizDiario);
end;
TAsientosController = class(TControllerBase, IAsientosController)
@@ -49,12 +50,13 @@ type
procedure DescartarCambios(AAsiento : IBizAsiento); virtual;
function Anadir: IBizAsiento; overload;
function Anadir(IdSubcuenta:Integer): IBizAsiento; overload;
- function CerrarCajaBanco(IdSubcuenta:Integer): Boolean;
function Buscar(const ID: Integer): IBizAsiento;
procedure VerDiario(ADiario: IBizDiario);
procedure VerExtracto;
procedure Ver(AAsiento: IBizAsiento);
+ procedure Puntear(ADiario: IBizDiario);
+ function CerrarCajaBanco(IdSubcuenta:Integer): Boolean;
end;
implementation
@@ -153,6 +155,7 @@ begin
end;
Guardar(AAsiento);
+ FDataModule.PuntearSubCuenta(IdSubcuenta);
Result := True;
finally
@@ -386,4 +389,50 @@ begin
end;
end;
+procedure TAsientosController.Puntear(ADiario: IBizDiario);
+//Este procedimiento se encargará de mandar al servidor que se puntee el asiento seleccionado y
+//puntear en el objeto ADiario los elementos del asiento seleccionado para no tener que refrescar la tabla.
+var
+ ABookmark: Pointer;
+ IdAsiento: Integer;
+
+begin
+ if Assigned(ADiario) then
+ begin
+ ShowHourglassCursor;
+ try
+ //Mandamos al servidor modificar todos los apuntes del asiento a punteados
+ IdAsiento := ADiario.ID_ASIENTO;
+ FDataModule.PuntearAsiento(IdAsiento);
+
+ ABookmark := NIL;
+ with ADiario.DataTable do
+ begin
+ DisableControls;
+ DisableEventHandlers;
+
+ try
+ ABookmark := GetBookMark;
+ First;
+ Locate(fld_DiarioID_ASIENTO, IdAsiento, []);
+ while (not EOF) and (ADiario.ID_ASIENTO = IdAsiento) do
+ begin
+ Edit;
+ ADiario.PUNTEADO := -1 * ADiario.PUNTEADO;
+ Post;
+ Next;
+ end;
+ finally
+ GotoBookmark(Abookmark);
+ FreeBookmark(ABookmark);
+ EnableControls;
+ EnableEventHandlers;
+ end;
+ end;
+ finally
+ HideHourglassCursor;
+ end;
+ end;
+end;
+
end.
diff --git a/Source/Modulos/Contabilidad/Data/uDataModuleContabilidad.pas b/Source/Modulos/Contabilidad/Data/uDataModuleContabilidad.pas
index c5f3f544..810ef014 100644
--- a/Source/Modulos/Contabilidad/Data/uDataModuleContabilidad.pas
+++ b/Source/Modulos/Contabilidad/Data/uDataModuleContabilidad.pas
@@ -48,6 +48,8 @@ type
function GetAsientoItem(const ID : Integer): IBizAsiento;
function GetCuentaEspecialItems: IBizCuentaEspecial;
function GetBalanceItems: IBizBalance;
+ procedure PuntearAsiento(IDAsiento: Integer);
+ procedure PuntearSubCuenta(IDSubcuenta: Integer);
end;
implementation
@@ -234,6 +236,16 @@ begin
Result := GetSubCuentaItem(ID_NULO)
end;
+procedure TDataModuleContabilidad.PuntearAsiento(IDAsiento: Integer);
+begin
+ (RORemoteService as IsrvContabilidad).PuntearAsiento(IdAsiento);
+end;
+
+procedure TDataModuleContabilidad.PuntearSubCuenta(IDSubcuenta: Integer);
+begin
+ (RORemoteService as IsrvContabilidad).PuntearSubCuenta(IdSubCuenta);
+end;
+
function TDataModuleContabilidad._GetApuntes: IBizApunte;
var
AApuntes : TDAMemDataTable;
diff --git a/Source/Modulos/Contabilidad/Model/Data/uIDataModuleContabilidad.pas b/Source/Modulos/Contabilidad/Model/Data/uIDataModuleContabilidad.pas
index 01b71c0f..f6237bfc 100644
--- a/Source/Modulos/Contabilidad/Model/Data/uIDataModuleContabilidad.pas
+++ b/Source/Modulos/Contabilidad/Model/Data/uIDataModuleContabilidad.pas
@@ -18,7 +18,9 @@ type
function NewSubCuentaItem : IBizSubCuenta;
function GetAsientosDiarioItems: IBizDiario;
function GetExtractoMovimientosItems: IBizExtractoMovimiento;
- function GetAsientoItem(const ID : Integer): IBizAsiento;
+ function GetAsientoItem(const ID : Integer): IBizAsiento;
+ procedure PuntearAsiento(IDAsiento: Integer);
+ procedure PuntearSubCuenta(IDSubcuenta: Integer);
end;
implementation
diff --git a/Source/Modulos/Contabilidad/Model/uBizApuntes.pas b/Source/Modulos/Contabilidad/Model/uBizApuntes.pas
index 438bf493..d0098ebb 100644
--- a/Source/Modulos/Contabilidad/Model/uBizApuntes.pas
+++ b/Source/Modulos/Contabilidad/Model/uBizApuntes.pas
@@ -6,6 +6,8 @@ uses
uDAInterfaces, uDADataTable, schContabilidadClient_Intf;
const
+ CTE_PUNTEADO = 1;
+ CTE_NO_PUNTEADO = -1;
BIZ_CLIENT_Apunte = 'Client.Apunte';
type
@@ -59,6 +61,7 @@ procedure TBizApunte.IniciarValoresApunteNueva;
begin
NUM_ORDEN := FNumOrden;
Inc(FNumOrden);
+ PUNTEADO := CTE_NO_PUNTEADO;
end;
procedure TBizApunte.OnNewRecord(Sender: TDADataTable);
diff --git a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm
index ff5886ff..70ea55a9 100644
--- a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm
+++ b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm
@@ -2046,6 +2046,40 @@ object srvContabilidad: TsrvContabilidad
ColumnMappings = <>
end>
Name = 'Update_Apuntes'
+ end
+ item
+ Params = <
+ item
+ Name = 'ID_ASIENTO'
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ SQL =
+ 'update CONT_APUNTES'#10'SET PUNTEADO = -1 * PUNTEADO'#10'WHERE ID_ASIENT' +
+ 'O = :ID_ASIENTO'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'PuntearAsiento'
+ end
+ item
+ Params = <
+ item
+ Name = 'ID_SUBCUENTA'
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ SQL =
+ 'update CONT_APUNTES'#10'SET PUNTEADO = 1'#10'WHERE ID_SUBCUENTA = :ID_SU' +
+ 'BCUENTA'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'PuntearSubCuenta'
end>
RelationShips = <
item
diff --git a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas
index d899407b..893f5685 100644
--- a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas
+++ b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas
@@ -45,6 +45,8 @@ type
function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const CLIENTE: String): Boolean;
function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ES_ACREEDOR: Integer; const ID_EMPRESA: Integer; const PROVEEDOR: String): Boolean;
function DarNumOrdenAsiento : Integer;
+ procedure PuntearAsiento(const ID_ASIENTO: Integer);
+ procedure PuntearSubCuenta(const ID_SUBCUENTA: Integer);
end;
implementation
@@ -268,6 +270,56 @@ begin
ConnectionName := dmServer.ConnectionName;
end;
+procedure TsrvContabilidad.PuntearAsiento(const ID_ASIENTO: Integer);
+var
+ AConn : IDAConnection;
+ dsCommand: IDASQLCommand;
+
+begin
+ AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
+ try
+ try
+ dsCommand := schContabilidad.NewCommand(AConn, 'PuntearAsiento');
+ with dsCommand do
+ begin
+ ParamByName('ID_ASIENTO').AsInteger := ID_ASIENTO;
+ end;
+ dsCommand.Execute;
+ AConn.CommitTransaction;
+ except
+ RaiseError('Error al puntear los apuntes del asiento');
+ AConn.RollbackTransaction;
+ end;
+ finally
+ dsCommand := NIL;
+ end;
+end;
+
+procedure TsrvContabilidad.PuntearSubCuenta(const ID_SUBCUENTA: Integer);
+var
+ AConn : IDAConnection;
+ dsCommand: IDASQLCommand;
+
+begin
+ AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
+ try
+ try
+ dsCommand := schContabilidad.NewCommand(AConn, 'PuntearSubCuenta');
+ with dsCommand do
+ begin
+ ParamByName('ID_SUBCUENTA').AsInteger := ID_SUBCUENTA;
+ end;
+ dsCommand.Execute;
+ AConn.CommitTransaction;
+ except
+ RaiseError('Error al puntear los apuntes de la subcuenta');
+ AConn.RollbackTransaction;
+ end;
+ finally
+ dsCommand := NIL;
+ end;
+end;
+
function TsrvContabilidad.TieneCuentaAsociada(const ID_CONTACTO: Integer; const ID_EMPRESA: Integer): Boolean;
var
AConn : IDAConnection;
diff --git a/Source/Modulos/Contabilidad/Views/uEditorApunte.pas b/Source/Modulos/Contabilidad/Views/uEditorApunte.pas
index 6afeed58..f0551cfe 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorApunte.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorApunte.pas
@@ -105,9 +105,9 @@ begin
if Assigned(Apunte) then
begin
if Apunte.EsNuevo then
- FTitulo := 'Nuevo apunte - ' + AppFactuGES.EjercicioActivo.NOMBRE
+ FTitulo := 'Nuevo apunte - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')'
else
- FTitulo := 'Apunte' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE; // + ' - ' + Apunte.DESCRIPCION;
+ FTitulo := 'Apunte' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')';
end;
inherited PonerTitulos(FTitulo);
diff --git a/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm b/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm
index 4e54f893..e17cf33c 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm
@@ -116,6 +116,7 @@ inherited fEditorAsiento: TfEditorAsiento
Height = 466
Align = alClient
TabOrder = 0
+ TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
DesignSize = (
855
@@ -141,12 +142,16 @@ inherited fEditorAsiento: TfEditorAsiento
Style.Font.Style = []
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
Style.TextColor = clWindowText
Style.ButtonStyle = bts3D
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
TabOrder = 1
Height = 21
Width = 100
@@ -163,13 +168,17 @@ inherited fEditorAsiento: TfEditorAsiento
Style.Color = clInfoBk
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
Style.Shadow = False
Style.ButtonStyle = bts3D
Style.ButtonTransparency = ebtNone
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
TabOrder = 0
Width = 200
end
@@ -215,6 +224,20 @@ inherited fEditorAsiento: TfEditorAsiento
end>
end
end
+ inherited ToolBar1: TToolBar
+ inherited ToolButton1: TToolButton
+ ExplicitWidth = 113
+ end
+ inherited ToolButton4: TToolButton
+ ExplicitWidth = 113
+ end
+ inherited ToolButton2: TToolButton
+ ExplicitWidth = 113
+ end
+ inherited ToolButton7: TToolButton
+ ExplicitWidth = 113
+ end
+ end
end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
diff --git a/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas b/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas
index f8f1c9fa..dfe792c5 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas
@@ -117,9 +117,9 @@ begin
if Assigned(Asiento) then
begin
if Asiento.EsNuevo then
- FTitulo := 'Nuevo asiento - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE
+ FTitulo := 'Nuevo asiento - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')'
else
- FTitulo := 'Asiento' + ' ' + IntToStr(Asiento.ORDEN) + ' - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE;
+ FTitulo := 'Asiento' + ' ' + IntToStr(Asiento.ORDEN) + ' - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')';
end;
inherited PonerTitulos(FTitulo);
diff --git a/Source/Modulos/Contabilidad/Views/uEditorCuenta.dfm b/Source/Modulos/Contabilidad/Views/uEditorCuenta.dfm
index c2c0b7c1..9c5df60b 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorCuenta.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorCuenta.dfm
@@ -8,6 +8,7 @@ inherited fEditorCuenta: TfEditorCuenta
Scaled = False
OnClose = CustomEditorClose
ExplicitWidth = 640
+ ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
diff --git a/Source/Modulos/Contabilidad/Views/uEditorCuenta.pas b/Source/Modulos/Contabilidad/Views/uEditorCuenta.pas
index e4fd24cb..1a4ef40e 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorCuenta.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorCuenta.pas
@@ -103,9 +103,9 @@ begin
if Assigned(Cuenta) then
begin
if Cuenta.EsNuevo then
- FTitulo := 'Nueva cuenta - ' + AppFactuGES.EjercicioActivo.NOMBRE
+ FTitulo := 'Nueva cuenta - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')'
else
- FTitulo := 'Cuenta' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' - ' + Cuenta.DESCRIPCION;
+ FTitulo := 'Cuenta' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')' + ' - ' + Cuenta.DESCRIPCION;
end;
inherited PonerTitulos(FTitulo);
diff --git a/Source/Modulos/Contabilidad/Views/uEditorCuentas.dfm b/Source/Modulos/Contabilidad/Views/uEditorCuentas.dfm
index 9ab49334..6ad3df6f 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorCuentas.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorCuentas.dfm
@@ -2,6 +2,8 @@ inherited fEditorCuentas: TfEditorCuentas
Left = 489
Top = 325
Caption = 'Lista de cuentas'
+ ExplicitWidth = 320
+ ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
diff --git a/Source/Modulos/Contabilidad/Views/uEditorCuentas.pas b/Source/Modulos/Contabilidad/Views/uEditorCuentas.pas
index 68bd88cb..f49bc62b 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorCuentas.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorCuentas.pas
@@ -99,7 +99,7 @@ procedure TfEditorCuentas.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
- FTitulo := 'Lista de Cuentas - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE;
+ FTitulo := 'Lista de Cuentas - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')';
inherited PonerTitulos(FTitulo);
end;
diff --git a/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm b/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm
index 19cd251d..8fc7c3cd 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm
@@ -2,6 +2,8 @@ inherited fEditorDiario: TfEditorDiario
Left = 489
Top = 325
Caption = 'Libro de diario'
+ ExplicitWidth = 320
+ ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@@ -43,7 +45,13 @@ inherited fEditorDiario: TfEditorDiario
inherited TBXTMain2: TTBXToolbar
Left = 275
DockPos = 275
+ Visible = True
ExplicitLeft = 275
+ ExplicitWidth = 176
+ object TBXItem38: TTBXItem
+ Action = actPuntear
+ DisplayMode = nbdmImageAndText
+ end
end
end
inline frViewDiario1: TfrViewDiario [3]
@@ -85,6 +93,9 @@ inherited fEditorDiario: TfEditorDiario
Kind = skCount
Column = frViewDiario1.cxGridViewCONCEPTO
end>
+ inherited cxGridViewPUNTEADO: TcxGridDBColumn
+ IsCaptionAssigned = True
+ end
inherited cxGridViewID_ASIENTO: TcxGridDBColumn
IsCaptionAssigned = True
end
@@ -103,16 +114,12 @@ inherited fEditorDiario: TfEditorDiario
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitWidth = 273
- Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitWidth = 121
- Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 337
@@ -121,8 +128,6 @@ inherited fEditorDiario: TfEditorDiario
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 337
- ExplicitWidth = 121
- Width = 121
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
@@ -177,6 +182,13 @@ inherited fEditorDiario: TfEditorDiario
Enabled = False
Visible = False
end
+ object actPuntear: TAction
+ Category = 'OperacionesEspeciales'
+ Caption = 'Puntear/Despuntear asiento'
+ ImageIndex = 24
+ OnExecute = actPuntearExecute
+ OnUpdate = actPuntearUpdate
+ end
end
inherited SmallImages: TPngImageList [5]
PngImages = <
@@ -721,6 +733,29 @@ inherited fEditorDiario: TfEditorDiario
49454E44AE426082}
Name = 'PngImage23'
Background = clWindow
+ end
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 61000000097048597300000AEB00000AEB01828B0D5A000001DA4944415478DA
+ 63FCFFFF3F032580912C5DF2F33964B539E3DF7DF8F1956403380CE7C85B5929
+ CFFAF99ED7FCFCED9BE124192060B7D8D6CE5279E99B876C42674FFC0CFEF9C0
+ 7A27D10628FBAF0FB030915F74E7EA6FE6F387FF87FD7A6AB195E83090F55915
+ EEE7A23BE7FCD9CFAC170EFF4EFDF6C07A31D18128E1BE3CC8DB597BE1A3BBBF
+ B98EECFA91FBFDBEF574A0F07FA20C10B09B67EBE366B8E3CDF37F9C47F77CED
+ FC7CD3AE125D0DC400B3897C9CCCBCEADFD9182F331C4CFC010E6DCB39F29E0E
+ 3A07599939E477AE7FBFFBE3CF4BBE0C77F27F621820EAB848DFDC447931372B
+ 9FE68E5DF7577F3C73368E414588D9C6496BB3AA92B8CBDECD9FDEBC7CF9D3F2
+ E71DE7BBD85CC928EAB438C4C7556F3A0B1B8BC8B1BD9FFFDE7B753F4C41994B
+ C3CA48B1E5F09ECFFFEF3F7D19F3FB5AD0725CDE047B41276243A09D85FAAAA7
+ CFBFB11CDEFBEA8EA79F98E4C3FBBFB8CF9F7BBDE5EB453F3FE440C31E060CF5
+ 4C4ED9F63B6565845D5EBEFEF29F11287AE9C4AF2FAFBF3D32FF753EFE3ABE80
+ 86C7028FF5429B101F83FDCF5F7F66797697E1FFCDDB6FA7FFBAE69F4D289A91
+ A2B19EC539C7E1C49BC7EC46F71EBDD9FFF9DFD338868B994F4930808181D76E
+ 413EF33F56D90F0F5ED4323C29FE4E4833080000904EC47A3EA3126900000000
+ 49454E44AE426082}
+ Name = 'PngImage24'
+ Background = clWindow
end>
Bitmap = {}
end
diff --git a/Source/Modulos/Contabilidad/Views/uEditorDiario.pas b/Source/Modulos/Contabilidad/Views/uEditorDiario.pas
index 84ef85ce..5005e86a 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorDiario.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorDiario.pas
@@ -17,10 +17,14 @@ uses
type
TfEditorDiario = class(TfEditorGridBase, IEditorDiario)
frViewDiario1: TfrViewDiario;
+ actPuntear: TAction;
+ TBXItem38: TTBXItem;
procedure FormShow(Sender: TObject);
procedure actModificarUpdate(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
procedure actNuevoUpdate(Sender: TObject);
+ procedure actPuntearExecute(Sender: TObject);
+ procedure actPuntearUpdate(Sender: TObject);
private
FDiario: IBizDiario;
FController : IAsientosController;
@@ -48,7 +52,7 @@ type
implementation
uses
- uCustomEditor, uDataModuleUsuarios, uBizEjercicios,
+ uCustomEditor, uDataModuleUsuarios, uBizEjercicios, uBizApuntes,
uEditorDBBase, uFactuGES_App,
cxGrid, cxGridCustomTableView;
@@ -112,7 +116,7 @@ procedure TfEditorDiario.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
- FTitulo := 'Libro de diario - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE;
+ FTitulo := 'Libro de diario - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')';
inherited PonerTitulos(FTitulo);
end;
@@ -169,17 +173,23 @@ end;
procedure TfEditorDiario.actEliminarUpdate(Sender: TObject);
begin
inherited;
+ //No se podrá eliminar un asiento si es automático por factura, si el ejercicio esta cerrado o el asiento esta punteado
if (Sender as TAction).Enabled then
if Assigned(Diario) then
- (Sender as TAction).Enabled := Diario.ID_FACTURAIsNull and Diario.ID_PAGOIsNull and (Diario.ESTADO = CTE_ABIERTO);
+ (Sender as TAction).Enabled := Diario.ID_FACTURAIsNull and Diario.ID_PAGOIsNull
+ and (Diario.ESTADO = CTE_ABIERTO)
+ and (Diario.PUNTEADO = CTE_NO_PUNTEADO);
end;
procedure TfEditorDiario.actModificarUpdate(Sender: TObject);
begin
inherited;
+ //No se podrá modificar un asiento si es automático por factura, si el ejercicio esta cerrado o el asiento esta punteado
if (Sender as TAction).Enabled then
if Assigned(Diario) then
- (Sender as TAction).Enabled := Diario.ID_FACTURAIsNull and Diario.ID_PAGOIsNull and (Diario.ESTADO = CTE_ABIERTO);
+ (Sender as TAction).Enabled := Diario.ID_FACTURAIsNull and Diario.ID_PAGOIsNull
+ and (Diario.ESTADO = CTE_ABIERTO)
+ and (Diario.PUNTEADO = CTE_NO_PUNTEADO);
end;
procedure TfEditorDiario.actNuevoUpdate(Sender: TObject);
@@ -189,6 +199,27 @@ begin
(Sender as TAction).Enabled := (AppFactuGES.EjercicioActivo.ESTADO = CTE_ABIERTO);
end;
+procedure TfEditorDiario.actPuntearExecute(Sender: TObject);
+begin
+ inherited;
+ FController.Puntear(Diario);
+// actRefrescar.Execute;
+end;
+
+procedure TfEditorDiario.actPuntearUpdate(Sender: TObject);
+begin
+ inherited;
+ if HayDatos and Assigned(ViewGrid) then
+ (Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes)
+ and not ViewGrid.IsEmpty
+ and ViewGrid.esSeleccionCeldaDatos
+ else
+ (Sender as TAction).Enabled := False;
+
+ if (Sender as TAction).Enabled then
+ (Sender as TAction).Enabled := (AppFactuGES.EjercicioActivo.ESTADO = CTE_ABIERTO);
+end;
+
constructor TfEditorDiario.Create(AOwner: TComponent);
begin
inherited;
diff --git a/Source/Modulos/Contabilidad/Views/uEditorEpigrafe.pas b/Source/Modulos/Contabilidad/Views/uEditorEpigrafe.pas
index 50f01d2d..728111bf 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorEpigrafe.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorEpigrafe.pas
@@ -103,9 +103,9 @@ begin
if Assigned(Epigrafe) then
begin
if Epigrafe.EsNuevo then
- FTitulo := 'Nuevo epígrafe - ' + AppFactuGES.EjercicioActivo.NOMBRE
+ FTitulo := 'Nuevo epígrafe - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')'
else
- FTitulo := 'Epígrafe' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' - ' + Epigrafe.DESCRIPCION;
+ FTitulo := 'Epígrafe' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')' + ' - ' + Epigrafe.DESCRIPCION;
end;
inherited PonerTitulos(FTitulo);
diff --git a/Source/Modulos/Contabilidad/Views/uEditorEpigrafes.dfm b/Source/Modulos/Contabilidad/Views/uEditorEpigrafes.dfm
index ba216321..d71e21bf 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorEpigrafes.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorEpigrafes.dfm
@@ -2,6 +2,8 @@ inherited fEditorEpigrafes: TfEditorEpigrafes
Left = 489
Top = 325
Caption = 'Lista de epigrafes'
+ ExplicitWidth = 320
+ ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
diff --git a/Source/Modulos/Contabilidad/Views/uEditorEpigrafes.pas b/Source/Modulos/Contabilidad/Views/uEditorEpigrafes.pas
index be6114ae..71c36413 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorEpigrafes.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorEpigrafes.pas
@@ -99,7 +99,7 @@ procedure TfEditorEpigrafes.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
- FTitulo := 'Lista de Epigrafes - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE;
+ FTitulo := 'Lista de Epigrafes - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')';
inherited PonerTitulos(FTitulo);
end;
diff --git a/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.dfm b/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.dfm
index 3ec6abea..b5e5a38c 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.dfm
@@ -55,11 +55,14 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
inherited TBXTMain2: TTBXToolbar
DockPos = 275
Visible = True
- ExplicitWidth = 129
+ ExplicitWidth = 240
object TBXItem38: TTBXItem
- Action = actCerrarCaja
+ Action = actPuntear
DisplayMode = nbdmImageAndText
end
+ object TBXItem39: TTBXItem
+ Action = actCerrarCaja
+ end
end
end
inherited StatusBar: TJvStatusBar
@@ -91,6 +94,13 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
ExplicitWidth = 774
ExplicitHeight = 248
inherited cxGridView: TcxGridDBTableView
+ DataController.Summary.DefaultGroupSummaryItems = <
+ item
+ Format = '0 movimientos'
+ Kind = skCount
+ Position = spFooter
+ Column = frViewExtractoMovimientos1.cxGridViewCONCEPTO
+ end>
DataController.Summary.FooterSummaryItems = <
item
Format = ',0.00 '#8364';-,0.00 '#8364
@@ -106,7 +116,15 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
Format = #218'ltimo orden 0'
Kind = skMax
Column = frViewExtractoMovimientos1.cxGridViewORDEN
+ end
+ item
+ Format = '0 movimientos'
+ Kind = skCount
+ Column = frViewExtractoMovimientos1.cxGridViewCONCEPTO
end>
+ inherited cxGridViewPUNTEADO: TcxGridDBColumn
+ IsCaptionAssigned = True
+ end
inherited cxGridViewID_ASIENTO: TcxGridDBColumn
IsCaptionAssigned = True
end
@@ -199,11 +217,15 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
Enabled = False
Visible = False
end
- object actCerrarCaja: TAction
- Caption = 'Cerrar Caja/Banco'
+ object actPuntear: TAction
+ Caption = 'Puntear/Despuntear asiento'
ImageIndex = 24
+ OnExecute = actPuntearExecute
+ OnUpdate = actPuntearUpdate
+ end
+ object actCerrarCaja: TAction
+ Caption = 'Cerrar caja'
OnExecute = actCerrarCajaExecute
- OnUpdate = actCerrarCajaUpdate
end
end
inherited SmallImages: TPngImageList [5]
diff --git a/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.pas b/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.pas
index 326c8f7c..f4c86efe 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.pas
@@ -17,14 +17,17 @@ uses
type
TfEditorExtractoMovimientos = class(TfEditorGridBase, IEditorExtractoMovimientos)
frViewExtractoMovimientos1: TfrViewExtractoMovimientos;
- actCerrarCaja: TAction;
+ actPuntear: TAction;
TBXItem38: TTBXItem;
+ actCerrarCaja: TAction;
+ TBXItem39: TTBXItem;
procedure FormShow(Sender: TObject);
procedure actModificarUpdate(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
- procedure actCerrarCajaExecute(Sender: TObject);
- procedure actCerrarCajaUpdate(Sender: TObject);
+ procedure actPuntearExecute(Sender: TObject);
+ procedure actPuntearUpdate(Sender: TObject);
procedure actNuevoUpdate(Sender: TObject);
+ procedure actCerrarCajaExecute(Sender: TObject);
private
FDiario: IBizDiario;
@@ -55,7 +58,7 @@ type
implementation
uses
- uFactuGES_App, uBizEjercicios;
+ uFactuGES_App, uBizEjercicios, uBizApuntes;
{$R *.dfm}
@@ -114,7 +117,7 @@ procedure TfEditorExtractoMovimientos.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
- FTitulo := 'Cajas / Bancos - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE;
+ FTitulo := 'Cajas / Bancos - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')';
inherited PonerTitulos(FTitulo);
end;
@@ -154,37 +157,55 @@ begin
end;
end;
+procedure TfEditorExtractoMovimientos.actPuntearExecute(Sender: TObject);
+begin
+ inherited;
+ FController.Puntear(Diario);
+end;
+
+procedure TfEditorExtractoMovimientos.actPuntearUpdate(Sender: TObject);
+begin
+ if HayDatos and Assigned(ViewGrid) then
+ (Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes)
+ and not ViewGrid.IsEmpty
+ and ViewGrid.esSeleccionCeldaDatos
+ else
+ (Sender as TAction).Enabled := False;
+
+ if (Sender as TAction).Enabled then
+ (Sender as TAction).Enabled := (AppFactuGES.EjercicioActivo.ESTADO = CTE_ABIERTO);
+end;
+
procedure TfEditorExtractoMovimientos.actCerrarCajaExecute(Sender: TObject);
begin
inherited;
+ showmessage(IntToStr(Diario.ID_SUBCUENTA));
+ showmessage(IntToStr(frViewExtractoMovimientos1.cxGrid.ActiveLevel.Tag));
if FController.CerrarCajaBanco(frViewExtractoMovimientos1.cxGrid.ActiveLevel.Tag) then
- actRefrescar.Execute;
-end;
+ actRefrescar.Execute;
-procedure TfEditorExtractoMovimientos.actCerrarCajaUpdate(Sender: TObject);
-begin
- (Sender as TAction).Enabled := (actNuevo as TAction).Enabled;
end;
procedure TfEditorExtractoMovimientos.actEliminarUpdate(Sender: TObject);
begin
inherited;
-
+ //No se podrá eliminar un asiento si es automático por factura, si el ejercicio esta cerrado o el asiento esta punteado
if (Sender as TAction).Enabled then
if Assigned(Diario) then
- (Sender as TAction).Enabled := Diario.ID_FACTURAIsNull
- and Diario.ID_PAGOIsNull
- and (Diario.ESTADO = CTE_ABIERTO);
+ (Sender as TAction).Enabled := Diario.ID_FACTURAIsNull and Diario.ID_PAGOIsNull
+ and (Diario.ESTADO = CTE_ABIERTO)
+ and (Diario.PUNTEADO = CTE_NO_PUNTEADO);
end;
procedure TfEditorExtractoMovimientos.actModificarUpdate(Sender: TObject);
begin
inherited;
+ //No se podrá modificar un asiento si es automático por factura, si el ejercicio esta cerrado o el asiento esta punteado
if (Sender as TAction).Enabled then
if Assigned(Diario) then
- (Sender as TAction).Enabled := Diario.ID_FACTURAIsNull
- and Diario.ID_PAGOIsNull
- and (Diario.ESTADO = CTE_ABIERTO);
+ (Sender as TAction).Enabled := Diario.ID_FACTURAIsNull and Diario.ID_PAGOIsNull
+ and (Diario.ESTADO = CTE_ABIERTO)
+ and (Diario.PUNTEADO = CTE_NO_PUNTEADO);
end;
procedure TfEditorExtractoMovimientos.actNuevoUpdate(Sender: TObject);
diff --git a/Source/Modulos/Contabilidad/Views/uEditorSubCuenta.pas b/Source/Modulos/Contabilidad/Views/uEditorSubCuenta.pas
index d9e39a51..9be5482c 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorSubCuenta.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorSubCuenta.pas
@@ -105,7 +105,7 @@ begin
if SubCuenta.EsNuevo then
FTitulo := 'Nueva subcuenta - ' + AppFactuGES.EjercicioActivo.NOMBRE
else
- FTitulo := 'Cuenta' + ' - ' + SubCuenta.DESCRIPCION + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE;
+ FTitulo := 'Cuenta' + ' - ' + SubCuenta.DESCRIPCION + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')';
end;
inherited PonerTitulos(FTitulo);
diff --git a/Source/Modulos/Contabilidad/Views/uEditorSubCuentas.dfm b/Source/Modulos/Contabilidad/Views/uEditorSubCuentas.dfm
index 5740ece0..e1b40bbd 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorSubCuentas.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorSubCuentas.dfm
@@ -2,6 +2,8 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
Left = 489
Top = 325
Caption = 'Lista de epigrafes'
+ ExplicitWidth = 320
+ ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
diff --git a/Source/Modulos/Contabilidad/Views/uEditorSubCuentas.pas b/Source/Modulos/Contabilidad/Views/uEditorSubCuentas.pas
index e8f8c98f..1ddb4efd 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorSubCuentas.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorSubCuentas.pas
@@ -99,7 +99,7 @@ procedure TfEditorSubCuentas.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
- FTitulo := 'Lista de SubCuentas - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE;
+ FTitulo := 'Lista de SubCuentas - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' (' + AppFactuGES.EjercicioActivo.ESTADO + ')';
inherited PonerTitulos(FTitulo);
end;
diff --git a/Source/Modulos/Contabilidad/Views/uViewDiario.dfm b/Source/Modulos/Contabilidad/Views/uViewDiario.dfm
index 4d0cf392..82bfc184 100644
--- a/Source/Modulos/Contabilidad/Views/uViewDiario.dfm
+++ b/Source/Modulos/Contabilidad/Views/uViewDiario.dfm
@@ -19,6 +19,21 @@ inherited frViewDiario: TfrViewDiario
Column = cxGridViewCONCEPTO
end>
OptionsBehavior.PullFocusing = True
+ object cxGridViewPUNTEADO: TcxGridDBColumn
+ DataBinding.FieldName = 'PUNTEADO'
+ PropertiesClassName = 'TcxImageComboBoxProperties'
+ Properties.Images = GridPNGImageList
+ Properties.Items = <
+ item
+ Value = -1
+ end
+ item
+ Description = 'Punteado'
+ ImageIndex = 1
+ Value = 1
+ end>
+ IsCaptionAssigned = True
+ end
object cxGridViewID_ASIENTO: TcxGridDBColumn
DataBinding.FieldName = 'ID_ASIENTO'
Visible = False
@@ -128,12 +143,135 @@ inherited frViewDiario: TfrViewDiario
end
end
end
+ inherited pnlAgrupaciones: TTBXDockablePanel
+ ExplicitWidth = 554
+ end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 38673.842406053240000000
BuiltInReportLink = True
end
end
+ inherited GridPNGImageList: TPngImageList
+ PngImages = <
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 61000000097048597300000B1300000B1301009A9C1800000A4F694343505068
+ 6F746F73686F70204943432070726F66696C65000078DA9D53675453E9163DF7
+ DEF4424B8880944B6F5215082052428B801491262A2109104A8821A1D91551C1
+ 114545041BC8A088038E8E808C15512C0C8A0AD807E421A28E83A3888ACAFBE1
+ 7BA36BD6BCF7E6CDFEB5D73EE7ACF39DB3CF07C0080C9648335135800CA9421E
+ 11E083C7C4C6E1E42E40810A2470001008B3642173FD230100F87E3C3C2B22C0
+ 07BE000178D30B0800C04D9BC0301C87FF0FEA42995C01808401C07491384B08
+ 801400407A8E42A600404601809D98265300A0040060CB6362E300502D006027
+ 7FE6D300809DF8997B01005B94211501A09100201365884400683B00ACCF568A
+ 450058300014664BC43900D82D00304957664800B0B700C0CE100BB200080C00
+ 305188852900047B0060C8232378008499001446F2573CF12BAE10E72A000078
+ 99B23CB9243945815B082D710757572E1E28CE49172B14366102619A402EC279
+ 99193281340FE0F3CC0000A0911511E083F3FD78CE0EAECECE368EB60E5F2DEA
+ BF06FF226262E3FEE5CFAB70400000E1747ED1FE2C2FB31A803B06806DFEA225
+ EE04685E0BA075F78B66B20F40B500A0E9DA57F370F87E3C3C45A190B9D9D9E5
+ E4E4D84AC4425B61CA577DFE67C25FC057FD6CF97E3CFCF7F5E0BEE22481325D
+ 814704F8E0C2CCF44CA51CCF92098462DCE68F47FCB70BFFFC1DD322C44962B9
+ 582A14E35112718E449A8CF332A52289429229C525D2FF64E2DF2CFB033EDF35
+ 00B06A3E017B912DA85D6303F64B27105874C0E2F70000F2BB6FC1D428080380
+ 6883E1CF77FFEF3FFD47A02500806649927100005E44242E54CAB33FC7080000
+ 44A0812AB0411BF4C1182CC0061CC105DCC10BFC6036844224C4C24210420A64
+ 801C726029AC82422886CDB01D2A602FD4401D34C051688693700E2EC255B80E
+ 3D700FFA61089EC128BC81090441C808136121DA8801628A58238E08179985F8
+ 21C14804128B2420C9881451224B91354831528A542055481DF23D720239875C
+ 46BA913BC8003282FC86BC47319481B2513DD40CB543B9A8371A8446A20BD064
+ 74319A8F16A09BD072B41A3D8C36A1E7D0AB680FDA8F3E43C730C0E8180733C4
+ 6C302EC6C342B1382C099363CBB122AC0CABC61AB056AC03BB89F563CFB17704
+ 128145C0093604774220611E4148584C584ED848A8201C243411DA0937090384
+ 51C2272293A84BB426BA11F9C4186232318758482C23D6128F132F107B8843C4
+ 37241289433227B9900249B1A454D212D246D26E5223E92CA99B34481A2393C9
+ DA646BB20739942C202BC885E49DE4C3E433E41BE421F25B0A9D624071A4F853
+ E22852CA6A4A19E510E534E5066598324155A39A52DDA8A15411358F5A42ADA1
+ B652AF5187A81334759A39CD8316494BA5ADA295D31A681768F769AFE874BA11
+ DD951E4E97D057D2CBE947E897E803F4770C0D861583C7886728199B18071867
+ 197718AF984CA619D38B19C754303731EB98E7990F996F55582AB62A7C1591CA
+ 0A954A9526951B2A2F54A9AAA6AADEAA0B55F355CB548FA95E537DAE46553353
+ E3A909D496AB55AA9D50EB531B5367A93BA887AA67A86F543FA47E59FD890659
+ C34CC34F43A451A0B15FE3BCC6200B6319B3782C216B0DAB86758135C426B1CD
+ D97C762ABB98FD1DBB8B3DAAA9A13943334A3357B352F394663F07E39871F89C
+ 744E09E728A797F37E8ADE14EF29E2291BA6344CB931655C6BAA96979658AB48
+ AB51AB47EBBD36AEEDA79DA6BD45BB59FB810E41C74A275C2747678FCE059DE7
+ 53D953DDA70AA7164D3D3AF5AE2EAA6BA51BA1BB4477BF6EA7EE989EBE5E809E
+ 4C6FA7DE79BDE7FA1C7D2FFD54FD6DFAA7F5470C5806B30C2406DB0CCE183CC5
+ 35716F3C1D2FC7DBF151435DC34043A561956197E18491B9D13CA3D5468D460F
+ 8C69C65CE324E36DC66DC6A326062621264B4DEA4DEE9A524DB9A629A63B4C3B
+ 4CC7CDCCCDA2CDD699359B3D31D732E79BE79BD79BDFB7605A785A2CB6A8B6B8
+ 6549B2E45AA659EEB6BC6E855A3959A558555A5DB346AD9DAD25D6BBADBBA711
+ A7B94E934EAB9ED667C3B0F1B6C9B6A9B719B0E5D806DBAEB66DB67D61676217
+ 67B7C5AEC3EE93BD937DBA7D8DFD3D070D87D90EAB1D5A1D7E73B472143A563A
+ DE9ACE9CEE3F7DC5F496E92F6758CF10CFD833E3B613CB29C4699D539BD34767
+ 1767B97383F3888B894B82CB2E973E2E9B1BC6DDC8BDE44A74F5715DE17AD2F5
+ 9D9BB39BC2EDA8DBAFEE36EE69EE87DC9FCC349F299E593373D0C3C843E051E5
+ D13F0B9F95306BDFAC7E4F434F8167B5E7232F632F9157ADD7B0B7A577AAF761
+ EF173EF63E729FE33EE33C37DE32DE595FCC37C0B7C8B7CB4FC36F9E5F85DF43
+ 7F23FF64FF7AFFD100A78025016703898141815B02FBF87A7C21BF8E3F3ADB65
+ F6B2D9ED418CA0B94115418F82AD82E5C1AD2168C8EC90AD21F7E798CE91CE69
+ 0E85507EE8D6D00761E6618BC37E0C2785878557863F8E7088581AD131973577
+ D1DC4373DF44FA449644DE9B67314F39AF2D4A352A3EAA2E6A3CDA37BA34BA3F
+ C62E6659CCD5589D58496C4B1C392E2AAE366E6CBEDFFCEDF387E29DE20BE37B
+ 17982FC85D7079A1CEC2F485A716A92E122C3A96404C884E3894F041102AA816
+ 8C25F21377258E0A79C21DC267222FD136D188D8435C2A1E4EF2482A4D7A92EC
+ 91BC357924C533A52CE5B98427A990BC4C0D4CDD9B3A9E169A76206D323D3ABD
+ 31839291907142AA214D93B667EA67E66676CBAC6585B2FEC56E8BB72F1E9507
+ C96BB390AC05592D0AB642A6E8545A28D72A07B267655766BFCD89CA3996AB9E
+ 2BCDEDCCB3CADB90379CEF9FFFED12C212E192B6A5864B572D1D58E6BDAC6A39
+ B23C7179DB0AE315052B865606AC3CB88AB62A6DD54FABED5797AE7EBD267A4D
+ 6B815EC1CA82C1B5016BEB0B550AE5857DEBDCD7ED5D4F582F59DFB561FA869D
+ 1B3E15898AAE14DB1797157FD828DC78E51B876FCABF99DC94B4A9ABC4B964CF
+ 66D266E9E6DE2D9E5B0E96AA97E6970E6E0DD9DAB40DDF56B4EDF5F645DB2F97
+ CD28DBBB83B643B9A3BF3CB8BC65A7C9CECD3B3F54A454F454FA5436EED2DDB5
+ 61D7F86ED1EE1B7BBCF634ECD5DB5BBCF7FD3EC9BEDB5501554DD566D565FB49
+ FBB3F73FAE89AAE9F896FB6D5DAD4E6D71EDC703D203FD07230EB6D7B9D4D51D
+ D23D54528FD62BEB470EC71FBEFE9DEF772D0D360D558D9CC6E223704479E4E9
+ F709DFF71E0D3ADA768C7BACE107D31F761D671D2F6A429AF29A469B539AFB5B
+ 625BBA4FCC3ED1D6EADE7AFC47DB1F0F9C343C59794AF354C969DAE982D39367
+ F2CF8C9D959D7D7E2EF9DC60DBA2B67BE763CEDF6A0F6FEFBA1074E1D245FF8B
+ E73BBC3BCE5CF2B874F2B2DBE51357B8579AAF3A5F6DEA74EA3CFE93D34FC7BB
+ 9CBB9AAEB95C6BB9EE7ABDB57B66F7E91B9E37CEDDF4BD79F116FFD6D59E393D
+ DDBDF37A6FF7C5F7F5DF16DD7E7227FDCECBBBD97727EEADBC4FBC5FF440ED41
+ D943DD87D53F5BFEDCD8EFDC7F6AC077A0F3D1DC47F7068583CFFE91F58F0F43
+ 058F998FCB860D86EB9E383E3939E23F72FDE9FCA743CF64CF269E17FEA2FECB
+ AE17162F7EF8D5EBD7CED198D1A197F29793BF6D7CA5FDEAC0EB19AFDBC6C2C6
+ 1EBEC97833315EF456FBEDC177DC771DEFA3DF0F4FE47C207F28FF68F9B1F553
+ D0A7FB93199393FF040398F3FC63332DDB000000434944415478DA63FCFFFF3F
+ 03258011D900464646ACA601D530126D00BA6298A1B80C21CA0090183639925C
+ 80CB3B040DC0E69A510306BD010C04005E03C801036F00008D248BE16F9028BA
+ 0000000049454E44AE426082}
+ Name = 'Icono_header'
+ Background = clWindow
+ end
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 61000000097048597300000AEB00000AEB01828B0D5A000001DA4944415478DA
+ 63FCFFFF3F032580912C5DF2F33964B539E3DF7DF8F1956403380CE7C85B5929
+ CFFAF99ED7FCFCED9BE124192060B7D8D6CE5279E99B876C42674FFC0CFEF9C0
+ 7A27D10628FBAF0FB030915F74E7EA6FE6F387FF87FD7A6AB195E83090F55915
+ EEE7A23BE7FCD9CFAC170EFF4EFDF6C07A31D18128E1BE3CC8DB597BE1A3BBBF
+ B98EECFA91FBFDBEF574A0F07FA20C10B09B67EBE366B8E3CDF37F9C47F77CED
+ FC7CD3AE125D0DC400B3897C9CCCBCEADFD9182F331C4CFC010E6DCB39F29E0E
+ 3A07599939E477AE7FBFFBE3CF4BBE0C77F27F621820EAB848DFDC447931372B
+ 9FE68E5DF7577F3C73368E414588D9C6496BB3AA92B8CBDECD9FDEBC7CF9D3F2
+ E71DE7BBD85CC928EAB438C4C7556F3A0B1B8BC8B1BD9FFFDE7B753F4C41994B
+ C3CA48B1E5F09ECFFFEF3F7D19F3FB5AD0725CDE047B41276243A09D85FAAAA7
+ CFBFB11CDEFBEA8EA79F98E4C3FBBFB8CF9F7BBDE5EB453F3FE440C31E060CF5
+ 4C4ED9F63B6565845D5EBEFEF29F11287AE9C4AF2FAFBF3D32FF753EFE3ABE80
+ 86C7028FF5429B101F83FDCF5F7F66797697E1FFCDDB6FA7FFBAE69F4D289A91
+ A2B19EC539C7E1C49BC7EC46F71EBDD9FFF9DFD338868B994F4930808181D76E
+ 413EF33F56D90F0F5ED4323C29FE4E4833080000904EC47A3EA3126900000000
+ 49454E44AE426082}
+ Name = 'PngImage1'
+ Background = clWindow
+ end>
+ Bitmap = {}
+ end
object PngImageList: TPngImageList
PngImages = <
item
diff --git a/Source/Modulos/Contabilidad/Views/uViewDiario.pas b/Source/Modulos/Contabilidad/Views/uViewDiario.pas
index abdb5dd4..30d2d6e3 100644
Binary files a/Source/Modulos/Contabilidad/Views/uViewDiario.pas and b/Source/Modulos/Contabilidad/Views/uViewDiario.pas differ
diff --git a/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.dfm b/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.dfm
index 1ff2d7b5..4f956c8f 100644
--- a/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.dfm
+++ b/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.dfm
@@ -20,6 +20,21 @@ inherited frViewExtractoMovimientos: TfrViewExtractoMovimientos
OptionsBehavior.PullFocusing = True
OptionsCustomize.ColumnMoving = False
OptionsCustomize.ColumnSorting = False
+ object cxGridViewPUNTEADO: TcxGridDBColumn
+ DataBinding.FieldName = 'PUNTEADO'
+ PropertiesClassName = 'TcxImageComboBoxProperties'
+ Properties.Images = GridPNGImageList
+ Properties.Items = <
+ item
+ Value = -1
+ end
+ item
+ Description = 'Punteado'
+ ImageIndex = 1
+ Value = 1
+ end>
+ IsCaptionAssigned = True
+ end
object cxGridViewID_ASIENTO: TcxGridDBColumn
DataBinding.FieldName = 'ID_ASIENTO'
Visible = False
@@ -112,15 +127,27 @@ inherited frViewExtractoMovimientos: TfrViewExtractoMovimientos
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 242
Width = 242
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 346
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 346
ExplicitWidth = 198
Width = 198
@@ -128,12 +155,135 @@ inherited frViewExtractoMovimientos: TfrViewExtractoMovimientos
end
end
end
+ inherited pnlAgrupaciones: TTBXDockablePanel
+ ExplicitWidth = 554
+ end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 38673.842406053240000000
BuiltInReportLink = True
end
end
+ inherited GridPNGImageList: TPngImageList
+ PngImages = <
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 61000000097048597300000B1300000B1301009A9C1800000A4F694343505068
+ 6F746F73686F70204943432070726F66696C65000078DA9D53675453E9163DF7
+ DEF4424B8880944B6F5215082052428B801491262A2109104A8821A1D91551C1
+ 114545041BC8A088038E8E808C15512C0C8A0AD807E421A28E83A3888ACAFBE1
+ 7BA36BD6BCF7E6CDFEB5D73EE7ACF39DB3CF07C0080C9648335135800CA9421E
+ 11E083C7C4C6E1E42E40810A2470001008B3642173FD230100F87E3C3C2B22C0
+ 07BE000178D30B0800C04D9BC0301C87FF0FEA42995C01808401C07491384B08
+ 801400407A8E42A600404601809D98265300A0040060CB6362E300502D006027
+ 7FE6D300809DF8997B01005B94211501A09100201365884400683B00ACCF568A
+ 450058300014664BC43900D82D00304957664800B0B700C0CE100BB200080C00
+ 305188852900047B0060C8232378008499001446F2573CF12BAE10E72A000078
+ 99B23CB9243945815B082D710757572E1E28CE49172B14366102619A402EC279
+ 99193281340FE0F3CC0000A0911511E083F3FD78CE0EAECECE368EB60E5F2DEA
+ BF06FF226262E3FEE5CFAB70400000E1747ED1FE2C2FB31A803B06806DFEA225
+ EE04685E0BA075F78B66B20F40B500A0E9DA57F370F87E3C3C45A190B9D9D9E5
+ E4E4D84AC4425B61CA577DFE67C25FC057FD6CF97E3CFCF7F5E0BEE22481325D
+ 814704F8E0C2CCF44CA51CCF92098462DCE68F47FCB70BFFFC1DD322C44962B9
+ 582A14E35112718E449A8CF332A52289429229C525D2FF64E2DF2CFB033EDF35
+ 00B06A3E017B912DA85D6303F64B27105874C0E2F70000F2BB6FC1D428080380
+ 6883E1CF77FFEF3FFD47A02500806649927100005E44242E54CAB33FC7080000
+ 44A0812AB0411BF4C1182CC0061CC105DCC10BFC6036844224C4C24210420A64
+ 801C726029AC82422886CDB01D2A602FD4401D34C051688693700E2EC255B80E
+ 3D700FFA61089EC128BC81090441C808136121DA8801628A58238E08179985F8
+ 21C14804128B2420C9881451224B91354831528A542055481DF23D720239875C
+ 46BA913BC8003282FC86BC47319481B2513DD40CB543B9A8371A8446A20BD064
+ 74319A8F16A09BD072B41A3D8C36A1E7D0AB680FDA8F3E43C730C0E8180733C4
+ 6C302EC6C342B1382C099363CBB122AC0CABC61AB056AC03BB89F563CFB17704
+ 128145C0093604774220611E4148584C584ED848A8201C243411DA0937090384
+ 51C2272293A84BB426BA11F9C4186232318758482C23D6128F132F107B8843C4
+ 37241289433227B9900249B1A454D212D246D26E5223E92CA99B34481A2393C9
+ DA646BB20739942C202BC885E49DE4C3E433E41BE421F25B0A9D624071A4F853
+ E22852CA6A4A19E510E534E5066598324155A39A52DDA8A15411358F5A42ADA1
+ B652AF5187A81334759A39CD8316494BA5ADA295D31A681768F769AFE874BA11
+ DD951E4E97D057D2CBE947E897E803F4770C0D861583C7886728199B18071867
+ 197718AF984CA619D38B19C754303731EB98E7990F996F55582AB62A7C1591CA
+ 0A954A9526951B2A2F54A9AAA6AADEAA0B55F355CB548FA95E537DAE46553353
+ E3A909D496AB55AA9D50EB531B5367A93BA887AA67A86F543FA47E59FD890659
+ C34CC34F43A451A0B15FE3BCC6200B6319B3782C216B0DAB86758135C426B1CD
+ D97C762ABB98FD1DBB8B3DAAA9A13943334A3357B352F394663F07E39871F89C
+ 744E09E728A797F37E8ADE14EF29E2291BA6344CB931655C6BAA96979658AB48
+ AB51AB47EBBD36AEEDA79DA6BD45BB59FB810E41C74A275C2747678FCE059DE7
+ 53D953DDA70AA7164D3D3AF5AE2EAA6BA51BA1BB4477BF6EA7EE989EBE5E809E
+ 4C6FA7DE79BDE7FA1C7D2FFD54FD6DFAA7F5470C5806B30C2406DB0CCE183CC5
+ 35716F3C1D2FC7DBF151435DC34043A561956197E18491B9D13CA3D5468D460F
+ 8C69C65CE324E36DC66DC6A326062621264B4DEA4DEE9A524DB9A629A63B4C3B
+ 4CC7CDCCCDA2CDD699359B3D31D732E79BE79BD79BDFB7605A785A2CB6A8B6B8
+ 6549B2E45AA659EEB6BC6E855A3959A558555A5DB346AD9DAD25D6BBADBBA711
+ A7B94E934EAB9ED667C3B0F1B6C9B6A9B719B0E5D806DBAEB66DB67D61676217
+ 67B7C5AEC3EE93BD937DBA7D8DFD3D070D87D90EAB1D5A1D7E73B472143A563A
+ DE9ACE9CEE3F7DC5F496E92F6758CF10CFD833E3B613CB29C4699D539BD34767
+ 1767B97383F3888B894B82CB2E973E2E9B1BC6DDC8BDE44A74F5715DE17AD2F5
+ 9D9BB39BC2EDA8DBAFEE36EE69EE87DC9FCC349F299E593373D0C3C843E051E5
+ D13F0B9F95306BDFAC7E4F434F8167B5E7232F632F9157ADD7B0B7A577AAF761
+ EF173EF63E729FE33EE33C37DE32DE595FCC37C0B7C8B7CB4FC36F9E5F85DF43
+ 7F23FF64FF7AFFD100A78025016703898141815B02FBF87A7C21BF8E3F3ADB65
+ F6B2D9ED418CA0B94115418F82AD82E5C1AD2168C8EC90AD21F7E798CE91CE69
+ 0E85507EE8D6D00761E6618BC37E0C2785878557863F8E7088581AD131973577
+ D1DC4373DF44FA449644DE9B67314F39AF2D4A352A3EAA2E6A3CDA37BA34BA3F
+ C62E6659CCD5589D58496C4B1C392E2AAE366E6CBEDFFCEDF387E29DE20BE37B
+ 17982FC85D7079A1CEC2F485A716A92E122C3A96404C884E3894F041102AA816
+ 8C25F21377258E0A79C21DC267222FD136D188D8435C2A1E4EF2482A4D7A92EC
+ 91BC357924C533A52CE5B98427A990BC4C0D4CDD9B3A9E169A76206D323D3ABD
+ 31839291907142AA214D93B667EA67E66676CBAC6585B2FEC56E8BB72F1E9507
+ C96BB390AC05592D0AB642A6E8545A28D72A07B267655766BFCD89CA3996AB9E
+ 2BCDEDCCB3CADB90379CEF9FFFED12C212E192B6A5864B572D1D58E6BDAC6A39
+ B23C7179DB0AE315052B865606AC3CB88AB62A6DD54FABED5797AE7EBD267A4D
+ 6B815EC1CA82C1B5016BEB0B550AE5857DEBDCD7ED5D4F582F59DFB561FA869D
+ 1B3E15898AAE14DB1797157FD828DC78E51B876FCABF99DC94B4A9ABC4B964CF
+ 66D266E9E6DE2D9E5B0E96AA97E6970E6E0DD9DAB40DDF56B4EDF5F645DB2F97
+ CD28DBBB83B643B9A3BF3CB8BC65A7C9CECD3B3F54A454F454FA5436EED2DDB5
+ 61D7F86ED1EE1B7BBCF634ECD5DB5BBCF7FD3EC9BEDB5501554DD566D565FB49
+ FBB3F73FAE89AAE9F896FB6D5DAD4E6D71EDC703D203FD07230EB6D7B9D4D51D
+ D23D54528FD62BEB470EC71FBEFE9DEF772D0D360D558D9CC6E223704479E4E9
+ F709DFF71E0D3ADA768C7BACE107D31F761D671D2F6A429AF29A469B539AFB5B
+ 625BBA4FCC3ED1D6EADE7AFC47DB1F0F9C343C59794AF354C969DAE982D39367
+ F2CF8C9D959D7D7E2EF9DC60DBA2B67BE763CEDF6A0F6FEFBA1074E1D245FF8B
+ E73BBC3BCE5CF2B874F2B2DBE51357B8579AAF3A5F6DEA74EA3CFE93D34FC7BB
+ 9CBB9AAEB95C6BB9EE7ABDB57B66F7E91B9E37CEDDF4BD79F116FFD6D59E393D
+ DDBDF37A6FF7C5F7F5DF16DD7E7227FDCECBBBD97727EEADBC4FBC5FF440ED41
+ D943DD87D53F5BFEDCD8EFDC7F6AC077A0F3D1DC47F7068583CFFE91F58F0F43
+ 058F998FCB860D86EB9E383E3939E23F72FDE9FCA743CF64CF269E17FEA2FECB
+ AE17162F7EF8D5EBD7CED198D1A197F29793BF6D7CA5FDEAC0EB19AFDBC6C2C6
+ 1EBEC97833315EF456FBEDC177DC771DEFA3DF0F4FE47C207F28FF68F9B1F553
+ D0A7FB93199393FF040398F3FC63332DDB000000434944415478DA63FCFFFF3F
+ 03258011D900464646ACA601D530126D00BA6298A1B80C21CA0090183639925C
+ 80CB3B040DC0E69A510306BD010C04005E03C801036F00008D248BE16F9028BA
+ 0000000049454E44AE426082}
+ Name = 'Icono_header'
+ Background = clWindow
+ end
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 61000000097048597300000AEB00000AEB01828B0D5A000001DA4944415478DA
+ 63FCFFFF3F032580912C5DF2F33964B539E3DF7DF8F1956403380CE7C85B5929
+ CFFAF99ED7FCFCED9BE124192060B7D8D6CE5279E99B876C42674FFC0CFEF9C0
+ 7A27D10628FBAF0FB030915F74E7EA6FE6F387FF87FD7A6AB195E83090F55915
+ EEE7A23BE7FCD9CFAC170EFF4EFDF6C07A31D18128E1BE3CC8DB597BE1A3BBBF
+ B98EECFA91FBFDBEF574A0F07FA20C10B09B67EBE366B8E3CDF37F9C47F77CED
+ FC7CD3AE125D0DC400B3897C9CCCBCEADFD9182F331C4CFC010E6DCB39F29E0E
+ 3A07599939E477AE7FBFFBE3CF4BBE0C77F27F621820EAB848DFDC447931372B
+ 9FE68E5DF7577F3C73368E414588D9C6496BB3AA92B8CBDECD9FDEBC7CF9D3F2
+ E71DE7BBD85CC928EAB438C4C7556F3A0B1B8BC8B1BD9FFFDE7B753F4C41994B
+ C3CA48B1E5F09ECFFFEF3F7D19F3FB5AD0725CDE047B41276243A09D85FAAAA7
+ CFBFB11CDEFBEA8EA79F98E4C3FBBFB8CF9F7BBDE5EB453F3FE440C31E060CF5
+ 4C4ED9F63B6565845D5EBEFEF29F11287AE9C4AF2FAFBF3D32FF753EFE3ABE80
+ 86C7028FF5429B101F83FDCF5F7F66797697E1FFCDDB6FA7FFBAE69F4D289A91
+ A2B19EC539C7E1C49BC7EC46F71EBDD9FFF9DFD338868B994F4930808181D76E
+ 413EF33F56D90F0F5ED4323C29FE4E4833080000904EC47A3EA3126900000000
+ 49454E44AE426082}
+ Name = 'PngImage1'
+ Background = clWindow
+ end>
+ Bitmap = {}
+ end
inherited cxStyleRepository1: TcxStyleRepository
object cxStyleCierre: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
diff --git a/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.pas b/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.pas
index 24f7f57c..15df5db7 100644
--- a/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.pas
+++ b/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.pas
@@ -50,8 +50,7 @@ type
cxGridViewSaldo: TcxGridDBColumn;
cxGridViewTIPO: TcxGridDBColumn;
cxStyleCierre: TcxStyle;
- procedure cxGridViewID_AsientoCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
- AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
+ cxGridViewPUNTEADO: TcxGridDBColumn;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
procedure CustomViewShow(Sender: TObject);
@@ -59,6 +58,9 @@ type
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
out AStyle: TcxStyle);
+ procedure cxGridViewICONOCustomDrawCell(Sender: TcxCustomGridTableView;
+ ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
+ var ADone: Boolean);
private
FOnExtractoChange: TNotifyEvent;
@@ -258,16 +260,17 @@ begin
Screen.Cursor := ACursor;
end;
-procedure TfrViewExtractoMovimientos.cxGridViewID_ASIENTOCustomDrawCell(
+procedure TfrViewExtractoMovimientos.cxGridViewICONOCustomDrawCell(
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
var
R : TRect;
+
begin
inherited;
R := AViewInfo.ContentBounds;
ACanvas.FillRect(R);
- ACanvas.DrawImage(PngImageList, R.Left, R.Top, 0);
+ ACanvas.DrawImage(GridPNGImageList, R.Left, R.Top, 0);
ADone := True;
end;
diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
index a2689d7f..48478902 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
@@ -4,7 +4,7 @@ interface
uses
- Classes, SysUtils, uDADataTable, uControllerBase, uIDataModuleFacturasCliente,
+ Classes, SysUtils, Variants, uDADataTable, uControllerBase, uIDataModuleFacturasCliente,
uClientesController, uDetallesFacturaClienteController, uBizAlbaranesCliente,
uBizFacturasCliente, uBizDireccionesContacto;
@@ -28,10 +28,9 @@ type
function Anadir(AFactura : IBizFacturaCliente) : Boolean; overload;
function AnadirAbono(AFactura : IBizFacturaCliente) : Boolean;
function Anadir(AFacturas : IBizFacturaCliente; AListaAlbaranes : IBizAlbaranCliente): Boolean; overload;
-// function Anadir(AFactura : IBizFacturaCliente; const IDPedido : Integer): Boolean; overload;
function Eliminar(const ID : Integer): Boolean; overload;
- function Eliminar(AFactura : IBizFacturaCliente; AllItems: Boolean = false): Boolean; overload;
+ function Eliminar(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AListaCausas: TStringList = nil): Boolean; overload;
function Guardar(AFactura : IBizFacturaCliente): Boolean;
procedure DescartarCambios(AFactura : IBizFacturaCliente);
function Existe(const ID: Integer) : Boolean;
@@ -43,8 +42,6 @@ type
procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false);
procedure RecalcularImportes(AFactura: IBizFacturaCliente);
- function EsModificable(AFactura: IBizFacturaCliente): Boolean;
- function EsEliminable(AFactura: IBizFacturaCliente): Boolean;
function ElegirFacturas(AFacturas : IBizFacturaCliente; AMensaje: String; AMultiSelect: Boolean): IBizFacturaCliente;
function ExtraerSeleccionados(ARecibosCliente: IBizFacturaCliente) : IBizFacturaCliente;
@@ -75,6 +72,7 @@ type
protected
procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override;
+
public
property ClienteController: IClientesController read GetClienteController write SetClienteController;
property DetallesController: IDetallesFacturaClienteController read GetDetallesController write SetDetallesController;
@@ -83,7 +81,7 @@ type
destructor Destroy; override;
function Eliminar(const ID : Integer): Boolean; overload;
- function Eliminar(AFactura : IBizFacturaCliente; AllItems: Boolean = false): Boolean; overload;
+ function Eliminar(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AListaCausas: TStringList = nil): Boolean; overload;
function Guardar(AFactura : IBizFacturaCliente): Boolean;
procedure DescartarCambios(AFactura : IBizFacturaCliente); virtual;
function Existe(const ID: Integer) : Boolean; virtual;
@@ -104,8 +102,8 @@ type
procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false);
procedure RecalcularImportes(AFactura: IBizFacturaCliente);
- function EsModificable(AFactura: IBizFacturaCliente): Boolean;
- function EsEliminable(AFactura: IBizFacturaCliente): Boolean;
+ function EsModificable(AFactura: IBizFacturaCliente; var AComentario: Variant): Boolean;
+ function EsEliminable(AFactura: IBizFacturaCliente; var AComentario: Variant): Boolean;
function ElegirFacturas(AFacturas : IBizFacturaCliente; AMensaje: String; AMultiSelect: Boolean): IBizFacturaCliente;
function ExtraerSeleccionados(AFacturasCliente: IBizFacturaCliente) : IBizFacturaCliente;
@@ -121,12 +119,10 @@ uses
Windows, uDateUtils, uNumUtils, Controls, cxControls, DB, uEditorRegistryUtils, schFacturasClienteClient_Intf,
uBizContactos, uIEditorFacturasCliente, uIEditorFacturaCliente, uFactuGES_App,
uDataModuleFacturasCliente, uBizDetallesFacturaCliente, uControllerDetallesBase,
- uDataModuleUsuarios, uDAInterfaces, uDataTableUtils,
- uAlbaranesClienteController, schAlbaranesClienteClient_Intf, uROTypes, uDetallesAlbaranClienteController,
- uBizDetallesAlbaranCliente, uFacturasClienteReportController,
- DateUtils, Forms, Dialogs, Variants, uIntegerListUtils,
- uFormasPagoController, uBizFormasPago, uIEditorElegirFacturasCliente,
-
+ uDataModuleUsuarios, uDAInterfaces, uDataTableUtils, uAlbaranesClienteController,
+ schAlbaranesClienteClient_Intf, uROTypes, uDetallesAlbaranClienteController,
+ uBizDetallesAlbaranCliente, uFacturasClienteReportController, DateUtils, Forms,
+ Dialogs, uIntegerListUtils, uFormasPagoController, uBizFormasPago, uIEditorElegirFacturasCliente,
uBizEjercicios, uRecibosClienteController, uBizRecibosCliente;
@@ -564,12 +560,13 @@ begin
//CONTABILIDAD
ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID;
- ESTADO := AppFactuGES.EjercicioActivo.ESTADO;
+ ESTADO_EJERCICIO := AppFactuGES.EjercicioActivo.ESTADO;
+ ASIENTO_PUNTEADO := -1;
//En el caso de que el ejercicio este cerrado dejamos duplicar factura sin asociar a contabilidad.
- if ESTADO = CTE_CERRADO then
+ if ESTADO_EJERCICIO = CTE_CERRADO then
begin
IGNORAR_CONTABILIDAD := 1;
- ESTADO := '';
+ ESTADO_EJERCICIO := '';
end;
end;
@@ -670,6 +667,7 @@ end;
procedure TFacturasClienteController.Ver(AFactura: IBizFacturaCliente);
var
AEditor : IEditorFacturaCliente;
+ AComentario : Variant;
begin
AEditor := NIL;
@@ -682,10 +680,11 @@ begin
AEditor.Factura := AFactura;
//MODO CONSULTAR
- if not EsModificable(AFactura) then
+ if not EsModificable(AFactura, AComentario) then
begin
SetDataTableReadOnly(AFactura.DataTable, True);
AEditor.ReadOnly := True;
+ AEditor.Comentario := AComentario;
end;
AEditor.ShowModal;
@@ -756,13 +755,14 @@ begin
end;
end;
-function TFacturasClienteController.Eliminar(AFactura: IBizFacturaCliente; AllItems: Boolean = false): Boolean;
-//En el caso de eliminar almenos un elemento del conjunto se devuelve true
+function TFacturasClienteController.Eliminar(AFactura: IBizFacturaCliente; AllItems: Boolean = false; AListaCausas: TStringList = nil): Boolean;
+//Solo devolverá true en el caso de eliminar todos y cada uno de los elementos a eliminar
var
bEliminado: Boolean;
+ ACausa: Variant;
begin
- bEliminado := False;
+ bEliminado := True;
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignada');
@@ -775,12 +775,15 @@ begin
if (AFactura.State in dsEditModes) then
AFactura.Cancel;
- //Siempre eliminaremos el seleccionado
- if EsEliminable(AFactura) then
+ //Siempre eliminaremos el seleccionado tanto si es una lista de facturas a eliminar como si es la propia lista del editor.
+ if not EsEliminable(AFactura, ACausa) then
begin
+ if Assigned(AListaCausas) then
+ AListaCausas.Add(Format('%d=%s', [AFactura.ID, ACausa]));
+ bEliminado := False;
+ end
+ else
AFactura.Delete;
- bEliminado := True;
- end;
//En el caso de querer eliminar todos los items del objeto AAlbaran
if AllItems then
@@ -790,48 +793,76 @@ begin
First;
while not EOF do
begin
- if EsEliminable(AFactura) then
+ if not EsEliminable(AFactura, ACausa) then
begin
- AFactura.Delete;
- bEliminado := True
+ if Assigned(AListaCausas) then
+ AListaCausas.Add(Format('%d=%s', [AFactura.ID, ACausa]));
+ bEliminado := False;
+ Next;
end
- else Next;
+ else
+ AFactura.Delete;
end;
end;
end;
- if bEliminado then
- begin
- try
+ try
AFactura.DataTable.ApplyUpdates;
- Result := True
- except
- //En el caso de una factura que tiene recibos con devoluciones hechas no se puede borrar aunque la factura este en situacion de pendiente
- AFactura.DataTable.CancelUpdates;
- Result := False;
- end;
- end
- else
- Result := False;
+ except
+ //En el caso de una factura que tiene recibos con devoluciones hechas no se puede borrar aunque la factura este en situacion de pendiente
+ AFactura.DataTable.CancelUpdates;
+ Result := False;
+ end;
finally
HideHourglassCursor;
end;
end;
-function TFacturasClienteController.EsEliminable(AFactura: IBizFacturaCliente): Boolean;
+function TFacturasClienteController.EsEliminable(AFactura: IBizFacturaCliente; var AComentario: Variant): Boolean;
begin
- Result := EsModificable(AFactura);
+ if not Assigned(AFactura) then
+ raise Exception.Create ('Factura no asignado: EsEliminable');
+
+ if (AFactura.SITUACION <> CTE_PENDIENTE) then
+ begin
+ Result := False;
+ AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser eliminada';
+ end
+ else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then
+ begin
+ Result := False;
+ AComentario := 'La factura tiene un asiento asociado en la parte contable cuyo ejercicio esta cerrado, por lo que no puede ser eliminada';
+ end
+ else if (AFactura.ASIENTO_PUNTEADO > 0) then
+ begin
+ Result := False;
+ AComentario := 'La factura tiene un asiento asociado en la parte contable y está punteado, por lo que no puede ser eliminada';
+ end;
end;
-function TFacturasClienteController.EsModificable(AFactura: IBizFacturaCliente): Boolean;
+function TFacturasClienteController.EsModificable(AFactura: IBizFacturaCliente; var AComentario: Variant): Boolean;
begin
+ AComentario := Null;
+
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignado: EsModificable');
- Result := (AFactura.SITUACION = CTE_PENDIENTE)
- //Si el ejercicio al que pertenece la factura esta cerrado no se podrá eliminar
- and (AFactura.ESTADO <> CTE_CERRADO);
+ if (AFactura.SITUACION <> CTE_PENDIENTE) then
+ begin
+ Result := False;
+ AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser modificada';
+ end
+ else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then
+ begin
+ Result := False;
+ AComentario := 'La factura tiene un asiento asociado en la parte contable cuyo ejercicio esta cerrado, por lo que no puede ser modificada';
+ end
+ else if (AFactura.ASIENTO_PUNTEADO > 0) then
+ begin
+ Result := False;
+ AComentario := 'La factura tiene un asiento asociado en la parte contable y está punteado, por lo que no puede ser modificada';
+ end;
end;
procedure TFacturasClienteController.RecalcularImportes(
diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm
index 32554601..470b0291 100644
--- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm
@@ -284,9 +284,13 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente
DataType = datInteger
end
item
- Name = 'ESTADO'
+ Name = 'ESTADO_EJERCICIO'
DataType = datString
Size = 255
+ end
+ item
+ Name = 'ASIENTO_PUNTEADO'
+ DataType = datSmallInt
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
diff --git a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj
index 893d6c31..6e73ca4e 100644
--- a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj
+++ b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj
@@ -23,6 +23,7 @@
+
@@ -251,14 +252,23 @@
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas
index 5fdee390..d667025f 100644
--- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas
+++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas
@@ -9,8 +9,8 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
- RID_FacturasCliente = '{661D7B8C-D928-4EE5-B87B-F3C5664D69D4}';
- RID_FacturasCliente_Detalles = '{A636830F-78D4-401D-9CD0-9A0BF195A8D9}';
+ RID_FacturasCliente = '{02DBD50A-E80C-4275-BFEE-BF157514D41F}';
+ RID_FacturasCliente_Detalles = '{642F747B-097F-4C29-B2A4-DCD4D2C33824}';
{ Data table names }
nme_FacturasCliente = 'FacturasCliente';
@@ -59,7 +59,8 @@ const
fld_FacturasClienteID_SUBCUENTA = 'ID_SUBCUENTA';
fld_FacturasClienteSUBCUENTA = 'SUBCUENTA';
fld_FacturasClienteID_EJERCICIO = 'ID_EJERCICIO';
- fld_FacturasClienteESTADO = 'ESTADO';
+ fld_FacturasClienteESTADO_EJERCICIO = 'ESTADO_EJERCICIO';
+ fld_FacturasClienteASIENTO_PUNTEADO = 'ASIENTO_PUNTEADO';
{ FacturasCliente field indexes }
idx_FacturasClienteID = 0;
@@ -104,7 +105,8 @@ const
idx_FacturasClienteID_SUBCUENTA = 39;
idx_FacturasClienteSUBCUENTA = 40;
idx_FacturasClienteID_EJERCICIO = 41;
- idx_FacturasClienteESTADO = 42;
+ idx_FacturasClienteESTADO_EJERCICIO = 42;
+ idx_FacturasClienteASIENTO_PUNTEADO = 43;
{ FacturasCliente_Detalles fields }
fld_FacturasCliente_DetallesID = 'ID';
@@ -141,7 +143,7 @@ const
type
{ IFacturasCliente }
IFacturasCliente = interface(IDAStronglyTypedDataTable)
- ['{93BE0E4C-8290-40F7-8644-B8914B454F0E}']
+ ['{6C1D0551-0751-4021-9476-820DA8DFDEC2}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -310,10 +312,14 @@ type
procedure SetID_EJERCICIOValue(const aValue: Integer);
function GetID_EJERCICIOIsNull: Boolean;
procedure SetID_EJERCICIOIsNull(const aValue: Boolean);
- function GetESTADOValue: String;
- procedure SetESTADOValue(const aValue: String);
- function GetESTADOIsNull: Boolean;
- procedure SetESTADOIsNull(const aValue: Boolean);
+ function GetESTADO_EJERCICIOValue: String;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String);
+ function GetESTADO_EJERCICIOIsNull: Boolean;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
+ function GetASIENTO_PUNTEADOValue: SmallInt;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+ function GetASIENTO_PUNTEADOIsNull: Boolean;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
{ Properties }
@@ -401,8 +407,10 @@ type
property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
- property ESTADO: String read GetESTADOValue write SetESTADOValue;
- property ESTADOIsNull: Boolean read GetESTADOIsNull write SetESTADOIsNull;
+ property ESTADO_EJERCICIO: String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull: Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO: SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull: Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
end;
{ TFacturasClienteDataTableRules }
@@ -579,10 +587,14 @@ type
procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
function GetID_EJERCICIOIsNull: Boolean; virtual;
procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
- function GetESTADOValue: String; virtual;
- procedure SetESTADOValue(const aValue: String); virtual;
- function GetESTADOIsNull: Boolean; virtual;
- procedure SetESTADOIsNull(const aValue: Boolean); virtual;
+ function GetESTADO_EJERCICIOValue: String; virtual;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String); virtual;
+ function GetESTADO_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetASIENTO_PUNTEADOValue: SmallInt; virtual;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt); virtual;
+ function GetASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -669,8 +681,10 @@ type
property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
- property ESTADO: String read GetESTADOValue write SetESTADOValue;
- property ESTADOIsNull: Boolean read GetESTADOIsNull write SetESTADOIsNull;
+ property ESTADO_EJERCICIO: String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull: Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO: SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull: Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -680,7 +694,7 @@ type
{ IFacturasCliente_Detalles }
IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable)
- ['{525EA5EE-4D61-4002-B935-03B3F4DC16BF}']
+ ['{010E516F-BB41-4392-8DDC-D0C2CE7144CF}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1773,25 +1787,46 @@ begin
DataTable.Fields[idx_FacturasClienteID_EJERCICIO].AsVariant := Null;
end;
-function TFacturasClienteDataTableRules.GetESTADOValue: String;
+function TFacturasClienteDataTableRules.GetESTADO_EJERCICIOValue: String;
begin
- result := DataTable.Fields[idx_FacturasClienteESTADO].AsString;
+ result := DataTable.Fields[idx_FacturasClienteESTADO_EJERCICIO].AsString;
end;
-procedure TFacturasClienteDataTableRules.SetESTADOValue(const aValue: String);
+procedure TFacturasClienteDataTableRules.SetESTADO_EJERCICIOValue(const aValue: String);
begin
- DataTable.Fields[idx_FacturasClienteESTADO].AsString := aValue;
+ DataTable.Fields[idx_FacturasClienteESTADO_EJERCICIO].AsString := aValue;
end;
-function TFacturasClienteDataTableRules.GetESTADOIsNull: boolean;
+function TFacturasClienteDataTableRules.GetESTADO_EJERCICIOIsNull: boolean;
begin
- result := DataTable.Fields[idx_FacturasClienteESTADO].IsNull;
+ result := DataTable.Fields[idx_FacturasClienteESTADO_EJERCICIO].IsNull;
end;
-procedure TFacturasClienteDataTableRules.SetESTADOIsNull(const aValue: Boolean);
+procedure TFacturasClienteDataTableRules.SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
begin
if aValue then
- DataTable.Fields[idx_FacturasClienteESTADO].AsVariant := Null;
+ DataTable.Fields[idx_FacturasClienteESTADO_EJERCICIO].AsVariant := Null;
+end;
+
+function TFacturasClienteDataTableRules.GetASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_FacturasClienteASIENTO_PUNTEADO].AsSmallInt;
+end;
+
+procedure TFacturasClienteDataTableRules.SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_FacturasClienteASIENTO_PUNTEADO].AsSmallInt := aValue;
+end;
+
+function TFacturasClienteDataTableRules.GetASIENTO_PUNTEADOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasClienteASIENTO_PUNTEADO].IsNull;
+end;
+
+procedure TFacturasClienteDataTableRules.SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasClienteASIENTO_PUNTEADO].AsVariant := Null;
end;
diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas
index 4e27b712..26e7ff0c 100644
--- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas
+++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas
@@ -9,13 +9,13 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
- RID_FacturasClienteDelta = '{889543CF-FBB1-4940-BA74-3ECB5DB8D2A6}';
- RID_FacturasCliente_DetallesDelta = '{883635DC-21EB-4728-8B22-A7C7D916ED6F}';
+ RID_FacturasClienteDelta = '{77786E5C-76FA-4B31-A625-81EEDB4F0EF5}';
+ RID_FacturasCliente_DetallesDelta = '{172DCD31-566D-43AD-B3BD-79D70B765BD3}';
type
{ IFacturasClienteDelta }
IFacturasClienteDelta = interface(IFacturasCliente)
- ['{889543CF-FBB1-4940-BA74-3ECB5DB8D2A6}']
+ ['{77786E5C-76FA-4B31-A625-81EEDB4F0EF5}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -59,7 +59,8 @@ type
function GetOldID_SUBCUENTAValue : Integer;
function GetOldSUBCUENTAValue : String;
function GetOldID_EJERCICIOValue : Integer;
- function GetOldESTADOValue : String;
+ function GetOldESTADO_EJERCICIOValue : String;
+ function GetOldASIENTO_PUNTEADOValue : SmallInt;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -104,7 +105,8 @@ type
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
- property OldESTADO : String read GetOldESTADOValue;
+ property OldESTADO_EJERCICIO : String read GetOldESTADO_EJERCICIOValue;
+ property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue;
end;
{ TFacturasClienteBusinessProcessorRules }
@@ -365,12 +367,18 @@ type
function GetOldID_EJERCICIOIsNull: Boolean; virtual;
procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
- function GetESTADOValue: String; virtual;
- function GetESTADOIsNull: Boolean; virtual;
- function GetOldESTADOValue: String; virtual;
- function GetOldESTADOIsNull: Boolean; virtual;
- procedure SetESTADOValue(const aValue: String); virtual;
- procedure SetESTADOIsNull(const aValue: Boolean); virtual;
+ function GetESTADO_EJERCICIOValue: String; virtual;
+ function GetESTADO_EJERCICIOIsNull: Boolean; virtual;
+ function GetOldESTADO_EJERCICIOValue: String; virtual;
+ function GetOldESTADO_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String); virtual;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetASIENTO_PUNTEADOValue: SmallInt; virtual;
+ function GetASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ function GetOldASIENTO_PUNTEADOValue: SmallInt; virtual;
+ function GetOldASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt); virtual;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -541,10 +549,14 @@ type
property ID_EJERCICIOIsNull : Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
property OldID_EJERCICIOIsNull : Boolean read GetOldID_EJERCICIOIsNull;
- property ESTADO : String read GetESTADOValue write SetESTADOValue;
- property ESTADOIsNull : Boolean read GetESTADOIsNull write SetESTADOIsNull;
- property OldESTADO : String read GetOldESTADOValue;
- property OldESTADOIsNull : Boolean read GetOldESTADOIsNull;
+ property ESTADO_EJERCICIO : String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull : Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property OldESTADO_EJERCICIO : String read GetOldESTADO_EJERCICIOValue;
+ property OldESTADO_EJERCICIOIsNull : Boolean read GetOldESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO : SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull : Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
+ property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue;
+ property OldASIENTO_PUNTEADOIsNull : Boolean read GetOldASIENTO_PUNTEADOIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -554,7 +566,7 @@ type
{ IFacturasCliente_DetallesDelta }
IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles)
- ['{883635DC-21EB-4728-8B22-A7C7D916ED6F}']
+ ['{172DCD31-566D-43AD-B3BD-79D70B765BD3}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
@@ -2068,35 +2080,66 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_EJERCICIO] := Null;
end;
-function TFacturasClienteBusinessProcessorRules.GetESTADOValue: String;
+function TFacturasClienteBusinessProcessorRules.GetESTADO_EJERCICIOValue: String;
begin
- result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteESTADO];
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteESTADO_EJERCICIO];
end;
-function TFacturasClienteBusinessProcessorRules.GetESTADOIsNull: Boolean;
+function TFacturasClienteBusinessProcessorRules.GetESTADO_EJERCICIOIsNull: Boolean;
begin
- result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteESTADO]);
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteESTADO_EJERCICIO]);
end;
-function TFacturasClienteBusinessProcessorRules.GetOldESTADOValue: String;
+function TFacturasClienteBusinessProcessorRules.GetOldESTADO_EJERCICIOValue: String;
begin
- result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteESTADO];
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteESTADO_EJERCICIO];
end;
-function TFacturasClienteBusinessProcessorRules.GetOldESTADOIsNull: Boolean;
+function TFacturasClienteBusinessProcessorRules.GetOldESTADO_EJERCICIOIsNull: Boolean;
begin
- result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteESTADO]);
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteESTADO_EJERCICIO]);
end;
-procedure TFacturasClienteBusinessProcessorRules.SetESTADOValue(const aValue: String);
+procedure TFacturasClienteBusinessProcessorRules.SetESTADO_EJERCICIOValue(const aValue: String);
begin
- BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteESTADO] := aValue;
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteESTADO_EJERCICIO] := aValue;
end;
-procedure TFacturasClienteBusinessProcessorRules.SetESTADOIsNull(const aValue: Boolean);
+procedure TFacturasClienteBusinessProcessorRules.SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
begin
if aValue then
- BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteESTADO] := Null;
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteESTADO_EJERCICIO] := Null;
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteASIENTO_PUNTEADO];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetASIENTO_PUNTEADOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteASIENTO_PUNTEADO]);
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteASIENTO_PUNTEADO];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldASIENTO_PUNTEADOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteASIENTO_PUNTEADO]);
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteASIENTO_PUNTEADO] := aValue;
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteASIENTO_PUNTEADO] := Null;
end;
diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
index f721fe9a..c6b1cfa5 100644
--- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
+++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
@@ -192,8 +192,12 @@ object srvFacturasCliente: TsrvFacturasCliente
TableField = 'ID_EJERCICIO'
end
item
- DatasetField = 'ESTADO'
- TableField = 'ESTADO'
+ DatasetField = 'ESTADO_EJERCICIO'
+ TableField = 'ESTADO_EJERCICIO'
+ end
+ item
+ DatasetField = 'ASIENTO_PUNTEADO'
+ TableField = 'ASIENTO_PUNTEADO'
end>
end>
Name = 'FacturasCliente'
@@ -423,9 +427,13 @@ object srvFacturasCliente: TsrvFacturasCliente
DataType = datInteger
end
item
- Name = 'ESTADO'
+ Name = 'ESTADO_EJERCICIO'
DataType = datString
Size = 255
+ end
+ item
+ Name = 'ASIENTO_PUNTEADO'
+ DataType = datSmallInt
end>
end
item
diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj
index 29be5bf7..b601adc1 100644
--- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj
+++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj
@@ -49,35 +49,35 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TForm
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm
index 38ac320f..7a17ac29 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm
@@ -3,7 +3,7 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
ClientWidth = 654
ExplicitWidth = 662
PixelsPerInch = 96
- TextHeight = 13
+ TextHeight = 13
object JvgWizardHeader1: TJvgWizardHeader [0]
Left = 0
Top = 0
@@ -54,10 +54,12 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
inherited TBXDock: TTBXDock
Top = 87
Width = 654
+ Height = 72
ExplicitTop = 87
ExplicitWidth = 654
+ ExplicitHeight = 72
inherited tbxMain: TTBXToolbar
- ExplicitWidth = 126
+ ExplicitWidth = 269
inherited TBXSubmenuItem2: TTBXSubmenuItem
Visible = False
end
@@ -72,12 +74,12 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
end
end
inherited tbxFiltro: TTBXToolbar
- Left = 126
+ Left = 269
Top = 23
DockPos = 104
DockRow = 1
Visible = False
- ExplicitLeft = 126
+ ExplicitLeft = 269
ExplicitTop = 23
inherited TBXItem34: TTBXItem
Action = actQuitarFiltro2
@@ -89,6 +91,7 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
inherited TBXTMain2: TTBXToolbar
Left = 334
ExplicitLeft = 334
+ ExplicitHeight = 23
end
end
inherited StatusBar: TJvStatusBar
@@ -141,18 +144,18 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
end
end
inherited frViewFacturasCliente1: TfrViewFacturasCliente [5]
- Top = 162
+ Top = 159
Width = 654
- Height = 449
- ExplicitTop = 162
+ Height = 452
+ ExplicitTop = 159
ExplicitWidth = 654
- ExplicitHeight = 449
+ ExplicitHeight = 452
inherited cxGrid: TcxGrid
Width = 654
- Height = 321
+ Height = 324
RootLevelOptions.DetailTabsPosition = dtpNone
ExplicitWidth = 654
- ExplicitHeight = 321
+ ExplicitHeight = 324
inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = <
item
@@ -184,29 +187,43 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
Width = 654
ExplicitWidth = 654
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 343
Width = 343
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 654
+ ExplicitWidth = 654
inherited tbxBotones: TTBXToolbar
Width = 644
+ ExplicitWidth = 644
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
- Top = 423
- ExplicitTop = 423
+ Top = 426
+ ExplicitTop = 426
ExplicitWidth = 654
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 654
@@ -270,6 +287,8 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
end
inherited JsNuevoAbonoDialog: TJSDialog [18]
end
+ inherited JsListaFacturasNoEliminadas: TJSDialog [19]
+ end
object EditorSeleccionActionList: TActionList
Images = SmallImages
Left = 152
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas
index 74268417..71cfe3b0 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas
@@ -1,4 +1,4 @@
-{
+{
===============================================================================
Copyright (©) 2007. Rodax Software.
===============================================================================
@@ -37,7 +37,7 @@ uses
uViewFacturasCliente, uEditorFacturasCliente, uBizFacturasCliente, uIEditorElegirFacturasCliente,
Buttons, cxRadioGroup, cxMaskEdit, cxDropDownEdit, cxCalendar, cxControls,
- cxContainer, cxEdit, cxTextEdit, TBXDkPanels, JSDialog;
+ cxContainer, cxEdit, cxTextEdit, TBXDkPanels, JSDialog, uDAInterfaces;
type
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
index 9f1a59ae..a64c153a 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
@@ -68,25 +68,30 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
end
end
+ inherited StatusBar: TJvStatusBar
+ Top = 643
+ Width = 860
+ Panels = <
+ item
+ Width = 200
+ end>
+ ExplicitTop = 643
+ ExplicitWidth = 860
+ end
inherited pgPaginas: TPageControl
Width = 854
- Height = 398
+ Height = 360
ActivePage = pagContabilidad
OnChanging = pgPaginasChanging
- ExplicitLeft = 3
- ExplicitTop = 79
ExplicitWidth = 854
- ExplicitHeight = 398
+ ExplicitHeight = 360
inherited pagGeneral: TTabSheet
- ExplicitLeft = 4
- ExplicitTop = 24
ExplicitWidth = 846
- ExplicitHeight = 370
inline frViewFacturaCliente1: TfrViewFacturaCliente
Left = 0
Top = 0
Width = 846
- Height = 370
+ Height = 332
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -97,12 +102,12 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 846
- ExplicitHeight = 370
+ ExplicitHeight = 332
inherited dxLayoutControl1: TdxLayoutControl
Width = 846
- Height = 370
+ Height = 332
ExplicitWidth = 846
- ExplicitHeight = 370
+ ExplicitHeight = 332
inherited eReferencia: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
@@ -138,8 +143,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 78
end
inherited bFormasPago: TButton
- Left = 289
- ExplicitLeft = 289
+ Left = 280
+ ExplicitLeft = 280
end
inherited frViewTienda1: TfrViewTienda
inherited dxLayoutControl1: TdxLayoutControl
@@ -154,9 +159,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
end
inherited frViewClienteFactura1: TfrViewClienteFactura
- Left = 449
+ Left = 440
Width = 398
- ExplicitLeft = 449
+ ExplicitLeft = 440
ExplicitWidth = 398
inherited dxLayoutControl1: TdxLayoutControl
Width = 398
@@ -205,16 +210,16 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 276
end
inherited edtCodigoPostal: TcxDBTextEdit
- Left = 283
+ Left = 275
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 283
+ ExplicitLeft = 275
end
inherited Button3: TBitBtn
- Left = 173
- ExplicitLeft = 173
+ Left = 165
+ ExplicitLeft = 165
end
inherited cxDBTextEdit1: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
@@ -244,7 +249,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Left = 0
Top = 0
Width = 846
- Height = 370
+ Height = 332
Align = alClient
BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET
@@ -257,7 +262,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 846
- ExplicitHeight = 370
+ ExplicitHeight = 332
inherited ToolBar1: TToolBar
Width = 846
Height = 24
@@ -287,67 +292,67 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 57
end
inherited UpDown1: TUpDown
- Left = 570
+ Left = 586
Top = 0
- ExplicitLeft = 570
+ ExplicitLeft = 586
ExplicitTop = 0
end
inherited ToolButton13: TToolButton
- Left = 587
+ Left = 603
Top = 0
- ExplicitLeft = 587
+ ExplicitLeft = 603
ExplicitTop = 0
end
inherited ToolButton6: TToolButton
- Left = 595
+ Left = 611
Top = 0
- ExplicitLeft = 595
+ ExplicitLeft = 611
ExplicitTop = 0
end
inherited ToolButton7: TToolButton
- Left = 629
+ Left = 645
Top = 0
- ExplicitLeft = 629
+ ExplicitLeft = 645
ExplicitTop = 0
end
inherited ToolButton8: TToolButton
- Left = 663
+ Left = 679
Top = 0
- ExplicitLeft = 663
+ ExplicitLeft = 679
ExplicitTop = 0
end
inherited ToolButton12: TToolButton
- Left = 697
+ Left = 713
Top = 0
- ExplicitLeft = 697
+ ExplicitLeft = 713
ExplicitTop = 0
end
inherited ToolButton9: TToolButton
- Left = 705
+ Left = 721
Top = 0
- ExplicitLeft = 705
+ ExplicitLeft = 721
ExplicitTop = 0
end
inherited ToolButton10: TToolButton
- Left = 739
+ Left = 755
Top = 0
- ExplicitLeft = 739
+ ExplicitLeft = 755
ExplicitTop = 0
end
inherited ToolButton11: TToolButton
- Left = 773
+ Left = 789
Top = 0
- ExplicitLeft = 773
+ ExplicitLeft = 789
ExplicitTop = 0
end
end
inherited cxGrid: TcxGrid
Top = 50
Width = 846
- Height = 320
+ Height = 282
ExplicitTop = 50
ExplicitWidth = 846
- ExplicitHeight = 320
+ ExplicitHeight = 282
end
inherited TBXDock1: TTBXDock
Top = 24
@@ -411,17 +416,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
end
end
- inherited StatusBar: TJvStatusBar
- Top = 643
- Width = 860
- Panels = <
- item
- Width = 200
- end>
- ExplicitTop = 643
- ExplicitWidth = 860
+ inherited PnlComentario: TPanel
end
- inline frViewTotales1: TfrViewTotales [4]
+ inline frViewTotales1: TfrViewTotales [5]
Left = 0
Top = 480
Width = 860
@@ -631,17 +628,17 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
end
end
- inherited EditorActionList: TActionList [5]
+ inherited EditorActionList: TActionList [6]
Left = 8
Top = 144
end
- inherited SmallImages: TPngImageList [6]
+ inherited SmallImages: TPngImageList [7]
end
- inherited LargeImages: TPngImageList [7]
+ inherited LargeImages: TPngImageList [8]
end
- inherited JvFormStorage: TJvFormStorage [8]
+ inherited JvFormStorage: TJvFormStorage [9]
end
- inherited dsDataTable: TDADataSource [10]
+ inherited dsDataTable: TDADataSource [11]
Top = 144
end
end
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
index fc4e1f4e..701138f4 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
@@ -17,7 +17,7 @@ uses
uViewDetallesFacturaCliente, dxLayoutLookAndFeels, JvExComCtrls, JvStatusBar,
uViewDetallesDTO, uViewDetallesArticulos, uTiposIVAController, uDAInterfaces,
cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit, Grids, DBGrids,
- cxCheckBox, uViewListaSubCuentas;
+ cxCheckBox, uViewListaSubCuentas, JvgWizardHeader;
type
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm
index 8a9f4d9d..a34352dd 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm
@@ -62,9 +62,10 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
end
inherited TBXTMain2: TTBXToolbar
Visible = True
- ExplicitWidth = 66
+ ExplicitWidth = 83
object TBXItem40: TTBXItem
Action = actInformes
+ DisplayMode = nbdmImageAndText
end
end
end
@@ -267,6 +268,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
object actInformes: TAction
Category = 'Archivo'
Caption = 'Informes'
+ ImageIndex = 25
OnExecute = actInformesExecute
end
end
@@ -993,6 +995,27 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
064200A70120096201BA0100A6C62916A56F74520000000049454E44AE426082}
Name = 'PngImage24'
Background = clWindow
+ end
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000000970485973000017120000171201679FD252000001A24944415478DA
+ 63FC61C0F09F71F72C86FFAE690C307A76D176065C2037CE9311C6FEFFFF3F03
+ E3CFD7B3FEFFEF5DC7C0D0B003883D18188B8318D84452E11AFE0115FDFDFB0F
+ 8CE7ACDACB306FE92686F33BA733C20D00B980E10403031BDB6F865FBF581918
+ 2C1818D8CFFF47D1FC076AC082B5FB1974D455188AEAFAC086E07481FB5A3B0C
+ A7AF8F926358B2E12043B0A70DC3CD7B2FC0869CDB318D91115B18B09E45D8FA
+ F71F82BD7CF361B01760006C008C3379D1F6FF39B11E0C5316EF6020047C9CCC
+ 1882926B300DC88C766330F5CA6138B26102D04654FF835C02A237EE39C9E061
+ 67C210965E8769405A840B83856F1E5EDB93A2FD189CAD0D19A2B31A310D480A
+ 7542B11542FF87DAFE1FC8FFCBF0E70F443C3EAF19D380B8400706FFA50F0986
+ 419F2D374372511BA601D17E76105BFFC1FCFD1FC287DAFA1BC90519A51D9806
+ 847BDB30ACDC7A84A00B8C74D419722ABB310D08F6B062F08EAD60583FAF151E
+ 06C8FE06D1A72E5E63D0D3546528A8E9C53420C0D582C12FA18A602CC0923386
+ 01BECEE6509BFE426D4762435D014AFF2080D500E4644A0C00190000D63E5BF0
+ 41A130430000000049454E44AE426082}
+ Name = 'PngImage25'
+ Background = clWindow
end>
Left = 395
Bitmap = {}
@@ -3383,37 +3406,44 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
end
object JsListaFacturasNoEliminadas: TJSDialog
Glyph.Data = {
- 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
- 00001C0806000000720DDF940000000970485973000017120000171201679FD2
- 520000000467414D410000B18E7CFB5193000003104944415478DAAD96FB4B14
- 5114C7CFE463DC1E606444BFF54424D3DC55CA52B1CCD7165A219905054182FD
- 1452FD5810FD100406610A669A998FC4F5BDB6266265DAB60F5DD15E58FE03B2
- 3F99D29ABBA7B9779C71C61D9D6177CFCE70CFDCB97B3EF7DCF3BD33C38082FD
- B502B2B300CC656020048688A24F036233A0671F40D43160BA87BF62AEEE1010
- 60D7AE293AD8B835815E9B625C80DC8F1E88D4A7C1E8C1FB8F9FD6C3C44035B3
- 21500A65F6D700FE2EA580A5EC551F4A50359316B31D76EFDC0EE5F72A645045
- A067AE0623074B8140891108F1057064CC0D556053DF173812B707E6DCF332A8
- 225080D201DB4AF99BF335B4D502F371415BCC364833C4C29F458F0C2A031281
- 081734AB0B3C88403C1E6E3E2E7960F6A8FFD27A7D3EF07A11DA2C76C84A8D87
- A57FCB32E8B8A54A4C8C21B59365C9015996EF2240B6634DF435B51460A46D1F
- 70C093AA46BF09C980C12CA914E6F371ADD707EF1DB3B0B0B8006EB79B8EA96B
- EA5106121851245129118FD8BFA2DC5C53C6BAF5EBBBBA97C2D64EC064195B1F
- 286C76E956A0EA5C51AEB4764A9929F5750D5A9581D2274B9B651C0BA2F514A8
- 6F28E36B70AD9A4253EF97A9AA55B0CEBA87D03B645B3F43C1DE589C58186D10
- 81150FCAC57B11E161B04517099BB953C78643141B01BA28EEE4DAB0B04DE2B8
- CA460B9C399902E661BB3AB0F5AD038BF30CD4D7E7DD14815A61023027DD00EF
- 469C1A80FD1C307F1578FD4A81E665945AD68924181A9D5007B6F4DBF1527E32
- F5C9D3632351F8F549AEE916B14EAA039BCD362C31A6040D23E7887D4A03B0CF
- 86C5C6641A24BB7646D3F2D51A77F8C1BCDCFFC79CD3EAC0D7BD56AE86294165
- 4660CB5C6B737DD3062CCA31D00069E76E05241862CF1EDD05E7D40F756063CF
- 673C7F5A4F679A59541EF03E4C8C3B0893DF67D481AFBAC7B0F05412CD30EBE2
- ED80F7617CEC0198FEF94B1BF06C6622AD4B4EC99D80F7A1666043D7281A3312
- FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312
- 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA
- 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082}
- Instruction.Text =
- 'Las siguientes facturas no han podido ser eliminadas, porque tie' +
- 'nen recibos con pagos o devoluciones emitidas'
+ 0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
+ 000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
+ 4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
+ 80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
+ 0AE900000AE901FD75CED3000003F049444154484BBD557B6C53651C3D7DAD7B
+ B0ADADC0363ADDA0834D2DDA6E5904A24C17E64864BAF8484C348E104940FD47
+ 128D31121213134DD4C4F8644F794C6413188E81A003B3A15B8AC87C4CA39D9A
+ 685013515B36D8B3F7E7F9AEDCDAB9760F62BCC94D9ADEEF3BE7FCCE777EBFCF
+ 2422F8DF9ED781A56D0EFB730D56945D0EA9BE3F2F676F3D70DF36C01C15FF0A
+ 30AF333BB9E9E74ADF68E4A12A19A8F0851BADB869B6242F00292DD9AE6DBD2B
+ BD43273D4E79371D5A1DB05527B807B0BCE7C0FEC1EB20A3373A447B60B5688F
+ 544BF0567FA8113393D45970F3C9E265FD7D371448E77C93746442DB6945B322
+ D5099ACCD8F8DBD5D0467C90E1EB21178A6D3276979F247748B0A2385C6FC5EA
+ 789550A1EBD02247DD57AB964DF4E4A7C9072E487B06B426139E55A2D51E9DE0
+ 656051201B030A7C885584BC9073D740C2E55789B6799D0C54964CB1EB0D6065
+ 4F81EBC76FFDD9F2E17CE8E0B465BCC18C4763C544CF603B5074C68D5FFFBC16
+ C26AE49742C84F4B21677D193252532EC1B5A521E34C76D9CD0FF67B175CFCCC
+ 931A056F4BC3700370FFBF2B9D94D02660455F2E060DF01F3C90E062C8371E8B
+ FC5EE593606569B8353D69F7803F2B12C8B546C10F109CA9B92D9E8D535A6087
+ 05EBFADC1835C0BFCE837C7125E44C2EC94A72E4F4E264F928CB2427AE80BCEF
+ 841C9C8771567F6FA2B4C5EDB15D366CF8D48D8928B81B722A07D29305E95E80
+ 28383D8FD0F387A78B72C2266E4EC29304D5782E71C10F5D4ACB4C7D92904075
+ E1DE64040254FE319577C5283F9209A1EF5A1DE34802D39C2BA0A7B6B7D3936A
+ BFBC65B966801FA7E7C7E8F96182D31AD99F06D9930CAD16786A4E04044F6D77
+ BB0E9CDB52239F143A75E5F1C05B52206FD9216F5A75922DB33A6482671E5B92
+ 73E2E2E335F25DA57F0A382DFB638F1DE70DF09D3648A305B2DD840936DEA669
+ 634ACFAD47721D1D639BAA24B47EAD742D344D52DE9A82610A287B0D286C34A3
+ 7B87F56FF05A1384E0C2293AC66F35091BAD25DDF6F460758936B1A1424E79D2
+ A593AD7FD401E9C880EC4B458436AC3736B770CE10F431FE7741811BEF25128E
+ A17F1E3D4554527E7655FEB8DCE993EF4BDD93C0555AEA4D783E5EF954EC2568
+ 2F5F2D8668E455A0CA58AF139C2E5AD82FD5CBE5FC9A0239CE716B2867970A3B
+ BB4BA52AD121D2DA24126D25C9704C2543DCB3263A4DBBF39DAD91DBBD12C84B
+ 9904DE6CC7A0BAA1666A26F59D80C524E88BA924AC26AE5E418305777F5EE414
+ 5E3AC20E95362A6752D48DB47936E0C69A97003B053DA3CE82E0115A55A613A8
+ 32391A7ADBD9400AFC9D5426C48CA3AA9BE74260ACA5652BF8BE18B548FDE0F5
+ E662F40E2BE5CC77880B965C0EF8B4F7818A1F6D7982F1DBF85F801B15FC059E
+ 6028BEE22B69170000000049454E44AE426082}
+ Instruction.Text = 'Las siguientes facturas no han podido ser eliminadas:'
Instruction.Glyph.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
00001C0806000000720DDF940000000970485973000017120000171201679FD2
@@ -3679,7 +3709,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
0007F0000007F0000007F0000007F0000007F0000007F0000007800000078000
0007C0000007C000000700000007000000070000000700000007C000000FC000
001F8000003F800000FFF8FFFFFF}
- Width = 450
+ Width = 600
Left = 184
Top = 112
end
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas
index cbf697cf..698bedcb 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas
@@ -12,7 +12,8 @@ uses
uEditorGridBase,
uBizFacturasCliente, uIEditorFacturasCliente, uFacturasClienteController,
uCustomView, uViewBase, uViewBarraSeleccion, uViewGridBase,
- uViewFacturasCliente, JvExComCtrls, JvStatusBar, JSDialog, uDAInterfaces;
+ uViewFacturasCliente, JvExComCtrls, JvStatusBar, JSDialog, uDAInterfaces,
+ dxGDIPlusClasses;
type
@@ -80,9 +81,7 @@ procedure TfEditorFacturasCliente.actEliminarUpdate(Sender: TObject);
begin
inherited;
if (Sender as TAction).Enabled then
- (Sender as TAction).Enabled := (FFacturas.SITUACION = 'PENDIENTE')
- //Si el ejercicio al que pertenece la factura esta cerrado no se podrá eliminar
- and (FFacturas.ESTADO <> CTE_CERRADO);
+ (Sender as TAction).Enabled := (FFacturas.SITUACION = 'PENDIENTE');
end;
procedure TfEditorFacturasCliente.actInformesExecute(Sender: TObject);
@@ -183,9 +182,12 @@ var
ACadena : String;
AFacturas: IBizFacturaCliente;
AllItems: Boolean;
+ AListaCausas: TStringList;
+
begin
AFacturas := Nil;
AllItems := False;
+ AListaCausas := TStringList.Create;
if MultiSelect and Assigned(ViewGrid) then
AllItems := (ViewGrid.NumSeleccionados > 1);
@@ -210,34 +212,46 @@ begin
if Assigned(AFacturas) then
begin
- if (not FController.Eliminar(AFacturas, AllItems))
- and (not AllItems) then //Es el caso de querer borrar una factura pendiente cuyos recibos tienen devoluciones
+ if (not FController.Eliminar(AFacturas, AllItems, AListaCausas))
+ //En el caso de querer borrar una factura pendiente cuyos recibos tienen devoluciones
+ and (not AllItems) then
begin
JsListaFacturasNoEliminadas.Content.Clear;
JsListaFacturasNoEliminadas.Content.Add('Ref. factura: ' + AFacturas.REFERENCIA + ' ' + AFacturas.NOMBRE);
- JsListaFacturasNoEliminadas.Execute;
+ if Length(VarToStr(AListaCausas.Values[IntToStr(AFacturas.ID)])) > 0 then
+ JsListaFacturasNoEliminadas.Content.Add(VarToStr(AListaCausas.Values[IntToStr(AFacturas.ID)]))
+ else
+ JsListaFacturasNoEliminadas.Content.Add('La factura puede tener algún recibo devuelto y no puede ser eliminada');
+ JsListaFacturasNoEliminadas.Execute;
end;
+
if AllItems then
begin
if (AFacturas.DataTable.RecordCount > 0) then
begin
with AFacturas.DataTable do
begin
- JsListaFacturasNoEliminadas.Content.Clear;
+ JsListaFacturasNoEliminadas.Content.Clear;
First;
while not EOF do
begin
JsListaFacturasNoEliminadas.Content.Add('Ref. factura: ' + AFacturas.REFERENCIA + ' ' + AFacturas.NOMBRE);
+ if Length(AListaCausas.Values[IntToStr(AFacturas.ID)]) > 0 then
+ JsListaFacturasNoEliminadas.Content.Add(VarToStr(AListaCausas.Values[IntToStr(AFacturas.ID)]))
+ else
+ JsListaFacturasNoEliminadas.Content.Add('La factura puede tener algún recibo devuelto y no puede ser eliminada');
+ JsListaFacturasNoEliminadas.Content.Add('');
Next;
end;
end;
JsListaFacturasNoEliminadas.Execute;
end;
actRefrescar.Execute;
- end;
+ end
end;
+ AListaCausas.Free;
ViewGrid.GotoFirst;
end;
diff --git a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas
index 2a0d22d1..26550284 100644
--- a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas
+++ b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas
@@ -30,7 +30,7 @@ type
function Anadir(AFactura : IBizFacturaProveedor; const IDPedido : Integer): Boolean; overload;
function Eliminar(const ID : Integer): Boolean; overload;
- function Eliminar(AFactura : IBizFacturaProveedor; AllItems: Boolean = false): Boolean; overload;
+ function Eliminar(AFactura : IBizFacturaProveedor; AllItems: Boolean = false; AListaCausas: TStringList = nil): Boolean; overload;
function Guardar(AFactura : IBizFacturaProveedor): Boolean;
procedure DescartarCambios(AFactura : IBizFacturaProveedor);
function Existe(const ID: Integer) : Boolean;
@@ -42,8 +42,6 @@ type
procedure Print(AFactura : IBizFacturaProveedor; AllItems: Boolean = false);
procedure RecalcularImportes(FFactura: IBizFacturaProveedor);
- function EsModificable(AFactura: IBizFacturaProveedor): Boolean;
- function EsEliminable(AFactura: IBizFacturaProveedor): Boolean;
function ElegirFacturas(AFacturas : IBizFacturaProveedor; AMensaje: String; AMultiSelect: Boolean): IBizFacturaProveedor;
function ExtraerSeleccionados(ARecibosProveedor: IBizFacturaProveedor) : IBizFacturaProveedor;
@@ -84,7 +82,7 @@ type
destructor Destroy; override;
function Eliminar(const ID : Integer): Boolean; overload;
- function Eliminar(AFactura : IBizFacturaProveedor; AllItems: Boolean = false): Boolean; overload;
+ function Eliminar(AFactura : IBizFacturaProveedor; AllItems: Boolean = false; AListaCausas: TStringList = nil): Boolean; overload;
function Guardar(AFactura : IBizFacturaProveedor): Boolean;
procedure DescartarCambios(AFactura : IBizFacturaProveedor); virtual;
function Existe(const ID: Integer) : Boolean; virtual;
@@ -106,8 +104,8 @@ type
procedure Print(AFactura : IBizFacturaProveedor; AllItems: Boolean = false);
procedure RecalcularImportes(FFactura: IBizFacturaProveedor);
- function EsModificable(AFactura: IBizFacturaProveedor): Boolean;
- function EsEliminable(AFactura: IBizFacturaProveedor): Boolean;
+ function EsModificable(AFactura: IBizFacturaProveedor; var AComentario: Variant): Boolean;
+ function EsEliminable(AFactura: IBizFacturaProveedor; var AComentario: Variant): Boolean;
function ElegirFacturas(AFacturas : IBizFacturaProveedor; AMensaje: String; AMultiSelect: Boolean): IBizFacturaProveedor;
function ExtraerSeleccionados(AFacturasProveedor: IBizFacturaProveedor) : IBizFacturaProveedor;
@@ -603,12 +601,13 @@ begin
//CONTABILIDAD
ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID;
- ESTADO := AppFactuGES.EjercicioActivo.ESTADO;
+ ESTADO_EJERCICIO := AppFactuGES.EjercicioActivo.ESTADO;
+ ASIENTO_PUNTEADO := -1;
//En el caso de que el ejercicio este cerrado dejamos duplicar factura sin asociar a contabilidad.
- if ESTADO = CTE_CERRADO then
+ if ESTADO_EJERCICIO = CTE_CERRADO then
begin
IGNORAR_CONTABILIDAD := 1;
- ESTADO := '';
+ ESTADO_EJERCICIO := '';
end;
end;
@@ -704,6 +703,7 @@ end;
procedure TFacturasProveedorController.Ver(AFactura: IBizFacturaProveedor);
var
AEditor : IEditorFacturaProveedor;
+ AComentario : Variant;
begin
AEditor := NIL;
@@ -718,10 +718,11 @@ begin
Factura := AFactura;
//MODO CONSULTAR
- if not EsModificable(AFactura) then
+ if not EsModificable(AFactura, AComentario) then
begin
SetDataTableReadOnly(AFactura.DataTable, True);
ReadOnly := True;
+ AEditor.Comentario := AComentario;
end;
ShowModal;
@@ -796,13 +797,14 @@ begin
}
end;
-function TFacturasProveedorController.Eliminar(AFactura: IBizFacturaProveedor; AllItems: Boolean = false): Boolean;
-//En el caso de eliminar almenos un elemento del conjunto se devuelve true
+function TFacturasProveedorController.Eliminar(AFactura: IBizFacturaProveedor; AllItems: Boolean = false; AListaCausas: TStringList = nil): Boolean;
+//Solo devolverá true en el caso de eliminar todos y cada uno de los elementos a eliminar
var
bEliminado: Boolean;
+ ACausa: Variant;
begin
- bEliminado := False;
+ bEliminado := True;
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignada');
@@ -816,11 +818,14 @@ begin
AFactura.Cancel;
//Siempre eliminaremos el seleccionado
- if EsEliminable(AFactura) then
+ if not EsEliminable(AFactura, ACausa) then
begin
+ if Assigned(AListaCausas) then
+ AListaCausas.Add(Format('%d=%s', [AFactura.ID, ACausa]));
+ bEliminado := False;
+ end
+ else
AFactura.Delete;
- bEliminado := True;
- end;
//En el caso de querer eliminar todos los items del objeto AAlbaran
if AllItems then
@@ -830,48 +835,77 @@ begin
First;
while not EOF do
begin
- if EsEliminable(AFactura) then
+ if not EsEliminable(AFactura, ACausa) then
begin
- AFactura.Delete;
- bEliminado := True
+ if Assigned(AListaCausas) then
+ AListaCausas.Add(Format('%d=%s', [AFactura.ID, ACausa]));
+ bEliminado := False;
+ Next;
end
- else Next;
+ else
+ AFactura.Delete;
end;
end;
end;
- if bEliminado then
- begin
- try
+ try
AFactura.DataTable.ApplyUpdates;
- Result := True
- except
- //En el caso de una factura que tiene recibos con devoluciones hechas no se puede borrar aunque la factura este en situacion de pendiente
- AFactura.DataTable.CancelUpdates;
- Result := False;
- end;
- end
- else
- Result := False;
+ except
+ //En el caso de una factura que tiene recibos con devoluciones hechas no se
+ //puede borrar aunque la factura este en situacion de pendiente
+ AFactura.DataTable.CancelUpdates;
+ Result := False;
+ end;
finally
HideHourglassCursor;
end;
end;
-function TFacturasProveedorController.EsEliminable(AFactura: IBizFacturaProveedor): Boolean;
+function TFacturasProveedorController.EsEliminable(AFactura: IBizFacturaProveedor; var AComentario: Variant): Boolean;
begin
- Result := EsModificable(AFactura);
+ if not Assigned(AFactura) then
+ raise Exception.Create ('Factura no asignado: EsEliminable');
+
+ if (AFactura.SITUACION <> CTE_PENDIENTE) then
+ begin
+ Result := False;
+ AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser eliminada';
+ end
+ else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then
+ begin
+ Result := False;
+ AComentario := 'La factura tiene un asiento asociado en la parte contable cuyo ejercicio esta cerrado, por lo que no puede ser eliminada';
+ end
+ else if (AFactura.ASIENTO_PUNTEADO > 0) then
+ begin
+ Result := False;
+ AComentario := 'La factura tiene un asiento asociado en la parte contable y está punteado, por lo que no puede ser eliminada';
+ end;
end;
-function TFacturasProveedorController.EsModificable(AFactura: IBizFacturaProveedor): Boolean;
+function TFacturasProveedorController.EsModificable(AFactura: IBizFacturaProveedor; var AComentario: Variant): Boolean;
begin
+ AComentario := Null;
+
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignado: EsModificable');
- Result := (AFactura.SITUACION = CTE_PENDIENTE)
- //Si el ejercicio al que pertenece la factura esta cerrado no se podrá eliminar
- and (AFactura.ESTADO <> CTE_CERRADO);
+ if (AFactura.SITUACION <> CTE_PENDIENTE) then
+ begin
+ Result := False;
+ AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser modificada';
+ end
+ else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then
+ begin
+ Result := False;
+ AComentario := 'La factura tiene un asiento asociado en la parte contable cuyo ejercicio esta cerrado, por lo que no puede ser modificada';
+ end
+ else if (AFactura.ASIENTO_PUNTEADO > 0) then
+ begin
+ Result := False;
+ AComentario := 'La factura tiene un asiento asociado en la parte contable y está punteado, por lo que no puede ser modificada';
+ end;
end;
procedure TFacturasProveedorController.RecalcularImportes(FFactura: IBizFacturaProveedor);
diff --git a/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm
index 59e6273c..74afba48 100644
--- a/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm
+++ b/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm
@@ -272,9 +272,13 @@ inherited DataModuleFacturasProveedor: TDataModuleFacturasProveedor
DataType = datInteger
end
item
- Name = 'ESTADO'
+ Name = 'ESTADO_EJERCICIO'
DataType = datString
Size = 255
+ end
+ item
+ Name = 'ASIENTO_PUNTEADO'
+ DataType = datSmallInt
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
diff --git a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas
index 452390a2..65ecbbfc 100644
--- a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas
+++ b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas
@@ -9,8 +9,8 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
- RID_FacturasProveedor = '{C464B4AA-6A1C-4808-BDA7-3FE27191FA2D}';
- RID_FacturasProveedor_Detalles = '{B4F5B47A-FAF2-4B14-A8D8-15041FC8CE5C}';
+ RID_FacturasProveedor = '{65925C03-CA37-4D4C-A571-E55853C26BA9}';
+ RID_FacturasProveedor_Detalles = '{10E36F34-C565-4C28-B800-2E679843DCED}';
{ Data table names }
nme_FacturasProveedor = 'FacturasProveedor';
@@ -57,7 +57,8 @@ const
fld_FacturasProveedorID_SUBCUENTA = 'ID_SUBCUENTA';
fld_FacturasProveedorSUBCUENTA = 'SUBCUENTA';
fld_FacturasProveedorID_EJERCICIO = 'ID_EJERCICIO';
- fld_FacturasProveedorESTADO = 'ESTADO';
+ fld_FacturasProveedorESTADO_EJERCICIO = 'ESTADO_EJERCICIO';
+ fld_FacturasProveedorASIENTO_PUNTEADO = 'ASIENTO_PUNTEADO';
{ FacturasProveedor field indexes }
idx_FacturasProveedorID = 0;
@@ -100,7 +101,8 @@ const
idx_FacturasProveedorID_SUBCUENTA = 37;
idx_FacturasProveedorSUBCUENTA = 38;
idx_FacturasProveedorID_EJERCICIO = 39;
- idx_FacturasProveedorESTADO = 40;
+ idx_FacturasProveedorESTADO_EJERCICIO = 40;
+ idx_FacturasProveedorASIENTO_PUNTEADO = 41;
{ FacturasProveedor_Detalles fields }
fld_FacturasProveedor_DetallesID = 'ID';
@@ -137,7 +139,7 @@ const
type
{ IFacturasProveedor }
IFacturasProveedor = interface(IDAStronglyTypedDataTable)
- ['{E97B9FEC-9473-41EC-B567-C1130AFB9389}']
+ ['{F2F30017-EDDC-4294-8A13-93D1B4D70D0C}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -298,10 +300,14 @@ type
procedure SetID_EJERCICIOValue(const aValue: Integer);
function GetID_EJERCICIOIsNull: Boolean;
procedure SetID_EJERCICIOIsNull(const aValue: Boolean);
- function GetESTADOValue: String;
- procedure SetESTADOValue(const aValue: String);
- function GetESTADOIsNull: Boolean;
- procedure SetESTADOIsNull(const aValue: Boolean);
+ function GetESTADO_EJERCICIOValue: String;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String);
+ function GetESTADO_EJERCICIOIsNull: Boolean;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
+ function GetASIENTO_PUNTEADOValue: SmallInt;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+ function GetASIENTO_PUNTEADOIsNull: Boolean;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
{ Properties }
@@ -385,8 +391,10 @@ type
property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
- property ESTADO: String read GetESTADOValue write SetESTADOValue;
- property ESTADOIsNull: Boolean read GetESTADOIsNull write SetESTADOIsNull;
+ property ESTADO_EJERCICIO: String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull: Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO: SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull: Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
end;
{ TFacturasProveedorDataTableRules }
@@ -555,10 +563,14 @@ type
procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
function GetID_EJERCICIOIsNull: Boolean; virtual;
procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
- function GetESTADOValue: String; virtual;
- procedure SetESTADOValue(const aValue: String); virtual;
- function GetESTADOIsNull: Boolean; virtual;
- procedure SetESTADOIsNull(const aValue: Boolean); virtual;
+ function GetESTADO_EJERCICIOValue: String; virtual;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String); virtual;
+ function GetESTADO_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetASIENTO_PUNTEADOValue: SmallInt; virtual;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt); virtual;
+ function GetASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -641,8 +653,10 @@ type
property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
- property ESTADO: String read GetESTADOValue write SetESTADOValue;
- property ESTADOIsNull: Boolean read GetESTADOIsNull write SetESTADOIsNull;
+ property ESTADO_EJERCICIO: String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull: Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO: SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull: Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -652,7 +666,7 @@ type
{ IFacturasProveedor_Detalles }
IFacturasProveedor_Detalles = interface(IDAStronglyTypedDataTable)
- ['{3D36CBEE-5B8B-47BA-A5DA-54E5E4F98D32}']
+ ['{FB8F2FD1-E2A2-42EE-8027-9B399F363BB6}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1703,25 +1717,46 @@ begin
DataTable.Fields[idx_FacturasProveedorID_EJERCICIO].AsVariant := Null;
end;
-function TFacturasProveedorDataTableRules.GetESTADOValue: String;
+function TFacturasProveedorDataTableRules.GetESTADO_EJERCICIOValue: String;
begin
- result := DataTable.Fields[idx_FacturasProveedorESTADO].AsString;
+ result := DataTable.Fields[idx_FacturasProveedorESTADO_EJERCICIO].AsString;
end;
-procedure TFacturasProveedorDataTableRules.SetESTADOValue(const aValue: String);
+procedure TFacturasProveedorDataTableRules.SetESTADO_EJERCICIOValue(const aValue: String);
begin
- DataTable.Fields[idx_FacturasProveedorESTADO].AsString := aValue;
+ DataTable.Fields[idx_FacturasProveedorESTADO_EJERCICIO].AsString := aValue;
end;
-function TFacturasProveedorDataTableRules.GetESTADOIsNull: boolean;
+function TFacturasProveedorDataTableRules.GetESTADO_EJERCICIOIsNull: boolean;
begin
- result := DataTable.Fields[idx_FacturasProveedorESTADO].IsNull;
+ result := DataTable.Fields[idx_FacturasProveedorESTADO_EJERCICIO].IsNull;
end;
-procedure TFacturasProveedorDataTableRules.SetESTADOIsNull(const aValue: Boolean);
+procedure TFacturasProveedorDataTableRules.SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
begin
if aValue then
- DataTable.Fields[idx_FacturasProveedorESTADO].AsVariant := Null;
+ DataTable.Fields[idx_FacturasProveedorESTADO_EJERCICIO].AsVariant := Null;
+end;
+
+function TFacturasProveedorDataTableRules.GetASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_FacturasProveedorASIENTO_PUNTEADO].AsSmallInt;
+end;
+
+procedure TFacturasProveedorDataTableRules.SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_FacturasProveedorASIENTO_PUNTEADO].AsSmallInt := aValue;
+end;
+
+function TFacturasProveedorDataTableRules.GetASIENTO_PUNTEADOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasProveedorASIENTO_PUNTEADO].IsNull;
+end;
+
+procedure TFacturasProveedorDataTableRules.SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasProveedorASIENTO_PUNTEADO].AsVariant := Null;
end;
diff --git a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas
index 60ade01a..0c248959 100644
--- a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas
+++ b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas
@@ -9,13 +9,13 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
- RID_FacturasProveedorDelta = '{D146A338-C0C9-4B53-9F54-E217054D207D}';
- RID_FacturasProveedor_DetallesDelta = '{69B9422B-A4B5-43D5-A992-EFB3F0FB5231}';
+ RID_FacturasProveedorDelta = '{8A815C19-322F-46C9-BAD5-3A2696BF133E}';
+ RID_FacturasProveedor_DetallesDelta = '{49E22119-767F-4CB5-A74E-87923CDA4BD6}';
type
{ IFacturasProveedorDelta }
IFacturasProveedorDelta = interface(IFacturasProveedor)
- ['{D146A338-C0C9-4B53-9F54-E217054D207D}']
+ ['{8A815C19-322F-46C9-BAD5-3A2696BF133E}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -57,7 +57,8 @@ type
function GetOldID_SUBCUENTAValue : Integer;
function GetOldSUBCUENTAValue : String;
function GetOldID_EJERCICIOValue : Integer;
- function GetOldESTADOValue : String;
+ function GetOldESTADO_EJERCICIOValue : String;
+ function GetOldASIENTO_PUNTEADOValue : SmallInt;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -100,7 +101,8 @@ type
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
- property OldESTADO : String read GetOldESTADOValue;
+ property OldESTADO_EJERCICIO : String read GetOldESTADO_EJERCICIOValue;
+ property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue;
end;
{ TFacturasProveedorBusinessProcessorRules }
@@ -349,12 +351,18 @@ type
function GetOldID_EJERCICIOIsNull: Boolean; virtual;
procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
- function GetESTADOValue: String; virtual;
- function GetESTADOIsNull: Boolean; virtual;
- function GetOldESTADOValue: String; virtual;
- function GetOldESTADOIsNull: Boolean; virtual;
- procedure SetESTADOValue(const aValue: String); virtual;
- procedure SetESTADOIsNull(const aValue: Boolean); virtual;
+ function GetESTADO_EJERCICIOValue: String; virtual;
+ function GetESTADO_EJERCICIOIsNull: Boolean; virtual;
+ function GetOldESTADO_EJERCICIOValue: String; virtual;
+ function GetOldESTADO_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String); virtual;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetASIENTO_PUNTEADOValue: SmallInt; virtual;
+ function GetASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ function GetOldASIENTO_PUNTEADOValue: SmallInt; virtual;
+ function GetOldASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt); virtual;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -517,10 +525,14 @@ type
property ID_EJERCICIOIsNull : Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
property OldID_EJERCICIOIsNull : Boolean read GetOldID_EJERCICIOIsNull;
- property ESTADO : String read GetESTADOValue write SetESTADOValue;
- property ESTADOIsNull : Boolean read GetESTADOIsNull write SetESTADOIsNull;
- property OldESTADO : String read GetOldESTADOValue;
- property OldESTADOIsNull : Boolean read GetOldESTADOIsNull;
+ property ESTADO_EJERCICIO : String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull : Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property OldESTADO_EJERCICIO : String read GetOldESTADO_EJERCICIOValue;
+ property OldESTADO_EJERCICIOIsNull : Boolean read GetOldESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO : SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull : Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
+ property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue;
+ property OldASIENTO_PUNTEADOIsNull : Boolean read GetOldASIENTO_PUNTEADOIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -530,7 +542,7 @@ type
{ IFacturasProveedor_DetallesDelta }
IFacturasProveedor_DetallesDelta = interface(IFacturasProveedor_Detalles)
- ['{69B9422B-A4B5-43D5-A992-EFB3F0FB5231}']
+ ['{49E22119-767F-4CB5-A74E-87923CDA4BD6}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
@@ -1982,35 +1994,66 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorID_EJERCICIO] := Null;
end;
-function TFacturasProveedorBusinessProcessorRules.GetESTADOValue: String;
+function TFacturasProveedorBusinessProcessorRules.GetESTADO_EJERCICIOValue: String;
begin
- result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorESTADO];
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorESTADO_EJERCICIO];
end;
-function TFacturasProveedorBusinessProcessorRules.GetESTADOIsNull: Boolean;
+function TFacturasProveedorBusinessProcessorRules.GetESTADO_EJERCICIOIsNull: Boolean;
begin
- result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorESTADO]);
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorESTADO_EJERCICIO]);
end;
-function TFacturasProveedorBusinessProcessorRules.GetOldESTADOValue: String;
+function TFacturasProveedorBusinessProcessorRules.GetOldESTADO_EJERCICIOValue: String;
begin
- result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedorESTADO];
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedorESTADO_EJERCICIO];
end;
-function TFacturasProveedorBusinessProcessorRules.GetOldESTADOIsNull: Boolean;
+function TFacturasProveedorBusinessProcessorRules.GetOldESTADO_EJERCICIOIsNull: Boolean;
begin
- result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedorESTADO]);
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedorESTADO_EJERCICIO]);
end;
-procedure TFacturasProveedorBusinessProcessorRules.SetESTADOValue(const aValue: String);
+procedure TFacturasProveedorBusinessProcessorRules.SetESTADO_EJERCICIOValue(const aValue: String);
begin
- BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorESTADO] := aValue;
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorESTADO_EJERCICIO] := aValue;
end;
-procedure TFacturasProveedorBusinessProcessorRules.SetESTADOIsNull(const aValue: Boolean);
+procedure TFacturasProveedorBusinessProcessorRules.SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
begin
if aValue then
- BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorESTADO] := Null;
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorESTADO_EJERCICIO] := Null;
+end;
+
+function TFacturasProveedorBusinessProcessorRules.GetASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorASIENTO_PUNTEADO];
+end;
+
+function TFacturasProveedorBusinessProcessorRules.GetASIENTO_PUNTEADOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorASIENTO_PUNTEADO]);
+end;
+
+function TFacturasProveedorBusinessProcessorRules.GetOldASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedorASIENTO_PUNTEADO];
+end;
+
+function TFacturasProveedorBusinessProcessorRules.GetOldASIENTO_PUNTEADOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedorASIENTO_PUNTEADO]);
+end;
+
+procedure TFacturasProveedorBusinessProcessorRules.SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorASIENTO_PUNTEADO] := aValue;
+end;
+
+procedure TFacturasProveedorBusinessProcessorRules.SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorASIENTO_PUNTEADO] := Null;
end;
diff --git a/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm b/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm
index 7f0e96c7..acf2e349 100644
--- a/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm
+++ b/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm
@@ -184,8 +184,12 @@ object srvFacturasProveedor: TsrvFacturasProveedor
TableField = 'ID_EJERCICIO'
end
item
- DatasetField = 'ESTADO'
- TableField = 'ESTADO'
+ DatasetField = 'ESTADO_EJERCICIO'
+ TableField = 'ESTADO_EJERCICIO'
+ end
+ item
+ DatasetField = 'ASIENTO_PUNTEADO'
+ TableField = 'ASIENTO_PUNTEADO'
end>
end>
Name = 'FacturasProveedor'
@@ -403,9 +407,13 @@ object srvFacturasProveedor: TsrvFacturasProveedor
DataType = datInteger
end
item
- Name = 'ESTADO'
+ Name = 'ESTADO_EJERCICIO'
DataType = datString
Size = 255
+ end
+ item
+ Name = 'ASIENTO_PUNTEADO'
+ DataType = datSmallInt
end>
end
item
diff --git a/Source/Modulos/Facturas de proveedor/Views/FacturasProveedor_view.dproj b/Source/Modulos/Facturas de proveedor/Views/FacturasProveedor_view.dproj
index ef4219ab..b1016bfd 100644
--- a/Source/Modulos/Facturas de proveedor/Views/FacturasProveedor_view.dproj
+++ b/Source/Modulos/Facturas de proveedor/Views/FacturasProveedor_view.dproj
@@ -41,7 +41,6 @@
Package
FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0
-
RemObjects Pascal Script - RemObjects SDK 3.0 Integration
FacturasProveedor_view.dpk
@@ -50,35 +49,35 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TfEditorElegirArticulosFacturaProveedor
diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm
index 56764977..d715b306 100644
--- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm
+++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.dfm
@@ -2,7 +2,6 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
Caption = 'Lista de facturas de proveedor'
ClientHeight = 666
ClientWidth = 640
- ExplicitTop = -43
ExplicitWidth = 648
ExplicitHeight = 700
PixelsPerInch = 96
@@ -64,9 +63,10 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
end
inherited TBXTMain2: TTBXToolbar
Visible = True
- ExplicitWidth = 66
+ ExplicitWidth = 83
object TBXItem40: TTBXItem
Action = actInformes
+ DisplayMode = nbdmImageAndText
end
end
end
@@ -255,6 +255,7 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
object actInformes: TAction
Category = 'Archivo'
Caption = 'Informes'
+ ImageIndex = 25
OnExecute = actInformesExecute
end
end
@@ -981,6 +982,27 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
064200A70120096201BA0100A6C62916A56F74520000000049454E44AE426082}
Name = 'PngImage24'
Background = clWindow
+ end
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000000970485973000017120000171201679FD252000001A24944415478DA
+ 63FC61C0F09F71F72C86FFAE690C307A76D176065C2037CE9311C6FEFFFF3F03
+ E3CFD7B3FEFFEF5DC7C0D0B003883D18188B8318D84452E11AFE0115FDFDFB0F
+ 8CE7ACDACB306FE92686F33BA733C20D00B980E10403031BDB6F865FBF581918
+ 2C1818D8CFFF47D1FC076AC082B5FB1974D455188AEAFAC086E07481FB5A3B0C
+ A7AF8F926358B2E12043B0A70DC3CD7B2FC0869CDB318D91115B18B09E45D8FA
+ F71F82BD7CF361B01760006C008C3379D1F6FF39B11E0C5316EF6020047C9CCC
+ 1882926B300DC88C766330F5CA6138B26102D04654FF835C02A237EE39C9E061
+ 67C210965E8769405A840B83856F1E5EDB93A2FD189CAD0D19A2B31A310D480A
+ 7542B11542FF87DAFE1FC8FFCBF0E70F443C3EAF19D380B8400706FFA50F0986
+ 419F2D374372511BA601D17E76105BFFC1FCFD1FC287DAFA1BC90519A51D9806
+ 847BDB30ACDC7A84A00B8C74D419722ABB310D08F6B062F08EAD60583FAF151E
+ 06C8FE06D1A72E5E63D0D3546528A8E9C53420C0D582C12FA18A602CC0923386
+ 01BECEE6509BFE426D4762435D014AFF2080D500E4644A0C00190000D63E5BF0
+ 41A130430000000049454E44AE426082}
+ Name = 'PngImage25'
+ Background = clWindow
end>
Left = 395
Bitmap = {}
@@ -3371,37 +3393,44 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
end
object JsListaFacturasNoEliminadas: TJSDialog
Glyph.Data = {
- 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
- 00001C0806000000720DDF940000000970485973000017120000171201679FD2
- 520000000467414D410000B18E7CFB5193000003104944415478DAAD96FB4B14
- 5114C7CFE463DC1E606444BFF54424D3DC55CA52B1CCD7165A219905054182FD
- 1452FD5810FD100406610A669A998FC4F5BDB6266265DAB60F5DD15E58FE03B2
- 3F99D29ABBA7B9779C71C61D9D6177CFCE70CFDCB97B3EF7DCF3BD33C38082FD
- B502B2B300CC656020048688A24F036233A0671F40D43160BA87BF62AEEE1010
- 60D7AE293AD8B835815E9B625C80DC8F1E88D4A7C1E8C1FB8F9FD6C3C44035B3
- 21500A65F6D700FE2EA580A5EC551F4A50359316B31D76EFDC0EE5F72A645045
- A067AE0623074B8140891108F1057064CC0D556053DF173812B707E6DCF332A8
- 225080D201DB4AF99BF335B4D502F371415BCC364833C4C29F458F0C2A031281
- 081734AB0B3C88403C1E6E3E2E7960F6A8FFD27A7D3EF07A11DA2C76C84A8D87
- A57FCB32E8B8A54A4C8C21B59365C9015996EF2240B6634DF435B51460A46D1F
- 70C093AA46BF09C980C12CA914E6F371ADD707EF1DB3B0B0B8006EB79B8EA96B
- EA5106121851245129118FD8BFA2DC5C53C6BAF5EBBBBA97C2D64EC064195B1F
- 286C76E956A0EA5C51AEB4764A9929F5750D5A9581D2274B9B651C0BA2F514A8
- 6F28E36B70AD9A4253EF97A9AA55B0CEBA87D03B645B3F43C1DE589C58186D10
- 81150FCAC57B11E161B04517099BB953C78643141B01BA28EEE4DAB0B04DE2B8
- CA460B9C399902E661BB3AB0F5AD038BF30CD4D7E7DD14815A61023027DD00EF
- 469C1A80FD1C307F1578FD4A81E665945AD68924181A9D5007B6F4DBF1527E32
- F5C9D3632351F8F549AEE916B14EAA039BCD362C31A6040D23E7887D4A03B0CF
- 86C5C6641A24BB7646D3F2D51A77F8C1BCDCFFC79CD3EAC0D7BD56AE86294165
- 4660CB5C6B737DD3062CCA31D00069E76E05241862CF1EDD05E7D40F756063CF
- 673C7F5A4F679A59541EF03E4C8C3B0893DF67D481AFBAC7B0F05412CD30EBE2
- ED80F7617CEC0198FEF94B1BF06C6622AD4B4EC99D80F7A1666043D7281A3312
- FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312
- 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA
- 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082}
- Instruction.Text =
- 'Las siguientes facturas no han podido ser eliminadas, porque tie' +
- 'nen recibos con pagos o devoluciones emitidas'
+ 0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
+ 000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
+ 4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
+ 80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
+ 0AE900000AE901FD75CED3000003F049444154484BBD557B6C53651C3D7DAD7B
+ B0ADADC0363ADDA0834D2DDA6E5904A24C17E64864BAF8484C348E104940FD47
+ 128D31121213134DD4C4F8644F794C6413188E81A003B3A15B8AC87C4CA39D9A
+ 685013515B36D8B3F7E7F9AEDCDAB9760F62BCC94D9ADEEF3BE7FCCE777EBFCF
+ 2422F8DF9ED781A56D0EFB730D56945D0EA9BE3F2F676F3D70DF36C01C15FF0A
+ 30AF333BB9E9E74ADF68E4A12A19A8F0851BADB869B6242F00292DD9AE6DBD2B
+ BD43273D4E79371D5A1DB05527B807B0BCE7C0FEC1EB20A3373A447B60B5688F
+ 544BF0567FA8113393D45970F3C9E265FD7D371448E77C93746442DB6945B322
+ D5099ACCD8F8DBD5D0467C90E1EB21178A6D3276979F247748B0A2385C6FC5EA
+ 789550A1EBD02247DD57AB964DF4E4A7C9072E487B06B426139E55A2D51E9DE0
+ 656051201B030A7C885584BC9073D740C2E55789B6799D0C54964CB1EB0D6065
+ 4F81EBC76FFDD9F2E17CE8E0B465BCC18C4763C544CF603B5074C68D5FFFBC16
+ C26AE49742C84F4B21677D193252532EC1B5A521E34C76D9CD0FF67B175CFCCC
+ 931A056F4BC3700370FFBF2B9D94D02660455F2E060DF01F3C90E062C8371E8B
+ FC5EE593606569B8353D69F7803F2B12C8B546C10F109CA9B92D9E8D535A6087
+ 05EBFADC1835C0BFCE837C7125E44C2EC94A72E4F4E264F928CB2427AE80BCEF
+ 841C9C8771567F6FA2B4C5EDB15D366CF8D48D8928B81B722A07D29305E95E80
+ 28383D8FD0F387A78B72C2266E4EC29304D5782E71C10F5D4ACB4C7D92904075
+ E1DE64040254FE319577C5283F9209A1EF5A1DE34802D39C2BA0A7B6B7D3936A
+ BFBC65B966801FA7E7C7E8F96182D31AD99F06D9930CAD16786A4E04044F6D77
+ BB0E9CDB52239F143A75E5F1C05B52206FD9216F5A75922DB33A6482671E5B92
+ 73E2E2E335F25DA57F0A382DFB638F1DE70DF09D3648A305B2DD840936DEA669
+ 634ACFAD47721D1D639BAA24B47EAD742D344D52DE9A82610A287B0D286C34A3
+ 7B87F56FF05A1384E0C2293AC66F35091BAD25DDF6F460758936B1A1424E79D2
+ A593AD7FD401E9C880EC4B458436AC3736B770CE10F431FE7741811BEF25128E
+ A17F1E3D4554527E7655FEB8DCE993EF4BDD93C0555AEA4D783E5EF954EC2568
+ 2F5F2D8668E455A0CA58AF139C2E5AD82FD5CBE5FC9A0239CE716B2867970A3B
+ BB4BA52AD121D2DA24126D25C9704C2543DCB3263A4DBBF39DAD91DBBD12C84B
+ 9904DE6CC7A0BAA1666A26F59D80C524E88BA924AC26AE5E418305777F5EE414
+ 5E3AC20E95362A6752D48DB47936E0C69A97003B053DA3CE82E0115A55A613A8
+ 32391A7ADBD9400AFC9D5426C48CA3AA9BE74260ACA5652BF8BE18B548FDE0F5
+ E662F40E2BE5CC77880B965C0EF8B4F7818A1F6D7982F1DBF85F801B15FC059E
+ 6028BEE22B69170000000049454E44AE426082}
+ Instruction.Text = 'Las siguientes facturas no han podido ser eliminadas:'
Instruction.Glyph.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
00001C0806000000720DDF940000000970485973000017120000171201679FD2
@@ -3667,7 +3696,7 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
0007F0000007F0000007F0000007F0000007F0000007F0000007800000078000
0007C0000007C000000700000007000000070000000700000007C000000FC000
001F8000003F800000FFF8FFFFFF}
- Width = 450
+ Width = 600
Left = 184
Top = 112
end
diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas
index 8db6d107..a90d8676 100644
--- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas
+++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturasProveedor.pas
@@ -12,7 +12,7 @@ uses
uEditorGridBase, uBizFacturasProveedor, uIEditorFacturasProveedor,
uFacturasProveedorController, uCustomView, uViewBase, uViewBarraSeleccion,
uViewGridBase, JvExComCtrls, JvStatusBar, JSDialog,
- uViewFacturasProveedor, uDAInterfaces;
+ uViewFacturasProveedor, uDAInterfaces, dxGDIPlusClasses;
type
@@ -82,9 +82,7 @@ procedure TfEditorFacturasProveedor.actEliminarUpdate(Sender: TObject);
begin
inherited;
if (Sender as TAction).Enabled then
- (Sender as TAction).Enabled := (FFacturas.SITUACION = CTE_PENDIENTE)
-//Si el ejercicio al que pertenece la factura esta cerrado no se podrá eliminar
- and (FFacturas.ESTADO <> CTE_CERRADO);
+ (Sender as TAction).Enabled := (FFacturas.SITUACION = CTE_PENDIENTE);
end;
procedure TfEditorFacturasProveedor.actInformesExecute(Sender: TObject);
@@ -190,9 +188,12 @@ var
ACadena : String;
AFacturas: IBizFacturaProveedor;
AllItems: Boolean;
+ AListaCausas: TStringList;
+
begin
AFacturas := Nil;
AllItems := False;
+ AListaCausas := TStringList.Create;
if MultiSelect and Assigned(ViewGrid) then
AllItems := (ViewGrid.NumSeleccionados > 1);
@@ -217,12 +218,17 @@ begin
if Assigned(AFacturas) then
begin
- if (not FController.Eliminar(AFacturas, AllItems))
- and (not AllItems) then //Es el caso de querer borrar una factura pendiente cuyos recibos tienen devoluciones
+ if (not FController.Eliminar(AFacturas, AllItems, AListaCausas))
+ //En el caso de querer borrar una factura pendiente cuyos recibos tienen devoluciones
+ and (not AllItems) then
begin
JsListaFacturasNoEliminadas.Content.Clear;
JsListaFacturasNoEliminadas.Content.Add('Ref. factura: ' + AFacturas.REFERENCIA + ' ' + AFacturas.NOMBRE);
- JsListaFacturasNoEliminadas.Execute;
+ if Length(VarToStr(AListaCausas.Values[IntToStr(AFacturas.ID)])) > 0 then
+ JsListaFacturasNoEliminadas.Content.Add(VarToStr(AListaCausas.Values[IntToStr(AFacturas.ID)]))
+ else
+ JsListaFacturasNoEliminadas.Content.Add('La factura puede tener algún recibo devuelto y no puede ser eliminada');
+ JsListaFacturasNoEliminadas.Execute;
end;
if AllItems then
@@ -231,11 +237,16 @@ begin
begin
with AFacturas.DataTable do
begin
- JsListaFacturasNoEliminadas.Content.Clear;
+ JsListaFacturasNoEliminadas.Content.Clear;
First;
while not EOF do
begin
JsListaFacturasNoEliminadas.Content.Add('Ref. factura: ' + AFacturas.REFERENCIA + ' ' + AFacturas.NOMBRE);
+ if Length(AListaCausas.Values[IntToStr(AFacturas.ID)]) > 0 then
+ JsListaFacturasNoEliminadas.Content.Add(VarToStr(AListaCausas.Values[IntToStr(AFacturas.ID)]))
+ else
+ JsListaFacturasNoEliminadas.Content.Add('La factura puede tener algún recibo devuelto y no puede ser eliminada');
+ JsListaFacturasNoEliminadas.Content.Add('');
Next;
end;
end;
@@ -245,6 +256,7 @@ begin
end;
end;
+ AListaCausas.Free;
ViewGrid.GotoFirst;
end;
diff --git a/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.dfm
index 09679daf..368d4a5a 100644
--- a/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.dfm
+++ b/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.dfm
@@ -111,6 +111,28 @@ inherited DataModuleRecibosCliente: TDataModuleRecibosCliente
item
Name = 'IGNORAR_CONTABILIDAD'
DataType = datSmallInt
+ end
+ item
+ Name = 'ID_SUBCUENTA'
+ DataType = datInteger
+ end
+ item
+ Name = 'SUBCUENTA'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ID_EJERCICIO'
+ DataType = datInteger
+ end
+ item
+ Name = 'ESTADO_EJERCICIO'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ASIENTO_PUNTEADO'
+ DataType = datSmallInt
end>
Params = <>
MasterMappingMode = mmWhere
diff --git a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas
index e7b125f2..3f54cbed 100644
--- a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas
+++ b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas
@@ -9,9 +9,9 @@ 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_RecibosCliente = '{54EEB874-6715-46B6-A82A-04AB24879A98}';
- RID_PagosCliente = '{B35119A8-398B-4FF5-8A00-4F8122E723F3}';
- RID_RecibosCompensadosCli = '{A7454A3D-421E-45A7-9CB0-B8A3F75F8B10}';
+ RID_RecibosCliente = '{83925C8D-8CDD-471F-95E7-3D94225FA3B9}';
+ RID_PagosCliente = '{6D505274-2913-4C4E-9C64-3CF6F7035F70}';
+ RID_RecibosCompensadosCli = '{AB4C31E9-E8B8-4AE3-A95A-B5A0D5F5E7F3}';
{ Data table names }
nme_RecibosCliente = 'RecibosCliente';
@@ -108,6 +108,11 @@ const
fld_PagosClienteFECHA_MODIFICACION = 'FECHA_MODIFICACION';
fld_PagosClienteUSUARIO = 'USUARIO';
fld_PagosClienteIGNORAR_CONTABILIDAD = 'IGNORAR_CONTABILIDAD';
+ fld_PagosClienteID_SUBCUENTA = 'ID_SUBCUENTA';
+ fld_PagosClienteSUBCUENTA = 'SUBCUENTA';
+ fld_PagosClienteID_EJERCICIO = 'ID_EJERCICIO';
+ fld_PagosClienteESTADO_EJERCICIO = 'ESTADO_EJERCICIO';
+ fld_PagosClienteASIENTO_PUNTEADO = 'ASIENTO_PUNTEADO';
{ PagosCliente field indexes }
idx_PagosClienteID = 0;
@@ -123,6 +128,11 @@ const
idx_PagosClienteFECHA_MODIFICACION = 10;
idx_PagosClienteUSUARIO = 11;
idx_PagosClienteIGNORAR_CONTABILIDAD = 12;
+ idx_PagosClienteID_SUBCUENTA = 13;
+ idx_PagosClienteSUBCUENTA = 14;
+ idx_PagosClienteID_EJERCICIO = 15;
+ idx_PagosClienteESTADO_EJERCICIO = 16;
+ idx_PagosClienteASIENTO_PUNTEADO = 17;
{ RecibosCompensadosCli fields }
fld_RecibosCompensadosCliID = 'ID';
@@ -203,7 +213,7 @@ const
type
{ IRecibosCliente }
IRecibosCliente = interface(IDAStronglyTypedDataTable)
- ['{416EE74E-EB7B-4CF4-B765-E2A87F9C2B37}']
+ ['{E9F7D1F3-CB56-4C0E-B493-853CFEE73672}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -658,7 +668,7 @@ type
{ IPagosCliente }
IPagosCliente = interface(IDAStronglyTypedDataTable)
- ['{F908AFBE-296E-4538-9827-AE99EFDAA57F}']
+ ['{E5953A2B-D345-4F0E-8018-16A50961F9E4}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -712,6 +722,26 @@ type
procedure SetIGNORAR_CONTABILIDADValue(const aValue: SmallInt);
function GetIGNORAR_CONTABILIDADIsNull: Boolean;
procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean);
+ function GetID_SUBCUENTAValue: Integer;
+ procedure SetID_SUBCUENTAValue(const aValue: Integer);
+ function GetID_SUBCUENTAIsNull: Boolean;
+ procedure SetID_SUBCUENTAIsNull(const aValue: Boolean);
+ function GetSUBCUENTAValue: String;
+ procedure SetSUBCUENTAValue(const aValue: String);
+ function GetSUBCUENTAIsNull: Boolean;
+ procedure SetSUBCUENTAIsNull(const aValue: Boolean);
+ function GetID_EJERCICIOValue: Integer;
+ procedure SetID_EJERCICIOValue(const aValue: Integer);
+ function GetID_EJERCICIOIsNull: Boolean;
+ procedure SetID_EJERCICIOIsNull(const aValue: Boolean);
+ function GetESTADO_EJERCICIOValue: String;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String);
+ function GetESTADO_EJERCICIOIsNull: Boolean;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
+ function GetASIENTO_PUNTEADOValue: SmallInt;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+ function GetASIENTO_PUNTEADOIsNull: Boolean;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
{ Properties }
@@ -741,6 +771,16 @@ type
property USUARIOIsNull: Boolean read GetUSUARIOIsNull write SetUSUARIOIsNull;
property IGNORAR_CONTABILIDAD: SmallInt read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue;
property IGNORAR_CONTABILIDADIsNull: Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull;
+ property ID_SUBCUENTA: Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
+ property ID_SUBCUENTAIsNull: Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
+ property SUBCUENTA: String read GetSUBCUENTAValue write SetSUBCUENTAValue;
+ property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
+ property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
+ property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
+ property ESTADO_EJERCICIO: String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull: Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO: SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull: Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
end;
{ TPagosClienteDataTableRules }
@@ -800,6 +840,26 @@ type
procedure SetIGNORAR_CONTABILIDADValue(const aValue: SmallInt); virtual;
function GetIGNORAR_CONTABILIDADIsNull: Boolean; virtual;
procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); virtual;
+ function GetID_SUBCUENTAValue: Integer; virtual;
+ procedure SetID_SUBCUENTAValue(const aValue: Integer); virtual;
+ function GetID_SUBCUENTAIsNull: Boolean; virtual;
+ procedure SetID_SUBCUENTAIsNull(const aValue: Boolean); virtual;
+ function GetSUBCUENTAValue: String; virtual;
+ procedure SetSUBCUENTAValue(const aValue: String); virtual;
+ function GetSUBCUENTAIsNull: Boolean; virtual;
+ procedure SetSUBCUENTAIsNull(const aValue: Boolean); virtual;
+ function GetID_EJERCICIOValue: Integer; virtual;
+ procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
+ function GetID_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetESTADO_EJERCICIOValue: String; virtual;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String); virtual;
+ function GetESTADO_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetASIENTO_PUNTEADOValue: SmallInt; virtual;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt); virtual;
+ function GetASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -828,6 +888,16 @@ type
property USUARIOIsNull: Boolean read GetUSUARIOIsNull write SetUSUARIOIsNull;
property IGNORAR_CONTABILIDAD: SmallInt read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue;
property IGNORAR_CONTABILIDADIsNull: Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull;
+ property ID_SUBCUENTA: Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
+ property ID_SUBCUENTAIsNull: Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
+ property SUBCUENTA: String read GetSUBCUENTAValue write SetSUBCUENTAValue;
+ property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
+ property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
+ property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
+ property ESTADO_EJERCICIO: String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull: Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO: SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull: Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -837,7 +907,7 @@ type
{ IRecibosCompensadosCli }
IRecibosCompensadosCli = interface(IDAStronglyTypedDataTable)
- ['{1D5A6596-4976-49A3-B1C3-40B57B6BBAFF}']
+ ['{F5CFE9D4-9477-43FF-AFBE-F6CFAC4D4313}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -2346,6 +2416,111 @@ begin
DataTable.Fields[idx_PagosClienteIGNORAR_CONTABILIDAD].AsVariant := Null;
end;
+function TPagosClienteDataTableRules.GetID_SUBCUENTAValue: Integer;
+begin
+ result := DataTable.Fields[idx_PagosClienteID_SUBCUENTA].AsInteger;
+end;
+
+procedure TPagosClienteDataTableRules.SetID_SUBCUENTAValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_PagosClienteID_SUBCUENTA].AsInteger := aValue;
+end;
+
+function TPagosClienteDataTableRules.GetID_SUBCUENTAIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosClienteID_SUBCUENTA].IsNull;
+end;
+
+procedure TPagosClienteDataTableRules.SetID_SUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosClienteID_SUBCUENTA].AsVariant := Null;
+end;
+
+function TPagosClienteDataTableRules.GetSUBCUENTAValue: String;
+begin
+ result := DataTable.Fields[idx_PagosClienteSUBCUENTA].AsString;
+end;
+
+procedure TPagosClienteDataTableRules.SetSUBCUENTAValue(const aValue: String);
+begin
+ DataTable.Fields[idx_PagosClienteSUBCUENTA].AsString := aValue;
+end;
+
+function TPagosClienteDataTableRules.GetSUBCUENTAIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosClienteSUBCUENTA].IsNull;
+end;
+
+procedure TPagosClienteDataTableRules.SetSUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosClienteSUBCUENTA].AsVariant := Null;
+end;
+
+function TPagosClienteDataTableRules.GetID_EJERCICIOValue: Integer;
+begin
+ result := DataTable.Fields[idx_PagosClienteID_EJERCICIO].AsInteger;
+end;
+
+procedure TPagosClienteDataTableRules.SetID_EJERCICIOValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_PagosClienteID_EJERCICIO].AsInteger := aValue;
+end;
+
+function TPagosClienteDataTableRules.GetID_EJERCICIOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosClienteID_EJERCICIO].IsNull;
+end;
+
+procedure TPagosClienteDataTableRules.SetID_EJERCICIOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosClienteID_EJERCICIO].AsVariant := Null;
+end;
+
+function TPagosClienteDataTableRules.GetESTADO_EJERCICIOValue: String;
+begin
+ result := DataTable.Fields[idx_PagosClienteESTADO_EJERCICIO].AsString;
+end;
+
+procedure TPagosClienteDataTableRules.SetESTADO_EJERCICIOValue(const aValue: String);
+begin
+ DataTable.Fields[idx_PagosClienteESTADO_EJERCICIO].AsString := aValue;
+end;
+
+function TPagosClienteDataTableRules.GetESTADO_EJERCICIOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosClienteESTADO_EJERCICIO].IsNull;
+end;
+
+procedure TPagosClienteDataTableRules.SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosClienteESTADO_EJERCICIO].AsVariant := Null;
+end;
+
+function TPagosClienteDataTableRules.GetASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_PagosClienteASIENTO_PUNTEADO].AsSmallInt;
+end;
+
+procedure TPagosClienteDataTableRules.SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_PagosClienteASIENTO_PUNTEADO].AsSmallInt := aValue;
+end;
+
+function TPagosClienteDataTableRules.GetASIENTO_PUNTEADOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosClienteASIENTO_PUNTEADO].IsNull;
+end;
+
+procedure TPagosClienteDataTableRules.SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosClienteASIENTO_PUNTEADO].AsVariant := Null;
+end;
+
{ TRecibosCompensadosCliDataTableRules }
constructor TRecibosCompensadosCliDataTableRules.Create(aDataTable: TDADataTable);
diff --git a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteServer_Intf.pas b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteServer_Intf.pas
index 21ff371b..2fc8da70 100644
--- a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteServer_Intf.pas
+++ b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteServer_Intf.pas
@@ -9,14 +9,14 @@ 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_RecibosClienteDelta = '{9E82239C-B734-475B-B8FD-4871173BD2C1}';
- RID_PagosClienteDelta = '{90080EE3-4FB0-4987-8267-214F13A79183}';
- RID_RecibosCompensadosCliDelta = '{C9412B31-0985-4CCC-B340-E45D44C1D87B}';
+ RID_RecibosClienteDelta = '{EA14D503-60F2-40E0-AC46-B289B3FE87FD}';
+ RID_PagosClienteDelta = '{FD903D99-7EAA-4C30-A79C-82C97E9B5098}';
+ RID_RecibosCompensadosCliDelta = '{A992F752-5824-4FA9-A17A-56EE6C368C9E}';
type
{ IRecibosClienteDelta }
IRecibosClienteDelta = interface(IRecibosCliente)
- ['{9E82239C-B734-475B-B8FD-4871173BD2C1}']
+ ['{EA14D503-60F2-40E0-AC46-B289B3FE87FD}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_RECIBO_COMPENSADOValue : Integer;
@@ -470,7 +470,7 @@ type
{ IPagosClienteDelta }
IPagosClienteDelta = interface(IPagosCliente)
- ['{90080EE3-4FB0-4987-8267-214F13A79183}']
+ ['{FD903D99-7EAA-4C30-A79C-82C97E9B5098}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_RECIBOValue : Integer;
@@ -485,6 +485,11 @@ type
function GetOldFECHA_MODIFICACIONValue : DateTime;
function GetOldUSUARIOValue : String;
function GetOldIGNORAR_CONTABILIDADValue : SmallInt;
+ function GetOldID_SUBCUENTAValue : Integer;
+ function GetOldSUBCUENTAValue : String;
+ function GetOldID_EJERCICIOValue : Integer;
+ function GetOldESTADO_EJERCICIOValue : String;
+ function GetOldASIENTO_PUNTEADOValue : SmallInt;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -500,6 +505,11 @@ type
property OldFECHA_MODIFICACION : DateTime read GetOldFECHA_MODIFICACIONValue;
property OldUSUARIO : String read GetOldUSUARIOValue;
property OldIGNORAR_CONTABILIDAD : SmallInt read GetOldIGNORAR_CONTABILIDADValue;
+ property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
+ property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
+ property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
+ property OldESTADO_EJERCICIO : String read GetOldESTADO_EJERCICIOValue;
+ property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue;
end;
{ TPagosClienteBusinessProcessorRules }
@@ -585,6 +595,36 @@ type
function GetOldIGNORAR_CONTABILIDADIsNull: Boolean; virtual;
procedure SetIGNORAR_CONTABILIDADValue(const aValue: SmallInt); virtual;
procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); virtual;
+ function GetID_SUBCUENTAValue: Integer; virtual;
+ function GetID_SUBCUENTAIsNull: Boolean; virtual;
+ function GetOldID_SUBCUENTAValue: Integer; virtual;
+ function GetOldID_SUBCUENTAIsNull: Boolean; virtual;
+ procedure SetID_SUBCUENTAValue(const aValue: Integer); virtual;
+ procedure SetID_SUBCUENTAIsNull(const aValue: Boolean); virtual;
+ function GetSUBCUENTAValue: String; virtual;
+ function GetSUBCUENTAIsNull: Boolean; virtual;
+ function GetOldSUBCUENTAValue: String; virtual;
+ function GetOldSUBCUENTAIsNull: Boolean; virtual;
+ procedure SetSUBCUENTAValue(const aValue: String); virtual;
+ procedure SetSUBCUENTAIsNull(const aValue: Boolean); virtual;
+ function GetID_EJERCICIOValue: Integer; virtual;
+ function GetID_EJERCICIOIsNull: Boolean; virtual;
+ function GetOldID_EJERCICIOValue: Integer; virtual;
+ function GetOldID_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
+ procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetESTADO_EJERCICIOValue: String; virtual;
+ function GetESTADO_EJERCICIOIsNull: Boolean; virtual;
+ function GetOldESTADO_EJERCICIOValue: String; virtual;
+ function GetOldESTADO_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String); virtual;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetASIENTO_PUNTEADOValue: SmallInt; virtual;
+ function GetASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ function GetOldASIENTO_PUNTEADOValue: SmallInt; virtual;
+ function GetOldASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt); virtual;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -639,6 +679,26 @@ type
property IGNORAR_CONTABILIDADIsNull : Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull;
property OldIGNORAR_CONTABILIDAD : SmallInt read GetOldIGNORAR_CONTABILIDADValue;
property OldIGNORAR_CONTABILIDADIsNull : Boolean read GetOldIGNORAR_CONTABILIDADIsNull;
+ property ID_SUBCUENTA : Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
+ property ID_SUBCUENTAIsNull : Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
+ property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
+ property OldID_SUBCUENTAIsNull : Boolean read GetOldID_SUBCUENTAIsNull;
+ property SUBCUENTA : String read GetSUBCUENTAValue write SetSUBCUENTAValue;
+ property SUBCUENTAIsNull : Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
+ property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
+ property OldSUBCUENTAIsNull : Boolean read GetOldSUBCUENTAIsNull;
+ property ID_EJERCICIO : Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
+ property ID_EJERCICIOIsNull : Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
+ property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
+ property OldID_EJERCICIOIsNull : Boolean read GetOldID_EJERCICIOIsNull;
+ property ESTADO_EJERCICIO : String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull : Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property OldESTADO_EJERCICIO : String read GetOldESTADO_EJERCICIOValue;
+ property OldESTADO_EJERCICIOIsNull : Boolean read GetOldESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO : SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull : Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
+ property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue;
+ property OldASIENTO_PUNTEADOIsNull : Boolean read GetOldASIENTO_PUNTEADOIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -648,7 +708,7 @@ type
{ IRecibosCompensadosCliDelta }
IRecibosCompensadosCliDelta = interface(IRecibosCompensadosCli)
- ['{C9412B31-0985-4CCC-B340-E45D44C1D87B}']
+ ['{A992F752-5824-4FA9-A17A-56EE6C368C9E}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_RECIBO_COMPENSADOValue : Integer;
@@ -2647,6 +2707,161 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteIGNORAR_CONTABILIDAD] := Null;
end;
+function TPagosClienteBusinessProcessorRules.GetID_SUBCUENTAValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteID_SUBCUENTA];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetID_SUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteID_SUBCUENTA]);
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldID_SUBCUENTAValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteID_SUBCUENTA];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldID_SUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteID_SUBCUENTA]);
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetID_SUBCUENTAValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteID_SUBCUENTA] := aValue;
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetID_SUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteID_SUBCUENTA] := Null;
+end;
+
+function TPagosClienteBusinessProcessorRules.GetSUBCUENTAValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteSUBCUENTA];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetSUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteSUBCUENTA]);
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldSUBCUENTAValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteSUBCUENTA];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldSUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteSUBCUENTA]);
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetSUBCUENTAValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteSUBCUENTA] := aValue;
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetSUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteSUBCUENTA] := Null;
+end;
+
+function TPagosClienteBusinessProcessorRules.GetID_EJERCICIOValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteID_EJERCICIO];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetID_EJERCICIOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteID_EJERCICIO]);
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldID_EJERCICIOValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteID_EJERCICIO];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldID_EJERCICIOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteID_EJERCICIO]);
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetID_EJERCICIOValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteID_EJERCICIO] := aValue;
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetID_EJERCICIOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteID_EJERCICIO] := Null;
+end;
+
+function TPagosClienteBusinessProcessorRules.GetESTADO_EJERCICIOValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteESTADO_EJERCICIO];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetESTADO_EJERCICIOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteESTADO_EJERCICIO]);
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldESTADO_EJERCICIOValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteESTADO_EJERCICIO];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldESTADO_EJERCICIOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteESTADO_EJERCICIO]);
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetESTADO_EJERCICIOValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteESTADO_EJERCICIO] := aValue;
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteESTADO_EJERCICIO] := Null;
+end;
+
+function TPagosClienteBusinessProcessorRules.GetASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteASIENTO_PUNTEADO];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetASIENTO_PUNTEADOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteASIENTO_PUNTEADO]);
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteASIENTO_PUNTEADO];
+end;
+
+function TPagosClienteBusinessProcessorRules.GetOldASIENTO_PUNTEADOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosClienteASIENTO_PUNTEADO]);
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteASIENTO_PUNTEADO] := aValue;
+end;
+
+procedure TPagosClienteBusinessProcessorRules.SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosClienteASIENTO_PUNTEADO] := Null;
+end;
+
{ TRecibosCompensadosCliBusinessProcessorRules }
constructor TRecibosCompensadosCliBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
diff --git a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.dfm b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.dfm
index b85697cc..0a1eefe1 100644
--- a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.dfm
+++ b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.dfm
@@ -384,7 +384,7 @@ object srvRecibosCliente: TsrvRecibosCliente
item
Connection = 'IBX'
Default = True
- TargetTable = 'PAGOS_CLIENTE'
+ TargetTable = 'V_PAGOS_CLIENTE'
StatementType = stAutoSQL
ColumnMappings = <
item
@@ -438,6 +438,26 @@ object srvRecibosCliente: TsrvRecibosCliente
item
DatasetField = 'IGNORAR_CONTABILIDAD'
TableField = 'IGNORAR_CONTABILIDAD'
+ end
+ item
+ DatasetField = 'ID_SUBCUENTA'
+ TableField = 'ID_SUBCUENTA'
+ end
+ item
+ DatasetField = 'SUBCUENTA'
+ TableField = 'SUBCUENTA'
+ end
+ item
+ DatasetField = 'ID_EJERCICIO'
+ TableField = 'ID_EJERCICIO'
+ end
+ item
+ DatasetField = 'ESTADO_EJERCICIO'
+ TableField = 'ESTADO_EJERCICIO'
+ end
+ item
+ DatasetField = 'ASIENTO_PUNTEADO'
+ TableField = 'ASIENTO_PUNTEADO'
end>
end>
Name = 'PagosCliente'
@@ -515,6 +535,28 @@ object srvRecibosCliente: TsrvRecibosCliente
item
Name = 'IGNORAR_CONTABILIDAD'
DataType = datSmallInt
+ end
+ item
+ Name = 'ID_SUBCUENTA'
+ DataType = datInteger
+ end
+ item
+ Name = 'SUBCUENTA'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ID_EJERCICIO'
+ DataType = datInteger
+ end
+ item
+ Name = 'ESTADO_EJERCICIO'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ASIENTO_PUNTEADO'
+ DataType = datSmallInt
end>
end
item
diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas b/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas
index 372b4bf5..85fc8c1a 100644
--- a/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas
+++ b/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas
@@ -46,7 +46,7 @@ implementation
{$R *.dfm}
{$INCLUDE ..\..\..\FactuGES.inc}
-uses uDialogUtils, uFactuGES_App;
+uses uDialogUtils, uFactuGES_App, uBizEjercicios;
procedure TfEditorFechaPago.DeshabilitarContabilidad;
begin
@@ -70,11 +70,19 @@ begin
ShowWarningMessage('Debe establecer la fecha del pago');
end;
- if ((IgnorarContabilidad = 0) and (IdSubCuenta < 1)) then
+ if (IgnorarContabilidad = 0) then
begin
- CanClose := False;
- ShowWarningMessage('Debe establecer la caja o banco donde se realiza el pago');
- end
+ if (AppFactuGES.EjercicioActivo.ESTADO = CTE_CERRADO) then
+ begin
+ CanClose := False;
+ ShowWarningMessage('El pago no puede pasar a la parte contable de la aplicación porque el ejercicio activo está CERRADO');
+ end
+ else if (IdSubCuenta < 1) then
+ begin
+ CanClose := False;
+ ShowWarningMessage('Debe establecer la caja o banco donde se realiza el pago');
+ end
+ end;
end;
end;
diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm
index 5db00529..3dbff0cc 100644
--- a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm
+++ b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm
@@ -51,6 +51,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
inherited pgPaginas: TPageControl
Width = 879
Height = 361
+ ActivePage = pagPagos
OnChanging = pgPaginasChanging
ExplicitLeft = 3
ExplicitTop = 79
@@ -451,6 +452,8 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
+ ExplicitWidth = 150
+ Width = 150
end
inherited eOtrosGastos: TcxDBCurrencyEdit
DataBinding.DataSource = dsDataTable
@@ -493,8 +496,8 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
OnRestorePlacement = JvFormStorageRestorePlacement
end
inherited dsDataTable: TDADataSource [9]
- Left = 8
- Top = 168
+ Left = 16
+ Top = 200
end
inherited JvAppRegistryStorage: TJvAppRegistryStorage [10]
end
diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas
index d7acc088..d0840382 100644
--- a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas
+++ b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas
@@ -73,8 +73,8 @@ type
implementation
-uses uDialogUtils, schRecibosClienteClient_Intf, uEditorFechaPago, uEditorBase, uFactuGES_App,
-uClientesController, uBizDireccionesContacto, uViewClienteRecibo;
+uses uDialogUtils, schRecibosClienteClient_Intf, uEditorFechaPago, uEditorBase,
+uFactuGES_App, uBizEjercicios, uClientesController, uBizDireccionesContacto, uViewClienteRecibo;
{$R *.dfm}
@@ -223,6 +223,7 @@ begin
//Si el recibo tiene una remesa asociada, el cobro generado por la remesa no se podrá eliminar
if (Length(FRecibo.REFERENCIA_REMESA) = 0) then
frViewPagosCliente1.actEliminar.Enabled := (FRecibo.Pagos.DataTable.RecordCount > 0)
+// and (FRecibo.Pagos.ESTADO <> CTE_CERRADO)
else
//En el caso de que el recibo este remesado no se podrán eliminar pagos,
//solo será posible en el caso de ser un recibo libre de remesa
@@ -274,8 +275,10 @@ end;
procedure TfEditorReciboCliente.frViewPagosCliente1actModificarUpdate(Sender: TObject);
begin
inherited;
+ //Si el ejercicio al que pertenece la factura esta cerrado no se podrá modificar
if Assigned(FRecibo) and Assigned(FRecibo.Pagos) then
- frViewPagosCliente1.actModificar.Enabled := (FRecibo.Pagos.DataTable.RecordCount > 0);
+ frViewPagosCliente1.actModificar.Enabled := (FRecibo.Pagos.DataTable.RecordCount > 0)
+// and (FRecibo.Pagos.ESTADO <> CTE_CERRADO);
end;
procedure TfEditorReciboCliente.frViewReciboCliente1eImportePropertiesValidate(
diff --git a/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas b/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas
index a714ca4a..74605637 100644
--- a/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas
+++ b/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas
@@ -55,7 +55,7 @@ type
implementation
uses
- cxControls, DB, uEditorRegistryUtils,Dialogs,
+ cxControls, Forms, DB, uEditorRegistryUtils,Dialogs, uFactuGES_App, uBizEjercicios,
uDAInterfaces, uDataTableUtils, uDataModuleUsuarios,
uDateUtils, uROTypes, DateUtils, Controls, Windows, Variants,
schRecibosProveedorClient_Intf, uDataModuleRecibosProveedor;
diff --git a/Source/Modulos/Recibos de proveedor/Data/RecibosProveedor_data.dproj b/Source/Modulos/Recibos de proveedor/Data/RecibosProveedor_data.dproj
index 47924284..1be1d9b7 100644
--- a/Source/Modulos/Recibos de proveedor/Data/RecibosProveedor_data.dproj
+++ b/Source/Modulos/Recibos de proveedor/Data/RecibosProveedor_data.dproj
@@ -49,9 +49,9 @@
MainSource
-
-
-
+
+
+
diff --git a/Source/Modulos/Recibos de proveedor/Data/uDataModuleRecibosProveedor.dfm b/Source/Modulos/Recibos de proveedor/Data/uDataModuleRecibosProveedor.dfm
index 8c992717..9a52646b 100644
--- a/Source/Modulos/Recibos de proveedor/Data/uDataModuleRecibosProveedor.dfm
+++ b/Source/Modulos/Recibos de proveedor/Data/uDataModuleRecibosProveedor.dfm
@@ -71,8 +71,6 @@ inherited DataModuleRecibosProveedor: TDataModuleRecibosProveedor
Name = 'SUCURSAL'
DataType = datString
Size = 15
- DisplayLabel = 'PagosCliente_SUCURSAL'
- DictionaryEntry = 'PagosProveedor_SUCURSAL'
end
item
Name = 'DC'
@@ -110,6 +108,28 @@ inherited DataModuleRecibosProveedor: TDataModuleRecibosProveedor
item
Name = 'IGNORAR_CONTABILIDAD'
DataType = datSmallInt
+ end
+ item
+ Name = 'ID_SUBCUENTA'
+ DataType = datInteger
+ end
+ item
+ Name = 'SUBCUENTA'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ID_EJERCICIO'
+ DataType = datInteger
+ end
+ item
+ Name = 'ESTADO_EJERCICIO'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ASIENTO_PUNTEADO'
+ DataType = datSmallInt
end>
Params = <>
MasterMappingMode = mmWhere
diff --git a/Source/Modulos/Recibos de proveedor/Model/schRecibosProveedorClient_Intf.pas b/Source/Modulos/Recibos de proveedor/Model/schRecibosProveedorClient_Intf.pas
index 8a06fe28..f9af5aaa 100644
--- a/Source/Modulos/Recibos de proveedor/Model/schRecibosProveedorClient_Intf.pas
+++ b/Source/Modulos/Recibos de proveedor/Model/schRecibosProveedorClient_Intf.pas
@@ -9,9 +9,9 @@ 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_RecibosCompensadosProv = '{A4D4F8FA-E771-4944-8F36-16B6A52DF602}';
- RID_RecibosProveedor = '{3B0F5C4B-BA5A-4503-9B85-D3F31A9B204E}';
- RID_PagosProveedor = '{F079C5BF-44B6-4E92-98E8-EE630E2A27C9}';
+ RID_RecibosCompensadosProv = '{54C2D2B1-B02A-467B-9C52-DA7767EF44A3}';
+ RID_RecibosProveedor = '{5BC08F92-FE46-4CDD-8EDF-4A329D706989}';
+ RID_PagosProveedor = '{528C3735-0265-42C5-BCC4-67E35704B985}';
{ Data table names }
nme_RecibosCompensadosProv = 'RecibosCompensadosProv';
@@ -192,6 +192,11 @@ const
fld_PagosProveedorFECHA_MODIFICACION = 'FECHA_MODIFICACION';
fld_PagosProveedorUSUARIO = 'USUARIO';
fld_PagosProveedorIGNORAR_CONTABILIDAD = 'IGNORAR_CONTABILIDAD';
+ fld_PagosProveedorID_SUBCUENTA = 'ID_SUBCUENTA';
+ fld_PagosProveedorSUBCUENTA = 'SUBCUENTA';
+ fld_PagosProveedorID_EJERCICIO = 'ID_EJERCICIO';
+ fld_PagosProveedorESTADO_EJERCICIO = 'ESTADO_EJERCICIO';
+ fld_PagosProveedorASIENTO_PUNTEADO = 'ASIENTO_PUNTEADO';
{ PagosProveedor field indexes }
idx_PagosProveedorID = 0;
@@ -207,11 +212,16 @@ const
idx_PagosProveedorFECHA_MODIFICACION = 10;
idx_PagosProveedorUSUARIO = 11;
idx_PagosProveedorIGNORAR_CONTABILIDAD = 12;
+ idx_PagosProveedorID_SUBCUENTA = 13;
+ idx_PagosProveedorSUBCUENTA = 14;
+ idx_PagosProveedorID_EJERCICIO = 15;
+ idx_PagosProveedorESTADO_EJERCICIO = 16;
+ idx_PagosProveedorASIENTO_PUNTEADO = 17;
type
{ IRecibosCompensadosProv }
IRecibosCompensadosProv = interface(IDAStronglyTypedDataTable)
- ['{8CDC61D9-4223-4C3D-8DE2-93F8140FE4BC}']
+ ['{6945980A-8AEF-4038-ABD2-0AA3573BE03D}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -690,7 +700,7 @@ type
{ IRecibosProveedor }
IRecibosProveedor = interface(IDAStronglyTypedDataTable)
- ['{A3089684-8FDA-44D5-A5B2-3327D4894A6F}']
+ ['{232A2617-948E-4E49-9AC6-41265EB87C46}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1169,7 +1179,7 @@ type
{ IPagosProveedor }
IPagosProveedor = interface(IDAStronglyTypedDataTable)
- ['{1C8D1CBD-87BA-47CF-ADDA-ECDF8BAF5F4E}']
+ ['{03E8C0E1-2295-4FF5-8FE5-DA68A3326500}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1223,6 +1233,26 @@ type
procedure SetIGNORAR_CONTABILIDADValue(const aValue: SmallInt);
function GetIGNORAR_CONTABILIDADIsNull: Boolean;
procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean);
+ function GetID_SUBCUENTAValue: Integer;
+ procedure SetID_SUBCUENTAValue(const aValue: Integer);
+ function GetID_SUBCUENTAIsNull: Boolean;
+ procedure SetID_SUBCUENTAIsNull(const aValue: Boolean);
+ function GetSUBCUENTAValue: String;
+ procedure SetSUBCUENTAValue(const aValue: String);
+ function GetSUBCUENTAIsNull: Boolean;
+ procedure SetSUBCUENTAIsNull(const aValue: Boolean);
+ function GetID_EJERCICIOValue: Integer;
+ procedure SetID_EJERCICIOValue(const aValue: Integer);
+ function GetID_EJERCICIOIsNull: Boolean;
+ procedure SetID_EJERCICIOIsNull(const aValue: Boolean);
+ function GetESTADO_EJERCICIOValue: String;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String);
+ function GetESTADO_EJERCICIOIsNull: Boolean;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
+ function GetASIENTO_PUNTEADOValue: SmallInt;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+ function GetASIENTO_PUNTEADOIsNull: Boolean;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
{ Properties }
@@ -1252,6 +1282,16 @@ type
property USUARIOIsNull: Boolean read GetUSUARIOIsNull write SetUSUARIOIsNull;
property IGNORAR_CONTABILIDAD: SmallInt read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue;
property IGNORAR_CONTABILIDADIsNull: Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull;
+ property ID_SUBCUENTA: Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
+ property ID_SUBCUENTAIsNull: Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
+ property SUBCUENTA: String read GetSUBCUENTAValue write SetSUBCUENTAValue;
+ property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
+ property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
+ property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
+ property ESTADO_EJERCICIO: String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull: Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO: SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull: Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
end;
{ TPagosProveedorDataTableRules }
@@ -1311,6 +1351,26 @@ type
procedure SetIGNORAR_CONTABILIDADValue(const aValue: SmallInt); virtual;
function GetIGNORAR_CONTABILIDADIsNull: Boolean; virtual;
procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); virtual;
+ function GetID_SUBCUENTAValue: Integer; virtual;
+ procedure SetID_SUBCUENTAValue(const aValue: Integer); virtual;
+ function GetID_SUBCUENTAIsNull: Boolean; virtual;
+ procedure SetID_SUBCUENTAIsNull(const aValue: Boolean); virtual;
+ function GetSUBCUENTAValue: String; virtual;
+ procedure SetSUBCUENTAValue(const aValue: String); virtual;
+ function GetSUBCUENTAIsNull: Boolean; virtual;
+ procedure SetSUBCUENTAIsNull(const aValue: Boolean); virtual;
+ function GetID_EJERCICIOValue: Integer; virtual;
+ procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
+ function GetID_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetESTADO_EJERCICIOValue: String; virtual;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String); virtual;
+ function GetESTADO_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetASIENTO_PUNTEADOValue: SmallInt; virtual;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt); virtual;
+ function GetASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -1339,6 +1399,16 @@ type
property USUARIOIsNull: Boolean read GetUSUARIOIsNull write SetUSUARIOIsNull;
property IGNORAR_CONTABILIDAD: SmallInt read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue;
property IGNORAR_CONTABILIDADIsNull: Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull;
+ property ID_SUBCUENTA: Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
+ property ID_SUBCUENTAIsNull: Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
+ property SUBCUENTA: String read GetSUBCUENTAValue write SetSUBCUENTAValue;
+ property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
+ property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
+ property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
+ property ESTADO_EJERCICIO: String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull: Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO: SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull: Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -3254,6 +3324,111 @@ begin
DataTable.Fields[idx_PagosProveedorIGNORAR_CONTABILIDAD].AsVariant := Null;
end;
+function TPagosProveedorDataTableRules.GetID_SUBCUENTAValue: Integer;
+begin
+ result := DataTable.Fields[idx_PagosProveedorID_SUBCUENTA].AsInteger;
+end;
+
+procedure TPagosProveedorDataTableRules.SetID_SUBCUENTAValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_PagosProveedorID_SUBCUENTA].AsInteger := aValue;
+end;
+
+function TPagosProveedorDataTableRules.GetID_SUBCUENTAIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosProveedorID_SUBCUENTA].IsNull;
+end;
+
+procedure TPagosProveedorDataTableRules.SetID_SUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosProveedorID_SUBCUENTA].AsVariant := Null;
+end;
+
+function TPagosProveedorDataTableRules.GetSUBCUENTAValue: String;
+begin
+ result := DataTable.Fields[idx_PagosProveedorSUBCUENTA].AsString;
+end;
+
+procedure TPagosProveedorDataTableRules.SetSUBCUENTAValue(const aValue: String);
+begin
+ DataTable.Fields[idx_PagosProveedorSUBCUENTA].AsString := aValue;
+end;
+
+function TPagosProveedorDataTableRules.GetSUBCUENTAIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosProveedorSUBCUENTA].IsNull;
+end;
+
+procedure TPagosProveedorDataTableRules.SetSUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosProveedorSUBCUENTA].AsVariant := Null;
+end;
+
+function TPagosProveedorDataTableRules.GetID_EJERCICIOValue: Integer;
+begin
+ result := DataTable.Fields[idx_PagosProveedorID_EJERCICIO].AsInteger;
+end;
+
+procedure TPagosProveedorDataTableRules.SetID_EJERCICIOValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_PagosProveedorID_EJERCICIO].AsInteger := aValue;
+end;
+
+function TPagosProveedorDataTableRules.GetID_EJERCICIOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosProveedorID_EJERCICIO].IsNull;
+end;
+
+procedure TPagosProveedorDataTableRules.SetID_EJERCICIOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosProveedorID_EJERCICIO].AsVariant := Null;
+end;
+
+function TPagosProveedorDataTableRules.GetESTADO_EJERCICIOValue: String;
+begin
+ result := DataTable.Fields[idx_PagosProveedorESTADO_EJERCICIO].AsString;
+end;
+
+procedure TPagosProveedorDataTableRules.SetESTADO_EJERCICIOValue(const aValue: String);
+begin
+ DataTable.Fields[idx_PagosProveedorESTADO_EJERCICIO].AsString := aValue;
+end;
+
+function TPagosProveedorDataTableRules.GetESTADO_EJERCICIOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosProveedorESTADO_EJERCICIO].IsNull;
+end;
+
+procedure TPagosProveedorDataTableRules.SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosProveedorESTADO_EJERCICIO].AsVariant := Null;
+end;
+
+function TPagosProveedorDataTableRules.GetASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_PagosProveedorASIENTO_PUNTEADO].AsSmallInt;
+end;
+
+procedure TPagosProveedorDataTableRules.SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_PagosProveedorASIENTO_PUNTEADO].AsSmallInt := aValue;
+end;
+
+function TPagosProveedorDataTableRules.GetASIENTO_PUNTEADOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PagosProveedorASIENTO_PUNTEADO].IsNull;
+end;
+
+procedure TPagosProveedorDataTableRules.SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PagosProveedorASIENTO_PUNTEADO].AsVariant := Null;
+end;
+
initialization
RegisterDataTableRules(RID_RecibosCompensadosProv, TRecibosCompensadosProvDataTableRules);
diff --git a/Source/Modulos/Recibos de proveedor/Model/schRecibosProveedorServer_Intf.pas b/Source/Modulos/Recibos de proveedor/Model/schRecibosProveedorServer_Intf.pas
index 7593beac..6421c28e 100644
--- a/Source/Modulos/Recibos de proveedor/Model/schRecibosProveedorServer_Intf.pas
+++ b/Source/Modulos/Recibos de proveedor/Model/schRecibosProveedorServer_Intf.pas
@@ -9,14 +9,14 @@ 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_RecibosCompensadosProvDelta = '{E95FB3AF-C9FA-4D99-89BD-57C6A4876A41}';
- RID_RecibosProveedorDelta = '{33917437-C0D3-47D1-B9D6-4F5690CA0B91}';
- RID_PagosProveedorDelta = '{A624BF64-9338-42F1-A371-05E83CD550D8}';
+ RID_RecibosCompensadosProvDelta = '{16554E00-D877-4BAF-9C55-8E20790DCD56}';
+ RID_RecibosProveedorDelta = '{ABE8514C-4344-43BF-B41B-C5E3095D1557}';
+ RID_PagosProveedorDelta = '{4E478891-83D7-4418-A3E7-E36D0F802EE0}';
type
{ IRecibosCompensadosProvDelta }
IRecibosCompensadosProvDelta = interface(IRecibosCompensadosProv)
- ['{E95FB3AF-C9FA-4D99-89BD-57C6A4876A41}']
+ ['{16554E00-D877-4BAF-9C55-8E20790DCD56}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_RECIBO_COMPENSADOValue : Integer;
@@ -494,7 +494,7 @@ type
{ IRecibosProveedorDelta }
IRecibosProveedorDelta = interface(IRecibosProveedor)
- ['{33917437-C0D3-47D1-B9D6-4F5690CA0B91}']
+ ['{ABE8514C-4344-43BF-B41B-C5E3095D1557}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_RECIBO_COMPENSADOValue : Integer;
@@ -972,7 +972,7 @@ type
{ IPagosProveedorDelta }
IPagosProveedorDelta = interface(IPagosProveedor)
- ['{A624BF64-9338-42F1-A371-05E83CD550D8}']
+ ['{4E478891-83D7-4418-A3E7-E36D0F802EE0}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_RECIBOValue : Integer;
@@ -987,6 +987,11 @@ type
function GetOldFECHA_MODIFICACIONValue : DateTime;
function GetOldUSUARIOValue : String;
function GetOldIGNORAR_CONTABILIDADValue : SmallInt;
+ function GetOldID_SUBCUENTAValue : Integer;
+ function GetOldSUBCUENTAValue : String;
+ function GetOldID_EJERCICIOValue : Integer;
+ function GetOldESTADO_EJERCICIOValue : String;
+ function GetOldASIENTO_PUNTEADOValue : SmallInt;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -1002,6 +1007,11 @@ type
property OldFECHA_MODIFICACION : DateTime read GetOldFECHA_MODIFICACIONValue;
property OldUSUARIO : String read GetOldUSUARIOValue;
property OldIGNORAR_CONTABILIDAD : SmallInt read GetOldIGNORAR_CONTABILIDADValue;
+ property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
+ property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
+ property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
+ property OldESTADO_EJERCICIO : String read GetOldESTADO_EJERCICIOValue;
+ property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue;
end;
{ TPagosProveedorBusinessProcessorRules }
@@ -1087,6 +1097,36 @@ type
function GetOldIGNORAR_CONTABILIDADIsNull: Boolean; virtual;
procedure SetIGNORAR_CONTABILIDADValue(const aValue: SmallInt); virtual;
procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); virtual;
+ function GetID_SUBCUENTAValue: Integer; virtual;
+ function GetID_SUBCUENTAIsNull: Boolean; virtual;
+ function GetOldID_SUBCUENTAValue: Integer; virtual;
+ function GetOldID_SUBCUENTAIsNull: Boolean; virtual;
+ procedure SetID_SUBCUENTAValue(const aValue: Integer); virtual;
+ procedure SetID_SUBCUENTAIsNull(const aValue: Boolean); virtual;
+ function GetSUBCUENTAValue: String; virtual;
+ function GetSUBCUENTAIsNull: Boolean; virtual;
+ function GetOldSUBCUENTAValue: String; virtual;
+ function GetOldSUBCUENTAIsNull: Boolean; virtual;
+ procedure SetSUBCUENTAValue(const aValue: String); virtual;
+ procedure SetSUBCUENTAIsNull(const aValue: Boolean); virtual;
+ function GetID_EJERCICIOValue: Integer; virtual;
+ function GetID_EJERCICIOIsNull: Boolean; virtual;
+ function GetOldID_EJERCICIOValue: Integer; virtual;
+ function GetOldID_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
+ procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetESTADO_EJERCICIOValue: String; virtual;
+ function GetESTADO_EJERCICIOIsNull: Boolean; virtual;
+ function GetOldESTADO_EJERCICIOValue: String; virtual;
+ function GetOldESTADO_EJERCICIOIsNull: Boolean; virtual;
+ procedure SetESTADO_EJERCICIOValue(const aValue: String); virtual;
+ procedure SetESTADO_EJERCICIOIsNull(const aValue: Boolean); virtual;
+ function GetASIENTO_PUNTEADOValue: SmallInt; virtual;
+ function GetASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ function GetOldASIENTO_PUNTEADOValue: SmallInt; virtual;
+ function GetOldASIENTO_PUNTEADOIsNull: Boolean; virtual;
+ procedure SetASIENTO_PUNTEADOValue(const aValue: SmallInt); virtual;
+ procedure SetASIENTO_PUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -1141,6 +1181,26 @@ type
property IGNORAR_CONTABILIDADIsNull : Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull;
property OldIGNORAR_CONTABILIDAD : SmallInt read GetOldIGNORAR_CONTABILIDADValue;
property OldIGNORAR_CONTABILIDADIsNull : Boolean read GetOldIGNORAR_CONTABILIDADIsNull;
+ property ID_SUBCUENTA : Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
+ property ID_SUBCUENTAIsNull : Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
+ property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
+ property OldID_SUBCUENTAIsNull : Boolean read GetOldID_SUBCUENTAIsNull;
+ property SUBCUENTA : String read GetSUBCUENTAValue write SetSUBCUENTAValue;
+ property SUBCUENTAIsNull : Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
+ property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
+ property OldSUBCUENTAIsNull : Boolean read GetOldSUBCUENTAIsNull;
+ property ID_EJERCICIO : Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
+ property ID_EJERCICIOIsNull : Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
+ property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
+ property OldID_EJERCICIOIsNull : Boolean read GetOldID_EJERCICIOIsNull;
+ property ESTADO_EJERCICIO : String read GetESTADO_EJERCICIOValue write SetESTADO_EJERCICIOValue;
+ property ESTADO_EJERCICIOIsNull : Boolean read GetESTADO_EJERCICIOIsNull write SetESTADO_EJERCICIOIsNull;
+ property OldESTADO_EJERCICIO : String read GetOldESTADO_EJERCICIOValue;
+ property OldESTADO_EJERCICIOIsNull : Boolean read GetOldESTADO_EJERCICIOIsNull;
+ property ASIENTO_PUNTEADO : SmallInt read GetASIENTO_PUNTEADOValue write SetASIENTO_PUNTEADOValue;
+ property ASIENTO_PUNTEADOIsNull : Boolean read GetASIENTO_PUNTEADOIsNull write SetASIENTO_PUNTEADOIsNull;
+ property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue;
+ property OldASIENTO_PUNTEADOIsNull : Boolean read GetOldASIENTO_PUNTEADOIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -3947,6 +4007,161 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorIGNORAR_CONTABILIDAD] := Null;
end;
+function TPagosProveedorBusinessProcessorRules.GetID_SUBCUENTAValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorID_SUBCUENTA];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetID_SUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorID_SUBCUENTA]);
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldID_SUBCUENTAValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorID_SUBCUENTA];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldID_SUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorID_SUBCUENTA]);
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetID_SUBCUENTAValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorID_SUBCUENTA] := aValue;
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetID_SUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorID_SUBCUENTA] := Null;
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetSUBCUENTAValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorSUBCUENTA];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetSUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorSUBCUENTA]);
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldSUBCUENTAValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorSUBCUENTA];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldSUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorSUBCUENTA]);
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetSUBCUENTAValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorSUBCUENTA] := aValue;
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetSUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorSUBCUENTA] := Null;
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetID_EJERCICIOValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorID_EJERCICIO];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetID_EJERCICIOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorID_EJERCICIO]);
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldID_EJERCICIOValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorID_EJERCICIO];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldID_EJERCICIOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorID_EJERCICIO]);
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetID_EJERCICIOValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorID_EJERCICIO] := aValue;
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetID_EJERCICIOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorID_EJERCICIO] := Null;
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetESTADO_EJERCICIOValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorESTADO_EJERCICIO];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetESTADO_EJERCICIOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorESTADO_EJERCICIO]);
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldESTADO_EJERCICIOValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorESTADO_EJERCICIO];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldESTADO_EJERCICIOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorESTADO_EJERCICIO]);
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetESTADO_EJERCICIOValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorESTADO_EJERCICIO] := aValue;
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetESTADO_EJERCICIOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorESTADO_EJERCICIO] := Null;
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorASIENTO_PUNTEADO];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetASIENTO_PUNTEADOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorASIENTO_PUNTEADO]);
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldASIENTO_PUNTEADOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorASIENTO_PUNTEADO];
+end;
+
+function TPagosProveedorBusinessProcessorRules.GetOldASIENTO_PUNTEADOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PagosProveedorASIENTO_PUNTEADO]);
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetASIENTO_PUNTEADOValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorASIENTO_PUNTEADO] := aValue;
+end;
+
+procedure TPagosProveedorBusinessProcessorRules.SetASIENTO_PUNTEADOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PagosProveedorASIENTO_PUNTEADO] := Null;
+end;
+
initialization
RegisterBusinessProcessorRules(RID_RecibosCompensadosProvDelta, TRecibosCompensadosProvBusinessProcessorRules);
diff --git a/Source/Modulos/Recibos de proveedor/RecibosProveedor_Group.groupproj b/Source/Modulos/Recibos de proveedor/RecibosProveedor_Group.groupproj
index f4c4e193..5a827225 100644
--- a/Source/Modulos/Recibos de proveedor/RecibosProveedor_Group.groupproj
+++ b/Source/Modulos/Recibos de proveedor/RecibosProveedor_Group.groupproj
@@ -9,6 +9,7 @@
+
@@ -161,14 +162,23 @@
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Recibos de proveedor/Servidor/srvRecibosProveedor_Impl.dfm b/Source/Modulos/Recibos de proveedor/Servidor/srvRecibosProveedor_Impl.dfm
index 20e52442..a8c4e9bf 100644
--- a/Source/Modulos/Recibos de proveedor/Servidor/srvRecibosProveedor_Impl.dfm
+++ b/Source/Modulos/Recibos de proveedor/Servidor/srvRecibosProveedor_Impl.dfm
@@ -732,7 +732,7 @@ object srvRecibosProveedor: TsrvRecibosProveedor
Statements = <
item
Connection = 'IBX'
- TargetTable = 'PAGOS_PROVEEDOR'
+ TargetTable = 'V_PAGOS_PROVEEDOR'
StatementType = stAutoSQL
ColumnMappings = <
item
@@ -759,10 +759,6 @@ object srvRecibosProveedor: TsrvRecibosProveedor
DatasetField = 'ENTIDAD'
TableField = 'ENTIDAD'
end
- item
- DatasetField = 'SUCURSAL'
- TableField = 'SUCURSAL'
- end
item
DatasetField = 'DC'
TableField = 'DC'
@@ -786,6 +782,30 @@ object srvRecibosProveedor: TsrvRecibosProveedor
item
DatasetField = 'IGNORAR_CONTABILIDAD'
TableField = 'IGNORAR_CONTABILIDAD'
+ end
+ item
+ DatasetField = 'ID_SUBCUENTA'
+ TableField = 'ID_SUBCUENTA'
+ end
+ item
+ DatasetField = 'SUBCUENTA'
+ TableField = 'SUBCUENTA'
+ end
+ item
+ DatasetField = 'ID_EJERCICIO'
+ TableField = 'ID_EJERCICIO'
+ end
+ item
+ DatasetField = 'ESTADO_EJERCICIO'
+ TableField = 'ESTADO_EJERCICIO'
+ end
+ item
+ DatasetField = 'ASIENTO_PUNTEADO'
+ TableField = 'ASIENTO_PUNTEADO'
+ end
+ item
+ DatasetField = 'SUCURSAL'
+ TableField = 'SUCURSAL'
end>
end>
Name = 'PagosProveedor'
@@ -829,7 +849,6 @@ object srvRecibosProveedor: TsrvRecibosProveedor
Name = 'SUCURSAL'
DataType = datString
Size = 15
- DictionaryEntry = 'PagosProveedor_SUCURSAL'
end
item
Name = 'DC'
@@ -862,6 +881,28 @@ object srvRecibosProveedor: TsrvRecibosProveedor
item
Name = 'IGNORAR_CONTABILIDAD'
DataType = datSmallInt
+ end
+ item
+ Name = 'ID_SUBCUENTA'
+ DataType = datInteger
+ end
+ item
+ Name = 'SUBCUENTA'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ID_EJERCICIO'
+ DataType = datInteger
+ end
+ item
+ Name = 'ESTADO_EJERCICIO'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ASIENTO_PUNTEADO'
+ DataType = datSmallInt
end>
end>
JoinDataTables = <>
diff --git a/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.pas b/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.pas
index ee3bf710..d6266e7c 100644
--- a/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.pas
+++ b/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.pas
@@ -43,7 +43,7 @@ implementation
{$R *.dfm}
{$INCLUDE ..\..\..\FactuGES.inc}
-uses uDialogUtils, uFactuGES_App;
+uses uDialogUtils, uFactuGES_App, uBizEjercicios;
procedure TfEditorFechaPagoProveedor.DeshabilitarContabilidad;
begin
@@ -67,11 +67,19 @@ begin
ShowWarningMessage('Debe establecer la fecha del pago');
end;
- if ((IgnorarContabilidad = 0) and (IdSubCuenta < 1)) then
+ if (IgnorarContabilidad = 0) then
begin
- CanClose := False;
- ShowWarningMessage('Debe establecer la caja o banco donde se realiza el pago');
- end
+ if (AppFactuGES.EjercicioActivo.ESTADO = CTE_CERRADO) then
+ begin
+ CanClose := False;
+ ShowWarningMessage('El pago no puede pasar a la parte contable de la aplicación porque el ejercicio activo está CERRADO');
+ end
+ else if (IdSubCuenta < 1) then
+ begin
+ CanClose := False;
+ ShowWarningMessage('Debe establecer la caja o banco donde se realiza el pago');
+ end
+ end;
end;
end;
diff --git a/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.dfm b/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.dfm
index 7bf67a8a..4e2d7ac2 100644
--- a/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.dfm
+++ b/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.dfm
@@ -51,6 +51,7 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
inherited pgPaginas: TPageControl
Width = 685
Height = 353
+ ActivePage = pagPagos
ExplicitLeft = 3
ExplicitTop = 79
ExplicitWidth = 685
@@ -351,10 +352,11 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
end
end
inherited DADataSource: TDADataSource
- Left = 32
- Top = 80
+ Left = 48
+ Top = 88
end
inherited ActionListContenido: TActionList
+ Left = 24
inherited actAnadir: TAction
OnExecute = frViewPagosProveedor1actAnadirExecute
end
@@ -489,7 +491,7 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
end
end
inherited EditorActionList: TActionList [5]
- Left = 48
+ Left = 56
Top = 144
inherited actNuevo: TAction
Enabled = False
diff --git a/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.pas b/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.pas
index ddccc6bc..a250562d 100644
--- a/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.pas
+++ b/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.pas
@@ -71,7 +71,7 @@ type
implementation
-uses schRecibosProveedorClient_Intf, uEditorFechaPagoProveedor, uEditorBase, uFactuGES_App,
+uses schRecibosProveedorClient_Intf, uEditorFechaPagoProveedor, uEditorBase, uFactuGES_App, uBizEjercicios,
uProveedoresController, uBizDireccionesContacto, uViewProveedorRecibo;
{$R *.dfm}
@@ -209,8 +209,10 @@ end;
procedure TfEditorReciboProveedor.frViewPagosProveedor1actEliminarUpdate(Sender: TObject);
begin
+ //Si el ejercicio al que pertenece la factura esta cerrado no se podrá eliminar
if Assigned(FRecibo) and Assigned(FRecibo.Pagos) then
frViewPagosProveedor1.actEliminar.Enabled := (FRecibo.Pagos.DataTable.RecordCount > 0)
+// and (FRecibo.Pagos.ESTADO <> CTE_CERRADO);
end;
procedure TfEditorReciboProveedor.frViewPagosProveedor1actModificarExecute(Sender: TObject);
@@ -250,8 +252,10 @@ end;
procedure TfEditorReciboProveedor.frViewPagosProveedor1actModificarUpdate(Sender: TObject);
begin
inherited;
+ //Si el ejercicio al que pertenece la factura esta cerrado no se podrá eliminar
if Assigned(FRecibo) and Assigned(FRecibo.Pagos) then
- frViewPagosProveedor1.actModificar.Enabled := (FRecibo.Pagos.DataTable.RecordCount > 0);
+ frViewPagosProveedor1.actModificar.Enabled := (FRecibo.Pagos.DataTable.RecordCount > 0)
+// and (FRecibo.Pagos.ESTADO <> CTE_CERRADO);
end;
procedure TfEditorReciboProveedor.frViewReciboProvImportes1eImportePropertiesEditValueChanged(
diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL
index b5518819..b60aa1d3 100644
--- a/Source/Servicios/FactuGES.RODL
+++ b/Source/Servicios/FactuGES.RODL
@@ -487,6 +487,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas
index 553b002d..ad7dfd33 100644
--- a/Source/Servicios/FactuGES_Intf.pas
+++ b/Source/Servicios/FactuGES_Intf.pas
@@ -673,6 +673,8 @@ type
function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const CLIENTE: String): Boolean;
function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ES_ACREEDOR: Integer; const ID_EMPRESA: Integer; const PROVEEDOR: String): Boolean;
function DarNumOrdenAsiento: Integer;
+ procedure PuntearAsiento(const ID_ASIENTO: Integer);
+ procedure PuntearSubcuenta(const ID_SUBCUENTA: Integer);
end;
{ CosrvContabilidad }
@@ -689,6 +691,8 @@ type
function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const CLIENTE: String): Boolean;
function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ES_ACREEDOR: Integer; const ID_EMPRESA: Integer; const PROVEEDOR: String): Boolean;
function DarNumOrdenAsiento: Integer;
+ procedure PuntearAsiento(const ID_ASIENTO: Integer);
+ procedure PuntearSubcuenta(const ID_SUBCUENTA: Integer);
end;
{ IsrvUnidadesMedida }
@@ -2103,6 +2107,36 @@ begin
end
end;
+procedure TsrvContabilidad_Proxy.PuntearAsiento(const ID_ASIENTO: Integer);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'PuntearAsiento');
+ __Message.Write('ID_ASIENTO', TypeInfo(Integer), ID_ASIENTO, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TsrvContabilidad_Proxy.PuntearSubcuenta(const ID_SUBCUENTA: Integer);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'PuntearSubcuenta');
+ __Message.Write('ID_SUBCUENTA', TypeInfo(Integer), ID_SUBCUENTA, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
{ CosrvUnidadesMedida }
class function CosrvUnidadesMedida.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvUnidadesMedida;
diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas
index 4c3f3765..4bbcfda2 100644
--- a/Source/Servicios/FactuGES_Invk.pas
+++ b/Source/Servicios/FactuGES_Invk.pas
@@ -199,6 +199,8 @@ type
procedure Invoke_AnadirSubCuentaCliente(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_AnadirSubCuentaProveedor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_DarNumOrdenAsiento(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_PuntearAsiento(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_PuntearSubcuenta(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
TsrvUnidadesMedida_Invoker = class(TDataAbstractService_Invoker)
@@ -1072,6 +1074,46 @@ begin
end;
end;
+procedure TsrvContabilidad_Invoker.Invoke_PuntearAsiento(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure PuntearAsiento(const ID_ASIENTO: Integer); }
+var
+ ID_ASIENTO: Integer;
+begin
+ try
+ __Message.Read('ID_ASIENTO', TypeInfo(Integer), ID_ASIENTO, []);
+
+ (__Instance as IsrvContabilidad).PuntearAsiento(ID_ASIENTO);
+
+ __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContabilidad', 'PuntearAsientoResponse');
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+procedure TsrvContabilidad_Invoker.Invoke_PuntearSubcuenta(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure PuntearSubcuenta(const ID_SUBCUENTA: Integer); }
+var
+ ID_SUBCUENTA: Integer;
+begin
+ try
+ __Message.Read('ID_SUBCUENTA', TypeInfo(Integer), ID_SUBCUENTA, []);
+
+ (__Instance as IsrvContabilidad).PuntearSubcuenta(ID_SUBCUENTA);
+
+ __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContabilidad', 'PuntearSubcuentaResponse');
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
{ TsrvComisiones_Invoker }
procedure TsrvComisiones_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
diff --git a/Source/Servicios/RODLFILE.res b/Source/Servicios/RODLFILE.res
index 616a3c44..c0a575a4 100644
Binary files a/Source/Servicios/RODLFILE.res and b/Source/Servicios/RODLFILE.res differ
diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES
index e8c3bd33..28421aed 100644
Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ
diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr
index 367feb70..6fbc45e5 100644
--- a/Source/Servidor/FactuGES_Server.dpr
+++ b/Source/Servidor/FactuGES_Server.dpr
@@ -95,8 +95,6 @@ uses
schReferenciasServer_Intf in '..\Modulos\Referencias\Model\schReferenciasServer_Intf.pas',
uBizRecibosProveedorServer in '..\Modulos\Recibos de proveedor\Model\uBizRecibosProveedorServer.pas',
uRptAlbaranesCliente_Server in '..\Modulos\Albaranes de cliente\Reports\uRptAlbaranesCliente_Server.pas',
- schRecibosClienteClient_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteClient_Intf.pas',
- schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas',
uBizAsientosServer in '..\Modulos\Contabilidad\Model\uBizAsientosServer.pas',
srvComisiones_Impl in '..\Modulos\Comisiones\Servidor\srvComisiones_Impl.pas' {srvComisiones: TDataAbstractService},
uBizComisionesServer in '..\Modulos\Comisiones\Model\uBizComisionesServer.pas',
@@ -118,20 +116,22 @@ uses
srvGestorInformes_Impl in '..\Modulos\Gestor de informes\Servidor\srvGestorInformes_Impl.pas' {srvGestorInformes: TDataAbstractService},
uRptFacturasProveedor_Server in '..\Modulos\Facturas de proveedor\Reports\uRptFacturasProveedor_Server.pas' {RptFacturasProveedor: TDataModule},
uRptRecibosProveedor_Server in '..\Modulos\Recibos de proveedor\Reports\uRptRecibosProveedor_Server.pas' {RptRecibosProveedor: TDataModule},
- schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas',
- schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas',
schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
schRemesasClienteClient_Intf in '..\Modulos\Remesas de cliente\Model\schRemesasClienteClient_Intf.pas',
schRemesasClienteServer_Intf in '..\Modulos\Remesas de cliente\Model\schRemesasClienteServer_Intf.pas',
schAlbaranesClienteClient_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteClient_Intf.pas',
schAlbaranesClienteServer_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteServer_Intf.pas',
- schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas',
- schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
+ schContabilidadClient_Intf in '..\Modulos\Contabilidad\Model\schContabilidadClient_Intf.pas',
+ schContabilidadServer_Intf in '..\Modulos\Contabilidad\Model\schContabilidadServer_Intf.pas',
schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
- schContabilidadClient_Intf in '..\Modulos\Contabilidad\Model\schContabilidadClient_Intf.pas',
- schContabilidadServer_Intf in '..\Modulos\Contabilidad\Model\schContabilidadServer_Intf.pas';
+ schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas',
+ schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
+ schRecibosClienteClient_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteClient_Intf.pas',
+ schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas',
+ schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas',
+ schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas';
{$R *.res}
{$R ..\Servicios\RODLFile.res}
diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc
index 5f709130..7122200d 100644
--- a/Source/Servidor/FactuGES_Server.rc
+++ b/Source/Servidor/FactuGES_Server.rc
@@ -16,7 +16,7 @@ BEGIN
VALUE "FileVersion", "2.2.8.0\0"
VALUE "ProductName", "FactuGES (Servidor)\0"
VALUE "ProductVersion", "2.2.8.0\0"
- VALUE "CompileDate", "lunes, 09 de febrero de 2009 17:25\0"
+ VALUE "CompileDate", "viernes, 13 de febrero de 2009 18:39\0"
END
END
BLOCK "VarFileInfo"