diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql
index 39947f4f..20e490f4 100644
--- a/Database/scripts/factuges.sql
+++ b/Database/scripts/factuges.sql
@@ -449,22 +449,22 @@ begin
if (diferencia > 0) then
begin
/*APUNTE DE CIERRE*/
- insert into CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, HABER)
- values (:id_apunte_cierre, :id_asiento_cierre, :id_subcuenta_cierre, :num_orden, 'Asiento de cierre ' || :nombre_ejercicio_cierre, :diferencia);
+ insert into CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, PUNTEADO, CONCEPTO, HABER)
+ values (:id_apunte_cierre, :id_asiento_cierre, :id_subcuenta_cierre, :num_orden, -1, 'Asiento de cierre ' || :nombre_ejercicio_cierre, :diferencia);
/*APUNTE DE APERTURA*/
- insert into CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DEBE)
- values (:id_apunte_apertura, :id_asiento_apertura, :id_subcuenta_apertura, :num_orden, 'Asiento de apertura ' || :nombre_ejercicio_apertura, :diferencia);
+ insert into CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, PUNTEADO, CONCEPTO, DEBE)
+ values (:id_apunte_apertura, :id_asiento_apertura, :id_subcuenta_apertura, :num_orden, -1, 'Asiento de apertura ' || :nombre_ejercicio_apertura, :diferencia);
end
else
begin
/*APUNTE DE CIERRE*/
- insert into CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DEBE)
- values (:id_apunte_cierre, :id_asiento_cierre, :id_subcuenta_cierre, :num_orden, 'Asiento de cierre ' || :nombre_ejercicio_cierre, (:diferencia)*-1);
+ insert into CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, PUNTEADO, CONCEPTO, DEBE)
+ values (:id_apunte_cierre, :id_asiento_cierre, :id_subcuenta_cierre, :num_orden, -1, 'Asiento de cierre ' || :nombre_ejercicio_cierre, (:diferencia)*-1);
/*APUNTE DE APERTURA*/
- insert into CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, HABER)
- values (:id_apunte_apertura, :id_asiento_apertura, :id_subcuenta_apertura, :num_orden, 'Asiento de apertura ' || :nombre_ejercicio_apertura, (:diferencia)*-1);
+ insert into CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, PUNTEADO, CONCEPTO, HABER)
+ values (:id_apunte_apertura, :id_asiento_apertura, :id_subcuenta_apertura, :num_orden, -1, 'Asiento de apertura ' || :nombre_ejercicio_apertura, (:diferencia)*-1);
end
num_orden = num_orden + 1;
end
@@ -4283,15 +4283,15 @@ begin
IF (IMPORTETOTAL < 0) THEN
BEGIN
/*INSERTAMOS LOS APUNTES DEL ABONO*/
- 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, 'Abono de cliente: ' || :RAZON,
+ 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, 'Abono de cliente: ' || :RAZON,
:REFERENCIAFACTURA, NULL, -1*(:IMPORTETOTAL));
END
ELSE
BEGIN
/*INSERTAMOS LOS APUNTES DE LA FACTURA*/
- 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, 'Factura de cliente: ' || :RAZON,
+ 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, 'Factura de cliente: ' || :RAZON,
:REFERENCIAFACTURA, :IMPORTETOTAL, NULL);
END
@@ -4305,14 +4305,14 @@ begin
IF (IMPORTETOTAL < 0) THEN
BEGIN
- 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, 2, 'Abono de cliente: ' || :RAZON,
+ 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, 2, -1, 'Abono de cliente: ' || :RAZON,
:REFERENCIAFACTURA || ' (IVA)', -1*(:IMPORTEIVA), NULL);
END
ELSE
BEGIN
- 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, 2, 'Factura de cliente: ' || :RAZON,
+ 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, 2, -1, 'Factura de cliente: ' || :RAZON,
:REFERENCIAFACTURA || ' (IVA)', NULL, :IMPORTEIVA);
END
END
@@ -4327,14 +4327,14 @@ begin
IF (IMPORTETOTAL < 0) THEN
BEGIN
- 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, 3, 'Abono de cliente: ' || :RAZON,
+ 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, 3, -1, 'Abono de cliente: ' || :RAZON,
:REFERENCIAFACTURA || ' (RE)', -1*(:IMPORTERE), NULL);
END
ELSE
BEGIN
- 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, 3, 'Factura de cliente: ' || :RAZON,
+ 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, 3, -1, 'Factura de cliente: ' || :RAZON,
:REFERENCIAFACTURA || ' (RE)', NULL, :IMPORTERE);
END
END
@@ -4343,14 +4343,14 @@ begin
BEGIN
IF (IMPORTETOTAL < 0) THEN
BEGIN
- INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DOCUMENTO, DEBE, HABER)
- VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :ID_SUBCUENTA_VENTA, 4, 'Abono de cliente: ' || :RAZON,
+ 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, :ID_SUBCUENTA_VENTA, 4, -1, 'Abono de cliente: ' || :RAZON,
:REFERENCIAFACTURA || ' (Base imponible)', -1*(:BASEIMPONIBLE), NULL);
END
ELSE
BEGIN
- INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DOCUMENTO, DEBE, HABER)
- VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :ID_SUBCUENTA_VENTA, 4, 'Factura de cliente: ' || :RAZON,
+ 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, :ID_SUBCUENTA_VENTA, 4, -1, 'Factura de cliente: ' || :RAZON,
:REFERENCIAFACTURA || ' (Base imponible)', NULL, :BASEIMPONIBLE);
END
END
@@ -4439,15 +4439,15 @@ begin
IF (IMPORTETOTAL < 0) THEN
BEGIN
/*INSERTAMOS LOS APUNTES DEL ABONO*/
- 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, 'Abono de proveedor: ' || :RAZON,
+ 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, 'Abono de proveedor: ' || :RAZON,
:REFERENCIAFACTURA, -1*(:IMPORTETOTAL), NULL);
END
ELSE
BEGIN
/*INSERTAMOS LOS APUNTES DE LA FACTURA*/
- 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, 'Factura de proveedor: ' || :RAZON,
+ 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, 'Factura de proveedor: ' || :RAZON,
:REFERENCIAFACTURA, NULL, :IMPORTETOTAL);
END
@@ -4461,14 +4461,14 @@ begin
IF (IMPORTETOTAL < 0) THEN
BEGIN
- 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, 2, 'Abono de proveedor: ' || :RAZON,
+ 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, 2, -1, 'Abono de proveedor: ' || :RAZON,
:REFERENCIAFACTURA || ' (IVA)', NULL, -1*(:IMPORTEIVA));
END
ELSE
BEGIN
- 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, 2, 'Factura de proveedor: ' || :RAZON,
+ 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, 2, -1, 'Factura de proveedor: ' || :RAZON,
:REFERENCIAFACTURA || ' (IVA)', :IMPORTEIVA, NULL);
END
END
@@ -4483,14 +4483,14 @@ begin
IF (IMPORTETOTAL < 0) THEN
BEGIN
- 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, 3, 'Abono de proveedor: ' || :RAZON,
+ 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, 3, -1, 'Abono de proveedor: ' || :RAZON,
:REFERENCIAFACTURA || ' (RE)', NULL, -1*(:IMPORTERE));
END
ELSE
BEGIN
- 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, 3, 'Factura de proveedor: ' || :RAZON,
+ 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, 3, -1, 'Factura de proveedor: ' || :RAZON,
:REFERENCIAFACTURA || ' (RE)', :IMPORTERE, NULL);
END
END
@@ -4499,14 +4499,14 @@ begin
BEGIN
IF (IMPORTETOTAL < 0) THEN
BEGIN
- INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DOCUMENTO, DEBE, HABER)
- VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :ID_SUBCUENTA_COMPRA, 4, 'Abono de proveedor: ' || :RAZON,
+ 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, :ID_SUBCUENTA_COMPRA, 4, -1, 'Abono de proveedor: ' || :RAZON,
:REFERENCIAFACTURA || ' (Base imponible)', NULL, -1*(:BASEIMPONIBLE));
END
ELSE
BEGIN
- INSERT INTO CONT_APUNTES (ID, ID_ASIENTO, ID_SUBCUENTA, NUM_ORDEN, CONCEPTO, DOCUMENTO, DEBE, HABER)
- VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :ID_SUBCUENTA_COMPRA, 4, 'Factura de proveedor: ' || :RAZON,
+ 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, :ID_SUBCUENTA_COMPRA, 4, -1, 'Factura de proveedor: ' || :RAZON,
:REFERENCIAFACTURA || ' (Base imponible)', :BASEIMPONIBLE, NULL);
END
END
@@ -4532,17 +4532,18 @@ declare variable debe numeric(11,2);
declare variable haber numeric(11,2);
declare variable idempresa integer;
declare variable idcontacto integer;
+declare variable concepto varchar(2000);
begin
/*BUSCAMOS EL PAGO PARA COMPROBAR SI HACER ASIENTO*/
SELECT PAGOS_CLIENTE.IGNORAR_CONTABILIDAD, RECIBOS_CLIENTE.ID_EMPRESA, RECIBOS_CLIENTE.ID_CLIENTE,
RECIBOS_CLIENTE.REFERENCIA || ': ' || RECIBOS_CLIENTE.NOMBRE,
- PAGOS_CLIENTE.FECHA_PAGO,
+ PAGOS_CLIENTE.FECHA_PAGO, PAGOS_CLIENTE.TIPO,
PAGOS_CLIENTE.TIPO || ': ' || RECIBOS_CLIENTE.DESCRIPCION,
RECIBOS_CLIENTE.IMPORTE
FROM PAGOS_CLIENTE
LEFT JOIN RECIBOS_CLIENTE ON (RECIBOS_CLIENTE.ID = PAGOS_CLIENTE.ID_RECIBO)
WHERE PAGOS_CLIENTE.ID = :IDPAGO
- INTO :IGNORARCONTABILIDAD, :IDEMPRESA, :IDCONTACTO, :REFERENCIARECIBO, :FECHAPAGO, :TIPOPAGO, :IMPORTE;
+ INTO :IGNORARCONTABILIDAD, :IDEMPRESA, :IDCONTACTO, :REFERENCIARECIBO, :FECHAPAGO, :TIPOPAGO, :CONCEPTO, :IMPORTE;
/*BUSCAMOS EL EJERCICIO ACTIVO PARA LA EMPRESA DE LA FACTURA*/
SELECT ID
@@ -4597,22 +4598,22 @@ begin
/*INSERTAMOS LOS APUNTES*/
if (TIPOPAGO = 'Pago') then
- begin
- DEBE = :IMPORTE;
- HABER = NULL;
- end
- else
begin
DEBE = NULL;
HABER = :IMPORTE;
end
+ else
+ begin
+ DEBE = :IMPORTE;
+ HABER = NULL;
+ end
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,
+ VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTA, 1, -1, :CONCEPTO,
:REFERENCIARECIBO, :DEBE, :HABER);
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,
+ VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTAPAGO, 2, -1, :CONCEPTO,
:REFERENCIARECIBO, :HABER, :DEBE);
END
@@ -4637,17 +4638,18 @@ declare variable debe numeric(11,2);
declare variable haber numeric(11,2);
declare variable idempresa integer;
declare variable idcontacto integer;
+declare variable concepto varchar(2000);
begin
/*BUSCAMOS EL PAGO PARA COMPROBAR SI HACER ASIENTO*/
SELECT PAGOS_PROVEEDOR.IGNORAR_CONTABILIDAD, RECIBOS_PROVEEDOR.ID_EMPRESA, RECIBOS_PROVEEDOR.ID_PROVEEDOR,
RECIBOS_PROVEEDOR.REFERENCIA || ': ' || RECIBOS_PROVEEDOR.NOMBRE,
- PAGOS_PROVEEDOR.FECHA_PAGO,
+ PAGOS_PROVEEDOR.FECHA_PAGO, PAGOS_PROVEEDOR.TIPO,
PAGOS_PROVEEDOR.TIPO || ': ' || RECIBOS_PROVEEDOR.DESCRIPCION,
RECIBOS_PROVEEDOR.IMPORTE
FROM PAGOS_PROVEEDOR
LEFT JOIN RECIBOS_PROVEEDOR ON (RECIBOS_PROVEEDOR.ID = PAGOS_PROVEEDOR.ID_RECIBO)
WHERE PAGOS_PROVEEDOR.ID = :IDPAGO
- INTO :IGNORARCONTABILIDAD, :IDEMPRESA, :IDCONTACTO, :REFERENCIARECIBO, :FECHAPAGO, :TIPOPAGO, :IMPORTE;
+ INTO :IGNORARCONTABILIDAD, :IDEMPRESA, :IDCONTACTO, :REFERENCIARECIBO, :FECHAPAGO, :TIPOPAGO, :CONCEPTO, :IMPORTE;
/*BUSCAMOS EL EJERCICIO ACTIVO PARA LA EMPRESA DE LA FACTURA*/
SELECT ID
@@ -4699,24 +4701,24 @@ begin
VALUES (:IDASIENTO, :FECHAPAGO, :ORDEN, :IDPAGO, 'p');
END
- /*INSERTAMOS LOS APUNTES*/
+/*INSERTAMOS LOS APUNTES*/
if (TIPOPAGO = 'Pago') then
- begin
- DEBE = NULL;
- HABER = :IMPORTE;
- end
- else
begin
DEBE = :IMPORTE;
HABER = NULL;
end
+ else
+ begin
+ DEBE = NULL;
+ HABER = :IMPORTE;
+ end
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,
+ VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTA, 1, -1, :CONCEPTO,
:REFERENCIARECIBO, :DEBE, :HABER);
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,
+ VALUES (GEN_ID(GEN_CONT_APUNTES_ID, 1), :IDASIENTO, :IDSUBCUENTAPAGO, 2, -1, :CONCEPTO,
:REFERENCIARECIBO, :HABER, :DEBE);
END
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index d8a586c6..3efdabfa 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -66,52 +66,52 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TForm
diff --git a/Source/Base/Base.res b/Source/Base/Base.res
index 8b251f31..1641339f 100644
Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index 7710dc4b..a5a33a2b 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 8b251f31..1641339f 100644
Binary files a/Source/GUIBase/GUIBase.res and b/Source/GUIBase/GUIBase.res differ
diff --git a/Source/GUIBase/uEditorDBItem.dfm b/Source/GUIBase/uEditorDBItem.dfm
index b4fcffba..4782b216 100644
--- a/Source/GUIBase/uEditorDBItem.dfm
+++ b/Source/GUIBase/uEditorDBItem.dfm
@@ -87,6 +87,9 @@ inherited fEditorDBItem: TfEditorDBItem
ExplicitHeight = 320
object pagGeneral: TTabSheet
Caption = 'General'
+ ExplicitLeft = 0
+ ExplicitTop = 0
+ ExplicitWidth = 0
ExplicitHeight = 292
end
end
@@ -106,13 +109,12 @@ inherited fEditorDBItem: TfEditorDBItem
AlignWithMargins = True
Left = 6
Top = 4
- Width = 640
- Height = 25
+ Width = 55
+ Height = 13
Margins.Left = 5
Align = alClient
Caption = 'Comentario'
WordWrap = True
- ExplicitHeight = 30
end
end
inherited EditorActionList: TActionList
diff --git a/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas b/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas
index e75a96a3..5e5d4223 100644
--- a/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas
+++ b/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas
@@ -37,6 +37,7 @@ type
function getIDCajaBanco: Integer;
function GetTipoSubCuenta: TEnumTipoSubCuenta;
procedure SetTipoSubCuenta(const Value: TEnumTipoSubCuenta);
+
public
property TipoSubCuenta: TEnumTipoSubCuenta read GetTipoSubCuenta write SetTipoSubCuenta;
property IdSubCuenta: Integer read getIDCajaBanco;
@@ -76,7 +77,7 @@ end;
procedure TfrViewListaSubcuentas.CustomViewShow(Sender: TObject);
begin
inherited;
- if Assigned(AppFactuGES.EjercicioActivo) then
+ if (not ReadOnly) and Assigned(AppFactuGES.EjercicioActivo) then
begin
cbSubCuentas.Enabled := True;
eContabilizar.Enabled := True;
diff --git a/Source/Modulos/Recibos de cliente/Controller/uPagosClienteController.pas b/Source/Modulos/Recibos de cliente/Controller/uPagosClienteController.pas
index ea67f474..f84b1cc2 100644
--- a/Source/Modulos/Recibos de cliente/Controller/uPagosClienteController.pas
+++ b/Source/Modulos/Recibos de cliente/Controller/uPagosClienteController.pas
@@ -56,7 +56,7 @@ type
implementation
uses
- cxControls, DB, uEditorRegistryUtils,Dialogs,
+ cxControls, DB, uEditorRegistryUtils,Dialogs, uFactuGES_App, uBizEjercicios,
uDAInterfaces, uDataTableUtils, uDataModuleUsuarios,
uDateUtils, uROTypes, DateUtils, Controls, Windows, Variants,
schRecibosClienteClient_Intf, uDataModuleRecibosCliente;
@@ -82,6 +82,9 @@ begin
APagosCliente.IGNORAR_CONTABILIDAD := IgnorarContabilidad;
APagosCliente.CUENTA := IntToStr(IdSubCuenta);
+ APagosCliente.ESTADO_EJERCICIO := AppFactuGES.EjercicioActivo.ESTADO;
+ APagosCliente.ASIENTO_PUNTEADO := -1;
+
Result := (APagosCliente.TIPO = CTE_PAGO);
APagosCliente.Post;
end;
@@ -118,6 +121,13 @@ begin
APagoCliente.Last;
Result := (APagoCliente.TIPO = CTE_PAGO);
+
+ if APagoCliente.ASIENTO_PUNTEADO > 0 then
+ raise Exception.Create('El asiento asociado al cobro esta punteado por lo que no puede ser borrado.');
+
+ if APagoCliente.ESTADO_EJERCICIO = CTE_CERRADO then
+ raise Exception.Create('El asiento asociado al cobro tiene el ejercicio cerrado por lo que no puede ser borrado.');
+
APagoCliente.Delete;
//Todo lo haremos en memoria ya que los pagos no tienen entidad propia
//APagosCliente.DataTable.ApplyUpdates;
diff --git a/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj b/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj
index 09d04d60..b7efb77f 100644
--- a/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj
+++ b/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj
@@ -9,22 +9,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -74,6 +60,15 @@
+
+
+
+
+
+
+
+
+
@@ -137,141 +132,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -282,13 +142,13 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj
index 9a13d0ba..f3f7db99 100644
--- a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj
+++ b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj
@@ -47,35 +47,35 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TfEditorElegirRecibosCliente
diff --git a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.res b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.res
index 8b251f31..1641339f 100644
Binary files a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.res and b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.res differ
diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.dfm
index b5b803ef..c51b6647 100644
--- a/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.dfm
+++ b/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.dfm
@@ -3,8 +3,8 @@ object fEditorFechaPago: TfEditorFechaPago
Top = 0
BorderStyle = bsDialog
Caption = 'Fecha del cobro / devoluci'#243'n'
- ClientHeight = 184
- ClientWidth = 535
+ ClientHeight = 234
+ ClientWidth = 560
Color = clWindow
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -19,8 +19,8 @@ object fEditorFechaPago: TfEditorFechaPago
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
- Left = 39
- Top = 15
+ Left = 38
+ Top = 64
Width = 362
Height = 13
Caption =
@@ -28,17 +28,24 @@ object fEditorFechaPago: TfEditorFechaPago
' devoluci'#243'n:'
end
object Label2: TLabel
- Left = 39
- Top = 50
+ Left = 38
+ Top = 87
Width = 77
Height = 13
Alignment = taRightJustify
Caption = 'Fecha del pago:'
FocusControl = eFechaPago
end
+ object Label3: TLabel
+ Left = 38
+ Top = 127
+ Width = 306
+ Height = 13
+ Caption = 'Seleccione el banco o caja donde se hace el cobro o devoluci'#243'n:'
+ end
object eFechaPago: TcxDateEdit
- Left = 122
- Top = 47
+ Left = 121
+ Top = 84
Properties.OnChange = eFechaPagoPropertiesChange
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
@@ -49,17 +56,90 @@ object fEditorFechaPago: TfEditorFechaPago
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
- Width = 132
+ Width = 267
+ end
+ inline frViewListaSubcuentas1: TfrViewListaSubcuentas
+ Left = 0
+ Top = 143
+ Width = 560
+ Height = 50
+ Align = alBottom
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 1
+ ReadOnly = False
+ ExplicitTop = 143
+ ExplicitWidth = 560
+ ExplicitHeight = 50
+ inherited dxLayoutControl1: TdxLayoutControl
+ Width = 560
+ ExplicitWidth = 560
+ inherited cbSubCuentas: TcxComboBox
+ Left = 122
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 122
+ ExplicitWidth = 376
+ Width = 376
+ end
+ inherited eContabilizar: TcxCheckBox
+ Left = 393
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 393
+ ExplicitWidth = 203
+ Width = 203
+ end
+ inherited dxLayoutControl1Group_Root: TdxLayoutGroup
+ inherited dxLayoutControl1Item1: TdxLayoutItem
+ Caption = ' Caja/Banco: '
+ end
+ end
+ end
+ end
+ object PnlComentario: TPanel
+ Left = 0
+ Top = 0
+ Width = 560
+ Height = 45
+ Align = alTop
+ Alignment = taLeftJustify
+ AutoSize = True
+ Color = 13499902
+ ParentBackground = False
+ TabOrder = 2
+ VerticalAlignment = taAlignTop
+ object lbComentario: TLabel
+ AlignWithMargins = True
+ Left = 6
+ Top = 4
+ Width = 550
+ Height = 40
+ Margins.Left = 5
+ Align = alClient
+ Caption = 'Comentario'
+ WordWrap = True
+ ExplicitWidth = 55
+ ExplicitHeight = 13
+ end
end
object Panel1: TPanel
Left = 0
- Top = 143
- Width = 535
+ Top = 193
+ Width = 560
Height = 41
Align = alBottom
- TabOrder = 1
+ TabOrder = 3
object bAceptar: TButton
- Left = 39
+ Left = 347
Top = 8
Width = 75
Height = 25
@@ -68,7 +148,7 @@ object fEditorFechaPago: TfEditorFechaPago
TabOrder = 0
end
object bCancelar: TButton
- Left = 120
+ Left = 445
Top = 8
Width = 75
Height = 25
@@ -77,38 +157,4 @@ object fEditorFechaPago: TfEditorFechaPago
TabOrder = 1
end
end
- inline frViewListaSubcuentas1: TfrViewListaSubcuentas
- Left = 30
- Top = 80
- Width = 453
- Height = 69
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Tahoma'
- Font.Style = []
- ParentFont = False
- TabOrder = 2
- ReadOnly = False
- ExplicitLeft = 30
- ExplicitTop = 80
- inherited dxLayoutControl1: TdxLayoutControl
- inherited cbSubCuentas: TcxComboBox
- Style.LookAndFeel.SkinName = ''
- StyleDisabled.LookAndFeel.SkinName = ''
- StyleFocused.LookAndFeel.SkinName = ''
- StyleHot.LookAndFeel.SkinName = ''
- ExplicitWidth = 376
- Width = 376
- end
- inherited eContabilizar: TcxCheckBox
- Style.LookAndFeel.SkinName = ''
- StyleDisabled.LookAndFeel.SkinName = ''
- StyleFocused.LookAndFeel.SkinName = ''
- StyleHot.LookAndFeel.SkinName = ''
- ExplicitWidth = 203
- Width = 203
- end
- end
- end
end
diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas b/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas
index 85fc8c1a..cdb7980d 100644
--- a/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas
+++ b/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas
@@ -7,17 +7,21 @@ uses
Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
cxDropDownEdit, cxCalendar, ExtCtrls, uEditorBasico, uIEditorFechaPago,
cxCheckBox, uSubCuentasController, Buttons, cxDBEdit, cxGraphics, uCustomView,
- uViewBase, uViewListaSubCuentas;
+ uViewBase, uViewListaSubCuentas, JvExStdCtrls, JvButton, JvCtrls, JvFooter,
+ JvExExtCtrls, JvExtComponent;
type
TfEditorFechaPago = class(TfEditorBasico, IEditorFechaPago)
Label1: TLabel;
eFechaPago: TcxDateEdit;
+ Label2: TLabel;
+ frViewListaSubcuentas1: TfrViewListaSubcuentas;
+ Label3: TLabel;
+ PnlComentario: TPanel;
+ lbComentario: TLabel;
+ Panel1: TPanel;
bAceptar: TButton;
bCancelar: TButton;
- Label2: TLabel;
- Panel1: TPanel;
- frViewListaSubcuentas1: TfrViewListaSubcuentas;
procedure FormShow(Sender: TObject);
procedure eFechaPagoPropertiesChange(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
@@ -25,22 +29,28 @@ type
private
FFechaPago : TDateTime;
+ FComentario: Variant;
+ FSoloLectura: Boolean;
function GetFechaPago: TDateTime;
procedure SetFechaPago(const Value: TDateTime);
function GetIgnorarContabilidad: Integer;
procedure SetIgnorarContabilidad(const Value: Integer);
function GetIdSubCuenta: Integer;
procedure SetIdSubCuenta(const Value: Integer);
+ function GetComentario: Variant;
+ procedure SetComentario(const Value: Variant);
+ function GetSoloLectura: Boolean;
+ procedure SetSoloLectura(const Value: Boolean);
public
property FechaPago: TDateTime Read GetFechaPago write SetFechaPago;
property IgnorarContabilidad: Integer Read GetIgnorarContabilidad write SetIgnorarContabilidad;
property IdSubCuenta: Integer Read GetIdSubCuenta write SetIdSubCuenta;
+ property Comentario: Variant read GetComentario write SetComentario;
+ property SoloLectura: Boolean read GetSoloLectura write SetSoloLectura;
procedure DeshabilitarContabilidad;
end;
-var
- fEditorFechaPago: TfEditorFechaPago;
implementation
{$R *.dfm}
@@ -91,6 +101,9 @@ begin
{$IFDEF CONTABILIDAD}
frViewListaSubCuentas1.TipoSubCuenta := tCajas;
{$ENDIF}
+
+ Comentario := Null;
+ FSoloLectura := False;
end;
procedure TfEditorFechaPago.FormShow(Sender: TObject);
@@ -115,6 +128,11 @@ begin
end;
end;
+function TfEditorFechaPago.GetComentario: Variant;
+begin
+ Result := FComentario;
+end;
+
function TfEditorFechaPago.GetFechaPago: TDateTime;
begin
Result := FFechaPago;
@@ -130,6 +148,23 @@ begin
Result := frViewListaSubCuentas1.eContabilizar.EditValue;
end;
+function TfEditorFechaPago.GetSoloLectura: Boolean;
+begin
+ Result := FSoloLectura;
+end;
+
+procedure TfEditorFechaPago.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;
+
procedure TfEditorFechaPago.SetFechaPago(const Value: TDateTime);
begin
FFechaPago := Value;
@@ -147,4 +182,19 @@ begin
frViewListaSubCuentas1.Refrescar;
end;
+procedure TfEditorFechaPago.SetSoloLectura(const Value: Boolean);
+begin
+ FSoloLectura := Value;
+ if FSoloLectura then
+ begin
+ eFechaPago.Enabled := False;
+ frViewListaSubcuentas1.ReadOnly := True;
+ end
+ else
+ begin
+ eFechaPago.Enabled := True;
+ frViewListaSubcuentas1.ReadOnly := False;
+ end;
+end;
+
end.
diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm
index 3dbff0cc..97e5318f 100644
--- a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm
+++ b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm
@@ -48,25 +48,34 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
ExplicitWidth = 885
end
end
+ inherited StatusBar: TJvStatusBar
+ Top = 543
+ Width = 885
+ Panels = <
+ item
+ Width = 200
+ end>
+ ExplicitTop = 543
+ ExplicitWidth = 885
+ end
inherited pgPaginas: TPageControl
Width = 879
- Height = 361
+ Height = 331
ActivePage = pagPagos
OnChanging = pgPaginasChanging
- ExplicitLeft = 3
- ExplicitTop = 79
+ ExplicitTop = 109
ExplicitWidth = 879
- ExplicitHeight = 361
+ ExplicitHeight = 331
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 871
- ExplicitHeight = 333
+ ExplicitHeight = 303
inline frViewReciboCliente1: TfrViewReciboCliente
Left = 0
Top = 0
Width = 871
- Height = 333
+ Height = 303
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -77,15 +86,15 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 871
- ExplicitHeight = 333
+ ExplicitHeight = 303
inherited dxLayoutControl1: TdxLayoutControl
Width = 871
- Height = 333
+ Height = 303
ExplicitWidth = 871
- ExplicitHeight = 333
+ ExplicitHeight = 303
DesignSize = (
871
- 333)
+ 303)
inherited eReferencia: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
@@ -302,7 +311,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
Left = 0
Top = 0
Width = 871
- Height = 333
+ Height = 303
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -313,18 +322,18 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 871
- ExplicitHeight = 333
+ ExplicitHeight = 303
inherited dxLayoutControl1: TdxLayoutControl
Width = 871
- Height = 333
+ Height = 303
ExplicitWidth = 871
- ExplicitHeight = 333
+ ExplicitHeight = 303
end
inherited dxLayoutControl2: TdxLayoutControl
Width = 871
- Height = 333
+ Height = 303
ExplicitWidth = 871
- ExplicitHeight = 333
+ ExplicitHeight = 303
inherited ToolBar1: TToolBar
Width = 684
ExplicitWidth = 684
@@ -364,7 +373,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
Left = 0
Top = 0
Width = 871
- Height = 333
+ Height = 303
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -375,10 +384,10 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 871
- ExplicitHeight = 333
+ ExplicitHeight = 303
inherited cxGrid: TcxGrid
Width = 871
- Height = 308
+ Height = 278
ExplicitWidth = 871
ExplicitHeight = 308
inherited cxGridView: TcxGridDBTableView
@@ -416,16 +425,6 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
end
end
end
- inherited StatusBar: TJvStatusBar
- Top = 543
- Width = 885
- Panels = <
- item
- Width = 200
- end>
- ExplicitTop = 543
- ExplicitWidth = 885
- end
inline frViewReciboCliImportes1: TfrViewReciboCliImportes [4]
Left = 0
Top = 443
@@ -438,7 +437,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
- TabOrder = 4
+ TabOrder = 5
ReadOnly = False
ExplicitTop = 443
ExplicitWidth = 885
@@ -472,7 +471,23 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
end
end
end
- inherited EditorActionList: TActionList [5]
+ inherited PnlComentario: TPanel [5]
+ Width = 885
+ ExplicitWidth = 885
+ inherited lbComentario: TLabel
+ Width = 875
+ Height = 25
+ end
+ end
+ inherited JvFormStorage: TJvFormStorage
+ OnSavePlacement = JvFormStorageSavePlacement
+ OnRestorePlacement = JvFormStorageRestorePlacement
+ end
+ inherited dsDataTable: TDADataSource
+ Left = 16
+ Top = 200
+ end
+ inherited EditorActionList: TActionList [11]
Top = 96
inherited actNuevo: TAction
Enabled = False
@@ -487,20 +502,6 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
Visible = False
end
end
- inherited SmallImages: TPngImageList [6]
- end
- inherited LargeImages: TPngImageList [7]
- end
- inherited JvFormStorage: TJvFormStorage [8]
- OnSavePlacement = JvFormStorageSavePlacement
- OnRestorePlacement = JvFormStorageRestorePlacement
- end
- inherited dsDataTable: TDADataSource [9]
- Left = 16
- Top = 200
- end
- inherited JvAppRegistryStorage: TJvAppRegistryStorage [10]
- end
object DADataSource1: TDADataSource
OnDataChange = dsDataTableDataChange
Left = 80
diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas
index d0840382..495bbe12 100644
--- a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas
+++ b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas
@@ -11,7 +11,7 @@ uses
uCustomView, uViewBase, uViewReciboCliente, uRecibosClienteController,
uBizRecibosCliente, uViewPagosCliente, dxLayoutLookAndFeels, cxCustomData,
uViewDetallesGenerico, uViewReciboCliImportes, uViewRecibosCliCompensados,
- uDAInterfaces;
+ uDAInterfaces, StdCtrls;
type
TfEditorReciboCliente = class(TfEditorDBItem, IEditorReciboCliente)
@@ -138,6 +138,7 @@ begin
raise Exception.Create('No hay ningún almacén asignado');
Recibo.DataTable.Active := True;
+ Recibo.Pagos.Last; //Nos posicionamos siempre en el último pago
CalcularTotal;
end;
@@ -186,6 +187,8 @@ begin
DeshabilitarRecibo
else
HabilitarRecibo;
+
+ frViewPagosCliente1.ListaPagosClienteDBTableView1.DataController.GotoLast;
end;
procedure TfEditorReciboCliente.frViewPagosCliente1actAnadirUpdate(Sender: TObject);
@@ -214,6 +217,8 @@ begin
FRecibo.SITUACION := CTE_COBRADO;
DeshabilitarRecibo;
end;
+
+ frViewPagosCliente1.ListaPagosClienteDBTableView1.DataController.GotoLast;
end;
procedure TfEditorReciboCliente.frViewPagosCliente1actEliminarUpdate(Sender: TObject);
@@ -223,7 +228,6 @@ 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
@@ -254,22 +258,32 @@ begin
DeshabilitarContabilidad;
end;
+ //En el caso de que el ejercicio asociado al asiento del pago este cerrado o el asiento punteado
+ //se podrá o no modificar el pago.
+ if (Recibo.Pagos.ESTADO_EJERCICIO = CTE_CERRADO) then
+ begin
+ Comentario := 'El asiento asociado a este pago tiene el ejercicio cerrado, por lo que no se puede modificar';
+ SoloLectura := true;
+ end
+ else if (Recibo.Pagos.ASIENTO_PUNTEADO > 0) then
+ begin
+ Comentario := 'El asiento asociado a este pago esta punteado, por lo que no se puede modificar';
+ SoloLectura := true;
+ end;
+
if (ShowModal = mrOk) then
begin
AFechaPago := DateToStr(FechaPago);
AIgnorarContabilidad := IgnorarContabilidad;
ASubCuenta := IdSubcuenta;
- Release;
- end
- else
- begin
- //Operación cancelada
- Release;
- exit;
+ if not SoloLectura then
+ FController.ModificarPago(Recibo, AFechaPago, AIgnorarContabilidad, ASubCuenta);
end;
+
+ Release;
end;
- FController.ModificarPago(Recibo, AFechaPago, AIgnorarContabilidad, ASubCuenta);
+
end;
procedure TfEditorReciboCliente.frViewPagosCliente1actModificarUpdate(Sender: TObject);
@@ -278,7 +292,6 @@ begin
//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)
-// and (FRecibo.Pagos.ESTADO <> CTE_CERRADO);
end;
procedure TfEditorReciboCliente.frViewReciboCliente1eImportePropertiesValidate(
diff --git a/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.dfm
index d0860486..dd6037ad 100644
--- a/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.dfm
+++ b/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.dfm
@@ -1,6 +1,7 @@
inherited frViewPagosCliente: TfrViewPagosCliente
Width = 666
Height = 401
+ OnShow = CustomViewShow
ExplicitWidth = 666
ExplicitHeight = 401
object dxLayoutControl1: TdxLayoutControl
diff --git a/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.pas b/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.pas
index 82d7a07e..300b61f0 100644
--- a/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.pas
+++ b/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.pas
@@ -63,6 +63,7 @@ type
Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
+ procedure CustomViewShow(Sender: TObject);
private
FPagos : IBizPagosCliente;
function GetPagos: IBizPagosCliente;
@@ -76,6 +77,12 @@ implementation
{ TfrViewPagosCliente }
+procedure TfrViewPagosCliente.CustomViewShow(Sender: TObject);
+begin
+ inherited;
+ ListaPagosClienteDBTableView1.DataController.GotoLast;
+end;
+
function TfrViewPagosCliente.GetPagos: IBizPagosCliente;
begin
Result := FPagos;
diff --git a/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas b/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas
index 74605637..db232352 100644
--- a/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas
+++ b/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas
@@ -117,6 +117,13 @@ begin
APagoCliente.Last;
Result := (APagoCliente.TIPO = CTE_PAGO);
+
+ if APagoCliente.ASIENTO_PUNTEADO > 0 then
+ raise Exception.Create('El asiento asociado al pago esta punteado por lo que no puede ser borrado.');
+
+ if APagoCliente.ESTADO_EJERCICIO = CTE_CERRADO then
+ raise Exception.Create('El asiento asociado al pago tiene el ejercicio cerrado por lo que no puede ser borrado.');
+
APagoCliente.Delete;
//Todo lo haremos en memoria ya que los pagos no tienen entidad propia
//APagosProveedor.DataTable.ApplyUpdates;
diff --git a/Source/Modulos/Recibos de proveedor/RecibosProveedor_Group.groupproj b/Source/Modulos/Recibos de proveedor/RecibosProveedor_Group.groupproj
index 5a827225..9c5c5fc0 100644
--- a/Source/Modulos/Recibos de proveedor/RecibosProveedor_Group.groupproj
+++ b/Source/Modulos/Recibos de proveedor/RecibosProveedor_Group.groupproj
@@ -9,12 +9,7 @@
-
-
-
-
-
@@ -126,59 +121,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Recibos de proveedor/Views/RecibosProveedor_view.dproj b/Source/Modulos/Recibos de proveedor/Views/RecibosProveedor_view.dproj
index 8d25708b..3ee153c5 100644
--- a/Source/Modulos/Recibos de proveedor/Views/RecibosProveedor_view.dproj
+++ b/Source/Modulos/Recibos de proveedor/Views/RecibosProveedor_view.dproj
@@ -47,34 +47,34 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TfEditorElegirRecibosProveedor
diff --git a/Source/Modulos/Recibos de proveedor/Views/RecibosProveedor_view.res b/Source/Modulos/Recibos de proveedor/Views/RecibosProveedor_view.res
index 8b251f31..1641339f 100644
Binary files a/Source/Modulos/Recibos de proveedor/Views/RecibosProveedor_view.res and b/Source/Modulos/Recibos de proveedor/Views/RecibosProveedor_view.res differ
diff --git a/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.dfm b/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.dfm
index 7f374d70..f208bebd 100644
--- a/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.dfm
+++ b/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.dfm
@@ -3,8 +3,8 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
Top = 0
BorderStyle = bsDialog
Caption = 'Fecha del cobro / devoluci'#243'n'
- ClientHeight = 193
- ClientWidth = 510
+ ClientHeight = 217
+ ClientWidth = 563
Color = clWindow
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -19,8 +19,8 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
- Left = 38
- Top = 8
+ Left = 42
+ Top = 61
Width = 362
Height = 13
Caption =
@@ -28,17 +28,24 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
' devoluci'#243'n:'
end
object Label2: TLabel
- Left = 39
- Top = 43
+ Left = 42
+ Top = 83
Width = 80
Height = 13
Alignment = taRightJustify
Caption = 'Fecha del cobro:'
FocusControl = eFechaPago
end
+ object Label3: TLabel
+ Left = 42
+ Top = 124
+ Width = 306
+ Height = 13
+ Caption = 'Seleccione el banco o caja donde se hace el cobro o devoluci'#243'n:'
+ end
object eFechaPago: TcxDateEdit
- Left = 125
- Top = 40
+ Left = 129
+ Top = 80
Properties.OnChange = eFechaPagoPropertiesChange
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
@@ -49,18 +56,20 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
- Width = 132
+ Width = 275
end
object Panel1: TPanel
Left = 0
- Top = 152
- Width = 510
+ Top = 176
+ Width = 563
Height = 41
Align = alBottom
TabOrder = 1
+ ExplicitTop = 152
+ ExplicitWidth = 510
object bAceptar: TButton
- Left = 38
- Top = 8
+ Left = 368
+ Top = 6
Width = 75
Height = 25
Caption = 'Aceptar'
@@ -68,8 +77,8 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
TabOrder = 0
end
object bCancelar: TButton
- Left = 119
- Top = 8
+ Left = 459
+ Top = 6
Width = 75
Height = 25
Caption = 'Cancelar'
@@ -78,10 +87,11 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
end
end
inline frViewListaSubcuentas1: TfrViewListaSubcuentas
- Left = 30
- Top = 80
- Width = 453
- Height = 69
+ Left = 0
+ Top = 136
+ Width = 563
+ Height = 40
+ Align = alBottom
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
@@ -90,25 +100,63 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
ParentFont = False
TabOrder = 2
ReadOnly = False
- ExplicitLeft = 30
- ExplicitTop = 80
+ ExplicitTop = 166
+ ExplicitWidth = 563
+ ExplicitHeight = 40
inherited dxLayoutControl1: TdxLayoutControl
+ Width = 563
inherited cbSubCuentas: TcxComboBox
+ Left = 128
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitWidth = 376
- Width = 376
+ ExplicitLeft = 128
+ ExplicitWidth = 440
+ Width = 440
end
inherited eContabilizar: TcxCheckBox
+ Left = 410
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 410
ExplicitWidth = 203
Width = 203
end
+ inherited dxLayoutControl1Group_Root: TdxLayoutGroup
+ inherited dxLayoutControl1Item1: TdxLayoutItem
+ Caption = ' Caja/Banco: '
+ end
+ end
+ end
+ end
+ object PnlComentario: TPanel
+ Left = 0
+ Top = 0
+ Width = 563
+ Height = 45
+ Align = alTop
+ Alignment = taLeftJustify
+ AutoSize = True
+ Color = 13499902
+ ParentBackground = False
+ TabOrder = 3
+ VerticalAlignment = taAlignTop
+ ExplicitWidth = 560
+ object lbComentario: TLabel
+ AlignWithMargins = True
+ Left = 6
+ Top = 4
+ Width = 553
+ Height = 40
+ Margins.Left = 5
+ Align = alClient
+ Caption = 'Comentario'
+ WordWrap = True
+ ExplicitWidth = 55
+ ExplicitHeight = 13
end
end
end
diff --git a/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.pas b/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.pas
index d6266e7c..225c00fe 100644
--- a/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.pas
+++ b/Source/Modulos/Recibos de proveedor/Views/uEditorFechaPagoProveedor.pas
@@ -18,6 +18,9 @@ type
Label2: TLabel;
Panel1: TPanel;
frViewListaSubcuentas1: TfrViewListaSubcuentas;
+ PnlComentario: TPanel;
+ lbComentario: TLabel;
+ Label3: TLabel;
procedure FormShow(Sender: TObject);
procedure eFechaPagoPropertiesChange(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
@@ -25,17 +28,25 @@ type
private
FFechaPago : TDateTime;
+ FComentario: Variant;
+ FSoloLectura: Boolean;
function GetFechaPago: TDateTime;
procedure SetFechaPago(const Value: TDateTime);
function GetIgnorarContabilidad: Integer;
procedure SetIgnorarContabilidad(const Value: Integer);
function GetIdSubCuenta: Integer;
procedure SetIdSubCuenta(const Value: Integer);
+ function GetComentario: Variant;
+ procedure SetComentario(const Value: Variant);
+ function GetSoloLectura: Boolean;
+ procedure SetSoloLectura(const Value: Boolean);
public
property FechaPago: TDateTime Read GetFechaPago write SetFechaPago;
property IgnorarContabilidad: Integer Read GetIgnorarContabilidad write SetIgnorarContabilidad;
property IdSubCuenta: Integer Read GetIdSubCuenta write SetIdSubCuenta;
+ property Comentario: Variant read GetComentario write SetComentario;
+ property SoloLectura: Boolean read GetSoloLectura write SetSoloLectura;
procedure DeshabilitarContabilidad;
end;
@@ -88,6 +99,9 @@ begin
{$IFDEF CONTABILIDAD}
frViewListaSubCuentas1.TipoSubCuenta := tCajas;
{$ENDIF}
+
+ Comentario := Null;
+ FSoloLectura := False;
end;
procedure TfEditorFechaPagoProveedor.FormShow(Sender: TObject);
@@ -112,6 +126,11 @@ begin
end;
end;
+function TfEditorFechaPagoProveedor.GetComentario: Variant;
+begin
+ Result := FComentario;
+end;
+
function TfEditorFechaPagoProveedor.GetFechaPago: TDateTime;
begin
Result := FFechaPago;
@@ -127,6 +146,23 @@ begin
Result := frViewListaSubCuentas1.eContabilizar.EditValue;
end;
+function TfEditorFechaPagoProveedor.GetSoloLectura: Boolean;
+begin
+ Result := FSoloLectura;
+end;
+
+procedure TfEditorFechaPagoProveedor.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;
+
procedure TfEditorFechaPagoProveedor.SetFechaPago(const Value: TDateTime);
begin
FFechaPago := Value;
@@ -144,4 +180,19 @@ begin
frViewListaSubCuentas1.Refrescar;
end;
+procedure TfEditorFechaPagoProveedor.SetSoloLectura(const Value: Boolean);
+begin
+ FSoloLectura := Value;
+ if FSoloLectura then
+ begin
+ eFechaPago.Enabled := False;
+ frViewListaSubcuentas1.ReadOnly := True;
+ end
+ else
+ begin
+ eFechaPago.Enabled := True;
+ frViewListaSubcuentas1.ReadOnly := False;
+ end;
+end;
+
end.
diff --git a/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.dfm b/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.dfm
index 4e2d7ac2..ae174227 100644
--- a/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.dfm
+++ b/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.dfm
@@ -48,24 +48,33 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
ExplicitWidth = 691
end
end
+ inherited StatusBar: TJvStatusBar
+ Top = 535
+ Width = 691
+ Panels = <
+ item
+ Width = 200
+ end>
+ ExplicitTop = 535
+ ExplicitWidth = 691
+ end
inherited pgPaginas: TPageControl
Width = 685
- Height = 353
+ Height = 323
ActivePage = pagPagos
- ExplicitLeft = 3
- ExplicitTop = 79
+ ExplicitTop = 109
ExplicitWidth = 685
- ExplicitHeight = 353
+ ExplicitHeight = 323
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 677
- ExplicitHeight = 325
+ ExplicitHeight = 295
inline frViewReciboProveedor1: TfrViewReciboProveedor
Left = 0
Top = 0
Width = 677
- Height = 325
+ Height = 295
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -76,15 +85,15 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
TabOrder = 0
ReadOnly = False
ExplicitWidth = 677
- ExplicitHeight = 325
+ ExplicitHeight = 295
inherited dxLayoutControl1: TdxLayoutControl
Width = 677
- Height = 325
+ Height = 295
ExplicitWidth = 677
- ExplicitHeight = 325
+ ExplicitHeight = 295
DesignSize = (
677
- 325)
+ 295)
inherited eReferencia: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
@@ -318,7 +327,7 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
Left = 0
Top = 0
Width = 677
- Height = 325
+ Height = 295
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -329,15 +338,16 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
TabOrder = 0
ReadOnly = False
ExplicitWidth = 677
- ExplicitHeight = 325
+ ExplicitHeight = 295
inherited dxLayoutControl1: TdxLayoutControl
Width = 677
- Height = 325
+ Height = 295
ExplicitWidth = 677
- ExplicitHeight = 325
+ ExplicitHeight = 295
inherited ListaPagosProveedor: TcxGrid
Width = 633
Height = 248
+ Enabled = False
ExplicitWidth = 633
ExplicitHeight = 248
inherited ListaPagosProveedorDBTableView1: TcxGridDBTableView
@@ -378,7 +388,7 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
Left = 0
Top = 0
Width = 677
- Height = 325
+ Height = 295
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -389,10 +399,10 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
TabOrder = 0
ReadOnly = False
ExplicitWidth = 677
- ExplicitHeight = 325
+ ExplicitHeight = 295
inherited cxGrid: TcxGrid
Width = 677
- Height = 300
+ Height = 270
ExplicitWidth = 677
ExplicitHeight = 300
inherited cxGridView: TcxGridDBTableView
@@ -434,16 +444,6 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
end
end
end
- inherited StatusBar: TJvStatusBar
- Top = 535
- Width = 691
- Panels = <
- item
- Width = 200
- end>
- ExplicitTop = 535
- ExplicitWidth = 691
- end
inline frViewReciboProvImportes1: TfrViewReciboProvImportes [4]
Left = 0
Top = 435
@@ -456,7 +456,7 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
- TabOrder = 4
+ TabOrder = 5
ReadOnly = False
ExplicitTop = 435
ExplicitWidth = 691
@@ -490,7 +490,23 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
end
end
end
- inherited EditorActionList: TActionList [5]
+ inherited PnlComentario: TPanel [5]
+ Width = 691
+ ExplicitWidth = 691
+ inherited lbComentario: TLabel
+ Width = 681
+ Height = 25
+ end
+ end
+ inherited JvFormStorage: TJvFormStorage
+ OnSavePlacement = JvFormStorageSavePlacement
+ OnRestorePlacement = JvFormStorageRestorePlacement
+ end
+ inherited dsDataTable: TDADataSource
+ Left = 8
+ Top = 136
+ end
+ inherited EditorActionList: TActionList [11]
Left = 56
Top = 144
inherited actNuevo: TAction
@@ -514,20 +530,6 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
Visible = False
end
end
- inherited SmallImages: TPngImageList [6]
- end
- inherited LargeImages: TPngImageList [7]
- end
- inherited JvFormStorage: TJvFormStorage [8]
- OnSavePlacement = JvFormStorageSavePlacement
- OnRestorePlacement = JvFormStorageRestorePlacement
- end
- inherited dsDataTable: TDADataSource [9]
- Left = 8
- Top = 136
- end
- inherited JvAppRegistryStorage: TJvAppRegistryStorage [10]
- end
object DADataSource1: TDADataSource
OnDataChange = dsDataTableDataChange
Left = 80
diff --git a/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.pas b/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.pas
index a250562d..d45805bc 100644
--- a/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.pas
+++ b/Source/Modulos/Recibos de proveedor/Views/uEditorReciboProveedor.pas
@@ -11,7 +11,7 @@ uses
uCustomView, uViewBase, uViewReciboProveedor, uRecibosProveedorController,
uBizRecibosProveedor, uViewPagosProveedor, dxLayoutLookAndFeels, cxCustomData,
uViewDetallesGenerico, uViewRecibosProvCompensados, uViewReciboProvImportes,
- uDAInterfaces;
+ uDAInterfaces, StdCtrls;
type
TfEditorReciboProveedor = class(TfEditorDBItem, IEditorReciboProveedor)
@@ -183,6 +183,8 @@ begin
DeshabilitarRecibo
else
HabilitarRecibo;
+
+ frViewPagosProveedor1.ListaPagosProveedorDBTableView1.DataController.GotoLast;
end;
procedure TfEditorReciboProveedor.frViewPagosProveedor1actEliminarExecute(Sender: TObject);
@@ -205,6 +207,8 @@ begin
FRecibo.SITUACION := CTE_PAGADO;
DeshabilitarRecibo;
end;
+
+ frViewPagosProveedor1.ListaPagosProveedorDBTableView1.DataController.GotoLast;
end;
procedure TfEditorReciboProveedor.frViewPagosProveedor1actEliminarUpdate(Sender: TObject);
@@ -212,7 +216,6 @@ 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);
@@ -231,22 +234,37 @@ begin
if IgnorarContabilidad = 0 then
IdSubCuenta := StrToInt(Recibo.Pagos.CUENTA);
+ //En el caso de que el proveedor del recibo no tenga aignada subcuenta contable el pago no podrá contabilizarse
+ if (Recibo.Proveedor.SubCuentas.ID < 1) then
+ begin
+ IgnorarContabilidad := 1;
+ DeshabilitarContabilidad;
+ end;
+
+ //En el caso de que el ejercicio asociado al asiento del pago este cerrado o el asiento punteado
+ //se podrá o no modificar el pago.
+ if (Recibo.Pagos.ESTADO_EJERCICIO = CTE_CERRADO) then
+ begin
+ Comentario := 'El asiento asociado a este pago tiene el ejercicio cerrado, por lo que no se puede modificar';
+ SoloLectura := true;
+ end
+ else if (Recibo.Pagos.ASIENTO_PUNTEADO > 0) then
+ begin
+ Comentario := 'El asiento asociado a este pago esta punteado, por lo que no se puede modificar';
+ SoloLectura := true;
+ end;
+
if (ShowModal = mrOk) then
begin
AFechaPago := DateToStr(FechaPago);
AIgnorarContabilidad := IgnorarContabilidad;
ASubCuenta := IdSubcuenta;
- Release;
- end
- else
- begin
- //Operación cancelada
- Release;
- exit;
+ if not SoloLectura then
+ FController.ModificarPago(Recibo, AFechaPago, AIgnorarContabilidad, ASubCuenta);
end;
- end;
- FController.ModificarPago(Recibo, AFechaPago, AIgnorarContabilidad, ASubCuenta);
+ Release;
+ end;
end;
procedure TfEditorReciboProveedor.frViewPagosProveedor1actModificarUpdate(Sender: TObject);
@@ -255,7 +273,6 @@ begin
//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)
-// and (FRecibo.Pagos.ESTADO <> CTE_CERRADO);
end;
procedure TfEditorReciboProveedor.frViewReciboProvImportes1eImportePropertiesEditValueChanged(
diff --git a/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.dfm b/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.dfm
index c1ab77a5..8b527eda 100644
--- a/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.dfm
+++ b/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.dfm
@@ -1,6 +1,7 @@
inherited frViewPagosProveedor: TfrViewPagosProveedor
Width = 664
Height = 355
+ OnShow = CustomViewShow
ExplicitWidth = 664
ExplicitHeight = 355
object dxLayoutControl1: TdxLayoutControl
diff --git a/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.pas b/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.pas
index 6ed5950a..9f137710 100644
--- a/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.pas
+++ b/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.pas
@@ -61,6 +61,7 @@ type
Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
+ procedure CustomViewShow(Sender: TObject);
private
FPagos : IBizPagosProveedor;
function GetPagos: IBizPagosProveedor;
@@ -74,6 +75,12 @@ implementation
{ TfrViewPagosProveedor }
+procedure TfrViewPagosProveedor.CustomViewShow(Sender: TObject);
+begin
+ inherited;
+ ListaPagosProveedorDBTableView1.DataController.GotoLast;
+end;
+
function TfrViewPagosProveedor.GetPagos: IBizPagosProveedor;
begin
Result := FPagos;
diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES
index 28421aed..4580b11f 100644
Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ
diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj
index 5e05fe08..a4a6b160 100644
--- a/Source/Servidor/FactuGES_Server.dproj
+++ b/Source/Servidor/FactuGES_Server.dproj
@@ -1,284 +1,285 @@
-
+
-
- {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
- FactuGES_Server.dpr
- Debug
- AnyCPU
- DCC32
- ..\..\Output\Debug\Servidor\FactuGES_Server.exe
-
-
- 7.0
- False
- False
- 0
- 3
- ..\..\Output\Release\Servidor
- RELEASE
-
-
- 7.0
- 3
- ..\..\Output\Debug\Servidor
- DEBUG;
- True
-
-
- Delphi.Personality
-
-
- FalseTrueFalseTrueFalse2280FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.2.8.0FactuGES (Servidor)2.2.8.0jueves, 08 de enero de 2009 20:14
- RemObjects Pascal Script - RemObjects SDK 3.0 Integration
- FactuGES_Server.dpr
-
-
-
-
- MainSource
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
- TRORemoteDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDARemoteService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
- TFrame
-
-
-
- TFrame
-
-
-
- TForm
-
-
-
- TFrame
-
-
-
- TDARemoteService
-
-
-
-
-
-
- TDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
+ FactuGES_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Output\Debug\Servidor\FactuGES_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ 3
+ ..\..\Output\Release\Servidor
+ RELEASE
+
+
+ 7.0
+ 3
+ ..\..\Output\Debug\Servidor
+ DEBUG;
+ True
+
+
+ Delphi.Personality
+
+
+FalseTrueFalseTrueFalse2280FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.2.8.0FactuGES (Servidor)2.2.8.0jueves, 08 de enero de 2009 20:14
+
+ RemObjects Pascal Script - RemObjects SDK 3.0 Integration
+ FactuGES_Server.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+ TRORemoteDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TFrame
+
+
+
+ TFrame
+
+
+
+ TForm
+
+
+
+ TFrame
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+