Se repasa script de base de datos para que coincida con lo que hay en produccion. Se arregla calculo de descuento para que este sea redondeado en todo calculo, se añade en presupuestos de cliente la funcionalidad de asignar descuento a la lista de conceptos seleccionada.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@934 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
70a5cdf648
commit
129d79653c
@ -61,7 +61,7 @@ CREATE DOMAIN TIPO_ID AS
|
||||
INTEGER;
|
||||
|
||||
CREATE DOMAIN TIPO_IMPORTE AS
|
||||
NUMERIC(11,4);
|
||||
NUMERIC(11,2);
|
||||
|
||||
CREATE DOMAIN TIPO_NOTAS AS
|
||||
BLOB SUB_TYPE 1 SEGMENT SIZE 80;
|
||||
@ -70,13 +70,11 @@ CREATE DOMAIN TIPO_PERFIL AS
|
||||
VARCHAR(15);
|
||||
|
||||
CREATE DOMAIN TIPO_PORCENTAJE AS
|
||||
FLOAT;
|
||||
NUMERIC(2,2);
|
||||
|
||||
CREATE DOMAIN TIPO_USUARIO AS
|
||||
VARCHAR(30);
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/**** Generators ****/
|
||||
/******************************************************************************/
|
||||
@ -3527,7 +3525,7 @@ ALTER TABLE ALBARANES_CLIENTE ADD CONSTRAINT FK_ALBARAN_CLIENTE1 FOREIGN KEY (ID
|
||||
ALTER TABLE ALBARANES_CLIENTE ADD CONSTRAINT FK_ALBARAN_CLIENTE2 FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||
ALTER TABLE ALBARANES_CLIENTE ADD CONSTRAINT FK_ALBARAN_CLIENTE3 FOREIGN KEY (ID_PEDIDO) REFERENCES PEDIDOS_CLIENTE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||
ALTER TABLE ALBARANES_CLIENTE ADD CONSTRAINT FK_ALBARAN_CLIENTE4 FOREIGN KEY (ID_FACTURA) REFERENCES FACTURAS_CLIENTE (ID) ON DELETE SET NULL ON UPDATE SET NULL;
|
||||
ALTER TABLE ALBARANES_PROVEEDOR ADD CONSTRAINT FK_ALBARANES_PROVEEDOR3 FOREIGN KEY (ID_PEDIDO) REFERENCES PEDIDOS_PROVEEDOR (ID) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE ALBARANES_PROVEEDOR ADD CONSTRAINT FK_ALBARANES_PROVEEDOR3 FOREIGN KEY (ID_PEDIDO) REFERENCES PEDIDOS_PROVEEDOR (ID) ON DELETE NO ACTION ON UPDATE CASCADE;
|
||||
ALTER TABLE ALBARANES_PROVEEDOR ADD CONSTRAINT FK_ALBARANES_PROVEEDOR4 FOREIGN KEY (ID_FACTURA) REFERENCES FACTURAS_PROVEEDOR (ID) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
ALTER TABLE ALBARANES_PROVEEDOR ADD CONSTRAINT FK_ALBARAN_PROVEEDOR1 FOREIGN KEY (ID_PROVEEDOR) REFERENCES CONTACTOS (ID) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||
ALTER TABLE ALBARANES_PROVEEDOR ADD CONSTRAINT FK_ALBARAN_PROVEEDOR2 FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||
@ -3538,7 +3536,6 @@ ALTER TABLE EMPRESAS_CONTACTOS ADD CONSTRAINT FK_EMPRESAS_CONTACTOS FOREIGN KEY
|
||||
ALTER TABLE EMPRESAS_DATOS_BANCO ADD CONSTRAINT FK_EMPRESAS_DATOS_BANCO FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE FACTURAS_CLIENTE ADD CONSTRAINT FK_FACTURAS_CLIENTE_EMPRESAS FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||
ALTER TABLE FACTURAS_PROVEEDOR ADD CONSTRAINT FK_FACTURAS_PROVEEDOR_EMPRESAS FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||
ALTER TABLE MOVIMIENTOS ADD CONSTRAINT FK_MOVIMIENTOS FOREIGN KEY (ID_ARTICULO) REFERENCES ARTICULOS (ID);
|
||||
ALTER TABLE MOVIMIENTOS ADD CONSTRAINT FK_MOVIMIENTOS2 FOREIGN KEY (ID_ALMACEN) REFERENCES ALMACENES (ID);
|
||||
ALTER TABLE OBRAS_EJECUCIONES_PRESUPUESTOS ADD CONSTRAINT FK_OBRAS_EJE_PRE_1 FOREIGN KEY (ID_EJECUCION) REFERENCES OBRAS_EJECUCIONES (ID);
|
||||
ALTER TABLE OBRAS_EJECUCIONES_PRESUPUESTOS ADD CONSTRAINT FK_OBRAS_EJE_PRE_2 FOREIGN KEY (ID_PRESUPUESTO) REFERENCES PRESUPUESTOS_CLIENTE (ID);
|
||||
@ -3669,7 +3666,7 @@ SET TERM ^ ;
|
||||
|
||||
CREATE PROCEDURE PRO_ART_RECALCULAR_PVP (
|
||||
ID_EMPRESA INTEGER,
|
||||
PARAM_MARGEN FLOAT,
|
||||
PARAM_MARGEN NUMERIC(2,2),
|
||||
PARAM_TIEMPO NUMERIC(11,2))
|
||||
AS
|
||||
declare variable id_articulo integer;
|
||||
@ -3706,7 +3703,7 @@ RETURNS (
|
||||
POSICION INTEGER,
|
||||
TIPO_DETALLE VARCHAR(25),
|
||||
CONCEPTO VARCHAR(2000),
|
||||
IMPORTE_TOTAL NUMERIC(11,4),
|
||||
IMPORTE_TOTAL NUMERIC(11,2),
|
||||
VISIBLE SMALLINT)
|
||||
AS
|
||||
declare variable num_filas integer;
|
||||
@ -3800,10 +3797,10 @@ RETURNS (
|
||||
CONCEPTO VARCHAR(2000),
|
||||
CANTIDAD NUMERIC(11,2),
|
||||
UNIDAD_MEDIDA VARCHAR(255),
|
||||
IMPORTE_UNIDAD NUMERIC(11,4),
|
||||
DESCUENTO FLOAT,
|
||||
IMPORTE_PORTE NUMERIC(11,4),
|
||||
IMPORTE_TOTAL NUMERIC(11,4),
|
||||
IMPORTE_UNIDAD NUMERIC(11,2),
|
||||
DESCUENTO NUMERIC(2,2),
|
||||
IMPORTE_PORTE NUMERIC(11,2),
|
||||
IMPORTE_TOTAL NUMERIC(11,2),
|
||||
VISIBLE SMALLINT)
|
||||
AS
|
||||
declare variable capitulo_actual integer;
|
||||
@ -3814,7 +3811,11 @@ for select pre.id, pre.id_presupuesto, pre.posicion, pre.tipo_detalle,
|
||||
pre.id_articulo, articulos.referencia,
|
||||
F_RTFTOTEXT(F_RTFTOTEXT(pre.CONCEPTO)) as CONCEPTO,
|
||||
pre.cantidad, pre.unidad_medida,
|
||||
pre.importe_unidad, pre.descuento, pre.importe_porte,
|
||||
case
|
||||
when (pre.descuento <> 0) then (pre.importe_total / pre.cantidad)
|
||||
else pre.importe_unidad
|
||||
end as importe_unidad,
|
||||
pre.descuento, pre.importe_porte,
|
||||
pre.importe_total, coalesce(pre.visible, 1)
|
||||
from presupuestos_cliente_detalles pre
|
||||
left join articulos on (pre.id_articulo = articulos.id)
|
||||
@ -3845,7 +3846,7 @@ RETURNS (
|
||||
POSICION INTEGER,
|
||||
TIPO_DETALLE VARCHAR(25),
|
||||
CONCEPTO VARCHAR(2000),
|
||||
IMPORTE_TOTAL NUMERIC(11,4),
|
||||
IMPORTE_TOTAL NUMERIC(11,2),
|
||||
VISIBLE SMALLINT)
|
||||
AS
|
||||
declare variable num_capitulos integer;
|
||||
|
||||
@ -55,57 +55,57 @@
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\adortl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxDataD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxExportD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxGridD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntl6D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntlPrintSys3D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dclIndyCore.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\designide.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dsnap.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\IndyCore.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\IndyProtocols.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\IndySystem.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Jcl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JclVcl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JSDialog100.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCmpD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvDlgsD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvMMD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvNetD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\pckMD5.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\pckUCDataConnector.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\pckUserControl_RT.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Indy_D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\TB2k_D10.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\VclSmp.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\xmlrtl.dcp" />
|
||||
<DCCReference Include="..\Servidor\adortl.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxExportD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxGridD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxIntl6D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxIntlPrintSys3D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\dbrtl.dcp" />
|
||||
<DCCReference Include="..\Servidor\dclIndyCore.dcp" />
|
||||
<DCCReference Include="..\Servidor\designide.dcp" />
|
||||
<DCCReference Include="..\Servidor\dsnap.dcp" />
|
||||
<DCCReference Include="..\Servidor\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\IndyCore.dcp" />
|
||||
<DCCReference Include="..\Servidor\IndyProtocols.dcp" />
|
||||
<DCCReference Include="..\Servidor\IndySystem.dcp" />
|
||||
<DCCReference Include="..\Servidor\Jcl.dcp" />
|
||||
<DCCReference Include="..\Servidor\JclVcl.dcp" />
|
||||
<DCCReference Include="..\Servidor\JSDialog100.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvCmpD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvDlgsD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvMMD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvNetD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\pckMD5.dcp" />
|
||||
<DCCReference Include="..\Servidor\pckUCDataConnector.dcp" />
|
||||
<DCCReference Include="..\Servidor\pckUserControl_RT.dcp" />
|
||||
<DCCReference Include="..\Servidor\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="..\Servidor\PNG_D10.dcp" />
|
||||
<DCCReference Include="..\Servidor\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\RemObjects_Indy_D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\rtl.dcp" />
|
||||
<DCCReference Include="..\Servidor\TB2k_D10.dcp" />
|
||||
<DCCReference Include="..\Servidor\tbx_d10.dcp" />
|
||||
<DCCReference Include="..\Servidor\vcl.dcp" />
|
||||
<DCCReference Include="..\Servidor\vclactnband.dcp" />
|
||||
<DCCReference Include="..\Servidor\vcldb.dcp" />
|
||||
<DCCReference Include="..\Servidor\vcljpg.dcp" />
|
||||
<DCCReference Include="..\Servidor\VclSmp.dcp" />
|
||||
<DCCReference Include="..\Servidor\vclx.dcp" />
|
||||
<DCCReference Include="..\Servidor\xmlrtl.dcp" />
|
||||
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
||||
<Form>fConfigurarConexion</Form>
|
||||
<DesignClass>TForm</DesignClass>
|
||||
|
||||
Binary file not shown.
@ -36,6 +36,7 @@ type
|
||||
procedure Renumerar(DataTable: TDADataTable; LocalizaPosicion: Integer);
|
||||
function DarListaTiposDetalle: TStringList;
|
||||
procedure ValidarDetalles(ADataTable: IDAStronglyTypedDataTable);
|
||||
procedure AsignarDescuento(ADataTable: IDAStronglyTypedDataTable; Posicion: TIntegerArray; ADescuento: Variant);
|
||||
end;
|
||||
|
||||
TControllerDetallesBase = class (TSujeto, IControllerDetallesBase)
|
||||
@ -93,6 +94,7 @@ type
|
||||
// Comprueba que todos los detalles del documento tengan un tipo_detalle asignado,
|
||||
// además de que los capitulos tengan su subtotal de cierre
|
||||
procedure ValidarDetalles(ADataTable: IDAStronglyTypedDataTable);
|
||||
procedure AsignarDescuento(ADataTable: IDAStronglyTypedDataTable; Posicion: TIntegerArray; ADescuento: Variant); virtual;
|
||||
end;
|
||||
|
||||
|
||||
@ -103,6 +105,7 @@ implementation
|
||||
uses
|
||||
cxControls, SysUtils, DB, uDAInterfaces, Dialogs;
|
||||
|
||||
|
||||
procedure TControllerDetallesBase.ActualizarTotales(ADataTable: IDAStronglyTypedDataTable);
|
||||
begin
|
||||
BeginUpdate(ADataTable);
|
||||
@ -134,6 +137,43 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TControllerDetallesBase.AsignarDescuento(ADataTable: IDAStronglyTypedDataTable; Posicion: TIntegerArray; ADescuento: Variant);
|
||||
var
|
||||
i: integer;
|
||||
AField: TDAField;
|
||||
AsignarDtoPosicion: Integer;
|
||||
|
||||
begin
|
||||
AsignarDtoPosicion := 0;
|
||||
AField := ADataTable.DataTable.FindField(CAMPO_POSICION);
|
||||
if not Assigned(AField) then
|
||||
raise Exception.Create('Campo ' + CAMPO_POSICION + ' no encontrado (AsignarDescuento)');
|
||||
|
||||
BeginUpdate(ADataTable);
|
||||
try
|
||||
with ADataTable do
|
||||
begin
|
||||
for i := 0 to High(POSICION) do
|
||||
begin
|
||||
DataTable.First;
|
||||
AsignarDtoPosicion := POSICION[i];
|
||||
if DataTable.Locate(CAMPO_POSICION, AsignarDtoPosicion, []) then
|
||||
begin
|
||||
if (DataTable.FieldByName(CAMPO_TIPO).AsString = TIPO_DETALLE_CONCEPTO) then
|
||||
begin
|
||||
DataTable.Edit;
|
||||
DataTable.FieldByName(CAMPO_DESCUENTO).AsVariant := ADescuento;
|
||||
DataTable.Post;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Renumerar(DataTable, AsignarDtoPosicion);
|
||||
end;
|
||||
finally
|
||||
EndUpdate(ADataTable);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TControllerDetallesBase.BeginUpdate(ADataTable: IDAStronglyTypedDataTable);
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
@ -258,15 +298,19 @@ procedure TControllerDetallesBase.CalculoDetalleDescuento(
|
||||
DataTable: TDADataTable; var ImporteAcumulado, ImporteTotal: Double);
|
||||
var
|
||||
ImporteDto : Double;
|
||||
Redondeado : Double;
|
||||
begin
|
||||
with DataTable do
|
||||
//Este metodo calcula el descuento por capitulo que no se activa para tecsitel
|
||||
{ with DataTable do
|
||||
begin
|
||||
if not Editing then Edit;
|
||||
ImporteDto := (-1)*((ImporteTotal * DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat) / 100);
|
||||
|
||||
ImporteTotal := ImporteTotal + ImporteDto;
|
||||
FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat := ImporteTotal;
|
||||
Post;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
procedure TControllerDetallesBase.CalculoDetalleSalto(DataTable: TDADataTable; var ImporteAcumulado, ImporteTotal: Double);
|
||||
|
||||
@ -32,13 +32,22 @@ uses
|
||||
function CalcularLineaConcepto (const ADataTable : TDADataTable): Double;
|
||||
var
|
||||
ImporteTotal : Double;
|
||||
ImporteA: Double;
|
||||
ImporteB: Double;
|
||||
begin
|
||||
with ADataTable do
|
||||
begin
|
||||
if (VarIsNull(FieldByName(CAMPO_DESCUENTO).AsVariant)) then
|
||||
ImporteTotal := FieldByName(CAMPO_CANTIDAD).asfloat * FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat
|
||||
else
|
||||
ImporteTotal := FieldByName(CAMPO_CANTIDAD).asfloat * (FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat - (FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat * (FieldByName(CAMPO_DESCUENTO).AsFloat/100)));
|
||||
begin
|
||||
//Importe descuento con todos los decimales
|
||||
ImporteA := FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat * (FieldByName(CAMPO_DESCUENTO).AsFloat/100);
|
||||
//Importe descuento redondeado a solo dos decimales, porque en grandes cantidades hay fluctuación
|
||||
//(importe unidad - 0,6732 no es lo mismo que importe unidad - 0,67 sobre todo cuando trabajamos con grandes cantidades)
|
||||
ImporteB := round(ImporteA*100)/100;
|
||||
ImporteTotal := FieldByName(CAMPO_CANTIDAD).asfloat * (FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat - ImporteB);
|
||||
end;
|
||||
|
||||
if (VarIsNull(FieldByName(CAMPO_IMPORTE_PORTE).AsVariant)) then
|
||||
ImporteTotal := ImporteTotal
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.7.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.7.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages></Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">2</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.7.2.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.7.2.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages></Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Factuges.ico"
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,7,0,0
|
||||
PRODUCTVERSION 1,7,0,0
|
||||
FILEVERSION 1,7,2,0
|
||||
PRODUCTVERSION 1,7,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
@ -13,10 +13,10 @@ BEGIN
|
||||
BLOCK "0C0A04E4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Rodax Software S.L.\0"
|
||||
VALUE "FileVersion", "1.7.0.0\0"
|
||||
VALUE "FileVersion", "1.7.2.0\0"
|
||||
VALUE "InternalName", "FactuGES\0"
|
||||
VALUE "ProductName", "FactuGES\0"
|
||||
VALUE "ProductVersion", "1.7.0.0\0"
|
||||
VALUE "ProductVersion", "1.7.2.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Binary file not shown.
@ -28,8 +28,6 @@ inherited fEditorDBItem: TfEditorDBItem
|
||||
AutoSize = False
|
||||
Caption = 'Desbloquear'
|
||||
ParentFont = False
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
Style.HotTrack = True
|
||||
Style.LookAndFeel.NativeStyle = False
|
||||
Style.TextColor = clWindow
|
||||
@ -39,10 +37,14 @@ inherited fEditorDBItem: TfEditorDBItem
|
||||
StyleHot.BorderStyle = ebsNone
|
||||
StyleHot.LookAndFeel.NativeStyle = False
|
||||
StyleHot.TextStyle = [fsUnderline]
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
Transparent = True
|
||||
OnClick = lblDesbloquearClick
|
||||
Height = 27
|
||||
Width = 90
|
||||
AnchorX = 821
|
||||
AnchorY = 14
|
||||
end
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
|
||||
@ -216,12 +216,12 @@ type
|
||||
procedure SetDetalles(const Value: IDAStronglyTypedDataTable);
|
||||
|
||||
function DarPosicionCAMPO(const Nombre:String): Integer;
|
||||
function DarListaSeleccionados: TIntegerArray;
|
||||
|
||||
procedure DoPasteText(Sender: TObject; AText: string);
|
||||
procedure TratamientoTeclas(Key: Word; Shift: TShiftState; AItem: TcxCustomGridTableItem = nil);
|
||||
|
||||
protected
|
||||
function DarListaSeleccionados: TIntegerArray;
|
||||
function HayQueRecalcular(AItem: TcxCustomGridTableItem): Boolean; virtual;
|
||||
function EsTipoEditable(AItem: TcxCustomGridTableItem): Boolean; virtual;
|
||||
function DarTipoConcepto(ARecord: TcxCustomGridRecord): string; virtual;
|
||||
|
||||
@ -3,23 +3,22 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO
|
||||
inherited ToolButton1: TToolButton
|
||||
ExplicitWidth = 109
|
||||
end
|
||||
inherited ToolButton2: TToolButton
|
||||
inherited ToolButton14: TToolButton [1]
|
||||
Left = 109
|
||||
ExplicitLeft = 109
|
||||
Wrap = False
|
||||
end
|
||||
inherited ToolButton4: TToolButton [2]
|
||||
Left = 174
|
||||
end
|
||||
inherited ToolButton3: TToolButton [3]
|
||||
Left = 230
|
||||
ExplicitLeft = 230
|
||||
end
|
||||
inherited ToolButton2: TToolButton [4]
|
||||
Left = 285
|
||||
ExplicitLeft = 285
|
||||
ExplicitWidth = 114
|
||||
end
|
||||
inherited ToolButton3: TToolButton
|
||||
Left = 223
|
||||
ExplicitLeft = 223
|
||||
end
|
||||
inherited ToolButton4: TToolButton
|
||||
Left = 278
|
||||
ExplicitLeft = 278
|
||||
end
|
||||
inherited ToolButton14: TToolButton
|
||||
Left = 334
|
||||
ExplicitLeft = 334
|
||||
end
|
||||
inherited FontSize: TEdit
|
||||
Width = 41
|
||||
ExplicitWidth = 41
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -49,16 +49,17 @@
|
||||
<DelphiCompile Include="PresupuestosCliente_controller.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\Obras\Articulos_controller.dcp" />
|
||||
<DCCReference Include="..\..\Obras\Contactos_controller.dcp" />
|
||||
<DCCReference Include="..\..\Obras\GestorDocumentos_controller.dcp" />
|
||||
<DCCReference Include="..\..\Obras\GUIBase.dcp" />
|
||||
<DCCReference Include="..\..\Obras\PresupuestosCliente_data.dcp" />
|
||||
<DCCReference Include="..\..\Obras\PresupuestosCliente_model.dcp" />
|
||||
<DCCReference Include="uArticulosPresupuestoClienteController.pas" />
|
||||
<DCCReference Include="uDetallesPresupuestoClienteController.pas" />
|
||||
<DCCReference Include="uPresupuestosClienteController.pas" />
|
||||
<DCCReference Include="uPresupuestosClienteReportController.pas" />
|
||||
<DCCReference Include="View\Articulos_controller.dcp" />
|
||||
<DCCReference Include="View\Contactos_controller.dcp" />
|
||||
<DCCReference Include="View\GestorDocumentos_controller.dcp" />
|
||||
<DCCReference Include="View\GUIBase.dcp" />
|
||||
<DCCReference Include="View\PresupuestosCliente_data.dcp" />
|
||||
<DCCReference Include="View\PresupuestosCliente_model.dcp" />
|
||||
<DCCReference Include="View\uIEditorAsignarDescuento.pas" />
|
||||
<DCCReference Include="View\uIEditorDireccionEntregaPresupuestoCliente.pas" />
|
||||
<DCCReference Include="View\uIEditorElegirArticulosPresupuestosCliente.pas" />
|
||||
<DCCReference Include="View\uIEditorElegirPresupuestosCliente.pas" />
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
unit uIEditorAsignarDescuento;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uEditorBasico;
|
||||
|
||||
type
|
||||
IEditorAsignarDescuento = interface(IEditorBasico)
|
||||
['{E814B4FE-F9EB-4002-83D9-7383A65F3F0D}']
|
||||
function GetDescuento: Variant;
|
||||
procedure SetDescuento(const Value: Variant);
|
||||
property Descuento: Variant Read GetDescuento write SetDescuento;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@ -3,7 +3,7 @@
|
||||
interface
|
||||
|
||||
uses
|
||||
uDADataTable, uControllerDetallesArticulos, uBizDetallesPresupuestoCliente, uIDataModulePresupuestosCliente,
|
||||
uDADataTable, uControllerDetallesBase, uControllerDetallesArticulos, uBizDetallesPresupuestoCliente, uIDataModulePresupuestosCliente,
|
||||
uBizArticulos, uBizContactos;
|
||||
|
||||
type
|
||||
@ -13,11 +13,14 @@ type
|
||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
||||
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||
function PedirDescuento: Variant;
|
||||
end;
|
||||
|
||||
TDetallesPresupuestoClienteController = class(TControllerDetallesArticulos, IDetallesPresupuestoClienteController)
|
||||
private
|
||||
FDataModule : IDataModulePresupuestosCliente;
|
||||
function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean;
|
||||
|
||||
protected
|
||||
// procedure AsignarDatos(ADetalles: IDAStronglyTypedDataTable; IDCabecera: Integer); override;
|
||||
procedure RellenarOtros(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); overload; override;
|
||||
@ -31,6 +34,7 @@ type
|
||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||
|
||||
public
|
||||
function PedirDescuento: Variant;
|
||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean = True); reintroduce; overload;
|
||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
||||
constructor Create; override;
|
||||
@ -39,8 +43,8 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses Dialogs, uDialogUtils, Variants, uControllerDetallesBase, uDataModulePresupuestosCliente, uArticulosPresupuestoClienteController,
|
||||
uDataTableUtils, uCalculosUtils;
|
||||
uses Controls, SysUtils, Dialogs, uDAInterfaces, uDialogUtils, Variants, uDataModulePresupuestosCliente, uArticulosPresupuestoClienteController,
|
||||
uDataTableUtils, uCalculosUtils, uIEditorAsignarDescuento, uEditorRegistryUtils;
|
||||
|
||||
{ TDetallesPresupuestoClienteController }
|
||||
|
||||
@ -92,6 +96,22 @@ begin
|
||||
FArticulosController := TArticulosPresupuestoClienteController.Create;
|
||||
end;
|
||||
|
||||
function TDetallesPresupuestoClienteController.PedirDescuento: Variant;
|
||||
var
|
||||
AEditor: IEditorAsignarDescuento;
|
||||
|
||||
begin
|
||||
CreateEditor('EditorAsignarDescuento', IEditorAsignarDescuento, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
try
|
||||
if (AEditor.ShowModal = mrOk) then
|
||||
Result := AEditor.Descuento;
|
||||
finally
|
||||
AEditor.Release;
|
||||
AEditor := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
{
|
||||
procedure TDetallesPresupuestoClienteController.AsignarDatos(ADetalles: IDAStronglyTypedDataTable; IDCabecera: Integer);
|
||||
begin
|
||||
@ -118,6 +138,11 @@ begin
|
||||
FDataModule := TDataModulePresupuestosCliente.Create(Nil);
|
||||
end;
|
||||
|
||||
function TDetallesPresupuestoClienteController.CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean;
|
||||
begin
|
||||
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
|
||||
end;
|
||||
|
||||
function TDetallesPresupuestoClienteController.DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||
begin
|
||||
Result := DarTotalPorte(ADetalles);
|
||||
@ -135,7 +160,6 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TDetallesPresupuestoClienteController.RellenarOtros(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);
|
||||
begin
|
||||
//En Tecsitel no se tiene en cuenta el descuento de cliente para el precio PVP
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
||||
<Projects Include="..\Articulos\Controller\Articulos_controller.dproj" />
|
||||
<Projects Include="..\Articulos\Data\Articulos_data.dproj" />
|
||||
<Projects Include="..\Articulos\Model\Articulos_model.dproj" />
|
||||
<Projects Include="..\Articulos\Views\Articulos_view.dproj" />
|
||||
<Projects Include="..\Contactos\Controller\Contactos_controller.dproj" />
|
||||
<Projects Include="..\Contactos\Data\Contactos_data.dproj" />
|
||||
@ -20,6 +21,7 @@
|
||||
<Projects Include="..\Gestion de documentos\Controller\GestorDocumentos_controller.dproj" />
|
||||
<Projects Include="..\Gestion de documentos\Data\GestorDocumentos_data.dproj" />
|
||||
<Projects Include="..\Gestor de informes\Views\GestorInformes_view.dproj" />
|
||||
<Projects Include="..\Pedidos a proveedor\Views\PedidosProveedor_view.dproj" />
|
||||
<Projects Include="..\Relaciones\Presupuestos de cliente - Albaranes de cliente\PreCli_AlbCli_relation.dproj" />
|
||||
<Projects Include="..\Relaciones\Presupuestos de cliente - Facturas de cliente\PreCli_FacCli_relation.dproj" />
|
||||
<Projects Include="Controller\PresupuestosCliente_controller.dproj" />
|
||||
@ -241,14 +243,32 @@
|
||||
<Target Name="GestorInformes_view:Make">
|
||||
<MSBuild Projects="..\Gestor de informes\Views\GestorInformes_view.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="PedidosProveedor_view">
|
||||
<MSBuild Projects="..\Pedidos a proveedor\Views\PedidosProveedor_view.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="PedidosProveedor_view:Clean">
|
||||
<MSBuild Projects="..\Pedidos a proveedor\Views\PedidosProveedor_view.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="PedidosProveedor_view:Make">
|
||||
<MSBuild Projects="..\Pedidos a proveedor\Views\PedidosProveedor_view.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="Articulos_model">
|
||||
<MSBuild Projects="..\Articulos\Model\Articulos_model.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="Articulos_model:Clean">
|
||||
<MSBuild Projects="..\Articulos\Model\Articulos_model.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="Articulos_model:Make">
|
||||
<MSBuild Projects="..\Articulos\Model\Articulos_model.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_model;Contactos_data;Contactos_controller;Contactos_view;Articulos_data;Articulos_controller;Articulos_view;PresupuestosCliente_model;PresupuestosCliente_data;GestorDocumentos_data;GestorDocumentos_controller;PresupuestosCliente_controller;PreCli_FacCli_relation;PreCli_AlbCli_relation;PresupuestosCliente_view;PresupuestosCliente_plugin;FactuGES;FactuGES_Server;FacturasCliente_view;GestorInformes_view" />
|
||||
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_model;Contactos_data;Contactos_controller;Contactos_view;Articulos_data;Articulos_controller;Articulos_view;PresupuestosCliente_model;PresupuestosCliente_data;GestorDocumentos_data;GestorDocumentos_controller;PresupuestosCliente_controller;PreCli_FacCli_relation;PreCli_AlbCli_relation;PresupuestosCliente_view;PresupuestosCliente_plugin;FactuGES;FactuGES_Server;FacturasCliente_view;GestorInformes_view;PedidosProveedor_view;Articulos_model" />
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_model:Clean;Contactos_data:Clean;Contactos_controller:Clean;Contactos_view:Clean;Articulos_data:Clean;Articulos_controller:Clean;Articulos_view:Clean;PresupuestosCliente_model:Clean;PresupuestosCliente_data:Clean;GestorDocumentos_data:Clean;GestorDocumentos_controller:Clean;PresupuestosCliente_controller:Clean;PreCli_FacCli_relation:Clean;PreCli_AlbCli_relation:Clean;PresupuestosCliente_view:Clean;PresupuestosCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasCliente_view:Clean;GestorInformes_view:Clean" />
|
||||
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_model:Clean;Contactos_data:Clean;Contactos_controller:Clean;Contactos_view:Clean;Articulos_data:Clean;Articulos_controller:Clean;Articulos_view:Clean;PresupuestosCliente_model:Clean;PresupuestosCliente_data:Clean;GestorDocumentos_data:Clean;GestorDocumentos_controller:Clean;PresupuestosCliente_controller:Clean;PreCli_FacCli_relation:Clean;PreCli_AlbCli_relation:Clean;PresupuestosCliente_view:Clean;PresupuestosCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasCliente_view:Clean;GestorInformes_view:Clean;PedidosProveedor_view:Clean;Articulos_model:Clean" />
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_model:Make;Contactos_data:Make;Contactos_controller:Make;Contactos_view:Make;Articulos_data:Make;Articulos_controller:Make;Articulos_view:Make;PresupuestosCliente_model:Make;PresupuestosCliente_data:Make;GestorDocumentos_data:Make;GestorDocumentos_controller:Make;PresupuestosCliente_controller:Make;PreCli_FacCli_relation:Make;PreCli_AlbCli_relation:Make;PresupuestosCliente_view:Make;PresupuestosCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasCliente_view:Make;GestorInformes_view:Make" />
|
||||
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_model:Make;Contactos_data:Make;Contactos_controller:Make;Contactos_view:Make;Articulos_data:Make;Articulos_controller:Make;Articulos_view:Make;PresupuestosCliente_model:Make;PresupuestosCliente_data:Make;GestorDocumentos_data:Make;GestorDocumentos_controller:Make;PresupuestosCliente_controller:Make;PreCli_FacCli_relation:Make;PreCli_AlbCli_relation:Make;PresupuestosCliente_view:Make;PresupuestosCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasCliente_view:Make;GestorInformes_view:Make;PedidosProveedor_view:Make;Articulos_model:Make" />
|
||||
</Target>
|
||||
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
||||
</Project>
|
||||
@ -293,11 +293,12 @@ object RptWordPresupuestoCliente: TRptWordPresupuestoCliente
|
||||
SQL =
|
||||
'SELECT '#10' ID, ID_PRESUPUESTO, POSICION, TIPO_DETALLE, ID_ARTIC' +
|
||||
'ULO, '#10' F_RTFTOTEXT(F_RTFTOTEXT(CONCEPTO)) as CONCEPTO, CONCEP' +
|
||||
'TO as CONCEPTO_RTF, CANTIDAD,'#10' UNIDAD_MEDIDA, IMPORTE_UNIDAD,' +
|
||||
' DESCUENTO, IMPORTE_PORTE,'#10' IMPORTE_TOTAL, VISIBLE, FECHA_ALT' +
|
||||
'A, FECHA_MODIFICACION'#10' FROM'#10' PRESUPUESTOS_CLIENTE_DETALLES'#10' ' +
|
||||
' WHERE {Where}'#10' AND (VISIBLE <> 0)'#10' AND (ID_PRESUPUESTO = ' +
|
||||
':ID_PRESUPUESTO)'#10' ORDER BY ID_PRESUPUESTO, POSICION'#10
|
||||
'TO as CONCEPTO_RTF, CANTIDAD,'#10' UNIDAD_MEDIDA,'#10' (IMPORTE_TO' +
|
||||
'TAL / CANTIDAD) AS IMPORTE_UNIDAD,'#10' DESCUENTO, IMPORTE_PORTE,' +
|
||||
#10' IMPORTE_TOTAL, VISIBLE, FECHA_ALTA, FECHA_MODIFICACION'#10' FR' +
|
||||
'OM'#10' PRESUPUESTOS_CLIENTE_DETALLES'#10' WHERE {Where}'#10' AND (VI' +
|
||||
'SIBLE <> 0)'#10' AND (ID_PRESUPUESTO = :ID_PRESUPUESTO)'#10' ORDER B' +
|
||||
'Y ID_PRESUPUESTO, POSICION'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
@ -401,7 +402,7 @@ object RptWordPresupuestoCliente: TRptWordPresupuestoCliente
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD'
|
||||
DataType = datFloat
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'UNIDAD_MEDIDA'
|
||||
@ -582,8 +583,6 @@ object RptWordPresupuestoCliente: TRptWordPresupuestoCliente
|
||||
RemoteFetchEnabled = False
|
||||
LocalSchema = schReport
|
||||
LocalDataStreamer = DABin2DataStreamer
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'Informe_Cabecera'
|
||||
IndexDefs = <>
|
||||
Left = 168
|
||||
@ -674,8 +673,6 @@ object RptWordPresupuestoCliente: TRptWordPresupuestoCliente
|
||||
RemoteFetchEnabled = False
|
||||
LocalSchema = schReport
|
||||
LocalDataStreamer = DABin2DataStreamer
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'Informe_Detalles'
|
||||
IndexDefs = <>
|
||||
Left = 264
|
||||
@ -693,8 +690,6 @@ object RptWordPresupuestoCliente: TRptWordPresupuestoCliente
|
||||
LogChanges = False
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
RemoteFetchEnabled = False
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'Empresa'
|
||||
IndexDefs = <>
|
||||
Left = 168
|
||||
|
||||
@ -65,6 +65,7 @@ contains
|
||||
uEditorFechaDecision in 'uEditorFechaDecision.pas' {fEditorFechaDecision: T},
|
||||
uViewDocumentosPresupuestoCliente in 'uViewDocumentosPresupuestoCliente.pas' {frViewDocumentosPresupuestoCliente: TFrame},
|
||||
uViewDatosYSeleccionClientePresupuesto in 'uViewDatosYSeleccionClientePresupuesto.pas' {frViewDatosYSeleccionClientePresupuesto: TFrame},
|
||||
uViewTotalesPresupuesto in 'uViewTotalesPresupuesto.pas' {frViewTotalesPresupuesto: TFrame};
|
||||
uViewTotalesPresupuesto in 'uViewTotalesPresupuesto.pas' {frViewTotalesPresupuesto: TFrame},
|
||||
uEditorAsignarDescuento in 'uEditorAsignarDescuento.pas' {fEditorAsignarDescuento};
|
||||
|
||||
end.
|
||||
|
||||
@ -49,30 +49,30 @@
|
||||
<DelphiCompile Include="PresupuestosCliente_view.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\Obras\adortl.dcp" />
|
||||
<DCCReference Include="..\..\Obras\Articulos_view.dcp" />
|
||||
<DCCReference Include="..\..\Obras\Base.dcp" />
|
||||
<DCCReference Include="..\..\Obras\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\..\Obras\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\..\Obras\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\..\Obras\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="..\..\Obras\dbrtl.dcp" />
|
||||
<DCCReference Include="..\..\Obras\dsnap.dcp" />
|
||||
<DCCReference Include="..\..\Obras\dxComnD11.dcp" />
|
||||
<DCCReference Include="..\..\Obras\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\..\Obras\dxLayoutControlD11.dcp" />
|
||||
<DCCReference Include="..\..\Obras\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\..\Obras\GestorInformes_controller.dcp" />
|
||||
<DCCReference Include="..\..\Obras\GUIBase.dcp" />
|
||||
<DCCReference Include="..\..\Obras\PreCli_AlbCli_relation.dcp" />
|
||||
<DCCReference Include="..\..\Obras\PreCli_FacCli_relation.dcp" />
|
||||
<DCCReference Include="..\..\Obras\PresupuestosCliente_controller.dcp" />
|
||||
<DCCReference Include="..\..\Obras\PresupuestosCliente_model.dcp" />
|
||||
<DCCReference Include="..\..\Obras\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="..\..\Obras\rtl.dcp" />
|
||||
<DCCReference Include="..\..\Obras\vcl.dcp" />
|
||||
<DCCReference Include="..\..\Obras\vcldb.dcp" />
|
||||
<DCCReference Include="..\..\Obras\vcljpg.dcp" />
|
||||
<DCCReference Include="adortl.dcp" />
|
||||
<DCCReference Include="Articulos_view.dcp" />
|
||||
<DCCReference Include="Base.dcp" />
|
||||
<DCCReference Include="cxDataD11.dcp" />
|
||||
<DCCReference Include="cxEditorsD11.dcp" />
|
||||
<DCCReference Include="cxLibraryD11.dcp" />
|
||||
<DCCReference Include="DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="dbrtl.dcp" />
|
||||
<DCCReference Include="dsnap.dcp" />
|
||||
<DCCReference Include="dxComnD11.dcp" />
|
||||
<DCCReference Include="dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="dxLayoutControlD11.dcp" />
|
||||
<DCCReference Include="dxThemeD11.dcp" />
|
||||
<DCCReference Include="GestorInformes_controller.dcp" />
|
||||
<DCCReference Include="GUIBase.dcp" />
|
||||
<DCCReference Include="PreCli_AlbCli_relation.dcp" />
|
||||
<DCCReference Include="PreCli_FacCli_relation.dcp" />
|
||||
<DCCReference Include="PresupuestosCliente_controller.dcp" />
|
||||
<DCCReference Include="PresupuestosCliente_model.dcp" />
|
||||
<DCCReference Include="RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="rtl.dcp" />
|
||||
<DCCReference Include="uEditorAsignarDescuento.pas">
|
||||
<Form>fEditorAsignarDescuento</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorElegirArticulosPresupuestoCliente.pas">
|
||||
<Form>fEditorElegirArticulosPresupuestoCliente</Form>
|
||||
<DesignClass>TfEditorElegirArticulosPedidoCliente</DesignClass>
|
||||
@ -130,6 +130,9 @@
|
||||
<Form>frViewTotalesPresupuesto</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="vcl.dcp" />
|
||||
<DCCReference Include="vcldb.dcp" />
|
||||
<DCCReference Include="vcljpg.dcp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<!-- EurekaLog First Line
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
object fEditorAsignarDescuento: TfEditorAsignarDescuento
|
||||
Left = 0
|
||||
Top = 0
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Asignar descuento'
|
||||
ClientHeight = 124
|
||||
ClientWidth = 342
|
||||
Color = clWindow
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object Label1: TLabel
|
||||
Left = 21
|
||||
Top = 16
|
||||
Width = 310
|
||||
Height = 13
|
||||
Caption =
|
||||
'Inserte el descuento que desea asignar a las filas seleccionadas' +
|
||||
'.'
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 45
|
||||
Top = 45
|
||||
Width = 55
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
Caption = 'Descuento:'
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 159
|
||||
Top = 45
|
||||
Width = 11
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
Caption = '%'
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 83
|
||||
Width = 342
|
||||
Height = 41
|
||||
Align = alBottom
|
||||
TabOrder = 0
|
||||
ExplicitWidth = 497
|
||||
DesignSize = (
|
||||
342
|
||||
41)
|
||||
object bAceptar: TButton
|
||||
Left = 178
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Aceptar'
|
||||
ModalResult = 1
|
||||
TabOrder = 0
|
||||
ExplicitLeft = 333
|
||||
end
|
||||
object bCancelar: TButton
|
||||
Left = 259
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Cancelar'
|
||||
ModalResult = 2
|
||||
TabOrder = 1
|
||||
ExplicitLeft = 414
|
||||
end
|
||||
end
|
||||
object sDescuento: TcxSpinEdit
|
||||
Left = 106
|
||||
Top = 42
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 1
|
||||
Width = 47
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,47 @@
|
||||
unit uEditorAsignarDescuento;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
|
||||
cxDropDownEdit, cxCalendar, ExtCtrls, uEditorBasico, uIEditorAsignarDescuento,
|
||||
cxGraphics, DB, uDAInterfaces, uDADataTable, cxDBEdit, uEmpresasController,
|
||||
cxSpinEdit;
|
||||
|
||||
type
|
||||
TfEditorAsignarDescuento = class(TfEditorBasico, IEditorAsignarDescuento)
|
||||
Label1: TLabel;
|
||||
bAceptar: TButton;
|
||||
bCancelar: TButton;
|
||||
Label2: TLabel;
|
||||
Panel1: TPanel;
|
||||
sDescuento: TcxSpinEdit;
|
||||
Label3: TLabel;
|
||||
|
||||
private
|
||||
FDescuento: Variant;
|
||||
function GetDescuento: Variant;
|
||||
procedure SetDescuento(const Value: Variant);
|
||||
|
||||
public
|
||||
property Descuento: Variant Read GetDescuento write SetDescuento;
|
||||
end;
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses uFactuGES_App;
|
||||
|
||||
function TfEditorAsignarDescuento.GetDescuento: Variant;
|
||||
begin
|
||||
Result := sDescuento.EditValue;
|
||||
end;
|
||||
|
||||
procedure TfEditorAsignarDescuento.SetDescuento(const Value: Variant);
|
||||
begin
|
||||
sDescuento.EditValue := Value;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
@ -5,7 +5,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
ClientHeight = 592
|
||||
ClientWidth = 764
|
||||
OnClose = CustomEditorClose
|
||||
ExplicitTop = -71
|
||||
ExplicitWidth = 772
|
||||
ExplicitHeight = 626
|
||||
PixelsPerInch = 96
|
||||
@ -128,6 +127,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
inherited lblDesbloquear: TcxLabel
|
||||
Left = 666
|
||||
ExplicitLeft = 666
|
||||
AnchorX = 711
|
||||
AnchorY = 14
|
||||
end
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
@ -204,108 +205,94 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
||||
ExplicitHeight = 338
|
||||
inherited ToolBar1: TToolBar
|
||||
Width = 750
|
||||
Height = 78
|
||||
Height = 73
|
||||
ExplicitWidth = 750
|
||||
ExplicitHeight = 78
|
||||
inherited ToolButton3: TToolButton
|
||||
Wrap = False
|
||||
end
|
||||
inherited ToolButton4: TToolButton
|
||||
Left = 278
|
||||
Top = 0
|
||||
ExplicitLeft = 278
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton14: TToolButton
|
||||
Left = 334
|
||||
Top = 0
|
||||
Wrap = False
|
||||
ExplicitLeft = 334
|
||||
ExplicitTop = 0
|
||||
Wrap = True
|
||||
end
|
||||
inherited FontName: TJvFontComboBox
|
||||
Left = 399
|
||||
Top = 0
|
||||
ExplicitLeft = 399
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton13: TToolButton [6]
|
||||
Left = 0
|
||||
Top = 0
|
||||
Wrap = True
|
||||
Top = 22
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitHeight = 27
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited FontSize: TEdit [7]
|
||||
Left = 0
|
||||
Top = 27
|
||||
inherited FontSize: TEdit
|
||||
Left = 145
|
||||
Top = 22
|
||||
Width = 200
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 27
|
||||
ExplicitLeft = 145
|
||||
ExplicitTop = 22
|
||||
ExplicitWidth = 200
|
||||
end
|
||||
inherited UpDown1: TUpDown [8]
|
||||
Left = 200
|
||||
Top = 27
|
||||
ExplicitLeft = 200
|
||||
ExplicitTop = 27
|
||||
inherited UpDown1: TUpDown
|
||||
Left = 345
|
||||
Top = 22
|
||||
ExplicitLeft = 345
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton13: TToolButton
|
||||
Left = 362
|
||||
Top = 22
|
||||
Wrap = False
|
||||
ExplicitLeft = 362
|
||||
ExplicitTop = 22
|
||||
ExplicitHeight = 22
|
||||
end
|
||||
inherited ToolButton6: TToolButton
|
||||
Left = 217
|
||||
Top = 27
|
||||
ExplicitLeft = 217
|
||||
ExplicitTop = 27
|
||||
Left = 370
|
||||
Top = 22
|
||||
ExplicitLeft = 370
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton7: TToolButton
|
||||
Left = 283
|
||||
Top = 27
|
||||
ExplicitLeft = 283
|
||||
ExplicitTop = 27
|
||||
Left = 436
|
||||
Top = 22
|
||||
ExplicitLeft = 436
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton8: TToolButton
|
||||
Left = 350
|
||||
Top = 27
|
||||
ExplicitLeft = 350
|
||||
ExplicitTop = 27
|
||||
Left = 503
|
||||
Top = 22
|
||||
ExplicitLeft = 503
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton12: TToolButton
|
||||
Left = 0
|
||||
Top = 27
|
||||
Top = 22
|
||||
Wrap = True
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 27
|
||||
ExplicitTop = 22
|
||||
ExplicitHeight = 27
|
||||
end
|
||||
inherited ToolButton9: TToolButton
|
||||
Left = 0
|
||||
Top = 54
|
||||
Top = 49
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 54
|
||||
ExplicitTop = 49
|
||||
end
|
||||
inherited ToolButton10: TToolButton
|
||||
Left = 145
|
||||
Top = 54
|
||||
Top = 49
|
||||
ExplicitLeft = 145
|
||||
ExplicitTop = 54
|
||||
ExplicitTop = 49
|
||||
end
|
||||
inherited ToolButton11: TToolButton
|
||||
Left = 270
|
||||
Top = 54
|
||||
Top = 49
|
||||
ExplicitLeft = 270
|
||||
ExplicitTop = 54
|
||||
ExplicitTop = 49
|
||||
end
|
||||
end
|
||||
inherited cxGrid: TcxGrid
|
||||
Top = 104
|
||||
Top = 99
|
||||
Width = 750
|
||||
Height = 234
|
||||
Height = 239
|
||||
ExplicitTop = 104
|
||||
ExplicitWidth = 750
|
||||
ExplicitHeight = 234
|
||||
end
|
||||
inherited TBXDock1: TTBXDock
|
||||
Top = 78
|
||||
Top = 73
|
||||
Width = 750
|
||||
ExplicitTop = 78
|
||||
ExplicitWidth = 750
|
||||
|
||||
@ -292,8 +292,9 @@ begin
|
||||
begin
|
||||
FPresupuesto.Cliente := ViewPresupuesto.ViewClientePresupuesto.Cliente;
|
||||
|
||||
if (FPresupuesto.Detalles.RecordCount > 0) then
|
||||
FController.DetallesController.ActualizarDetalles(FPresupuesto.Detalles, FPresupuesto.Cliente);
|
||||
//Desactivado porque en presupuestos no utilizan el catálogo de clientes
|
||||
// if (FPresupuesto.Detalles.RecordCount > 0) then
|
||||
// FController.DetallesController.ActualizarDetalles(FPresupuesto.Detalles, FPresupuesto.Cliente);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ implementation
|
||||
|
||||
uses
|
||||
uEditorRegistryUtils, uEditorPresupuestosCliente, uEditorPresupuestoCliente, uEditorElegirPresupuestosCliente,
|
||||
uEditorElegirArticulosPresupuestoCliente, uEditorPresupuestosClienteReport;
|
||||
uEditorElegirArticulosPresupuestoCliente, uEditorPresupuestosClienteReport, uEditorAsignarDescuento;
|
||||
|
||||
procedure RegisterViews;
|
||||
begin
|
||||
@ -18,6 +18,7 @@ begin
|
||||
EditorRegistry.RegisterClass(TfEditorElegirPresupuestosCliente, 'EditorElegirPresupuestosCliente');
|
||||
EditorRegistry.RegisterClass(TfEditorElegirArticulosPresupuestoCliente, 'EditorElegirArticulosPresupuestosCliente');
|
||||
EditorRegistry.RegisterClass(TfEditorPresupuestosClientePreview, 'EditorPresupuestosClientePreview');
|
||||
EditorRegistry.RegisterClass(TfEditorAsignarDescuento, 'EditorAsignarDescuento');
|
||||
end;
|
||||
|
||||
procedure UnregisterViews;
|
||||
@ -27,6 +28,7 @@ begin
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirPresupuestosCliente);
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosPresupuestoCliente);
|
||||
EditorRegistry.UnRegisterClass(TfEditorPresupuestosClientePreview);
|
||||
EditorRegistry.UnRegisterClass(TfEditorAsignarDescuento);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -1,43 +1,51 @@
|
||||
inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
||||
inherited ToolBar1: TToolBar
|
||||
Height = 95
|
||||
ExplicitHeight = 95
|
||||
inherited FontName: TJvFontComboBox [4]
|
||||
Left = 56
|
||||
Height = 73
|
||||
ExplicitHeight = 73
|
||||
inherited ToolButton3: TToolButton
|
||||
Wrap = False
|
||||
end
|
||||
inherited ToolButton4: TToolButton
|
||||
Left = 278
|
||||
Top = 0
|
||||
ExplicitLeft = 278
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton14: TToolButton
|
||||
Left = 334
|
||||
Top = 0
|
||||
ExplicitLeft = 334
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited FontName: TJvFontComboBox
|
||||
Top = 22
|
||||
ExplicitLeft = 56
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton14: TToolButton [5]
|
||||
Left = 201
|
||||
Wrap = False
|
||||
ExplicitLeft = 201
|
||||
end
|
||||
inherited FontSize: TEdit
|
||||
Left = 266
|
||||
Top = 22
|
||||
ExplicitLeft = 266
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited UpDown1: TUpDown
|
||||
Left = 308
|
||||
Top = 22
|
||||
ExplicitLeft = 308
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton13: TToolButton
|
||||
Left = 325
|
||||
Top = 22
|
||||
ExplicitLeft = 325
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton11: TToolButton [9]
|
||||
Left = 333
|
||||
inherited ToolButton6: TToolButton
|
||||
Top = 22
|
||||
ExplicitLeft = 333
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton12: TToolButton [10]
|
||||
inherited ToolButton7: TToolButton
|
||||
Top = 22
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton8: TToolButton
|
||||
Top = 22
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited ToolButton12: TToolButton
|
||||
Left = 0
|
||||
Top = 22
|
||||
Wrap = True
|
||||
@ -45,49 +53,62 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
||||
ExplicitTop = 22
|
||||
ExplicitHeight = 27
|
||||
end
|
||||
inherited ToolButton9: TToolButton [11]
|
||||
inherited ToolButton9: TToolButton
|
||||
Left = 0
|
||||
Top = 49
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 49
|
||||
end
|
||||
inherited ToolButton10: TToolButton [12]
|
||||
inherited ToolButton10: TToolButton
|
||||
Left = 145
|
||||
Top = 49
|
||||
ExplicitLeft = 145
|
||||
ExplicitTop = 49
|
||||
end
|
||||
inherited ToolButton6: TToolButton [13]
|
||||
inherited ToolButton11: TToolButton
|
||||
Left = 270
|
||||
Top = 49
|
||||
ExplicitLeft = 270
|
||||
ExplicitTop = 49
|
||||
end
|
||||
inherited ToolButton7: TToolButton [14]
|
||||
Left = 336
|
||||
Top = 49
|
||||
Wrap = True
|
||||
ExplicitLeft = 336
|
||||
ExplicitTop = 49
|
||||
end
|
||||
inherited ToolButton8: TToolButton [15]
|
||||
Left = 0
|
||||
Top = 71
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 71
|
||||
end
|
||||
end
|
||||
inherited cxGrid: TcxGrid
|
||||
Top = 121
|
||||
Height = 183
|
||||
Top = 99
|
||||
Height = 205
|
||||
ExplicitTop = 99
|
||||
ExplicitHeight = 205
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
inherited cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn
|
||||
DataBinding.FieldName = ''
|
||||
end
|
||||
inherited cxGridViewDESCUENTO: TcxGridDBColumn
|
||||
Visible = True
|
||||
end
|
||||
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
|
||||
Visible = True
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited TBXDock1: TTBXDock
|
||||
Top = 95
|
||||
ExplicitTop = 68
|
||||
Top = 73
|
||||
ExplicitTop = 73
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
object TBXSeparatorItem9: TTBXSeparatorItem
|
||||
end
|
||||
object TBXItem18: TTBXItem
|
||||
Action = actAsignarDescuento
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ActionListContenido: TActionList
|
||||
inherited actAnadirDescuento: TAction
|
||||
Caption = 'Linea de descuento'
|
||||
end
|
||||
object actAsignarDescuento: TAction
|
||||
Category = 'Operaciones'
|
||||
Caption = 'Asignar descuento'
|
||||
OnExecute = actAsignarDescuentoExecute
|
||||
OnUpdate = actAsignarDescuentoUpdate
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -25,6 +25,11 @@ type
|
||||
end;
|
||||
|
||||
TfrViewDetallesPresupuestoCliente = class(TfrViewDetallesArticulosParaVenta, IViewDetallesPresupuestoCliente)
|
||||
actAsignarDescuento: TAction;
|
||||
TBXItem18: TTBXItem;
|
||||
TBXSeparatorItem9: TTBXSeparatorItem;
|
||||
procedure actAsignarDescuentoExecute(Sender: TObject);
|
||||
procedure actAsignarDescuentoUpdate(Sender: TObject);
|
||||
protected
|
||||
FPresupuesto: IBizPresupuestoCliente;
|
||||
function GetPresupuesto: IBizPresupuestoCliente;
|
||||
@ -41,10 +46,51 @@ type
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses uDetallesPresupuestoClienteController;
|
||||
uses uControllerDetallesBase, uDetallesPresupuestoClienteController;
|
||||
|
||||
{ TfrViewDetallesPresupuestoProveedor }
|
||||
|
||||
procedure TfrViewDetallesPresupuestoCliente.actAsignarDescuentoExecute(Sender: TObject);
|
||||
var
|
||||
AuxTop, AuxRow:Integer;
|
||||
ADescuento: Variant;
|
||||
|
||||
begin
|
||||
|
||||
ADescuento := (Controller as IDetallesPresupuestoClienteController).PedirDescuento;
|
||||
|
||||
ShowHourglassCursor;
|
||||
_FocusedView.BeginUpdate;
|
||||
try
|
||||
|
||||
if Assigned(Controller) and Assigned(FPresupuesto.Detalles) then
|
||||
begin
|
||||
AuxTop := cxGridView.Controller.TopRowIndex;
|
||||
AuxRow := cxGridView.DataController.FocusedRowIndex;
|
||||
|
||||
(Controller as IDetallesPresupuestoClienteController).AsignarDescuento(FPresupuesto.Detalles, darListaSeleccionados, ADescuento);
|
||||
|
||||
_FocusedView.DataController.SelectRows(AuxRow,AuxRow);
|
||||
_FocusedView.Controller.TopRowIndex := AuxTop;
|
||||
end
|
||||
finally
|
||||
_FocusedView.EndUpdate;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetallesPresupuestoCliente.actAsignarDescuentoUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if not DADataSource.DataTable.IsEmpty then
|
||||
(Sender as TAction).Enabled := not (DADataSource.DataTable.State in dsEditModes)
|
||||
and (_FocusedView.DataController.GetSelectedCount > 0)
|
||||
and (FPresupuesto.Detalles.TIPO_DETALLE = TIPO_DETALLE_CONCEPTO)
|
||||
else
|
||||
(Sender as TAction).Enabled := False;
|
||||
end;
|
||||
|
||||
function TfrViewDetallesPresupuestoCliente.AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean;
|
||||
begin
|
||||
Result := (Controller as IDetallesPresupuestoClienteController).AnadirArticulo(Detalles, pReferencia, TipoReferencia, Presupuesto.Cliente.ID);
|
||||
|
||||
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}</ProjectGuid>
|
||||
@ -35,7 +35,7 @@
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters><Parameters Name="RunParams">/standalone</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.7.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.7.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">martes, 17 de marzo de 2009 17:52</VersionInfoKeys></VersionInfoKeys><Excluded_Packages/><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters><Parameters Name="RunParams">/standalone</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">2</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.7.2.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.7.2.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">lunes, 23 de marzo de 2009 19:21</VersionInfoKeys></VersionInfoKeys><Excluded_Packages /><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Servidor.ico"
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,7,0,0
|
||||
PRODUCTVERSION 1,7,0,0
|
||||
FILEVERSION 1,7,2,0
|
||||
PRODUCTVERSION 1,7,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
@ -12,9 +12,9 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "0C0A04E4"
|
||||
BEGIN
|
||||
VALUE "FileVersion", "1.7.0.0\0"
|
||||
VALUE "ProductVersion", "1.7.0.0\0"
|
||||
VALUE "CompileDate", "martes, 17 de marzo de 2009 19:39\0"
|
||||
VALUE "FileVersion", "1.7.2.0\0"
|
||||
VALUE "ProductVersion", "1.7.2.0\0"
|
||||
VALUE "CompileDate", "jueves, 26 de marzo de 2009 20:08\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@ -20,6 +20,7 @@ object dmServer: TdmServer
|
||||
Top = 16
|
||||
end
|
||||
object BINMessage: TROBinMessage
|
||||
Envelopes = <>
|
||||
Left = 136
|
||||
Top = 16
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user