diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql
index d8933497..f2bc3a2e 100644
--- a/Database/scripts/factuges.sql
+++ b/Database/scripts/factuges.sql
@@ -896,7 +896,8 @@ CREATE TABLE FACTURAS_CLIENTE (
RECARGO_EQUIVALENCIA TIPO_BOOLEANO,
ID_COMISION_LIQUIDADA TIPO_ID,
IGNORAR_CONTABILIDAD SMALLINT,
- ID_TIENDA TIPO_ID
+ ID_TIENDA TIPO_ID,
+ ID_TIPOVENTA TIPO_ID
);
@@ -1296,6 +1297,7 @@ CREATE TABLE RECIBOS_PROVEEDOR (
CREATE TABLE REFERENCIAS (
ID TIPO_ID NOT NULL,
ID_EMPRESA TIPO_ID,
+ ID_TIENDA TIPO_ID,
CODIGO VARCHAR(50) NOT NULL,
VALOR VARCHAR(255) NOT NULL,
DESCRIPCION VARCHAR(255) COLLATE ES_ES
@@ -1900,7 +1902,6 @@ left join CONT_CUENTAS_ESPECIALES on (CONT_CUENTAS_ESPECIALES.ID = CONT_CUENTAS.
;
-
/* View: V_CONT_DIARIO */
CREATE VIEW V_CONT_DIARIO(
ID_APUNTE,
@@ -1911,6 +1912,7 @@ CREATE VIEW V_CONT_DIARIO(
FECHA_ASIENTO,
ID_SUBCUENTA,
REF_SUBCUENTA,
+ SUBCUENTA,
ID_EJERCICIO,
CONCEPTO,
DOCUMENTO,
@@ -1926,7 +1928,8 @@ SELECT
CONT_ASIENTOS.ORDEN,
CONT_ASIENTOS.FECHA_ASIENTO,
CONT_APUNTES.ID_SUBCUENTA,
- CONT_SUBCUENTAS.REF_SUBCUENTA as SUBCUENTA,
+ CONT_SUBCUENTAS.REF_SUBCUENTA as REF_SUBCUENTA,
+ CONT_SUBCUENTAS.DESCRIPCION as SUBCUENTA,
CONT_SUBCUENTAS.ID_EJERCICIO,
CONT_APUNTES.CONCEPTO,
CONT_APUNTES.DOCUMENTO,
@@ -2256,7 +2259,9 @@ CREATE VIEW V_FACTURAS_CLIENTE(
REFERENCIA_COMISION,
IGNORAR_CONTABILIDAD,
ID_TIENDA,
- TIENDA)
+ TIENDA,
+ ID_TIPOVENTA,
+ TIPOVENTA)
AS
SELECT FACTURAS_CLIENTE.ID,
FACTURAS_CLIENTE.ID_EMPRESA,
@@ -2293,7 +2298,9 @@ SELECT FACTURAS_CLIENTE.ID,
COMISIONES_LIQUIDADAS.REFERENCIA,
FACTURAS_CLIENTE.IGNORAR_CONTABILIDAD,
FACTURAS_CLIENTE.ID_TIENDA,
- EMPRESAS_TIENDAS.NOMBRE AS TIENDA
+ EMPRESAS_TIENDAS.NOMBRE AS TIENDA,
+ FACTURAS_CLIENTE.ID_TIPOVENTA,
+ TIPOS_VENTA.DESCRIPCION
FROM V_FAC_CLI_SITUACION
LEFT JOIN FACTURAS_CLIENTE
@@ -2303,6 +2310,7 @@ SELECT FACTURAS_CLIENTE.ID,
LEFT JOIN CLIENTES_DATOS
ON (CLIENTES_DATOS.ID_CLIENTE = FACTURAS_CLIENTE.ID_CLIENTE)
LEFT JOIN EMPRESAS_TIENDAS ON (EMPRESAS_TIENDAS.ID = FACTURAS_CLIENTE.ID_TIENDA)
+ LEFT JOIN TIPOS_VENTA ON (TIPOS_VENTA.ID = FACTURAS_CLIENTE.ID_TIPOVENTA)
;
@@ -3780,6 +3788,7 @@ CREATE INDEX IDX_PROVEEDORES_DATOS1 ON PROVEEDORES_DATOS (ID_FORMA_PAGO);
CREATE INDEX IDX_RECIBOS_CLIENTE ON RECIBOS_CLIENTE (ID_RECIBO_COMPENSADO);
CREATE INDEX IDX_RECIBOS_PROVEEDOR ON RECIBOS_PROVEEDOR (ID_RECIBO_COMPENSADO);
CREATE INDEX IDX_REFERENCIAS ON REFERENCIAS (ID_EMPRESA);
+CREATE INDEX IDX_REFERENCIAS2 ON REFERENCIAS (ID_TIENDA);
CREATE INDEX IDX_REMESAS_CLIENTE ON REMESAS_CLIENTE (ID_DATOS_BANCO);
CREATE INDEX IDX_REMESAS_PROVEEDOR ON REMESAS_PROVEEDOR (ID_DATOS_BANCO);
CREATE INDEX IDX_PERMISOS ON PERMISOS (ID_USUARIO);
diff --git a/Source/ApplicationBase/Empresas/Views/uViewTienda.pas b/Source/ApplicationBase/Empresas/Views/uViewTienda.pas
index 62a147f6..1e8553ad 100644
--- a/Source/ApplicationBase/Empresas/Views/uViewTienda.pas
+++ b/Source/ApplicationBase/Empresas/Views/uViewTienda.pas
@@ -60,6 +60,8 @@ begin
if Assigned(FDataItem.FindField('TIENDA')) then
FDataItem.FieldByName('TIENDA').AsString := DisplayValue;
+
+ FDataItem.post;
end;
end;
@@ -68,6 +70,7 @@ var
i : integer;
begin
inherited;
+
FListaTiendas := AppFactuGES.EmpresasController.DarListaTiendas(AppFactuGES.EmpresaActiva);
with cbTienda.Properties.Items do
begin
@@ -80,6 +83,7 @@ begin
EndUpdate;
end;
end;
+
end;
procedure TfrViewTienda.CustomViewDestroy(Sender: TObject);
@@ -119,7 +123,7 @@ procedure TfrViewTienda.SetDataItem(const Value: TDADataTable);
begin
FDataItem := Value;
if Assigned(FDataItem.FindField('ID_TIENDA')) then
- ElegirTienda(FDataItem.FieldByName('ID_TIENDA').AsInteger);
+ ElegirTienda(FDataItem.FieldByName('ID_TIENDA').AsInteger);
end;
procedure TfrViewTienda.SetIDTienda(const ID: Integer);
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index 04cef2f8..f4734247 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -44,6 +44,13 @@
Package
FalseTrueFalseLibreria base de FactuGESTrueFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0
+
+
+
+
+
+
+
VCL for the Web Design Package for CodeGear RAD Studio
CodeGear WebSnap Components
CodeGear SOAP Components
@@ -58,47 +65,47 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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.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/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas
index c6d6aeb6..105bea7e 100644
--- a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas
+++ b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas
@@ -17,8 +17,7 @@ type
function IncrementarReferencia : Boolean;
protected
procedure BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); override;
- procedure AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean;
- var CanRemoveFromDelta: Boolean);
+ procedure AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean; var CanRemoveFromDelta: Boolean); override;
end;
implementation
diff --git a/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranProveedorServer.PAS b/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranProveedorServer.PAS
index bd82e6bb..f6891cb1 100644
--- a/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranProveedorServer.PAS
+++ b/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranProveedorServer.PAS
@@ -18,9 +18,7 @@ type
protected
procedure BeforeProcessDelta(Sender: TDABusinessProcessor;
const aDelta: IDADelta); override;
- procedure AfterProcessChange(Sender: TDABusinessProcessor;
- aChange: TDADeltaChange; Processed: Boolean;
- var CanRemoveFromDelta: Boolean); override;
+ procedure AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean; var CanRemoveFromDelta: Boolean); override;
end;
implementation
diff --git a/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas b/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas
index 0702b596..97ebad62 100644
--- a/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas
+++ b/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas
@@ -17,8 +17,12 @@ const
CTE_CUENTASPROVEEDOR = 400;
CTE_CUENTASCAJA = 570;
CTE_CUENTASBANCO = 572;
+ CTE_CUENTASVENTA = 700;
+ CTE_CUENTASCOMPRA = 600;
type
+ TEnumTipoSubCuenta = (tTodas, tClientes, tProveedores, tCompras, tVentas, tCajas);
+
ISubCuentasController = interface(IObservador)
['{94E5F2B6-64C8-4331-B9CB-3ED730478529}']
function BuscarTodos: IBizSubCuenta;
@@ -31,7 +35,6 @@ type
function Guardar(ASubCuenta : IBizSubCuenta): Boolean;
procedure DescartarCambios(ASubCuenta : IBizSubCuenta);
function Localizar(ASubCuentas: IBizSubCuenta; ADescripcion:String): Boolean;
- function DarListaSubCuentas: TStringList;
function ExtraerSeleccionados(ASubCuentas: IBizSubCuenta) : IBizSubCuenta;
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
@@ -42,7 +45,7 @@ type
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
- function DarListaCajasBancos: TStringList;
+ function DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList;
end;
TSubCuentasController = class(TObservador, ISubCuentasController)
@@ -72,11 +75,11 @@ type
function Nuevo : IBizSubCuenta;
function BuscarTodos: IBizSubCuenta;
function BuscarCajasBancos: IBizSubCuenta;
+ function BuscarVentas: IBizSubCuenta;
function Buscar(ID: Integer): IBizSubCuenta;
procedure VerTodos(ASubCuentas: IBizSubCuenta);
procedure Ver(ASubCuenta: IBizSubCuenta);
function Localizar(ASubCuentas: IBizSubCuenta; ADescripcion:String): Boolean;
- function DarListaSubCuentas: TStringList;
function ExtraerSeleccionados(ASubCuentas: IBizSubCuenta) : IBizSubCuenta;
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
@@ -87,7 +90,7 @@ type
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
- function DarListaCajasBancos: TStringList;
+ function DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList;
end;
implementation
@@ -241,6 +244,31 @@ begin
FiltrarEjercicio(Result);
end;
+function TSubCuentasController.BuscarVentas: IBizSubCuenta;
+var
+ Condicion: TDAWhereExpression;
+
+begin
+ ShowHourglassCursor;
+ try
+ Result := BuscarTodos;
+
+ with Result.DataTable.DynamicWhere do
+ begin
+ // (REF_CUENTAS = 700 ventas)
+ Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASVENTA, datInteger), dboEqual);
+
+ if IsEmpty then
+ Expression := Condicion
+ else
+ Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
+ end;
+
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
constructor TSubCuentasController.Create;
begin
inherited;
@@ -252,37 +280,21 @@ begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end;
-function TSubCuentasController.DarListaCajasBancos: TStringList;
+function TSubCuentasController.DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList;
var
- ACajasBancos: IBizSubCuenta;
+ ASubCuentas: IBizSubCuenta;
i : integer;
begin
- ACajasBancos := BuscarCajasBancos;
- ACajasBancos.DataTable.Active := True;
-
- Result := TStringList.Create;
- try
- with Result do
- begin
- ACajasBancos.DataTable.First;
- while not ACajasBancos.DataTable.EOF do
- begin
- Add(Format('%s=%d', [ACajasBancos.DESCRIPCION, ACajasBancos.ID]));
- ACajasBancos.DataTable.Next;
- end;
- end;
- finally
- ACajasBancos := NIL;
+ case TipoSubCuenta of
+// tClientes, tProveedores, tCompras, tVentas,
+ tTodas : ASubCuentas := BuscarTodos;
+ tCajas : ASubCuentas := BuscarCajasBancos;
+ tVentas : ASubCuentas := BuscarVentas;
end;
-end;
-function TSubCuentasController.DarListaSubCuentas: TStringList;
-var
- ASubCuentas: IBizSubCuenta;
-begin
- ASubCuentas := BuscarTodos;
ASubCuentas.DataTable.Active := True;
+
Result := TStringList.Create;
try
with Result do
@@ -290,7 +302,11 @@ begin
ASubCuentas.DataTable.First;
while not ASubCuentas.DataTable.EOF do
begin
- Add(ASubCuentas.DESCRIPCION);
+ case TipoSubCuenta of
+ // tClientes, tProveedores
+ tTodas : Add(ASubCuentas.DESCRIPCION);
+ tCajas, tCompras, tVentas : Add(Format('%s=%d', [ASubCuentas.DESCRIPCION, ASubCuentas.ID]));
+ end;
ASubCuentas.DataTable.Next;
end;
end;
@@ -299,6 +315,7 @@ begin
end;
end;
+
procedure TSubCuentasController.DescartarCambios(ASubCuenta: IBizSubCuenta);
begin
if not Assigned(ASubCuenta) then
diff --git a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas
index 385d3882..d72963c4 100644
--- a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas
+++ b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas
@@ -125,7 +125,7 @@ begin
with dsCommand do
begin
ParamByName('REFERENCIA').AsString := RefSubCuenta;
- ParamByName('DESCRIPCION').AsString := 'Cuenta de cliente ' + CLIENTE;
+ ParamByName('DESCRIPCION').AsString := 'Cuenta de cliente: ' + CLIENTE;
ParamByName('ID_CUENTA').AsInteger := IDCuenta;
ParamByName('ID_EJERCICIO').AsInteger := darEjercicioActivo(ID_EMPRESA);
ParamByName('ID_CONTACTO').AsInteger := ID_CONTACTO;
diff --git a/Source/Modulos/Contabilidad/Views/Contabilidad_view.dpk b/Source/Modulos/Contabilidad/Views/Contabilidad_view.dpk
index 5a0044f9..3b83f821 100644
--- a/Source/Modulos/Contabilidad/Views/Contabilidad_view.dpk
+++ b/Source/Modulos/Contabilidad/Views/Contabilidad_view.dpk
@@ -78,6 +78,6 @@ contains
uEditorAsiento in 'uEditorAsiento.pas' {fEditorAsiento: TfEditorEjercicios},
uEditorApunte in 'uEditorApunte.pas' {fEditorApunte: TfEditorEjercicios},
uEditorElegirSubCuentas in 'uEditorElegirSubCuentas.pas' {fEditorElegirSubCuentas: TfEditorEjercicios},
- uViewCajasBancos in 'uViewCajasBancos.pas' {frViewCajasBancos: TFrame};
+ uViewListaSubCuentas in 'uViewListaSubCuentas.pas' {frViewListaSubcuentas: TFrame};
end.
diff --git a/Source/Modulos/Contabilidad/Views/Contabilidad_view.dproj b/Source/Modulos/Contabilidad/Views/Contabilidad_view.dproj
index 86646d53..65e425c7 100644
--- a/Source/Modulos/Contabilidad/Views/Contabilidad_view.dproj
+++ b/Source/Modulos/Contabilidad/Views/Contabilidad_view.dproj
@@ -153,10 +153,6 @@
TFrame
-
-
- TFrame
-
TFrame
@@ -181,6 +177,10 @@
TFrame
+
+
+ TFrame
+
TFrame
diff --git a/Source/Modulos/Contabilidad/Views/uViewCajasBancos.pas b/Source/Modulos/Contabilidad/Views/uViewCajasBancos.pas
index 6e9de99e..54855a39 100644
--- a/Source/Modulos/Contabilidad/Views/uViewCajasBancos.pas
+++ b/Source/Modulos/Contabilidad/Views/uViewCajasBancos.pas
@@ -90,6 +90,7 @@ begin
begin
cbCajasBancos.ItemIndex := 0;
cbCajasBancos.Enabled := True;
+ FIdSubCuenta := StrToInt(FListaCajasBancos.Values[cbCajasBancos.Text]); //Refrescamos el valor
end
else
begin
diff --git a/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas b/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas
new file mode 100644
index 00000000..f04bb850
--- /dev/null
+++ b/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas
@@ -0,0 +1,153 @@
+unit uViewListaSubCuentas;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uViewBase, ExtCtrls, StdCtrls, DB, uDADataTable, cxGraphics,
+ dxLayoutControl, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit,
+ cxControls, cxCheckBox, uSubCuentasController;
+
+type
+ IViewListaSubcuentas = interface(IViewBase)
+ ['{5266EE90-D715-462A-9720-FF0D4078A496}']
+ function GetTipoSubCuenta: TEnumTipoSubCuenta;
+ procedure SetTipoSubCuenta(const Value: TEnumTipoSubCuenta);
+ property TipoSubCuenta: TEnumTipoSubCuenta read GetTipoSubCuenta write SetTipoSubCuenta;
+ end;
+
+ TfrViewListaSubcuentas = class(TfrViewBase, IViewListaSubcuentas)
+ cbSubCuentas: TcxComboBox;
+ dxLayoutControl1Group_Root: TdxLayoutGroup;
+ dxLayoutControl1: TdxLayoutControl;
+ dxLayoutControl1Item1: TdxLayoutItem;
+ dxLayoutControl1Item2: TdxLayoutItem;
+ eContabilizar: TcxCheckBox;
+ procedure CustomViewCreate(Sender: TObject);
+ procedure CustomViewDestroy(Sender: TObject);
+ procedure CustomViewShow(Sender: TObject);
+
+ procedure cbCajaBancoPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
+ procedure eContabilizarPropertiesEditValueChanged(Sender: TObject);
+
+ private
+ FTipoSubCuenta: TEnumTipoSubCuenta;
+ FIdSubCuenta : Integer;
+ FListaSubCuentas : TStringList;
+ function getIDCajaBanco: Integer;
+ function GetTipoSubCuenta: TEnumTipoSubCuenta;
+ procedure SetTipoSubCuenta(const Value: TEnumTipoSubCuenta);
+ public
+ property TipoSubCuenta: TEnumTipoSubCuenta read GetTipoSubCuenta write SetTipoSubCuenta;
+ property IdSubCuenta: Integer read getIDCajaBanco;
+ procedure ElegirSubCuenta(const AIdSubCuenta : Integer);
+ end;
+
+
+implementation
+{$R *.dfm}
+
+uses
+ uFactuGES_App;
+
+procedure TfrViewListaSubcuentas.cbCajaBancoPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
+begin
+ inherited;
+ FIdSubCuenta := StrToInt(FListaSubCuentas.Values[DisplayValue]);
+end;
+
+
+procedure TfrViewListaSubcuentas.CustomViewCreate(Sender: TObject);
+var
+ i : integer;
+begin
+ inherited;
+ FTipoSubCuenta := tTodas;
+ FListaSubCuentas := Nil;
+end;
+
+procedure TfrViewListaSubcuentas.CustomViewDestroy(Sender: TObject);
+begin
+ inherited;
+ cbSubCuentas.Properties.OnValidate := nil;
+ eContabilizar.Properties.OnEditValueChanged := nil;
+ FreeAndNIL(FListaSubCuentas);
+end;
+
+procedure TfrViewListaSubcuentas.CustomViewShow(Sender: TObject);
+begin
+ inherited;
+ cbSubCuentas.Properties.OnValidate := cbCajaBancoPropertiesValidate;
+ eContabilizar.Properties.OnEditValueChanged := eContabilizarPropertiesEditValueChanged;
+end;
+
+procedure TfrViewListaSubcuentas.eContabilizarPropertiesEditValueChanged(Sender: TObject);
+begin
+ inherited;
+ if not eContabilizar.Checked then
+ begin
+ cbSubCuentas.ItemIndex := 0;
+ FIdSubCuenta := StrToInt(FListaSubCuentas.Values[cbSubCuentas.Text]); //Refrescamos el valor
+ cbSubCuentas.Enabled := True;
+ end
+ else
+ begin
+ cbSubCuentas.ItemIndex := -1;
+ cbSubCuentas.Enabled := False;
+ end;
+end;
+
+procedure TfrViewListaSubcuentas.ElegirSubCuenta(const AIdSubCuenta: Integer);
+var
+ i : integer;
+begin
+ for i := 0 to FListaSubCuentas.Count-1 do
+ begin
+ if FListaSubCuentas.ValueFromIndex[i] = IntToStr(AIdSubCuenta) then
+ begin
+ cbSubCuentas.Text := FListaSubCuentas.Names[i];
+ Break;
+ end;
+ end;
+end;
+
+function TfrViewListaSubcuentas.getIDCajaBanco: Integer;
+begin
+ Result := FIdSubCuenta;
+end;
+
+function TfrViewListaSubcuentas.GetTipoSubCuenta: TEnumTipoSubCuenta;
+begin
+ Result := FTipoSubCuenta;
+end;
+
+procedure TfrViewListaSubcuentas.SetTipoSubCuenta(Const Value: TEnumTipoSubCuenta);
+var
+ i: Integer;
+begin
+ FTipoSubCuenta := Value;
+
+ with TSubCuentasController.create do
+ begin
+
+ FListaSubCuentas := DarLista(FTipoSubCuenta);
+ with cbSubCuentas.Properties.Items do
+ begin
+ BeginUpdate;
+ try
+ Clear;
+ for i := 0 to FListaSubCuentas.Count - 1 do
+ Add(FListaSubCuentas.Names[i]);
+ finally
+ EndUpdate;
+ end;
+ end;
+ Free;
+ end;
+
+ //Ponemos la primera por defecto
+ cbSubCuentas.ItemIndex := 0;
+ FIdSubCuenta := StrToInt(FListaSubCuentas.Values[cbSubCuentas.Text]); //Refrescamos el valor
+end;
+
+end.
diff --git a/Source/Modulos/Contactos/Model/uBizClientesServer.pas b/Source/Modulos/Contactos/Model/uBizClientesServer.pas
index 7f343094..af584867 100644
--- a/Source/Modulos/Contactos/Model/uBizClientesServer.pas
+++ b/Source/Modulos/Contactos/Model/uBizClientesServer.pas
@@ -57,7 +57,7 @@ var
idCliente: integer;
idTienda: integer;
idEmpresa: integer;
- NombreComercial: string;
+ Nombre: string;
begin
inherited;
@@ -96,9 +96,9 @@ begin
IdCliente := aChange.NewValueByName[fld_ClientesID];
IdTienda := aChange.NewValueByName[fld_ClientesID_TIENDA];
IdEmpresa := aChange.NewValueByName[fld_ClientesID_EMPRESA];
- NombreComercial := aChange.NewValueByName[fld_ClientesNOMBRE_COMERCIAL];
+ Nombre := aChange.NewValueByName[fld_ClientesNOMBRE];
if not TieneCuentaAsociada(idCliente, idEmpresa) then
- AnadirSubCuentaCliente(idCliente, idTienda, idEmpresa, NombreComercial);
+ AnadirSubCuentaCliente(idCliente, idTienda, idEmpresa, Nombre);
finally
Free;
end;
diff --git a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj
index 3e99156b..cdb83c0f 100644
--- a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj
+++ b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj
@@ -48,15 +48,15 @@
MainSource
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
index 548577e5..ee6fa394 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
@@ -50,6 +50,8 @@ type
function ExtraerSeleccionados(ARecibosCliente: IBizFacturaCliente) : IBizFacturaCliente;
procedure SetID_Tienda (AFactura: IBizFacturaCliente; const ID_Tienda: Integer);
+ procedure SetIdSubcuenta (AFactura: IBizFacturaCliente; const IdSubCuenta: Integer);
+ procedure SetIgnorarContabilidad (AFactura: IBizFacturaCliente; const Ignorar: Integer);
end;
TFacturasClienteController = class(TObservador, IFacturasClienteController)
@@ -110,7 +112,9 @@ type
function ElegirFacturas(AFacturas : IBizFacturaCliente; AMensaje: String; AMultiSelect: Boolean): IBizFacturaCliente;
function ExtraerSeleccionados(AFacturasCliente: IBizFacturaCliente) : IBizFacturaCliente;
- procedure SetID_Tienda (AFactura: IBizFacturaCliente; const ID_Tienda: Integer);
+ procedure SetID_Tienda (AFactura: IBizFacturaCliente; const ID_Tienda: Integer);
+ procedure SetIdSubcuenta (AFactura: IBizFacturaCliente; const IdSubCuenta: Integer);
+ procedure SetIgnorarContabilidad (AFactura: IBizFacturaCliente; const Ignorar: Integer);
end;
implementation
@@ -917,6 +921,46 @@ begin
end;
end;
+procedure TFacturasClienteController.SetIgnorarContabilidad(AFactura: IBizFacturaCliente; const Ignorar: Integer);
+var
+ EnEdicion: Boolean;
+begin
+ if Assigned(AFactura) then
+ begin
+ EnEdicion := AFactura.DataTable.Editing;
+ if not AFactura.DataTable.Editing then
+ AFactura.DataTable.Edit;
+
+ AFactura.IGNORAR_CONTABILIDAD := Ignorar;
+ AFactura.DataTable.Post;
+
+ if EnEdicion then
+ AFactura.DataTable.Edit;
+ end;
+end;
+
+procedure TFacturasClienteController.SetIdSubCuenta(AFactura: IBizFacturaCliente; const IdSubCuenta: Integer);
+var
+ EnEdicion: Boolean;
+begin
+ if Assigned(AFactura) then
+ begin
+ EnEdicion := AFactura.DataTable.Editing;
+ if not AFactura.DataTable.Editing then
+ AFactura.DataTable.Edit;
+
+ if IdSubCuenta < 0 then
+ AFactura.DataTable.FieldByName(fld_FacturasClienteID_SUBCUENTA).AsVariant := Null
+ else
+ AFactura.ID_SUBCUENTA := IdSubCuenta;
+
+ AFactura.DataTable.Post;
+
+ if EnEdicion then
+ AFactura.DataTable.Edit;
+ end;
+end;
+
function TFacturasClienteController.Guardar(AFactura: IBizFacturaCliente): Boolean;
var
IDNuevo : Integer;
diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm
index affdef44..a147dbc1 100644
--- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm
@@ -251,6 +251,15 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente
Name = 'TIENDA'
DataType = datString
Size = 255
+ end
+ item
+ Name = 'ID_SUBCUENTA'
+ DataType = datInteger
+ end
+ item
+ Name = 'SUBCUENTA'
+ DataType = datString
+ Size = 255
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 5f4e9af2..a316e70f 100644
--- a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj
+++ b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj
@@ -11,8 +11,13 @@
+
+
+
+
+
@@ -88,6 +93,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -151,14 +183,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ 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 231ef39c..99cadd81 100644
--- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas
+++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas
@@ -3,14 +3,14 @@ unit schFacturasClienteClient_Intf;
interface
uses
- Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
+ Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
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 = '{B44F7BFA-C409-45FB-82EE-487E20CB6656}';
- RID_FacturasCliente_Detalles = '{3398E461-119A-4D6F-8AB3-8D03BD2B0A4C}';
+ RID_FacturasCliente = '{002FC909-9064-4D9C-AA64-A28325D42EC4}';
+ RID_FacturasCliente_Detalles = '{9A3BDA83-5AEB-4FD6-8914-CFDE2AE53C06}';
{ Data table names }
nme_FacturasCliente = 'FacturasCliente';
@@ -53,6 +53,8 @@ const
fld_FacturasClienteIGNORAR_CONTABILIDAD = 'IGNORAR_CONTABILIDAD';
fld_FacturasClienteID_TIENDA = 'ID_TIENDA';
fld_FacturasClienteTIENDA = 'TIENDA';
+ fld_FacturasClienteID_SUBCUENTA = 'ID_SUBCUENTA';
+ fld_FacturasClienteSUBCUENTA = 'SUBCUENTA';
{ FacturasCliente field indexes }
idx_FacturasClienteID = 0;
@@ -91,6 +93,8 @@ const
idx_FacturasClienteIGNORAR_CONTABILIDAD = 33;
idx_FacturasClienteID_TIENDA = 34;
idx_FacturasClienteTIENDA = 35;
+ idx_FacturasClienteID_SUBCUENTA = 36;
+ idx_FacturasClienteSUBCUENTA = 37;
{ FacturasCliente_Detalles fields }
fld_FacturasCliente_DetallesID = 'ID';
@@ -127,7 +131,7 @@ const
type
{ IFacturasCliente }
IFacturasCliente = interface(IDAStronglyTypedDataTable)
- ['{78EEA3FC-BED8-4F9E-ACBC-E377A8132367}']
+ ['{77B09FE8-CC07-4A1D-87AA-D36AEB54D2BE}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -272,6 +276,14 @@ type
procedure SetTIENDAValue(const aValue: String);
function GetTIENDAIsNull: Boolean;
procedure SetTIENDAIsNull(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);
{ Properties }
@@ -347,10 +359,14 @@ type
property ID_TIENDAIsNull: Boolean read GetID_TIENDAIsNull write SetID_TIENDAIsNull;
property TIENDA: String read GetTIENDAValue write SetTIENDAValue;
property TIENDAIsNull: Boolean read GetTIENDAIsNull write SetTIENDAIsNull;
+ 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;
end;
{ TFacturasClienteDataTableRules }
- TFacturasClienteDataTableRules = class(TIntfObjectDADataTableRules, IFacturasCliente)
+ TFacturasClienteDataTableRules = class(TDADataTableRules, IFacturasCliente)
private
f_OBSERVACIONES: IROStrings;
procedure OBSERVACIONES_OnChange(Sender: TObject);
@@ -499,6 +515,14 @@ type
procedure SetTIENDAValue(const aValue: String); virtual;
function GetTIENDAIsNull: Boolean; virtual;
procedure SetTIENDAIsNull(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;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -573,6 +597,10 @@ type
property ID_TIENDAIsNull: Boolean read GetID_TIENDAIsNull write SetID_TIENDAIsNull;
property TIENDA: String read GetTIENDAValue write SetTIENDAValue;
property TIENDAIsNull: Boolean read GetTIENDAIsNull write SetTIENDAIsNull;
+ 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;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -582,7 +610,7 @@ type
{ IFacturasCliente_Detalles }
IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable)
- ['{F3725EA1-8E69-4419-AE57-1F0A4C949826}']
+ ['{5705755D-4FD6-4B5E-B60C-72155D3868DD}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -674,7 +702,7 @@ type
end;
{ TFacturasCliente_DetallesDataTableRules }
- TFacturasCliente_DetallesDataTableRules = class(TIntfObjectDADataTableRules, IFacturasCliente_Detalles)
+ TFacturasCliente_DetallesDataTableRules = class(TDADataTableRules, IFacturasCliente_Detalles)
private
protected
{ Property getters and setters }
@@ -1549,6 +1577,48 @@ begin
DataTable.Fields[idx_FacturasClienteTIENDA].AsVariant := Null;
end;
+function TFacturasClienteDataTableRules.GetID_SUBCUENTAValue: Integer;
+begin
+ result := DataTable.Fields[idx_FacturasClienteID_SUBCUENTA].AsInteger;
+end;
+
+procedure TFacturasClienteDataTableRules.SetID_SUBCUENTAValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_FacturasClienteID_SUBCUENTA].AsInteger := aValue;
+end;
+
+function TFacturasClienteDataTableRules.GetID_SUBCUENTAIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasClienteID_SUBCUENTA].IsNull;
+end;
+
+procedure TFacturasClienteDataTableRules.SetID_SUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasClienteID_SUBCUENTA].AsVariant := Null;
+end;
+
+function TFacturasClienteDataTableRules.GetSUBCUENTAValue: String;
+begin
+ result := DataTable.Fields[idx_FacturasClienteSUBCUENTA].AsString;
+end;
+
+procedure TFacturasClienteDataTableRules.SetSUBCUENTAValue(const aValue: String);
+begin
+ DataTable.Fields[idx_FacturasClienteSUBCUENTA].AsString := aValue;
+end;
+
+function TFacturasClienteDataTableRules.GetSUBCUENTAIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasClienteSUBCUENTA].IsNull;
+end;
+
+procedure TFacturasClienteDataTableRules.SetSUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasClienteSUBCUENTA].AsVariant := Null;
+end;
+
{ TFacturasCliente_DetallesDataTableRules }
constructor TFacturasCliente_DetallesDataTableRules.Create(aDataTable: TDADataTable);
diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas
index aa5a437c..c0494a7f 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 = '{423AEA32-50CE-46B7-89CE-596B555D2557}';
- RID_FacturasCliente_DetallesDelta = '{E56A4E4E-9680-46FF-BF17-EFA23E024033}';
+ RID_FacturasClienteDelta = '{9F142F33-556F-41B3-A527-27FF1BDAB48E}';
+ RID_FacturasCliente_DetallesDelta = '{A97D0506-4C6F-4078-A30F-8768419E7E0F}';
type
{ IFacturasClienteDelta }
IFacturasClienteDelta = interface(IFacturasCliente)
- ['{423AEA32-50CE-46B7-89CE-596B555D2557}']
+ ['{9F142F33-556F-41B3-A527-27FF1BDAB48E}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -53,6 +53,8 @@ type
function GetOldIGNORAR_CONTABILIDADValue : SmallInt;
function GetOldID_TIENDAValue : Integer;
function GetOldTIENDAValue : String;
+ function GetOldID_SUBCUENTAValue : Integer;
+ function GetOldSUBCUENTAValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -91,6 +93,8 @@ type
property OldIGNORAR_CONTABILIDAD : SmallInt read GetOldIGNORAR_CONTABILIDADValue;
property OldID_TIENDA : Integer read GetOldID_TIENDAValue;
property OldTIENDA : String read GetOldTIENDAValue;
+ property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
+ property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
end;
{ TFacturasClienteBusinessProcessorRules }
@@ -315,6 +319,18 @@ type
function GetOldTIENDAIsNull: Boolean; virtual;
procedure SetTIENDAValue(const aValue: String); virtual;
procedure SetTIENDAIsNull(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;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -461,6 +477,14 @@ type
property TIENDAIsNull : Boolean read GetTIENDAIsNull write SetTIENDAIsNull;
property OldTIENDA : String read GetOldTIENDAValue;
property OldTIENDAIsNull : Boolean read GetOldTIENDAIsNull;
+ 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;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -470,7 +494,7 @@ type
{ IFacturasCliente_DetallesDelta }
IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles)
- ['{E56A4E4E-9680-46FF-BF17-EFA23E024033}']
+ ['{A97D0506-4C6F-4078-A30F-8768419E7E0F}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
@@ -1798,6 +1822,68 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteTIENDA] := Null;
end;
+function TFacturasClienteBusinessProcessorRules.GetID_SUBCUENTAValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_SUBCUENTA];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetID_SUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_SUBCUENTA]);
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldID_SUBCUENTAValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteID_SUBCUENTA];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldID_SUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteID_SUBCUENTA]);
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetID_SUBCUENTAValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_SUBCUENTA] := aValue;
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetID_SUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_SUBCUENTA] := Null;
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetSUBCUENTAValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteSUBCUENTA];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetSUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteSUBCUENTA]);
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldSUBCUENTAValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteSUBCUENTA];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldSUBCUENTAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteSUBCUENTA]);
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetSUBCUENTAValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteSUBCUENTA] := aValue;
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetSUBCUENTAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteSUBCUENTA] := Null;
+end;
+
{ TFacturasCliente_DetallesBusinessProcessorRules }
constructor TFacturasCliente_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
diff --git a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
index f3047c20..57458a74 100644
--- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
@@ -256,10 +256,10 @@ begin
IVA := AppFactuGES.EmpresaActiva.IVA;
RE := 0;
SITUACION := CTE_PENDIENTE;
- IGNORAR_CONTABILIDAD := 0;
-
ID_TIENDA := CTE_ID_TODAS;
- TIENDA := CTE_TODAS;
+ TIENDA := CTE_TODAS;
+
+ IGNORAR_CONTABILIDAD := 0;
end;
procedure TBizFacturaCliente.IVAOnChange(Sender: TDACustomField);
diff --git a/Source/Modulos/Facturas de cliente/Model/uBizFacturasClienteServer.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasClienteServer.pas
index f3d5d303..ca72e718 100644
--- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasClienteServer.pas
+++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasClienteServer.pas
@@ -96,6 +96,19 @@ begin
ASchema := BusinessProcessor.Schema;
ACurrentConn := GetBusinessProcessorConnection(BusinessProcessor);
+ //Eliminamos los recibos de la factura
+ ACommand := ASchema.NewCommand(ACurrentConn, 'Delete_RecibosFactura');
+ try
+ with ACommand do
+ begin
+ ParamByName('ID_FACTURA').Value := aChange.OldValueByName[fld_FacturasClienteID];
+ Execute;
+ end;
+ finally
+ ACommand := NIL;
+ end;
+
+ //Eliminamos los asientos contables de la factura
ACommand := ASchema.NewCommand(ACurrentConn, 'Delete_AsientoFactura');
try
with ACommand do
@@ -113,14 +126,15 @@ function TBizFacturasClienteServer.DarReferencia: String;
var
ATipo : String;
begin
- if TIPO = CTE_TIPO_FACTURA then
- ATipo := REF_FACTURAS_CLIENTE
- else
- ATipo := REF_ABONOS_CLIENTE;
+//No se hace distinción en la referencia entre facturas y abonos
+// if TIPO = CTE_TIPO_FACTURA then
+ ATipo := REF_FACTURAS_CLIENTE;
+// else
+// ATipo := REF_ABONOS_CLIENTE;
with TsrvReferencias.Create(NIL) do
try
- Result := DarNuevaReferencia(ATipo, ID_EMPRESA)
+ Result := DarNuevaReferencia(ATipo, ID_EMPRESA, ID_TIENDA)
finally
Free;
end;
@@ -130,15 +144,14 @@ function TBizFacturasClienteServer.IncrementarReferencia: Boolean;
var
ATipo : String;
begin
- if TIPO = CTE_TIPO_FACTURA then
- ATipo := REF_FACTURAS_CLIENTE
- else
- ATipo := REF_ABONOS_CLIENTE;
+// if TIPO = CTE_TIPO_FACTURA then
+ ATipo := REF_FACTURAS_CLIENTE;
+// else
+// ATipo := REF_ABONOS_CLIENTE;
with TsrvReferencias.Create(NIL) do
try
- Result := IncrementarValorReferencia(ATipo,
- Self.REFERENCIA, ID_EMPRESA)
+ Result := IncrementarValorReferencia(ATipo, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA)
finally
Free;
end;
@@ -158,6 +171,7 @@ begin
with ACommand do
begin
ParamByName('IdFactura').Value := aChange.NewValueByName[fld_FacturasClienteID];
+ ParamByName('IdSubCuentaVenta').Value := aChange.NewValueByName[fld_FacturasClienteID_SUBCUENTA];
Execute;
end;
finally
@@ -179,6 +193,7 @@ begin
with ACommand do
begin
ParamByName('IdFactura').Value := aChange.NewValueByName[fld_FacturasClienteID];
+ ParamByName('IdSubCuentaVenta').Value := aChange.NewValueByName[fld_FacturasClienteID_SUBCUENTA];
Execute;
end;
finally
diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
index 8045b764..36a41fc0 100644
--- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
+++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
@@ -166,6 +166,14 @@ object srvFacturasCliente: TsrvFacturasCliente
item
DatasetField = 'TIENDA'
TableField = 'TIENDA'
+ end
+ item
+ DatasetField = 'ID_SUBCUENTA'
+ TableField = 'ID_SUBCUENTA'
+ end
+ item
+ DatasetField = 'SUBCUENTA'
+ TableField = 'SUBCUENTA'
end>
end>
Name = 'FacturasCliente'
@@ -362,6 +370,15 @@ object srvFacturasCliente: TsrvFacturasCliente
Name = 'TIENDA'
DataType = datString
Size = 255
+ end
+ item
+ Name = 'ID_SUBCUENTA'
+ DataType = datInteger
+ end
+ item
+ Name = 'SUBCUENTA'
+ DataType = datString
+ Size = 255
end>
end
item
@@ -551,6 +568,10 @@ object srvFacturasCliente: TsrvFacturasCliente
item
Name = 'IdFactura'
Value = ''
+ end
+ item
+ Name = 'IdSubCuentaVenta'
+ Value = ''
end>
Statements = <
item
@@ -558,7 +579,9 @@ object srvFacturasCliente: TsrvFacturasCliente
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
- SQL = 'execute procedure proc_new_asiento_factura_cli :IdFactura'#10
+ SQL =
+ 'execute procedure proc_new_asiento_factura_cli :IdFactura, :IdSu' +
+ 'bCuentaVenta'#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -1087,6 +1110,21 @@ object srvFacturasCliente: TsrvFacturasCliente
ColumnMappings = <>
end>
Name = 'Update_FacturasCliente'
+ end
+ item
+ Params = <
+ item
+ Name = 'ID_FACTURA'
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ SQL = 'delete from recibos_cliente'#10'where id_factura = :ID_FACTURA'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Delete_RecibosFactura'
end>
RelationShips = <
item
diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas
index d020c86b..361ff87d 100644
--- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas
+++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas
@@ -10,7 +10,7 @@ unit srvFacturasCliente_Impl;
interface
uses
- {vcl:} Classes, SysUtils,
+ {vcl:} Classes, SysUtils,
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
{Ancestor Implementation:} DataAbstractService_Impl,
{Used RODLs:} DataAbstract4_Intf,
diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk
index 730b5d39..6101ab36 100644
--- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk
+++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk
@@ -30,7 +30,9 @@ requires
FacturasCliente_controller,
Contactos_view,
Articulos_view,
- AlbCli_FacCli_relation;
+ AlbCli_FacCli_relation,
+ Contabilidad_view,
+ Contabilidad_controller;
contains
uFacturasClienteViewRegister in 'uFacturasClienteViewRegister.pas',
diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj
index b7de9dad..9018a5b9 100644
--- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj
+++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj
@@ -1,4 +1,5 @@
-
+
+
{9e558626-cf49-4cff-a178-e12c186758ac}
FacturasCliente_view.dpk
@@ -50,6 +51,8 @@
+
+
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
index 82c31c77..d5bff0c6 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
@@ -3,19 +3,19 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Top = 208
Caption = 'Nueva factura de cliente'
ClientHeight = 642
- ClientWidth = 813
+ ClientWidth = 771
Position = poScreenCenter
OnClose = CustomEditorClose
- ExplicitWidth = 821
+ ExplicitWidth = 779
ExplicitHeight = 676
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
- Width = 813
+ Width = 771
Caption = 'Nueva factura de cliente'
ExplicitWidth = 813
inherited Image1: TImage
- Left = 786
+ Left = 744
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
0000180806000000E0773DF80000000970485973000017120000171201679FD2
@@ -39,7 +39,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
end
inherited TBXDock: TTBXDock
- Width = 813
+ Width = 771
ExplicitWidth = 813
inherited tbxMain: TTBXToolbar
ExplicitWidth = 488
@@ -54,7 +54,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
end
inherited tbxMenu: TTBXToolbar
- ExplicitWidth = 813
+ ExplicitWidth = 771
inherited TBXSubmenuItem4: TTBXSubmenuItem
inherited TBXItem8: TTBXItem
Visible = False
@@ -69,8 +69,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
end
inherited pgPaginas: TPageControl
- Width = 807
+ Width = 765
Height = 378
+ ActivePage = pagContabilidad
OnChanging = pgPaginasChanging
ExplicitLeft = 3
ExplicitTop = 79
@@ -84,7 +85,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inline frViewFacturaCliente1: TfrViewFacturaCliente
Left = 0
Top = 0
- Width = 799
+ Width = 757
Height = 350
Align = alClient
Font.Charset = DEFAULT_CHARSET
@@ -98,7 +99,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 799
ExplicitHeight = 350
inherited dxLayoutControl1: TdxLayoutControl
- Width = 799
+ Width = 757
Height = 350
ExplicitWidth = 799
ExplicitHeight = 350
@@ -147,13 +148,13 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 327
end
inherited edtCodigoPostal: TcxDBTextEdit
- Left = 284
+ Left = 242
DataBinding.DataSource = frViewFacturaCliente1.DADataSource
- ExplicitLeft = 284
+ ExplicitLeft = 242
end
inherited Button3: TBitBtn
- Left = 174
- ExplicitLeft = 174
+ Left = 132
+ ExplicitLeft = 132
end
end
end
@@ -175,10 +176,11 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
+ ExplicitWidth = 799
inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente
Left = 0
Top = 0
- Width = 799
+ Width = 757
Height = 350
Align = alClient
BiDiMode = bdLeftToRight
@@ -194,7 +196,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 799
ExplicitHeight = 350
inherited ToolBar1: TToolBar
- Width = 799
+ Width = 757
ExplicitWidth = 799
inherited ToolButton4: TToolButton
Wrap = False
@@ -217,50 +219,50 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 57
end
inherited UpDown1: TUpDown
- Left = 218
- ExplicitLeft = 218
+ Left = 202
+ ExplicitLeft = 202
end
inherited ToolButton13: TToolButton
- Left = 235
- ExplicitLeft = 235
+ Left = 219
+ ExplicitLeft = 219
end
inherited ToolButton6: TToolButton
- Left = 243
- ExplicitLeft = 243
+ Left = 227
+ ExplicitLeft = 227
end
inherited ToolButton7: TToolButton
- Left = 277
- ExplicitLeft = 277
+ Left = 261
+ ExplicitLeft = 261
end
inherited ToolButton8: TToolButton
- Left = 311
- ExplicitLeft = 311
+ Left = 295
+ ExplicitLeft = 295
end
inherited ToolButton12: TToolButton
- Left = 345
- ExplicitLeft = 345
+ Left = 329
+ ExplicitLeft = 329
end
inherited ToolButton9: TToolButton
- Left = 353
- ExplicitLeft = 353
+ Left = 337
+ ExplicitLeft = 337
end
inherited ToolButton10: TToolButton
- Left = 387
- ExplicitLeft = 387
+ Left = 371
+ ExplicitLeft = 371
end
inherited ToolButton11: TToolButton
- Left = 421
- ExplicitLeft = 421
+ Left = 405
+ ExplicitLeft = 405
end
end
inherited cxGrid: TcxGrid
- Width = 799
+ Width = 757
Height = 278
ExplicitWidth = 799
ExplicitHeight = 278
end
inherited TBXDock1: TTBXDock
- Width = 799
+ Width = 757
ExplicitWidth = 799
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 548
@@ -271,38 +273,46 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
object pagContabilidad: TTabSheet
Caption = 'Contabilidad'
ImageIndex = 2
- ExplicitLeft = 0
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
- object cbIgnorarContabilidad: TcxDBCheckBox
- Left = 16
- Top = 12
- Caption = 'Ignorar en contabilidad'
- DataBinding.DataField = 'IGNORAR_CONTABILIDAD'
- DataBinding.DataSource = dsDataTable
- Properties.NullStyle = nssUnchecked
- Properties.ValueChecked = 1
- Properties.ValueUnchecked = 0
- Style.BorderColor = clWindowFrame
- Style.BorderStyle = ebs3D
- Style.HotTrack = False
- Style.LookAndFeel.Kind = lfStandard
- Style.LookAndFeel.NativeStyle = True
- StyleDisabled.LookAndFeel.Kind = lfStandard
- StyleDisabled.LookAndFeel.NativeStyle = True
- StyleFocused.LookAndFeel.Kind = lfStandard
- StyleFocused.LookAndFeel.NativeStyle = True
- StyleHot.LookAndFeel.Kind = lfStandard
- StyleHot.LookAndFeel.NativeStyle = True
+ ExplicitWidth = 799
+ inline frViewListaSubcuentas1: TfrViewListaSubcuentas
+ Left = 0
+ Top = 0
+ Width = 757
+ Height = 73
+ Align = alTop
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
TabOrder = 0
- Width = 300
+ ReadOnly = False
+ ExplicitLeft = 10
+ ExplicitTop = 20
+ ExplicitHeight = 73
+ inherited dxLayoutControl1: TdxLayoutControl
+ Width = 757
+ inherited cbSubCuentas: TcxComboBox
+ Left = 85
+ ExplicitLeft = 85
+ end
+ inherited eContabilizar: TcxCheckBox
+ Left = 520
+ ExplicitLeft = 520
+ end
+ inherited dxLayoutControl1Group_Root: TdxLayoutGroup
+ inherited dxLayoutControl1Item1: TdxLayoutItem
+ Caption = 'Tipo de venta:'
+ end
+ end
+ end
end
end
end
inherited StatusBar: TJvStatusBar
Top = 623
- Width = 813
+ Width = 771
Panels = <
item
Width = 200
@@ -313,7 +323,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inline frViewTotales1: TfrViewTotales [4]
Left = 0
Top = 460
- Width = 813
+ Width = 771
Height = 163
Align = alBottom
Font.Charset = DEFAULT_CHARSET
@@ -328,7 +338,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 813
ExplicitHeight = 163
inherited dxLayoutControl1: TdxLayoutControl
- Width = 813
+ Width = 771
LookAndFeel = frViewFacturaCliente1.dxLayoutOfficeLookAndFeel1
ExplicitWidth = 813
inherited Bevel1: TBevel
@@ -338,18 +348,18 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 73
end
inherited Bevel3: TBevel
- Left = 433
+ Left = 411
Top = 30
Height = 122
- ExplicitLeft = 433
+ ExplicitLeft = 411
ExplicitTop = 30
ExplicitHeight = 122
end
inherited Bevel4: TBevel
- Left = 545
+ Left = 523
Top = 111
Width = 186
- ExplicitLeft = 545
+ ExplicitLeft = 523
ExplicitTop = 111
ExplicitWidth = 186
end
@@ -361,19 +371,19 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 93
end
inherited ImporteIVA: TcxDBCurrencyEdit
- Left = 616
+ Left = 594
Top = 57
Style.IsFontAssigned = True
- ExplicitLeft = 616
+ ExplicitLeft = 594
ExplicitTop = 57
ExplicitWidth = 137
Width = 137
end
inherited ImporteTotal: TcxDBCurrencyEdit
- Left = 546
+ Left = 524
Top = 131
Style.IsFontAssigned = True
- ExplicitLeft = 546
+ ExplicitLeft = 524
ExplicitTop = 131
ExplicitWidth = 137
Width = 137
@@ -385,34 +395,34 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitTop = 131
end
inherited edtIVA: TcxDBSpinEdit
- Left = 545
+ Left = 523
Top = 57
Style.IsFontAssigned = True
- ExplicitLeft = 545
+ ExplicitLeft = 523
ExplicitTop = 57
end
inherited ImporteBase: TcxDBCurrencyEdit
- Left = 545
+ Left = 523
Top = 30
Style.IsFontAssigned = True
- ExplicitLeft = 545
+ ExplicitLeft = 523
ExplicitTop = 30
ExplicitWidth = 92
Width = 92
end
inherited edtRE: TcxDBSpinEdit
- Left = 545
+ Left = 523
Top = 84
Properties.AssignedValues.MinValue = True
Style.IsFontAssigned = True
- ExplicitLeft = 545
+ ExplicitLeft = 523
ExplicitTop = 84
end
inherited ImporteRE: TcxDBCurrencyEdit
- Left = 616
+ Left = 594
Top = 84
Style.IsFontAssigned = True
- ExplicitLeft = 616
+ ExplicitLeft = 594
ExplicitTop = 84
ExplicitWidth = 56
Width = 56
@@ -443,10 +453,10 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 134
end
inherited bTiposIVA: TButton
- Left = 285
+ Left = 263
Top = 57
OnClick = frViewTotales1bTiposIVAClick
- ExplicitLeft = 285
+ ExplicitLeft = 263
ExplicitTop = 57
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
index 321bad56..63615ac1 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;
+ cxCheckBox, uViewListaSubCuentas;
type
@@ -26,7 +26,7 @@ type
frViewTotales1: TfrViewTotales;
frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente;
pagContabilidad: TTabSheet;
- cbIgnorarContabilidad: TcxDBCheckBox;
+ frViewListaSubcuentas1: TfrViewListaSubcuentas;
procedure FormShow(Sender: TObject);
procedure frViewClienteFactura1edtlNombrePropertiesEditValueChanged(Sender: TObject);
procedure dsDataTableDataChange(Sender: TObject; Field: TField);
@@ -79,9 +79,10 @@ type
implementation
{$R *.dfm}
+{$INCLUDE ..\..\..\FactuGES.inc}
uses
- uBizContactos, uDataModuleUsuarios, uFactuGES_App,
+ uBizContactos, uDataModuleUsuarios, uFactuGES_App, uSubCuentasController,
uDetallesFacturaClienteController, uDialogUtils, uDataTableUtils;
// uGenerarAlbaranesCliFacCliUtils;
@@ -98,6 +99,9 @@ begin
pgPaginas.ActivePageIndex := 0;
ViewFacturaCliente := frViewFacturaCliente1;
FTiposIVAController := TTiposIVAController.Create;
+
+ //CONTABILIDAD
+ frViewListaSubcuentas1.TipoSubCuenta := tVentas;
end;
procedure TfEditorFacturaCliente.CustomEditorClose(Sender: TObject;
@@ -249,16 +253,23 @@ end;
procedure TfEditorFacturaCliente.GuardarInterno;
var
bEsNuevo : Boolean;
+
begin
inherited;
-
+
ShowHourglassCursor;
//frViewDetallesFacturaCliente1.SaveGridStatus; // Para guardar estado del grid
frViewDetallesFacturaCliente1.BeginUpdate; // Para que no se mueva el foco
try
bEsNuevo := FFactura.EsNuevo;
- FController.SetID_Tienda(FFactura, frViewFacturaCliente1.frViewTienda1.getIDTienda);
+
+ {$IFDEF CONTABILIDAD}
+ FController.SetIgnorarContabilidad(FFactura, frViewListaSubCuentas1.eContabilizar.EditValue);
+ FController.SetIdSubcuenta(FFactura, frViewListaSubCuentas1.IdSubCuenta);
+ {$ENDIF}
+
FController.Guardar(FFactura);
+
finally
frViewDetallesFacturaCliente1.EndUpdate;
//frViewDetallesFacturaCliente1.RestoreGridStatus;
@@ -398,7 +409,6 @@ begin
begin
dsDataTable.DataTable := FFactura.DataTable;
frViewTotales1.DADataSource.DataTable := FFactura.DataTable;
-
FTiposIVA := FTiposIVAController.BuscarTodos;
frViewTotales1.dsTiposIVA.DataTable := FTiposIVA.DataTable;
FTiposIVA.DataTable.Active := True;
@@ -412,6 +422,12 @@ begin
frViewDetallesFacturaCliente1.Detalles := FFactura.Detalles;
frViewDetallesFacturaCliente1.Factura := FFactura; //Para poder sacar los descuento del articulos segun el cliente seleccionado
end;
+
+ {$IFDEF CONTABILIDAD}
+ frViewListaSubCuentas1.eContabilizar.EditValue := FFactura.IGNORAR_CONTABILIDAD;
+// frViewListaSubCuentas1.ElegirSubCuenta(FFactura.ID_SUBCUENTA);
+ {$ENDIF}
+
end
else begin
frViewFacturaCliente1.frViewClienteFactura.OnClienteChanged := NIL;
diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm
index 01dde6c1..bdfc0f81 100644
--- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm
@@ -1,6 +1,6 @@
inherited frViewFacturaCliente: TfrViewFacturaCliente
- Width = 745
- Height = 458
+ Width = 451
+ Height = 304
Align = alClient
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
@@ -9,18 +9,16 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
- Width = 745
- Height = 458
+ Width = 451
+ Height = 304
Align = alClient
ParentBackground = True
TabOrder = 0
AutoContentSizes = [acsWidth, acsHeight]
LookAndFeel = dxLayoutOfficeLookAndFeel1
- ExplicitWidth = 451
- ExplicitHeight = 304
DesignSize = (
- 745
- 458)
+ 451
+ 304)
object eReferencia: TcxDBTextEdit
Left = 124
Top = 30
@@ -100,7 +98,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
inherited dxLayoutControl1: TdxLayoutControl
Width = 314
Height = 215
- ExplicitWidth = 314
+ ExplicitWidth = 101
ExplicitHeight = 215
inherited edtlNombre: TcxDBTextEdit
DataBinding.DataSource = DADataSource
@@ -128,13 +126,13 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Width = 327
end
inherited edtCodigoPostal: TcxDBTextEdit
- Left = 230
+ Left = 192
DataBinding.DataSource = DADataSource
- ExplicitLeft = 230
+ ExplicitLeft = 192
end
inherited Button3: TBitBtn
- Left = 120
- ExplicitLeft = 120
+ Left = 82
+ ExplicitLeft = 82
end
end
end
diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas
index edbc53a0..24a305a9 100644
--- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas
@@ -126,7 +126,6 @@ begin
if Assigned(FFactura) then
begin
DADataSource.DataTable := FFactura.DataTable;
-
frViewTienda1.DataItem := FFactura.DataTable;
FFormasPago := FFormasPagoController.BuscarTodos;
diff --git a/Source/Modulos/Recibos de cliente/Model/uBizPagosClienteServer.pas b/Source/Modulos/Recibos de cliente/Model/uBizPagosClienteServer.pas
index 8ea92c26..e1003d3e 100644
--- a/Source/Modulos/Recibos de cliente/Model/uBizPagosClienteServer.pas
+++ b/Source/Modulos/Recibos de cliente/Model/uBizPagosClienteServer.pas
@@ -109,6 +109,7 @@ begin
with ACommand do
begin
ParamByName('IdPago').Value := aChange.NewValueByName[fld_PagosClienteID];
+ ParamByName('IdSubCuentaPago').Value := aChange.NewValueByName[fld_PagosClienteCUENTA];
Execute;
end;
finally
diff --git a/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj b/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj
index 6cd443bf..d1190af4 100644
--- a/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj
+++ b/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj
@@ -11,6 +11,8 @@
+
+
@@ -143,6 +145,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -162,13 +182,13 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.res b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.res
index 1641339f..8b251f31 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 efa2b762..186b7aa0 100644
--- a/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.dfm
+++ b/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.dfm
@@ -14,6 +14,7 @@ object fEditorFechaPago: TfEditorFechaPago
OldCreateOrder = False
Position = poScreenCenter
OnCloseQuery = FormCloseQuery
+ OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
@@ -76,11 +77,11 @@ object fEditorFechaPago: TfEditorFechaPago
TabOrder = 1
end
end
- inline frViewCajasBancos1: TfrViewCajasBancos
- Left = 39
- Top = 83
+ inline frViewListaSubcuentas1: TfrViewListaSubcuentas
+ Left = 30
+ Top = 80
Width = 453
- Height = 76
+ Height = 69
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
@@ -89,11 +90,10 @@ object fEditorFechaPago: TfEditorFechaPago
ParentFont = False
TabOrder = 2
ReadOnly = False
- ExplicitLeft = 39
- ExplicitTop = 83
- ExplicitHeight = 76
+ ExplicitLeft = 30
+ ExplicitTop = 80
inherited dxLayoutControl1: TdxLayoutControl
- inherited cbCajasBancos: TcxComboBox
+ inherited cbSubCuentas: TcxComboBox
ExplicitWidth = 376
Width = 376
end
diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas b/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas
index 634dc459..a70e4761 100644
--- a/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas
+++ b/Source/Modulos/Recibos de cliente/Views/uEditorFechaPago.pas
@@ -7,7 +7,7 @@ uses
Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
cxDropDownEdit, cxCalendar, ExtCtrls, uEditorBasico, uIEditorFechaPago,
cxCheckBox, uSubCuentasController, Buttons, cxDBEdit, cxGraphics, uCustomView,
- uViewBase, uViewCajasBancos;
+ uViewBase, uViewListaSubCuentas;
type
TfEditorFechaPago = class(TfEditorBasico, IEditorFechaPago)
@@ -17,10 +17,11 @@ type
bCancelar: TButton;
Label2: TLabel;
Panel1: TPanel;
- frViewCajasBancos1: TfrViewCajasBancos;
+ frViewListaSubcuentas1: TfrViewListaSubcuentas;
procedure FormShow(Sender: TObject);
procedure eFechaPagoPropertiesChange(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+ procedure FormCreate(Sender: TObject);
private
FFechaPago : TDateTime;
@@ -72,15 +73,22 @@ begin
end;
end;
+procedure TfEditorFechaPago.FormCreate(Sender: TObject);
+begin
+ {$IFDEF CONTABILIDAD}
+ frViewListaSubCuentas1.TipoSubCuenta := tCajas;
+ {$ENDIF}
+end;
+
procedure TfEditorFechaPago.FormShow(Sender: TObject);
begin
if (length(eFechaPago.Text) = 0) then
eFechaPago.Date := Date;
{$IFDEF CONTABILIDAD}
- frViewCajasBancos1.Visible := true;
+ frViewListaSubCuentas1.Visible := true;
{$ELSE}
- frViewCajasBancos1.Visible := false;
+ frViewListaSubCuentas1.Visible := false;
{$ENDIF}
end;
@@ -91,12 +99,12 @@ end;
function TfEditorFechaPago.GetIdSubCuenta: Integer;
begin
- Result := frViewCajasBancos1.IdSubCuenta;
+ Result := frViewListaSubCuentas1.IdSubCuenta;
end;
function TfEditorFechaPago.GetIgnorarContabilidad: Integer;
begin
- Result := frViewCajasBancos1.eContabilizar.EditValue;
+ Result := frViewListaSubCuentas1.eContabilizar.EditValue;
end;
procedure TfEditorFechaPago.SetFechaPago(const Value: TDateTime);
@@ -107,12 +115,12 @@ end;
procedure TfEditorFechaPago.SetIdSubCuenta(const Value: Integer);
begin
- frViewCajasBancos1.ElegirCajaBanco(Value);
+ frViewListaSubCuentas1.ElegirSubCuenta(Value);
end;
procedure TfEditorFechaPago.SetIgnorarContabilidad(const Value: Integer);
begin
- frViewCajasBancos1.eContabilizar.EditValue := Value;
+ frViewListaSubCuentas1.eContabilizar.EditValue := Value;
end;
end.
diff --git a/Source/Modulos/Referencias/Data/Referencias_data.dproj b/Source/Modulos/Referencias/Data/Referencias_data.dproj
index 26c07021..8f042cc8 100644
--- a/Source/Modulos/Referencias/Data/Referencias_data.dproj
+++ b/Source/Modulos/Referencias/Data/Referencias_data.dproj
@@ -47,23 +47,9 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/Source/Modulos/Referencias/Data/uDataModuleReferencias.dfm b/Source/Modulos/Referencias/Data/uDataModuleReferencias.dfm
index 92a1ca0e..28bc93f6 100644
--- a/Source/Modulos/Referencias/Data/uDataModuleReferencias.dfm
+++ b/Source/Modulos/Referencias/Data/uDataModuleReferencias.dfm
@@ -37,6 +37,10 @@ inherited DataModuleReferencias: TDataModuleReferencias
Name = 'ID_EMPRESA'
DataType = datInteger
end
+ item
+ Name = 'ID_TIENDA'
+ DataType = datInteger
+ end
item
Name = 'CODIGO'
DataType = datString
diff --git a/Source/Modulos/Referencias/Model/Referencias_model.dproj b/Source/Modulos/Referencias/Model/Referencias_model.dproj
index 4fb41f52..73dc73e2 100644
--- a/Source/Modulos/Referencias/Model/Referencias_model.dproj
+++ b/Source/Modulos/Referencias/Model/Referencias_model.dproj
@@ -47,12 +47,11 @@
MainSource
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Source/Modulos/Referencias/Model/schReferenciasClient_Intf.pas b/Source/Modulos/Referencias/Model/schReferenciasClient_Intf.pas
index 3ae8235d..4a44f11a 100644
--- a/Source/Modulos/Referencias/Model/schReferenciasClient_Intf.pas
+++ b/Source/Modulos/Referencias/Model/schReferenciasClient_Intf.pas
@@ -9,7 +9,7 @@ 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_Referencias = '{99B6D683-BD8D-4855-BBF8-65A96EA046A1}';
+ RID_Referencias = '{156D5B25-C2AD-4959-B6AB-1D9403AB4FCE}';
{ Data table names }
nme_Referencias = 'Referencias';
@@ -17,6 +17,7 @@ const
{ Referencias fields }
fld_ReferenciasID = 'ID';
fld_ReferenciasID_EMPRESA = 'ID_EMPRESA';
+ fld_ReferenciasID_TIENDA = 'ID_TIENDA';
fld_ReferenciasCODIGO = 'CODIGO';
fld_ReferenciasVALOR = 'VALOR';
fld_ReferenciasDESCRIPCION = 'DESCRIPCION';
@@ -24,14 +25,15 @@ const
{ Referencias field indexes }
idx_ReferenciasID = 0;
idx_ReferenciasID_EMPRESA = 1;
- idx_ReferenciasCODIGO = 2;
- idx_ReferenciasVALOR = 3;
- idx_ReferenciasDESCRIPCION = 4;
+ idx_ReferenciasID_TIENDA = 2;
+ idx_ReferenciasCODIGO = 3;
+ idx_ReferenciasVALOR = 4;
+ idx_ReferenciasDESCRIPCION = 5;
type
{ IReferencias }
IReferencias = interface(IDAStronglyTypedDataTable)
- ['{F8DE7790-964D-498F-B2BA-1DCE31966722}']
+ ['{A12A8336-88E9-4B4A-9485-49E5BCA286C3}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -41,6 +43,10 @@ type
procedure SetID_EMPRESAValue(const aValue: Integer);
function GetID_EMPRESAIsNull: Boolean;
procedure SetID_EMPRESAIsNull(const aValue: Boolean);
+ function GetID_TIENDAValue: Integer;
+ procedure SetID_TIENDAValue(const aValue: Integer);
+ function GetID_TIENDAIsNull: Boolean;
+ procedure SetID_TIENDAIsNull(const aValue: Boolean);
function GetCODIGOValue: String;
procedure SetCODIGOValue(const aValue: String);
function GetCODIGOIsNull: Boolean;
@@ -60,6 +66,8 @@ type
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull;
+ property ID_TIENDA: Integer read GetID_TIENDAValue write SetID_TIENDAValue;
+ property ID_TIENDAIsNull: Boolean read GetID_TIENDAIsNull write SetID_TIENDAIsNull;
property CODIGO: String read GetCODIGOValue write SetCODIGOValue;
property CODIGOIsNull: Boolean read GetCODIGOIsNull write SetCODIGOIsNull;
property VALOR: String read GetVALORValue write SetVALORValue;
@@ -81,6 +89,10 @@ type
procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
function GetID_EMPRESAIsNull: Boolean; virtual;
procedure SetID_EMPRESAIsNull(const aValue: Boolean); virtual;
+ function GetID_TIENDAValue: Integer; virtual;
+ procedure SetID_TIENDAValue(const aValue: Integer); virtual;
+ function GetID_TIENDAIsNull: Boolean; virtual;
+ procedure SetID_TIENDAIsNull(const aValue: Boolean); virtual;
function GetCODIGOValue: String; virtual;
procedure SetCODIGOValue(const aValue: String); virtual;
function GetCODIGOIsNull: Boolean; virtual;
@@ -99,6 +111,8 @@ type
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull;
+ property ID_TIENDA: Integer read GetID_TIENDAValue write SetID_TIENDAValue;
+ property ID_TIENDAIsNull: Boolean read GetID_TIENDAIsNull write SetID_TIENDAIsNull;
property CODIGO: String read GetCODIGOValue write SetCODIGOValue;
property CODIGOIsNull: Boolean read GetCODIGOIsNull write SetCODIGOIsNull;
property VALOR: String read GetVALORValue write SetVALORValue;
@@ -169,6 +183,27 @@ begin
DataTable.Fields[idx_ReferenciasID_EMPRESA].AsVariant := Null;
end;
+function TReferenciasDataTableRules.GetID_TIENDAValue: Integer;
+begin
+ result := DataTable.Fields[idx_ReferenciasID_TIENDA].AsInteger;
+end;
+
+procedure TReferenciasDataTableRules.SetID_TIENDAValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_ReferenciasID_TIENDA].AsInteger := aValue;
+end;
+
+function TReferenciasDataTableRules.GetID_TIENDAIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_ReferenciasID_TIENDA].IsNull;
+end;
+
+procedure TReferenciasDataTableRules.SetID_TIENDAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_ReferenciasID_TIENDA].AsVariant := Null;
+end;
+
function TReferenciasDataTableRules.GetCODIGOValue: String;
begin
result := DataTable.Fields[idx_ReferenciasCODIGO].AsString;
diff --git a/Source/Modulos/Referencias/Model/schReferenciasServer_Intf.pas b/Source/Modulos/Referencias/Model/schReferenciasServer_Intf.pas
index 7f445213..22ed1c36 100644
--- a/Source/Modulos/Referencias/Model/schReferenciasServer_Intf.pas
+++ b/Source/Modulos/Referencias/Model/schReferenciasServer_Intf.pas
@@ -9,15 +9,16 @@ 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_ReferenciasDelta = '{6FB0611C-16F3-40E5-8C0C-7706C84C0E8C}';
+ RID_ReferenciasDelta = '{3D76ED26-23CC-4938-82C0-6044A5F5284F}';
type
{ IReferenciasDelta }
IReferenciasDelta = interface(IReferencias)
- ['{6FB0611C-16F3-40E5-8C0C-7706C84C0E8C}']
+ ['{3D76ED26-23CC-4938-82C0-6044A5F5284F}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
+ function GetOldID_TIENDAValue : Integer;
function GetOldCODIGOValue : String;
function GetOldVALORValue : String;
function GetOldDESCRIPCIONValue : String;
@@ -25,6 +26,7 @@ type
{ Properties }
property OldID : Integer read GetOldIDValue;
property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
+ property OldID_TIENDA : Integer read GetOldID_TIENDAValue;
property OldCODIGO : String read GetOldCODIGOValue;
property OldVALOR : String read GetOldVALORValue;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
@@ -47,6 +49,12 @@ type
function GetOldID_EMPRESAIsNull: Boolean; virtual;
procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
procedure SetID_EMPRESAIsNull(const aValue: Boolean); virtual;
+ function GetID_TIENDAValue: Integer; virtual;
+ function GetID_TIENDAIsNull: Boolean; virtual;
+ function GetOldID_TIENDAValue: Integer; virtual;
+ function GetOldID_TIENDAIsNull: Boolean; virtual;
+ procedure SetID_TIENDAValue(const aValue: Integer); virtual;
+ procedure SetID_TIENDAIsNull(const aValue: Boolean); virtual;
function GetCODIGOValue: String; virtual;
function GetCODIGOIsNull: Boolean; virtual;
function GetOldCODIGOValue: String; virtual;
@@ -75,6 +83,10 @@ type
property ID_EMPRESAIsNull : Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull;
property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
property OldID_EMPRESAIsNull : Boolean read GetOldID_EMPRESAIsNull;
+ property ID_TIENDA : Integer read GetID_TIENDAValue write SetID_TIENDAValue;
+ property ID_TIENDAIsNull : Boolean read GetID_TIENDAIsNull write SetID_TIENDAIsNull;
+ property OldID_TIENDA : Integer read GetOldID_TIENDAValue;
+ property OldID_TIENDAIsNull : Boolean read GetOldID_TIENDAIsNull;
property CODIGO : String read GetCODIGOValue write SetCODIGOValue;
property CODIGOIsNull : Boolean read GetCODIGOIsNull write SetCODIGOIsNull;
property OldCODIGO : String read GetOldCODIGOValue;
@@ -172,6 +184,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ReferenciasID_EMPRESA] := Null;
end;
+function TReferenciasBusinessProcessorRules.GetID_TIENDAValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_ReferenciasID_TIENDA];
+end;
+
+function TReferenciasBusinessProcessorRules.GetID_TIENDAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ReferenciasID_TIENDA]);
+end;
+
+function TReferenciasBusinessProcessorRules.GetOldID_TIENDAValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_ReferenciasID_TIENDA];
+end;
+
+function TReferenciasBusinessProcessorRules.GetOldID_TIENDAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ReferenciasID_TIENDA]);
+end;
+
+procedure TReferenciasBusinessProcessorRules.SetID_TIENDAValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_ReferenciasID_TIENDA] := aValue;
+end;
+
+procedure TReferenciasBusinessProcessorRules.SetID_TIENDAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_ReferenciasID_TIENDA] := Null;
+end;
+
function TReferenciasBusinessProcessorRules.GetCODIGOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ReferenciasCODIGO];
diff --git a/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.dfm b/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.dfm
index 817d4eb5..a2301336 100644
--- a/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.dfm
+++ b/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.dfm
@@ -41,6 +41,10 @@ object srvReferencias: TsrvReferencias
item
DatasetField = 'DESCRIPCION'
TableField = 'DESCRIPCION'
+ end
+ item
+ DatasetField = 'ID_TIENDA'
+ TableField = 'ID_TIENDA'
end>
end>
Name = 'Referencias'
@@ -56,6 +60,10 @@ object srvReferencias: TsrvReferencias
Name = 'ID_EMPRESA'
DataType = datInteger
end
+ item
+ Name = 'ID_TIENDA'
+ DataType = datInteger
+ end
item
Name = 'CODIGO'
DataType = datString
@@ -97,7 +105,7 @@ object srvReferencias: TsrvReferencias
Name = 'IBX'
SQL =
'UPDATE REFERENCIAS SET'#10' VALOR = :VALOR'#10'WHERE CODIGO = :CODIGO' +
- #10' AND {Where}'#10
+ #10#10
StatementType = stSQL
ColumnMappings = <>
end>
diff --git a/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.pas b/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.pas
index 18f5e924..30db27ec 100644
--- a/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.pas
+++ b/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.pas
@@ -30,16 +30,16 @@ type
public
{ IsrvReferencias methods }
function DarNuevaReferencia(const NombreReferencia: String;
- const EmpresaID: Integer = -1): String;
+ const EmpresaID: Integer = -1; const TiendaID: Integer = -1): String;
function IncrementarValorReferencia(const NombreReferencia: String;
- const Valor: String; const EmpresaID: Integer = -1): Boolean;
+ const Valor: String; const EmpresaID: Integer = -1; const TiendaID: Integer = -1): Boolean;
end;
implementation
{$R *.dfm}
uses
- {Generated:} FactuGES_Invk, Variants,
+ {Generated:} FactuGES_Invk, Variants, dialogs,
uDataModuleServer, uROClasses, uReferenciasUtils;
procedure Create_srvReferencias(out anInstance : IUnknown);
@@ -49,7 +49,7 @@ end;
{ srvReferencias }
function TsrvReferencias.DarNuevaReferencia(const NombreReferencia: String;
- const EmpresaID: Integer = -1): String;
+ const EmpresaID: Integer = -1; const TiendaID: Integer = -1): String;
var
ASchema : TDASchema;
AConn : IDAConnection;
@@ -58,6 +58,7 @@ var
AWhere : TDAWhereExpression;
AWhereExpr1: TDAWhereExpression;
AWhereExpr2: TDAWhereExpression;
+ AWhereExpr3: TDAWhereExpression;
begin
Result := '';
@@ -69,16 +70,29 @@ begin
AWhereExpr1 := NewBinaryExpression(NewField('', 'CODIGO'),
NewConstant(NombreReferencia, datString),
dboEqual);
+
+ AWhere := AWhereExpr1;
+
+ //Si se asigna IDEmpresa se añade condicion
if (EmpresaID <> -1) then
begin
AWhereExpr2 := NewBinaryExpression(NewField('', 'ID_EMPRESA'),
NewConstant(EmpresaID, datInteger),
dboEqual);
- AWhere := NewBinaryExpression(AWhereExpr1, AWhereExpr2, dboAnd);
+ AWhere := NewBinaryExpression(AWhere, AWhereExpr2, dboAnd);
+ end;
+
+ //Si se asigna IDTienda se añade condicion
+ if (TiendaID <> -1) then
+ begin
+ AWhereExpr3 := NewBinaryExpression(NewField('', 'ID_TIENDA'),
+ NewConstant(TiendaID, datInteger),
+ dboEqual);
+
+ AWhere := NewBinaryExpression(AWhere, AWhereExpr3, dboAnd);
end
- else
- AWhere := AWhereExpr1;
+
finally
Free;
end;
@@ -116,28 +130,24 @@ begin
end;
function TsrvReferencias.IncrementarValorReferencia(const NombreReferencia: String;
- const Valor: String; const EmpresaID: Integer = -1): Boolean;
+ const Valor: String; const EmpresaID: Integer = -1; const TiendaID: Integer = -1): Boolean;
var
ASchema : TDASchema;
AConn : IDAConnection;
dsCommand: IDASQLCommand;
- AWhere : TDAWhereExpression;
+ AWhere : String;
begin
Result := False;
- AWhere := NIL;
{ Construir la expresión del Where a partir de los parámetros
que se reciban.
}
+ AWhere := '';
if (EmpresaID <> -1) then
- begin
- with TDAWhereBuilder.Create do
- try
- AWhere := NewBinaryExpression(NewField('', 'ID_EMPRESA'), NewConstant(EmpresaID, datInteger), dboEqual);
- finally
- Free;
- end;
- end;
+ AWhere := AWhere + ' AND (ID_EMPRESA = ' + IntToStr(EmpresaID) + ')';
+
+ if (TiendaID <> -1) then
+ AWhere := AWhere + ' AND (ID_TIENDA = ' + IntToStr(TiendaID) + ')';
ASchema := schReferencias;
AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
@@ -149,8 +159,7 @@ begin
begin
ParamByName('CODIGO').AsString := NombreReferencia;
ParamByName('VALOR').AsString := DarReferenciaSiguiente(Valor);
- if EmpresaID <> -1 then
- dsCommand.DynamicWhere.Expression := AWhere;
+ dsCommand.SQL := dsCommand.SQL + AWhere; //Asignamos las condiciones de empresa y tienda si es necesario
end;
dsCommand.Execute;
AConn.CommitTransaction;
diff --git a/Source/Modulos/Referencias/Views/uEditorReferencias.dfm b/Source/Modulos/Referencias/Views/uEditorReferencias.dfm
index 3cdda89d..2e77bff5 100644
--- a/Source/Modulos/Referencias/Views/uEditorReferencias.dfm
+++ b/Source/Modulos/Referencias/Views/uEditorReferencias.dfm
@@ -62,7 +62,7 @@ object fEditorReferencias: TfEditorReferencias
FilterBox.Visible = fvNever
DataController.DataSource = dsReferencias
DataController.Filter.Options = [fcoCaseInsensitive]
- DataController.KeyFieldNames = 'CODIGO'
+ DataController.KeyFieldNames = 'ID'
DataController.Options = [dcoAnsiSort, dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoFocusTopRowAfterSorting, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
@@ -90,6 +90,11 @@ object fEditorReferencias: TfEditorReferencias
OptionsView.GroupByBox = False
OptionsView.HeaderEndEllipsis = True
OptionsView.Indicator = True
+ object ListaReferenciasViewID: TcxGridDBColumn
+ DataBinding.FieldName = 'ID'
+ Visible = False
+ VisibleForCustomization = False
+ end
object ListaReferenciasViewCODIGO: TcxGridDBColumn
DataBinding.FieldName = 'CODIGO'
Visible = False
diff --git a/Source/Modulos/Referencias/Views/uEditorReferencias.pas b/Source/Modulos/Referencias/Views/uEditorReferencias.pas
index e39fd1e2..25871add 100644
--- a/Source/Modulos/Referencias/Views/uEditorReferencias.pas
+++ b/Source/Modulos/Referencias/Views/uEditorReferencias.pas
@@ -51,6 +51,7 @@ type
ListaReferenciasViewDESCRIPCION: TcxGridDBColumn;
ListaReferenciasViewVALOR: TcxGridDBColumn;
ListaReferenciasLevel: TcxGridLevel;
+ ListaReferenciasViewID: TcxGridDBColumn;
procedure FormShow(Sender: TObject);
procedure actAceptarExecute(Sender: TObject);
diff --git a/Source/Modulos/Remesas de cliente/RemesasCliente_Group.groupproj b/Source/Modulos/Remesas de cliente/RemesasCliente_Group.groupproj
index 7e6bf7b0..8aabfffc 100644
--- a/Source/Modulos/Remesas de cliente/RemesasCliente_Group.groupproj
+++ b/Source/Modulos/Remesas de cliente/RemesasCliente_Group.groupproj
@@ -9,6 +9,7 @@
+
@@ -151,14 +152,23 @@
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dpk b/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dpk
index c69f6c9a..20c39282 100644
--- a/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dpk
+++ b/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dpk
@@ -35,7 +35,8 @@ requires
tee,
fsTee11,
frxTee11,
- Contabilidad_view;
+ Contabilidad_view,
+ Contabilidad_controller;
contains
uViewRemesasCliente in 'uViewRemesasCliente.pas' {frViewRemesasCliente: TFrame},
diff --git a/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dproj b/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dproj
index 36371eb4..aae5dd1b 100644
--- a/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dproj
+++ b/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dproj
@@ -55,6 +55,7 @@
MainSource
+
diff --git a/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.dfm b/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.dfm
index 0d673f02..653697ef 100644
--- a/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.dfm
+++ b/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.dfm
@@ -9,7 +9,7 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente
Scaled = False
OnClose = CustomEditorClose
ExplicitWidth = 732
- ExplicitHeight = 754
+ ExplicitHeight = 761
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@@ -109,7 +109,7 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente
Width = 718
Height = 580
MultiLine = True
- ExplicitLeft = 3
+ ExplicitLeft = -2
ExplicitTop = 79
ExplicitWidth = 718
ExplicitHeight = 580
@@ -122,7 +122,7 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente
Left = 0
Top = 0
Width = 710
- Height = 185
+ Height = 210
Align = alTop
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -133,16 +133,16 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 710
- ExplicitHeight = 185
+ ExplicitHeight = 210
inherited dxLayoutControlRemesaCliente: TdxLayoutControl
Width = 710
- Height = 200
+ Height = 220
Align = alTop
ExplicitWidth = 710
- ExplicitHeight = 200
+ ExplicitHeight = 220
DesignSize = (
710
- 200)
+ 220)
inherited eReferencia: TcxDBTextEdit
ExplicitWidth = 326
Width = 326
@@ -165,19 +165,18 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente
ExplicitWidth = 121
Width = 121
end
- inherited frViewCajasBancos1: TfrViewCajasBancos
- Width = 453
- ExplicitWidth = 453
+ inherited frViewListaSubcuentas1: TfrViewListaSubcuentas
+ Width = 429
+ ExplicitWidth = 429
inherited dxLayoutControl1: TdxLayoutControl
- Width = 453
- ExplicitWidth = 453
- inherited cbCajasBancos: TcxComboBox
+ Width = 429
+ inherited cbSubCuentas: TcxComboBox
ExplicitWidth = 376
Width = 376
end
inherited eContabilizar: TcxCheckBox
- Left = 458
- ExplicitLeft = 458
+ Left = 453
+ ExplicitLeft = 453
ExplicitWidth = 203
Width = 203
end
@@ -194,9 +193,9 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente
end
inline frViewRecibosRemesaCliente1: TfrViewRecibosRemesaCliente
Left = 0
- Top = 185
+ Top = 210
Width = 710
- Height = 367
+ Height = 342
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -209,16 +208,16 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente
ParentFont = False
TabOrder = 1
ReadOnly = False
- ExplicitTop = 185
+ ExplicitTop = 200
ExplicitWidth = 710
- ExplicitHeight = 367
+ ExplicitHeight = 352
inherited cxGrid: TcxGrid
Left = 15
Width = 680
- Height = 327
+ Height = 302
ExplicitLeft = 15
ExplicitWidth = 680
- ExplicitHeight = 327
+ ExplicitHeight = 312
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
diff --git a/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.pas b/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.pas
index dc9384f8..cc991127 100644
--- a/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.pas
+++ b/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.pas
@@ -126,8 +126,8 @@ begin
bEsNuevo := FRemesaCliente.EsNuevo;
{$IFDEF CONTABILIDAD}
- AIgnorarContabilidad := frViewRemesaCliente1.frViewCajasBancos1.eContabilizar.EditValue;
- ASubCuenta := frViewRemesaCliente1.frViewCajasBancos1.IdSubCuenta;
+ AIgnorarContabilidad := frViewRemesaCliente1.frViewListaSubCuentas1.eContabilizar.EditValue;
+ ASubCuenta := frViewRemesaCliente1.frViewListaSubCuentas1.IdSubCuenta;
FController.Guardar(FRemesaCliente, AIgnorarContabilidad, ASubCuenta);
{$ELSE}
FController.Guardar(FRemesaCliente);
diff --git a/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.dfm b/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.dfm
index 0433cf40..8319eb48 100644
--- a/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.dfm
+++ b/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.dfm
@@ -1,23 +1,24 @@
inherited frViewRemesaCliente: TfrViewRemesaCliente
- Width = 513
- Height = 304
+ Width = 476
+ Height = 224
Align = alClient
ExplicitWidth = 451
ExplicitHeight = 304
object dxLayoutControlRemesaCliente: TdxLayoutControl
Left = 0
Top = 0
- Width = 513
- Height = 304
+ Width = 476
+ Height = 224
Align = alClient
ParentBackground = True
TabOrder = 0
AutoContentSizes = [acsWidth, acsHeight]
LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 451
+ ExplicitHeight = 304
DesignSize = (
- 513
- 304)
+ 476
+ 224)
object eReferencia: TcxDBTextEdit
Left = 110
Top = 30
@@ -62,7 +63,7 @@ inherited frViewRemesaCliente: TfrViewRemesaCliente
Width = 108
end
object edtFechaRemesa: TcxDBDateEdit
- Left = 342
+ Left = 324
Top = 30
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'FECHA_REMESA'
@@ -137,10 +138,10 @@ inherited frViewRemesaCliente: TfrViewRemesaCliente
TabOrder = 3
Width = 121
end
- inline frViewCajasBancos1: TfrViewCajasBancos
+ inline frViewListaSubcuentas1: TfrViewListaSubcuentas
Left = 22
- Top = 138
- Width = 469
+ Top = 162
+ Width = 429
Height = 35
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -151,28 +152,22 @@ inherited frViewRemesaCliente: TfrViewRemesaCliente
TabOrder = 5
ReadOnly = False
ExplicitLeft = 22
- ExplicitTop = 138
- ExplicitWidth = 469
+ ExplicitTop = 162
+ ExplicitWidth = 429
ExplicitHeight = 35
inherited dxLayoutControl1: TdxLayoutControl
- Width = 469
- inherited cbCajasBancos: TcxComboBox
- Left = 86
- ExplicitLeft = 86
+ Width = 429
+ ExplicitWidth = 429
+ inherited cbSubCuentas: TcxComboBox
ExplicitWidth = 376
Width = 376
end
inherited eContabilizar: TcxCheckBox
- Left = 322
- ExplicitLeft = 322
+ Left = 293
+ ExplicitLeft = 293
ExplicitWidth = 203
Width = 203
end
- inherited dxLayoutControl1Group_Root: TdxLayoutGroup
- inherited dxLayoutControl1Item1: TdxLayoutItem
- Caption = 'Caja / Banco: '
- end
- end
end
end
object dxLayoutControlRemesaClienteGroup_Root: TdxLayoutGroup
@@ -226,11 +221,14 @@ inherited frViewRemesaCliente: TfrViewRemesaCliente
Control = eDescripcion
ControlOptions.ShowBorder = False
end
- object dxlcCuentaContable: TdxLayoutItem
- Control = frViewCajasBancos1
- ControlOptions.AutoColor = True
- ControlOptions.ShowBorder = False
- end
+ end
+ end
+ object dxlcCuentaContable: TdxLayoutGroup
+ Caption = 'Contabilidad'
+ object dxLayoutControlRemesaClienteItem2: TdxLayoutItem
+ Control = frViewListaSubcuentas1
+ ControlOptions.AutoColor = True
+ ControlOptions.ShowBorder = False
end
end
object dxLayoutControlRemesaClienteGroup3: TdxLayoutGroup
diff --git a/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.pas b/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.pas
index 192f9618..d4c38fb0 100644
--- a/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.pas
+++ b/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.pas
@@ -12,7 +12,7 @@ uses
uFamiliasController, cxSpinEdit, cxCurrencyEdit,
uBizRemesasCliente, uRemesasClienteController, cxCalendar,
dxLayoutLookAndFeels, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox,
- cxImageComboBox, uDAInterfaces, uViewCajasBancos;
+ cxImageComboBox, uDAInterfaces, uViewListaSubCuentas;
type
IViewRemesaCliente = interface(IViewBase)
@@ -47,8 +47,9 @@ type
dxLayoutControlRemesaClienteGroup2: TdxLayoutGroup;
cbTipo: TcxDBImageComboBox;
dxLayoutControlRemesaClienteItem1: TdxLayoutItem;
- dxlcCuentaContable: TdxLayoutItem;
- frViewCajasBancos1: TfrViewCajasBancos;
+ dxLayoutControlRemesaClienteItem2: TdxLayoutItem;
+ frViewListaSubcuentas1: TfrViewListaSubcuentas;
+ dxlcCuentaContable: TdxLayoutGroup;
protected
FController: IRemesasClienteController;
@@ -68,7 +69,7 @@ implementation
{$INCLUDE ..\..\..\FactuGES.inc}
uses
- uDataModuleUsuarios, uFactuGES_App;
+ uDataModuleUsuarios, uFactuGES_App, uSubCuentasController;
{ TfrViewRemesaClientes }
@@ -112,6 +113,7 @@ begin
cbTipo.Properties.Items.EndUpdate;
{$IFDEF CONTABILIDAD}
+ frViewListaSubcuentas1.TipoSubCuenta := tCajas;
dxlcCuentaBancaria.visible := false;
dxlcCuentaContable.Visible := true;
{$ELSE}
diff --git a/Source/Modulos/Remesas de proveedor/Model/uBizRemesasProveedorServer.pas b/Source/Modulos/Remesas de proveedor/Model/uBizRemesasProveedorServer.pas
index db15e5ff..b8f5868e 100644
--- a/Source/Modulos/Remesas de proveedor/Model/uBizRemesasProveedorServer.pas
+++ b/Source/Modulos/Remesas de proveedor/Model/uBizRemesasProveedorServer.pas
@@ -19,7 +19,7 @@ type
procedure BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); override;
procedure AfterProcessChange(Sender: TDABusinessProcessor;
aChange: TDADeltaChange; Processed: Boolean;
- var CanRemoveFromDelta: Boolean);
+ var CanRemoveFromDelta: Boolean); override;
end;
implementation
diff --git a/Source/Modulos/Tipos de venta/Controller/TiposVenta_controller.rc b/Source/Modulos/Tipos de venta/Controller/TiposVenta_controller.rc
new file mode 100644
index 00000000..153736af
--- /dev/null
+++ b/Source/Modulos/Tipos de venta/Controller/TiposVenta_controller.rc
@@ -0,0 +1,22 @@
+1 VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+FILEFLAGSMASK 0x3FL
+FILEFLAGS 0x00L
+FILEOS 0x40004L
+FILETYPE 0x1L
+FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "0C0A04E4"
+ BEGIN
+ VALUE "FileVersion", "1.0.0.0\0"
+ VALUE "ProductVersion", "1.0.0.0\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0C0A, 1252
+ END
+END
diff --git a/Source/Modulos/Tipos de venta/Controller/uTiposVentaController.pas b/Source/Modulos/Tipos de venta/Controller/uTiposVentaController.pas
index cb1d80ff..2afa9f17 100644
--- a/Source/Modulos/Tipos de venta/Controller/uTiposVentaController.pas
+++ b/Source/Modulos/Tipos de venta/Controller/uTiposVentaController.pas
@@ -14,6 +14,7 @@ type
procedure VerTodos(ATiposVenta: IBizTipoVenta);
function Guardar(AReferencia : IBizTipoVenta): Boolean;
procedure DescartarCambios(AReferencia : IBizTipoVenta);
+ function DarListaTiposVenta: TStringList;
end;
TTiposVentaController = class(TObservador, ITiposVentaController)
@@ -34,6 +35,7 @@ type
procedure DescartarCambios(AReferencia : IBizTipoVenta); virtual;
function BuscarTodos: IBizTipoVenta;
procedure VerTodos(ATiposVenta: IBizTipoVenta);
+ function DarListaTiposVenta: TStringList;
end;
implementation
@@ -67,6 +69,32 @@ begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end;
+function TTiposVentaController.DarListaTiposVenta: TStringList;
+var
+ ATiposVenta: IBizTipoVenta;
+ i : integer;
+begin
+ ATiposVenta := BuscarTodos;
+ ATiposVenta.DataTable.Active := True;
+
+ Result := TStringList.Create;
+ try
+ with Result do
+ begin
+ Add(Format('%s=%d', [CTE_GENERAL, CTE_ID_GENERAL]));
+
+ ATiposVenta.DataTable.First;
+ while not ATiposVenta.DataTable.EOF do
+ begin
+ Add(Format('%s=%d', [ATiposVenta.DESCRIPCION, ATiposVenta.ID]));
+ ATiposVenta.DataTable.Next;
+ end;
+ end;
+ finally
+ ATiposVenta := NIL;
+ end;
+end;
+
procedure TTiposVentaController.DescartarCambios(AReferencia: IBizTipoVenta);
begin
if not Assigned(AReferencia) then
diff --git a/Source/Modulos/Tipos de venta/Data/TiposVenta_data.rc b/Source/Modulos/Tipos de venta/Data/TiposVenta_data.rc
new file mode 100644
index 00000000..153736af
--- /dev/null
+++ b/Source/Modulos/Tipos de venta/Data/TiposVenta_data.rc
@@ -0,0 +1,22 @@
+1 VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+FILEFLAGSMASK 0x3FL
+FILEFLAGS 0x00L
+FILEOS 0x40004L
+FILETYPE 0x1L
+FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "0C0A04E4"
+ BEGIN
+ VALUE "FileVersion", "1.0.0.0\0"
+ VALUE "ProductVersion", "1.0.0.0\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0C0A, 1252
+ END
+END
diff --git a/Source/Modulos/Tipos de venta/Model/TiposVenta_model.rc b/Source/Modulos/Tipos de venta/Model/TiposVenta_model.rc
new file mode 100644
index 00000000..153736af
--- /dev/null
+++ b/Source/Modulos/Tipos de venta/Model/TiposVenta_model.rc
@@ -0,0 +1,22 @@
+1 VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+FILEFLAGSMASK 0x3FL
+FILEFLAGS 0x00L
+FILEOS 0x40004L
+FILETYPE 0x1L
+FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "0C0A04E4"
+ BEGIN
+ VALUE "FileVersion", "1.0.0.0\0"
+ VALUE "ProductVersion", "1.0.0.0\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0C0A, 1252
+ END
+END
diff --git a/Source/Modulos/Tipos de venta/Model/uBizTiposVenta.pas b/Source/Modulos/Tipos de venta/Model/uBizTiposVenta.pas
index 6364766f..89623331 100644
--- a/Source/Modulos/Tipos de venta/Model/uBizTiposVenta.pas
+++ b/Source/Modulos/Tipos de venta/Model/uBizTiposVenta.pas
@@ -7,6 +7,9 @@ uses
const
BIZ_CLIENT_TIPOSVENTA = 'Client.TiposVenta';
+ CTE_ID_GENERAL = 0;
+ CTE_GENERAL = 'General';
+
type
IBizTipoVenta = interface(ITiposVenta)
diff --git a/Source/Modulos/Tipos de venta/Plugin/TiposVenta_plugin.rc b/Source/Modulos/Tipos de venta/Plugin/TiposVenta_plugin.rc
new file mode 100644
index 00000000..153736af
--- /dev/null
+++ b/Source/Modulos/Tipos de venta/Plugin/TiposVenta_plugin.rc
@@ -0,0 +1,22 @@
+1 VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+FILEFLAGSMASK 0x3FL
+FILEFLAGS 0x00L
+FILEOS 0x40004L
+FILETYPE 0x1L
+FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "0C0A04E4"
+ BEGIN
+ VALUE "FileVersion", "1.0.0.0\0"
+ VALUE "ProductVersion", "1.0.0.0\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0C0A, 1252
+ END
+END
diff --git a/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dpk b/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dpk
index 965d1c11..1bd1bcd4 100644
--- a/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dpk
+++ b/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dpk
@@ -27,10 +27,27 @@ package TiposVenta_view;
requires
GUIBase,
TiposVenta_controller,
- TiposVenta_model;
+ TiposVenta_model,
+ vcl,
+ rtl,
+ dbrtl,
+ DataAbstract_Core_D11,
+ vcldb,
+ dsnap,
+ adortl,
+ RemObjects_Core_D11,
+ cxLibraryD11,
+ dxThemeD11,
+ dxGDIPlusD11,
+ cxEditorsD11,
+ cxDataD11,
+ vcljpg,
+ dxLayoutControlD11,
+ dxComnD11;
contains
uEditorTiposVenta in 'uEditorTiposVenta.pas' {fEditorTiposVenta: TfEditorFormasPago},
- uTiposVentaViewRegister in 'uTiposVentaViewRegister.pas';
+ uTiposVentaViewRegister in 'uTiposVentaViewRegister.pas',
+ uViewTiposVenta in 'uViewTiposVenta.pas' {frViewTiposVenta: TFrame};
end.
diff --git a/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dproj b/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dproj
index 92ce75e6..e78d89d3 100644
--- a/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dproj
+++ b/Source/Modulos/Tipos de venta/Views/TiposVenta_view.dproj
@@ -47,14 +47,34 @@
MainSource
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TfEditorFormasPago
+
+
+ TFrame
+
+
+
+