git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@183 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
parent
5fc03ccee0
commit
5930757ac8
BIN
Build/Build.fbl6
BIN
Build/Build.fbl6
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 353 B |
@ -10,6 +10,7 @@ uses
|
||||
type
|
||||
IProvinciasPoblacionesController = interface(IControllerBase)
|
||||
['{777EDE6C-DAB6-4D96-BA57-AE3DAF8A3F78}']
|
||||
function DarListaPaises : TStringList;
|
||||
function DarListaProvincias : TStringList;
|
||||
function DarListaPoblaciones (const AID_Provincia : Integer) : TStringList;
|
||||
end;
|
||||
@ -18,6 +19,7 @@ type
|
||||
protected
|
||||
FDataModule : IDataModuleProvinciasPoblaciones;
|
||||
public
|
||||
function DarListaPaises : TStringList;
|
||||
function DarListaProvincias : TStringList;
|
||||
function DarListaPoblaciones (const AID_Provincia : Integer) : TStringList;
|
||||
destructor Destroy; override;
|
||||
@ -37,6 +39,16 @@ begin
|
||||
FDataModule := TDataModuleProvinciasPoblaciones.Create(NIL);
|
||||
end;
|
||||
|
||||
function TProvinciasPoblacionesController.DarListaPaises: TStringList;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
Result := FDataModule.DarListaPaises;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TProvinciasPoblacionesController.DarListaPoblaciones(
|
||||
const AID_Provincia: Integer): TStringList;
|
||||
begin
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
object DataModuleProvinciasPoblaciones: TDataModuleProvinciasPoblaciones
|
||||
inherited DataModuleProvinciasPoblaciones: TDataModuleProvinciasPoblaciones
|
||||
OldCreateOrder = False
|
||||
Height = 150
|
||||
Width = 215
|
||||
object RORemoteService: TRORemoteService
|
||||
Message = dmConexion.ROMessage
|
||||
Channel = dmConexion.ROChannel
|
||||
|
||||
@ -8,6 +8,7 @@ uses
|
||||
type
|
||||
IDataModuleProvinciasPoblaciones = interface
|
||||
['{E73DB3C4-BC57-44E8-A64B-F86AE2DCB7D6}']
|
||||
function DarListaPaises : TStringList;
|
||||
function DarListaProvincias : TStringList;
|
||||
function DarListaPoblaciones (const AID_Provincia : Integer) : TStringList;
|
||||
end;
|
||||
@ -15,6 +16,7 @@ type
|
||||
TDataModuleProvinciasPoblaciones = class(TDataModuleBase, IDataModuleProvinciasPoblaciones)
|
||||
RORemoteService: TRORemoteService;
|
||||
public
|
||||
function DarListaPaises : TStringList;
|
||||
function DarListaProvincias : TStringList;
|
||||
function DarListaPoblaciones (const AID_Provincia : Integer) : TStringList;
|
||||
end;
|
||||
@ -28,6 +30,15 @@ uses
|
||||
|
||||
{ TDataModuleProvinciasPoblaciones }
|
||||
|
||||
function TDataModuleProvinciasPoblaciones.DarListaPaises: TStringList;
|
||||
var
|
||||
ABinary : Binary;
|
||||
begin
|
||||
ABinary := (RORemoteService as IsrvProvinciasPoblaciones).DarListaPaises;
|
||||
Result := TStringList.Create;
|
||||
Result.LoadFromStream(ABinary);
|
||||
end;
|
||||
|
||||
function TDataModuleProvinciasPoblaciones.DarListaPoblaciones(
|
||||
const AID_Provincia: Integer): TStringList;
|
||||
var
|
||||
|
||||
@ -40,6 +40,74 @@ object srvProvinciasPoblaciones: TsrvProvinciasPoblaciones
|
||||
end>
|
||||
ReadOnly = True
|
||||
end
|
||||
item
|
||||
Params = <>
|
||||
Statements = <
|
||||
item
|
||||
Connection = 'IBX'
|
||||
ConnectionType = 'Interbase'
|
||||
Default = True
|
||||
Name = 'IBX'
|
||||
SQL =
|
||||
'SELECT'#10' ID, ISO_NUM, ISO_DES1, ISO_DES2, DESCRIPCION, ACTIVO'#10 +
|
||||
' FROM'#10' PAISES'#10' WHERE (ACTIVO = 1)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
DatasetField = 'ID'
|
||||
TableField = 'ID'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ISO_NUM'
|
||||
TableField = 'ISO_NUM'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ISO_DES1'
|
||||
TableField = 'ISO_DES1'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ISO_DES2'
|
||||
TableField = 'ISO_DES2'
|
||||
end
|
||||
item
|
||||
DatasetField = 'DESCRIPCION'
|
||||
TableField = 'DESCRIPCION'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ACTIVO'
|
||||
TableField = 'ACTIVO'
|
||||
end>
|
||||
end>
|
||||
Name = 'Paises'
|
||||
Fields = <
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ISO_NUM'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ISO_DES1'
|
||||
DataType = datString
|
||||
Size = 2
|
||||
end
|
||||
item
|
||||
Name = 'ISO_DES2'
|
||||
DataType = datString
|
||||
Size = 3
|
||||
end
|
||||
item
|
||||
Name = 'DESCRIPCION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'ACTIVO'
|
||||
DataType = datSmallInt
|
||||
end>
|
||||
end
|
||||
item
|
||||
IsPublic = False
|
||||
Params = <>
|
||||
|
||||
@ -26,6 +26,7 @@ type
|
||||
private
|
||||
protected
|
||||
{ IsrvProvinciasPoblaciones methods }
|
||||
function DarListaPaises: Binary;
|
||||
function DarListaProvincias: Binary;
|
||||
function DarListaPoblaciones(const ID_Provincia: Integer): Binary;
|
||||
end;
|
||||
@ -80,6 +81,42 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvProvinciasPoblaciones.DarListaPaises: Binary;
|
||||
var
|
||||
ASchema : TDASchema;
|
||||
AConn : IDAConnection;
|
||||
dsData: IDADataset;
|
||||
ALista : TStringList;
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
|
||||
ASchema := schProvinciasPoblaciones;
|
||||
AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
|
||||
|
||||
try
|
||||
dsData := ASchema.NewDataset(AConn, 'Paises');
|
||||
except
|
||||
RaiseError('No existe la tabla PAISES');
|
||||
end;
|
||||
|
||||
ALista := TStringList.Create;
|
||||
try
|
||||
dsData.Active := True;
|
||||
ALista.Sorted := True;
|
||||
while not dsData.EOF do
|
||||
begin
|
||||
ALista.Add(Format('%s=%s', [dsData.Fields[4].AsString, dsData.Fields[2].AsString]));
|
||||
dsData.Next;
|
||||
end;
|
||||
|
||||
ALista.SaveToStream(Result);
|
||||
finally
|
||||
FreeANDNIL(ALista);
|
||||
dsData := NIL;
|
||||
AConn := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvProvinciasPoblaciones.DarListaPoblaciones(const ID_Provincia: Integer): Binary;
|
||||
var
|
||||
ASchema : TDASchema;
|
||||
|
||||
@ -13,7 +13,9 @@ const
|
||||
CTE_PERFIL_VENDEDOR_GRADEN = 7;
|
||||
CTE_PERFIL_VENDEDOR_MARBELLA = 9;
|
||||
CTE_PERFIL_VENDEDOR_DONOSTI = 10;
|
||||
CTE_PERFIL_VENDEDOR_GRADEN_UECKO = 6;
|
||||
CTE_PERFIL_VENDEDOR_BILBAO = 11;
|
||||
CTE_PERFIL_VENDEDOR_GRADEN_UECKO = 6;
|
||||
CTE_PERFIL_VENDEDOR_GRADEN_UECKO2 = 12;
|
||||
CTE_PERFIL_COMPRAS = 8;
|
||||
CTE_PERFIL_USUARIO = 5;
|
||||
|
||||
@ -21,6 +23,7 @@ const
|
||||
CTE_EMPRESA_GRADEN = 2;
|
||||
CTE_EMPRESA_GRADEN_MARBELLA = 6;
|
||||
CTE_EMPRESA_GRADEN_DONOSTI = 10;
|
||||
CTE_EMPRESA_GRADEN_BILBAO = 15;
|
||||
|
||||
type
|
||||
TAppFactuGES_Event = procedure;
|
||||
|
||||
@ -44,6 +44,13 @@
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="PackageDescription">Libreria base de FactuGES</Package_Options><Package_Options Name="ImplicitBuild">False</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</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.0.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.0.0.0</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Excluded_Packages Name="$(BDS)\Bin\dclintraweb_90_100.bpl">VCL for the Web Design Package for CodeGear RAD Studio</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDS)\bin\dclwebsnap100.bpl">CodeGear WebSnap Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDS)\bin\dclsoap100.bpl">CodeGear SOAP Components</Excluded_Packages>
|
||||
@ -58,54 +65,54 @@
|
||||
<DelphiCompile Include="Base.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\adortl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\cxGridD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\dbrtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\dclIndyCore.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\designide.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\dsnap.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\IndyCore.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\IndyProtocols.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\IndySystem.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\Jcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JclVcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JSDialog100.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JvCmpD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JvDlgsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JvMMD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JvNetD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\pckMD5.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\pckUCDataConnector.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\pckUserControl_RT.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\PluginSDK_D11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\PNG_D10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\rtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\TB2k_D10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\tbx_d10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\vcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\vclactnband.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\vcldb.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\vcljpg.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\VclSmp.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\vclx.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de proveedor\xmlrtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\adortl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxGridD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dbrtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dclIndyCore.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\designide.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dsnap.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\IndyCore.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\IndyProtocols.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\IndySystem.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\Jcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JclVcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JSDialog100.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvCmpD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvDlgsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvMMD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvNetD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\pckMD5.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\pckUCDataConnector.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\pckUserControl_RT.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\PluginSDK_D11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\PNG_D10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\rtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\TB2k_D10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\tbx_d10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vclactnband.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vcldb.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vcljpg.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\VclSmp.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vclx.dcp" />
|
||||
<DCCReference Include="..\Modulos\Contratos de cliente\Views\xmlrtl.dcp" />
|
||||
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
||||
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
||||
<Form>fConfigurarConexion</Form>
|
||||
|
||||
@ -14,6 +14,10 @@ function StringsToString(Source:TStrings; Delimiter:char):string;
|
||||
function EsCadenaVacia(const S: AnsiString): Boolean; overload;
|
||||
function EsCadenaVacia(const S: Variant): Boolean; overload;
|
||||
function EsNumerico(Cadena: String) : Boolean;
|
||||
function calcularLetraNIF(numeroDNI : integer): string;
|
||||
function comprobarLetraNIF(nif: string): boolean;
|
||||
function validarCIF(Cif: string) : boolean;
|
||||
function CadLimpiaCar(NIF: String): String;
|
||||
|
||||
|
||||
implementation
|
||||
@ -62,5 +66,73 @@ begin
|
||||
Result := (Codigo = 0)
|
||||
end;
|
||||
|
||||
//Obtiene la letra del DNI NIF de un número
|
||||
function calcularLetraNIF(numeroDNI : integer): string;
|
||||
begin
|
||||
Result := copy('TRWAGMYFPDXBNJZSQVHLCKET', 1 + numeroDNI mod 23, 1);
|
||||
end;
|
||||
|
||||
//Comprueba si un NIF DNI es correcto (con letra incluida y extranjero)
|
||||
function comprobarLetraNIF (nif: string): boolean;
|
||||
var
|
||||
numeroDNI : Integer;
|
||||
begin
|
||||
Result := false;
|
||||
if Length(nif) = 9 then
|
||||
begin
|
||||
// DNI normal
|
||||
if TryStrToInt(Copy(nif, 1, Length(nif) - 1), numeroDNI) then
|
||||
Result := UpperCase(Copy(nif, Length(nif), 1)) = calcularLetraNIF(numeroDNI);
|
||||
// DNI Extranjero
|
||||
if UpperCase(Copy(nif, 1, 1)) = 'X' then
|
||||
if TryStrToInt(Copy(nif, 2, Length(nif) - 2), numeroDNI) then
|
||||
Result := Uppercase(Copy(nif, Length(nif), 1)) = calcularLetraNIF(numeroDNI);
|
||||
end;
|
||||
end;
|
||||
|
||||
//Comprueba si un CIF es correcto (se le pasa el CIF completo, incluida la letra)
|
||||
function validarCIF (Cif : string) : boolean;
|
||||
var
|
||||
Suma, Control : integer;
|
||||
n : byte;
|
||||
begin
|
||||
Result:=False;
|
||||
Cif:=UpperCase(Cif);
|
||||
{El cif debe ser de 9 cifras}
|
||||
if Length(Cif)=9 then
|
||||
begin
|
||||
Suma:= StrToInt(Cif[3])+
|
||||
StrToInt(Cif[5])+
|
||||
StrToInt(Cif[7]);
|
||||
for n := 1 to 4 do
|
||||
begin
|
||||
Suma:=Suma+ ( (2*StrToInt(Cif[2*n])) mod 10 )+
|
||||
( (2*StrToInt(Cif[2*n])) div 10 );
|
||||
end;
|
||||
Control := 10-(Suma mod 10);
|
||||
if Pos(Cif[1],'XP') <> 0 then
|
||||
{Control tipo letra}
|
||||
Result:= ( Cif[9] = Chr(64+ Control))
|
||||
else
|
||||
begin
|
||||
{Control tipo número}
|
||||
if Control =10 then
|
||||
Control := 0;
|
||||
Result:= ( StrToInt(Cif[9]) = Control);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function CadLimpiaCar(NIF: String): String;
|
||||
begin
|
||||
Result:= NIF;
|
||||
while (pos(' ',NIF)>0) do
|
||||
delete(NIF,pos(' ',NIF),1);
|
||||
while (pos('-',NIF)>0) do
|
||||
delete(NIF,pos('-',NIF),1);
|
||||
while (pos('/',NIF)>0) do
|
||||
delete(NIF,pos('/',NIF),1);
|
||||
Result:=UpperCase(NIF);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
program FactuGES;
|
||||
|
||||
uses
|
||||
ExceptionLog,
|
||||
Forms,
|
||||
Windows,
|
||||
SysUtils,
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<DCC_ResourcePath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib</DCC_ResourcePath>
|
||||
<DCC_ObjPath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib</DCC_ObjPath>
|
||||
<DCC_IncludePath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib</DCC_IncludePath>
|
||||
<DCC_Define>DEBUG;</DCC_Define>
|
||||
<DCC_Define>DEBUG;EUREKALOG;EUREKALOG_VER6</DCC_Define>
|
||||
<DCC_DebugInfoInExe>True</DCC_DebugInfoInExe>
|
||||
<DCC_DebugVN>True</DCC_DebugVN>
|
||||
<DCC_MapFile>3</DCC_MapFile>
|
||||
@ -52,7 +52,9 @@
|
||||
<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">4</VersionInfo><VersionInfo Name="MinorVer">4</VersionInfo><VersionInfo Name="Release">5</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">4.4.5.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">4.4.5.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
<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">4</VersionInfo><VersionInfo Name="MinorVer">4</VersionInfo><VersionInfo Name="Release">9</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">4.4.9.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">4.4.9.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
|
||||
|
||||
|
||||
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
|
||||
</Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||
@ -81,7 +83,7 @@
|
||||
<!-- EurekaLog First Line
|
||||
[Exception Log]
|
||||
EurekaLog Version=6006
|
||||
Activate=0
|
||||
Activate=1
|
||||
Activate Handle=1
|
||||
Save Log File=1
|
||||
Foreground Tab=0
|
||||
|
||||
Binary file not shown.
@ -198,7 +198,9 @@ begin
|
||||
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN)
|
||||
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_MARBELLA)
|
||||
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_DONOSTI)
|
||||
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN_UECKO) then
|
||||
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_BILBAO)
|
||||
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN_UECKO)
|
||||
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN_UECKO2) then
|
||||
begin
|
||||
Compras1.Enabled := False;
|
||||
Compras1.Visible := False;
|
||||
|
||||
@ -58,34 +58,34 @@
|
||||
<DelphiCompile Include="GUIBase.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\Base.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\ccpackD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxExportD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dbrtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dxLayoutControlD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dxPScxCommonD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dxPScxGrid6LnkD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\frx11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\frxe11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\fs11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvAppFrmD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvGlobusD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\PNG_D10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\rtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\tb2k_d10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\tbx_d10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\vcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\vclactnband.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\vcldb.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\vcljpg.dcp" />
|
||||
<DCCReference Include="..\Modulos\Facturas de proveedor\vclx.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\Base.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\ccpackD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\cxExportD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\dbrtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\dxLayoutControlD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\dxPScxCommonD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\dxPScxGrid6LnkD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\frx11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\frxe11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\fs11.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\JvAppFrmD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\JvGlobusD11R.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\PNG_D10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\rtl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\tb2k_d10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\tbx_d10.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\vcl.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\vclactnband.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\vcldb.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\vcljpg.dcp" />
|
||||
<DCCReference Include="..\Modulos\Recibos de cliente\vclx.dcp" />
|
||||
<DCCReference Include="uDialogBase.pas">
|
||||
<Form>fDialogBase</Form>
|
||||
</DCCReference>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TfrxReport Version="4.8.11" DotMatrixReport="False" EngineOptions.DoublePass="True" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Por defecto" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="39065,8724234954" ReportOptions.Description.Text="" ReportOptions.LastChange="44314,6665726273" ScriptLanguage="PascalScript" ScriptText.Text=" procedure MasterData1OnBeforePrint(Sender: TfrxComponent); begin if (<frxDBEtiquetas."BULTO"> = 0) then begin logo1.Visible := False; logo2.Visible := False; eAgencia.Visible := False; eBulto.Visible := False; ePedido.Visible := False; eReferencia.Visible := False; eDestinatario.Visible := False; eDestinatario2.Visible := False; eDireccion.Visible := False; eDireccion2.Visible := False; line01.Visible := False; line02.Visible := False; line03.Visible := False; line04.Visible := False; end else begin logo1.Visible := True; logo2.Visible := True; eAgencia.Visible := True; eBulto.Visible := True; ePedido.Visible := True; eReferencia.Visible := True; eDestinatario.Visible := True; eDestinatario2.Visible := True; eDireccion.Visible := True; eDireccion2.Visible := True; line01.Visible := True; line02.Visible := True; line03.Visible := True; line04.Visible := True; end; end; begin end. " ShowProgress="False" StoreInDFM="False" OnStartReport="frxReportOnStartReport" PropData="044C65667403A90003546F70021008446174617365747301010C1D00000020446174615365744E616D653D226672784442457469717565746173220000095661726961626C65730100055374796C650100">
|
||||
<TfrxReport Version="4.8.11" DotMatrixReport="False" EngineOptions.DoublePass="True" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Por defecto" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="39065,8724234954" ReportOptions.Description.Text="" ReportOptions.LastChange="45257,8000817361" ScriptLanguage="PascalScript" ScriptText.Text=" procedure MasterData1OnBeforePrint(Sender: TfrxComponent); begin if (<frxDBEtiquetas."BULTO"> = 0) then begin logo1.Visible := False; logo2.Visible := False; eAgencia.Visible := False; eBulto.Visible := False; ePedido.Visible := False; eReferencia.Visible := False; eDestinatario.Visible := False; eDestinatario2.Visible := False; eDireccion.Visible := False; eDireccion2.Visible := False; line01.Visible := False; line02.Visible := False; line03.Visible := False; line04.Visible := False; end else begin logo1.Visible := True; logo2.Visible := True; eAgencia.Visible := True; eBulto.Visible := True; ePedido.Visible := True; eReferencia.Visible := True; eDestinatario.Visible := True; eDestinatario2.Visible := True; eDireccion.Visible := True; eDireccion2.Visible := True; line01.Visible := True; line02.Visible := True; line03.Visible := True; line04.Visible := True; end; end; begin end. " ShowProgress="False" StoreInDFM="False" OnStartReport="frxReportOnStartReport" PropData="044C65667403A90003546F70021008446174617365747301010C1D00000020446174615365744E616D653D226672784442457469717565746173220000095661726961626C65730100055374796C650100">
|
||||
<TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000"/>
|
||||
<TfrxReportPage Name="Page1" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="2,64583333333333" RightMargin="2,64583333333333" TopMargin="0" BottomMargin="0" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
|
||||
<TfrxMasterData Name="MasterData1" Height="280" Left="0" Top="16" Width="773,701287083333" OnBeforePrint="MasterData1OnBeforePrint" Columns="2" ColumnWidth="395" ColumnGap="0" DataSetName="frxDBEtiquetas" RowCount="0">
|
||||
@ -10,7 +10,7 @@
|
||||
<TfrxMemoView Name="logo2" Left="0" Top="57" Width="136" Height="26" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-7" Font.Name="Arial" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="C/Bélmez, 22 - Pol.Industrial Albarreja 28946 Fuenlabrada - Madrid Tlf. +34 916 099 394 "/>
|
||||
<TfrxMemoView Name="ePedido" Left="8" Top="230" Width="382" Height="17" ShowHint="False" AllowHTMLTags="True" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" HideZeros="True" ParentFont="False" VAlign="vaCenter" Text="PEDIDO Nº: <b>[frxDBEtiquetas."REF_PEDIDO"]</b>"/>
|
||||
<TfrxMemoView Name="eReferencia" Left="8" Top="247" Width="383" Height="30" ShowHint="False" AllowHTMLTags="True" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" HideZeros="True" ParentFont="False" VAlign="vaCenter" Text="REFERENCIA: <b>[frxDBEtiquetas."REF_CLIENTE"]</b>"/>
|
||||
<TfrxMemoView Name="eDireccion2" Left="84" Top="135" Width="308" Height="83" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Arial" Font.Style="1" HAlign="haCenter" HideZeros="True" ParentFont="False" Text="[frxDBEtiquetas."CALLE"] [frxDBEtiquetas."CODIGO_POSTAL"][frxDBEtiquetas."POBLACION"] [frxDBEtiquetas."PROVINCIA"]"/>
|
||||
<TfrxMemoView Name="eDireccion2" Left="84" Top="135" Width="308" Height="83" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Arial" Font.Style="1" HAlign="haCenter" HideZeros="True" ParentFont="False" Text="[frxDBEtiquetas."CALLE"] [frxDBEtiquetas."CODIGO_POSTAL"] [frxDBEtiquetas."POBLACION"] [frxDBEtiquetas."PROVINCIA"] [frxDBEtiquetas."PAIS"]"/>
|
||||
<TfrxMemoView Name="eDestinatario" Left="8" Top="91" Width="102" Height="13" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="DESTINATARIO:"/>
|
||||
<TfrxMemoView Name="Edireccion" Left="8" Top="135" Width="76" Height="32" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="DIRECCIÓN ENTREGA:"/>
|
||||
<TfrxLineView Name="line03" Left="11" Top="88" Width="371" Height="0" ShowHint="False" Diagonal="True"/>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TfrxReport Version="4.8.11" DotMatrixReport="False" EngineOptions.DoublePass="True" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Por defecto" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="39065,8724234954" ReportOptions.Description.Text="" ReportOptions.LastChange="44314,6645263657" ScriptLanguage="PascalScript" ScriptText.Text=" procedure MasterData1OnBeforePrint(Sender: TfrxComponent); begin if (<frxDBEtiquetas."BULTO"> = 0) then begin logo1.Visible := False; logo2.Visible := False; eAgencia.Visible := False; eBulto.Visible := False; ePedido.Visible := False; eReferencia.Visible := False; eDestinatario.Visible := False; eDestinatario2.Visible := False; eDireccion.Visible := False; eDireccion2.Visible := False; line01.Visible := False; line02.Visible := False; line03.Visible := False; line04.Visible := False; end else begin logo1.Visible := True; logo2.Visible := True; eAgencia.Visible := True; eBulto.Visible := True; ePedido.Visible := True; eReferencia.Visible := True; eDestinatario.Visible := True; eDestinatario2.Visible := True; eDireccion.Visible := True; eDireccion2.Visible := True; line01.Visible := True; line02.Visible := True; line03.Visible := True; line04.Visible := True; end; end; begin end. " ShowProgress="False" StoreInDFM="False" OnStartReport="frxReportOnStartReport" PropData="044C65667403A90003546F70021008446174617365747301010C1D00000020446174615365744E616D653D226672784442457469717565746173220000095661726961626C65730100055374796C650100">
|
||||
<TfrxReport Version="4.8.11" DotMatrixReport="False" EngineOptions.DoublePass="True" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Por defecto" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="39065,8724234954" ReportOptions.Description.Text="" ReportOptions.LastChange="45244,7283150579" ScriptLanguage="PascalScript" ScriptText.Text=" procedure MasterData1OnBeforePrint(Sender: TfrxComponent); begin if (<frxDBEtiquetas."BULTO"> = 0) then begin logo1.Visible := False; logo2.Visible := False; eAgencia.Visible := False; eBulto.Visible := False; ePedido.Visible := False; eReferencia.Visible := False; eDestinatario.Visible := False; eDestinatario2.Visible := False; eDireccion.Visible := False; eDireccion2.Visible := False; line01.Visible := False; line02.Visible := False; line03.Visible := False; line04.Visible := False; end else begin logo1.Visible := True; logo2.Visible := True; eAgencia.Visible := True; eBulto.Visible := True; ePedido.Visible := True; eReferencia.Visible := True; eDestinatario.Visible := True; eDestinatario2.Visible := True; eDireccion.Visible := True; eDireccion2.Visible := True; line01.Visible := True; line02.Visible := True; line03.Visible := True; line04.Visible := True; end; end; begin end. " ShowProgress="False" StoreInDFM="False" OnStartReport="frxReportOnStartReport" PropData="044C65667403A90003546F70021008446174617365747301010C1D00000020446174615365744E616D653D226672784442457469717565746173220000095661726961626C65730100055374796C650100">
|
||||
<TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000"/>
|
||||
<TfrxReportPage Name="Page1" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="2,64583333333333" RightMargin="2,64583333333333" TopMargin="0" BottomMargin="0" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
|
||||
<TfrxMasterData Name="MasterData1" Height="280" Left="0" Top="16" Width="773,701287083333" OnBeforePrint="MasterData1OnBeforePrint" Columns="2" ColumnWidth="395" ColumnGap="0" DataSetName="frxDBEtiquetas" RowCount="0">
|
||||
@ -10,7 +10,7 @@
|
||||
<TfrxMemoView Name="logo2" Left="0" Top="57" Width="136" Height="26" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-7" Font.Name="Arial" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="C/Bélmez, 22 - Pol.Industrial Albarreja 28946 Fuenlabrada - Madrid Tlf. +34 916 099 394 "/>
|
||||
<TfrxMemoView Name="ePedido" Left="8" Top="230" Width="382" Height="17" ShowHint="False" AllowHTMLTags="True" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" HideZeros="True" ParentFont="False" VAlign="vaCenter" Text="PEDIDO Nº: <b>[frxDBEtiquetas."REF_PEDIDO"]</b>"/>
|
||||
<TfrxMemoView Name="eReferencia" Left="8" Top="247" Width="383" Height="30" ShowHint="False" AllowHTMLTags="True" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" HideZeros="True" ParentFont="False" VAlign="vaCenter" Text="REFERENCIA: <b>[frxDBEtiquetas."REF_CLIENTE"]</b>"/>
|
||||
<TfrxMemoView Name="eDireccion2" Left="84" Top="135" Width="308" Height="83" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Arial" Font.Style="1" HAlign="haCenter" HideZeros="True" ParentFont="False" Text="[frxDBEtiquetas."CALLE"] [frxDBEtiquetas."CODIGO_POSTAL"][frxDBEtiquetas."POBLACION"] [frxDBEtiquetas."PROVINCIA"]"/>
|
||||
<TfrxMemoView Name="eDireccion2" Left="84" Top="135" Width="308" Height="83" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Arial" Font.Style="1" HAlign="haCenter" HideZeros="True" ParentFont="False" Text="[frxDBEtiquetas."CALLE"] [frxDBEtiquetas."CODIGO_POSTAL"] [frxDBEtiquetas."POBLACION"] [frxDBEtiquetas."PROVINCIA"] [frxDBEtiquetas."PAIS"]"/>
|
||||
<TfrxMemoView Name="eDestinatario" Left="8" Top="90" Width="102" Height="13" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="DESTINATARIO:"/>
|
||||
<TfrxMemoView Name="Edireccion" Left="8" Top="135" Width="76" Height="32" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="DIRECCIÓN ENTREGA:"/>
|
||||
<TfrxLineView Name="line03" Left="11" Top="88" Width="370" Height="0" ShowHint="False" Diagonal="True"/>
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
<Projects Include="..\Contratos de cliente\Model\ContratosCliente_model.dproj" />
|
||||
<Projects Include="..\Contratos de cliente\Views\ContratosCliente_view.dproj" />
|
||||
<Projects Include="..\Facturas de cliente\Controller\FacturasCliente_controller.dproj" />
|
||||
<Projects Include="..\Facturas de cliente\Model\FacturasCliente_model.dproj" />
|
||||
<Projects Include="..\Facturas de cliente\Views\FacturasCliente_view.dproj" />
|
||||
<Projects Include="..\Relaciones\Albaranes de cliente - Facturas de cliente\AlbCli_FacCli_relation.dproj" />
|
||||
<Projects Include="..\Relaciones\Contratos de cliente - Albaranes de cliente\ConCli_AlbCli_relation.dproj" />
|
||||
@ -211,14 +212,23 @@
|
||||
<Target Name="ContratosCliente_model:Make">
|
||||
<MSBuild Projects="..\Contratos de cliente\Model\ContratosCliente_model.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="FacturasCliente_model">
|
||||
<MSBuild Projects="..\Facturas de cliente\Model\FacturasCliente_model.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="FacturasCliente_model:Clean">
|
||||
<MSBuild Projects="..\Facturas de cliente\Model\FacturasCliente_model.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="FacturasCliente_model:Make">
|
||||
<MSBuild Projects="..\Facturas de cliente\Model\FacturasCliente_model.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_view;AlbaranesCliente_model;AlbaranesCliente_data;AlbaranesCliente_controller;FacturasCliente_controller;AlbCli_FacCli_relation;AlbaranesCliente_view;AlbaranesCliente_plugin;FactuGES;FactuGES_Server;FacturasCliente_view;ContratosCliente_view;ConCli_FacCli_relation;ConCli_AlbCli_relation;ContratosCliente_controller;ContratosCliente_model" />
|
||||
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_view;AlbaranesCliente_model;AlbaranesCliente_data;AlbaranesCliente_controller;FacturasCliente_controller;AlbCli_FacCli_relation;AlbaranesCliente_view;AlbaranesCliente_plugin;FactuGES;FactuGES_Server;FacturasCliente_view;ContratosCliente_view;ConCli_FacCli_relation;ConCli_AlbCli_relation;ContratosCliente_controller;ContratosCliente_model;FacturasCliente_model" />
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_view:Clean;AlbaranesCliente_model:Clean;AlbaranesCliente_data:Clean;AlbaranesCliente_controller:Clean;FacturasCliente_controller:Clean;AlbCli_FacCli_relation:Clean;AlbaranesCliente_view:Clean;AlbaranesCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasCliente_view:Clean;ContratosCliente_view:Clean;ConCli_FacCli_relation:Clean;ConCli_AlbCli_relation:Clean;ContratosCliente_controller:Clean;ContratosCliente_model:Clean" />
|
||||
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_view:Clean;AlbaranesCliente_model:Clean;AlbaranesCliente_data:Clean;AlbaranesCliente_controller:Clean;FacturasCliente_controller:Clean;AlbCli_FacCli_relation:Clean;AlbaranesCliente_view:Clean;AlbaranesCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasCliente_view:Clean;ContratosCliente_view:Clean;ConCli_FacCli_relation:Clean;ConCli_AlbCli_relation:Clean;ContratosCliente_controller:Clean;ContratosCliente_model:Clean;FacturasCliente_model:Clean" />
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_view:Make;AlbaranesCliente_model:Make;AlbaranesCliente_data:Make;AlbaranesCliente_controller:Make;FacturasCliente_controller:Make;AlbCli_FacCli_relation:Make;AlbaranesCliente_view:Make;AlbaranesCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasCliente_view:Make;ContratosCliente_view:Make;ConCli_FacCli_relation:Make;ConCli_AlbCli_relation:Make;ContratosCliente_controller:Make;ContratosCliente_model:Make" />
|
||||
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_view:Make;AlbaranesCliente_model:Make;AlbaranesCliente_data:Make;AlbaranesCliente_controller:Make;FacturasCliente_controller:Make;AlbCli_FacCli_relation:Make;AlbaranesCliente_view:Make;AlbaranesCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasCliente_view:Make;ContratosCliente_view:Make;ConCli_FacCli_relation:Make;ConCli_AlbCli_relation:Make;ContratosCliente_controller:Make;ContratosCliente_model:Make;FacturasCliente_model:Make" />
|
||||
</Target>
|
||||
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
||||
</Project>
|
||||
@ -48,15 +48,15 @@
|
||||
<DelphiCompile Include="AlbaranesCliente_data.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\adortl.dcp" />
|
||||
<DCCReference Include="..\AlbaranesCliente_model.dcp" />
|
||||
<DCCReference Include="..\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\dbrtl.dcp" />
|
||||
<DCCReference Include="..\dsnap.dcp" />
|
||||
<DCCReference Include="..\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\rtl.dcp" />
|
||||
<DCCReference Include="..\vcl.dcp" />
|
||||
<DCCReference Include="..\vcldb.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\adortl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\AlbaranesCliente_model.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dsnap.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
|
||||
<DCCReference Include="uDataModuleAlbaranesCliente.pas">
|
||||
<Form>DataModuleAlbaranesCliente</Form>
|
||||
</DCCReference>
|
||||
|
||||
@ -321,6 +321,30 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente
|
||||
Name = 'NOTAS_ENVIO'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'PAIS'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
ServerAutoRefresh = True
|
||||
end
|
||||
item
|
||||
Name = 'PAIS_ENVIO'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
ServerAutoRefresh = True
|
||||
end
|
||||
item
|
||||
Name = 'IDIOMA_ISO'
|
||||
DataType = datString
|
||||
Size = 2
|
||||
ServerAutoRefresh = True
|
||||
end
|
||||
item
|
||||
Name = 'IDIOMA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
ServerAutoRefresh = True
|
||||
end>
|
||||
Params = <>
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
|
||||
@ -9,9 +9,9 @@ const
|
||||
{ Data table rules ids
|
||||
Feel free to change them to something more human readable
|
||||
but make sure they are unique in the context of your application }
|
||||
RID_ListaAnosAlbaranes = '{B517DFB7-B260-4DD7-B59F-D0C79D930D9A}';
|
||||
RID_AlbaranesCliente = '{FCE2B205-1ADB-4A2F-A57A-BB4978B0C22D}';
|
||||
RID_AlbaranesCliente_Detalles = '{E456B282-7E51-41D3-9214-4A96CEF784F8}';
|
||||
RID_ListaAnosAlbaranes = '{61B2D316-8F9F-495D-9278-71421234B3F2}';
|
||||
RID_AlbaranesCliente = '{27F96218-2165-463E-B495-642C0C19D7DA}';
|
||||
RID_AlbaranesCliente_Detalles = '{C23659BB-29EF-41BF-8B1A-316F63882183}';
|
||||
|
||||
{ Data table names }
|
||||
nme_ListaAnosAlbaranes = 'ListaAnosAlbaranes';
|
||||
@ -71,6 +71,10 @@ const
|
||||
fld_AlbaranesClienteID_TIENDA = 'ID_TIENDA';
|
||||
fld_AlbaranesClienteTIENDA = 'TIENDA';
|
||||
fld_AlbaranesClienteNOTAS_ENVIO = 'NOTAS_ENVIO';
|
||||
fld_AlbaranesClientePAIS = 'PAIS';
|
||||
fld_AlbaranesClientePAIS_ENVIO = 'PAIS_ENVIO';
|
||||
fld_AlbaranesClienteIDIOMA_ISO = 'IDIOMA_ISO';
|
||||
fld_AlbaranesClienteIDIOMA = 'IDIOMA';
|
||||
|
||||
{ AlbaranesCliente field indexes }
|
||||
idx_AlbaranesClienteID = 0;
|
||||
@ -119,6 +123,10 @@ const
|
||||
idx_AlbaranesClienteID_TIENDA = 43;
|
||||
idx_AlbaranesClienteTIENDA = 44;
|
||||
idx_AlbaranesClienteNOTAS_ENVIO = 45;
|
||||
idx_AlbaranesClientePAIS = 46;
|
||||
idx_AlbaranesClientePAIS_ENVIO = 47;
|
||||
idx_AlbaranesClienteIDIOMA_ISO = 48;
|
||||
idx_AlbaranesClienteIDIOMA = 49;
|
||||
|
||||
{ AlbaranesCliente_Detalles fields }
|
||||
fld_AlbaranesCliente_DetallesID = 'ID';
|
||||
@ -157,7 +165,7 @@ const
|
||||
type
|
||||
{ IListaAnosAlbaranes }
|
||||
IListaAnosAlbaranes = interface(IDAStronglyTypedDataTable)
|
||||
['{3DFD3F5E-DB3F-4FB7-9F95-80091A69254A}']
|
||||
['{EFF3928E-162E-4C73-BBCA-0E169312D7B6}']
|
||||
{ Property getters and setters }
|
||||
function GetANOValue: String;
|
||||
procedure SetANOValue(const aValue: String);
|
||||
@ -192,7 +200,7 @@ type
|
||||
|
||||
{ IAlbaranesCliente }
|
||||
IAlbaranesCliente = interface(IDAStronglyTypedDataTable)
|
||||
['{C45B8E2D-036A-48F5-BE78-0E9922D58F85}']
|
||||
['{E2C95ABE-86CA-400D-86DB-44B64F7BB1EE}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -376,6 +384,22 @@ type
|
||||
procedure SetNOTAS_ENVIOValue(const aValue: String);
|
||||
function GetNOTAS_ENVIOIsNull: Boolean;
|
||||
procedure SetNOTAS_ENVIOIsNull(const aValue: Boolean);
|
||||
function GetPAISValue: String;
|
||||
procedure SetPAISValue(const aValue: String);
|
||||
function GetPAISIsNull: Boolean;
|
||||
procedure SetPAISIsNull(const aValue: Boolean);
|
||||
function GetPAIS_ENVIOValue: String;
|
||||
procedure SetPAIS_ENVIOValue(const aValue: String);
|
||||
function GetPAIS_ENVIOIsNull: Boolean;
|
||||
procedure SetPAIS_ENVIOIsNull(const aValue: Boolean);
|
||||
function GetIDIOMA_ISOValue: String;
|
||||
procedure SetIDIOMA_ISOValue(const aValue: String);
|
||||
function GetIDIOMA_ISOIsNull: Boolean;
|
||||
procedure SetIDIOMA_ISOIsNull(const aValue: Boolean);
|
||||
function GetIDIOMAValue: String;
|
||||
procedure SetIDIOMAValue(const aValue: String);
|
||||
function GetIDIOMAIsNull: Boolean;
|
||||
procedure SetIDIOMAIsNull(const aValue: Boolean);
|
||||
|
||||
|
||||
{ Properties }
|
||||
@ -471,6 +495,14 @@ type
|
||||
property TIENDAIsNull: Boolean read GetTIENDAIsNull write SetTIENDAIsNull;
|
||||
property NOTAS_ENVIO: String read GetNOTAS_ENVIOValue write SetNOTAS_ENVIOValue;
|
||||
property NOTAS_ENVIOIsNull: Boolean read GetNOTAS_ENVIOIsNull write SetNOTAS_ENVIOIsNull;
|
||||
property PAIS: String read GetPAISValue write SetPAISValue;
|
||||
property PAISIsNull: Boolean read GetPAISIsNull write SetPAISIsNull;
|
||||
property PAIS_ENVIO: String read GetPAIS_ENVIOValue write SetPAIS_ENVIOValue;
|
||||
property PAIS_ENVIOIsNull: Boolean read GetPAIS_ENVIOIsNull write SetPAIS_ENVIOIsNull;
|
||||
property IDIOMA_ISO: String read GetIDIOMA_ISOValue write SetIDIOMA_ISOValue;
|
||||
property IDIOMA_ISOIsNull: Boolean read GetIDIOMA_ISOIsNull write SetIDIOMA_ISOIsNull;
|
||||
property IDIOMA: String read GetIDIOMAValue write SetIDIOMAValue;
|
||||
property IDIOMAIsNull: Boolean read GetIDIOMAIsNull write SetIDIOMAIsNull;
|
||||
end;
|
||||
|
||||
{ TAlbaranesClienteDataTableRules }
|
||||
@ -664,6 +696,22 @@ type
|
||||
procedure SetNOTAS_ENVIOValue(const aValue: String); virtual;
|
||||
function GetNOTAS_ENVIOIsNull: Boolean; virtual;
|
||||
procedure SetNOTAS_ENVIOIsNull(const aValue: Boolean); virtual;
|
||||
function GetPAISValue: String; virtual;
|
||||
procedure SetPAISValue(const aValue: String); virtual;
|
||||
function GetPAISIsNull: Boolean; virtual;
|
||||
procedure SetPAISIsNull(const aValue: Boolean); virtual;
|
||||
function GetPAIS_ENVIOValue: String; virtual;
|
||||
procedure SetPAIS_ENVIOValue(const aValue: String); virtual;
|
||||
function GetPAIS_ENVIOIsNull: Boolean; virtual;
|
||||
procedure SetPAIS_ENVIOIsNull(const aValue: Boolean); virtual;
|
||||
function GetIDIOMA_ISOValue: String; virtual;
|
||||
procedure SetIDIOMA_ISOValue(const aValue: String); virtual;
|
||||
function GetIDIOMA_ISOIsNull: Boolean; virtual;
|
||||
procedure SetIDIOMA_ISOIsNull(const aValue: Boolean); virtual;
|
||||
function GetIDIOMAValue: String; virtual;
|
||||
procedure SetIDIOMAValue(const aValue: String); virtual;
|
||||
function GetIDIOMAIsNull: Boolean; virtual;
|
||||
procedure SetIDIOMAIsNull(const aValue: Boolean); virtual;
|
||||
|
||||
{ Properties }
|
||||
property ID: Integer read GetIDValue write SetIDValue;
|
||||
@ -758,6 +806,14 @@ type
|
||||
property TIENDAIsNull: Boolean read GetTIENDAIsNull write SetTIENDAIsNull;
|
||||
property NOTAS_ENVIO: String read GetNOTAS_ENVIOValue write SetNOTAS_ENVIOValue;
|
||||
property NOTAS_ENVIOIsNull: Boolean read GetNOTAS_ENVIOIsNull write SetNOTAS_ENVIOIsNull;
|
||||
property PAIS: String read GetPAISValue write SetPAISValue;
|
||||
property PAISIsNull: Boolean read GetPAISIsNull write SetPAISIsNull;
|
||||
property PAIS_ENVIO: String read GetPAIS_ENVIOValue write SetPAIS_ENVIOValue;
|
||||
property PAIS_ENVIOIsNull: Boolean read GetPAIS_ENVIOIsNull write SetPAIS_ENVIOIsNull;
|
||||
property IDIOMA_ISO: String read GetIDIOMA_ISOValue write SetIDIOMA_ISOValue;
|
||||
property IDIOMA_ISOIsNull: Boolean read GetIDIOMA_ISOIsNull write SetIDIOMA_ISOIsNull;
|
||||
property IDIOMA: String read GetIDIOMAValue write SetIDIOMAValue;
|
||||
property IDIOMAIsNull: Boolean read GetIDIOMAIsNull write SetIDIOMAIsNull;
|
||||
|
||||
public
|
||||
constructor Create(aDataTable: TDADataTable); override;
|
||||
@ -767,7 +823,7 @@ type
|
||||
|
||||
{ IAlbaranesCliente_Detalles }
|
||||
IAlbaranesCliente_Detalles = interface(IDAStronglyTypedDataTable)
|
||||
['{40165756-12BF-4C0D-8107-BEE438314BC2}']
|
||||
['{55BD370E-59E9-4354-86EB-BA9418DFA316}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -1994,6 +2050,90 @@ begin
|
||||
DataTable.Fields[idx_AlbaranesClienteNOTAS_ENVIO].AsVariant := Null;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteDataTableRules.GetPAISValue: String;
|
||||
begin
|
||||
result := DataTable.Fields[idx_AlbaranesClientePAIS].AsString;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteDataTableRules.SetPAISValue(const aValue: String);
|
||||
begin
|
||||
DataTable.Fields[idx_AlbaranesClientePAIS].AsString := aValue;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteDataTableRules.GetPAISIsNull: boolean;
|
||||
begin
|
||||
result := DataTable.Fields[idx_AlbaranesClientePAIS].IsNull;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteDataTableRules.SetPAISIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
DataTable.Fields[idx_AlbaranesClientePAIS].AsVariant := Null;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteDataTableRules.GetPAIS_ENVIOValue: String;
|
||||
begin
|
||||
result := DataTable.Fields[idx_AlbaranesClientePAIS_ENVIO].AsString;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteDataTableRules.SetPAIS_ENVIOValue(const aValue: String);
|
||||
begin
|
||||
DataTable.Fields[idx_AlbaranesClientePAIS_ENVIO].AsString := aValue;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteDataTableRules.GetPAIS_ENVIOIsNull: boolean;
|
||||
begin
|
||||
result := DataTable.Fields[idx_AlbaranesClientePAIS_ENVIO].IsNull;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteDataTableRules.SetPAIS_ENVIOIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
DataTable.Fields[idx_AlbaranesClientePAIS_ENVIO].AsVariant := Null;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteDataTableRules.GetIDIOMA_ISOValue: String;
|
||||
begin
|
||||
result := DataTable.Fields[idx_AlbaranesClienteIDIOMA_ISO].AsString;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteDataTableRules.SetIDIOMA_ISOValue(const aValue: String);
|
||||
begin
|
||||
DataTable.Fields[idx_AlbaranesClienteIDIOMA_ISO].AsString := aValue;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteDataTableRules.GetIDIOMA_ISOIsNull: boolean;
|
||||
begin
|
||||
result := DataTable.Fields[idx_AlbaranesClienteIDIOMA_ISO].IsNull;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteDataTableRules.SetIDIOMA_ISOIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
DataTable.Fields[idx_AlbaranesClienteIDIOMA_ISO].AsVariant := Null;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteDataTableRules.GetIDIOMAValue: String;
|
||||
begin
|
||||
result := DataTable.Fields[idx_AlbaranesClienteIDIOMA].AsString;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteDataTableRules.SetIDIOMAValue(const aValue: String);
|
||||
begin
|
||||
DataTable.Fields[idx_AlbaranesClienteIDIOMA].AsString := aValue;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteDataTableRules.GetIDIOMAIsNull: boolean;
|
||||
begin
|
||||
result := DataTable.Fields[idx_AlbaranesClienteIDIOMA].IsNull;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteDataTableRules.SetIDIOMAIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
DataTable.Fields[idx_AlbaranesClienteIDIOMA].AsVariant := Null;
|
||||
end;
|
||||
|
||||
|
||||
{ TAlbaranesCliente_DetallesDataTableRules }
|
||||
constructor TAlbaranesCliente_DetallesDataTableRules.Create(aDataTable: TDADataTable);
|
||||
|
||||
@ -9,14 +9,14 @@ const
|
||||
{ Delta rules ids
|
||||
Feel free to change them to something more human readable
|
||||
but make sure they are unique in the context of your application }
|
||||
RID_ListaAnosAlbaranesDelta = '{0B01B3F1-FD0A-41E2-9AC8-DF2FE6427AC9}';
|
||||
RID_AlbaranesClienteDelta = '{15937719-1382-4F28-B013-5ED650D7FD2B}';
|
||||
RID_AlbaranesCliente_DetallesDelta = '{6E38A603-223E-4266-AB5E-8ECFB13DFFC3}';
|
||||
RID_ListaAnosAlbaranesDelta = '{71958837-EE5B-49A7-B55E-8E4632400C97}';
|
||||
RID_AlbaranesClienteDelta = '{55A9D339-9DAE-4A16-ADBF-D4A22BB1CDCB}';
|
||||
RID_AlbaranesCliente_DetallesDelta = '{34014D71-6E3C-4D68-A04E-CE44C8433129}';
|
||||
|
||||
type
|
||||
{ IListaAnosAlbaranesDelta }
|
||||
IListaAnosAlbaranesDelta = interface(IListaAnosAlbaranes)
|
||||
['{0B01B3F1-FD0A-41E2-9AC8-DF2FE6427AC9}']
|
||||
['{71958837-EE5B-49A7-B55E-8E4632400C97}']
|
||||
{ Property getters and setters }
|
||||
function GetOldANOValue : String;
|
||||
|
||||
@ -50,7 +50,7 @@ type
|
||||
|
||||
{ IAlbaranesClienteDelta }
|
||||
IAlbaranesClienteDelta = interface(IAlbaranesCliente)
|
||||
['{15937719-1382-4F28-B013-5ED650D7FD2B}']
|
||||
['{55A9D339-9DAE-4A16-ADBF-D4A22BB1CDCB}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldID_EMPRESAValue : Integer;
|
||||
@ -98,6 +98,10 @@ type
|
||||
function GetOldID_TIENDAValue : Integer;
|
||||
function GetOldTIENDAValue : String;
|
||||
function GetOldNOTAS_ENVIOValue : String;
|
||||
function GetOldPAISValue : String;
|
||||
function GetOldPAIS_ENVIOValue : String;
|
||||
function GetOldIDIOMA_ISOValue : String;
|
||||
function GetOldIDIOMAValue : String;
|
||||
|
||||
{ Properties }
|
||||
property OldID : Integer read GetOldIDValue;
|
||||
@ -146,6 +150,10 @@ type
|
||||
property OldID_TIENDA : Integer read GetOldID_TIENDAValue;
|
||||
property OldTIENDA : String read GetOldTIENDAValue;
|
||||
property OldNOTAS_ENVIO : String read GetOldNOTAS_ENVIOValue;
|
||||
property OldPAIS : String read GetOldPAISValue;
|
||||
property OldPAIS_ENVIO : String read GetOldPAIS_ENVIOValue;
|
||||
property OldIDIOMA_ISO : String read GetOldIDIOMA_ISOValue;
|
||||
property OldIDIOMA : String read GetOldIDIOMAValue;
|
||||
end;
|
||||
|
||||
{ TAlbaranesClienteBusinessProcessorRules }
|
||||
@ -431,6 +439,30 @@ type
|
||||
function GetOldNOTAS_ENVIOIsNull: Boolean; virtual;
|
||||
procedure SetNOTAS_ENVIOValue(const aValue: String); virtual;
|
||||
procedure SetNOTAS_ENVIOIsNull(const aValue: Boolean); virtual;
|
||||
function GetPAISValue: String; virtual;
|
||||
function GetPAISIsNull: Boolean; virtual;
|
||||
function GetOldPAISValue: String; virtual;
|
||||
function GetOldPAISIsNull: Boolean; virtual;
|
||||
procedure SetPAISValue(const aValue: String); virtual;
|
||||
procedure SetPAISIsNull(const aValue: Boolean); virtual;
|
||||
function GetPAIS_ENVIOValue: String; virtual;
|
||||
function GetPAIS_ENVIOIsNull: Boolean; virtual;
|
||||
function GetOldPAIS_ENVIOValue: String; virtual;
|
||||
function GetOldPAIS_ENVIOIsNull: Boolean; virtual;
|
||||
procedure SetPAIS_ENVIOValue(const aValue: String); virtual;
|
||||
procedure SetPAIS_ENVIOIsNull(const aValue: Boolean); virtual;
|
||||
function GetIDIOMA_ISOValue: String; virtual;
|
||||
function GetIDIOMA_ISOIsNull: Boolean; virtual;
|
||||
function GetOldIDIOMA_ISOValue: String; virtual;
|
||||
function GetOldIDIOMA_ISOIsNull: Boolean; virtual;
|
||||
procedure SetIDIOMA_ISOValue(const aValue: String); virtual;
|
||||
procedure SetIDIOMA_ISOIsNull(const aValue: Boolean); virtual;
|
||||
function GetIDIOMAValue: String; virtual;
|
||||
function GetIDIOMAIsNull: Boolean; virtual;
|
||||
function GetOldIDIOMAValue: String; virtual;
|
||||
function GetOldIDIOMAIsNull: Boolean; virtual;
|
||||
procedure SetIDIOMAValue(const aValue: String); virtual;
|
||||
procedure SetIDIOMAIsNull(const aValue: Boolean); virtual;
|
||||
|
||||
{ Properties }
|
||||
property ID : Integer read GetIDValue write SetIDValue;
|
||||
@ -617,6 +649,22 @@ type
|
||||
property NOTAS_ENVIOIsNull : Boolean read GetNOTAS_ENVIOIsNull write SetNOTAS_ENVIOIsNull;
|
||||
property OldNOTAS_ENVIO : String read GetOldNOTAS_ENVIOValue;
|
||||
property OldNOTAS_ENVIOIsNull : Boolean read GetOldNOTAS_ENVIOIsNull;
|
||||
property PAIS : String read GetPAISValue write SetPAISValue;
|
||||
property PAISIsNull : Boolean read GetPAISIsNull write SetPAISIsNull;
|
||||
property OldPAIS : String read GetOldPAISValue;
|
||||
property OldPAISIsNull : Boolean read GetOldPAISIsNull;
|
||||
property PAIS_ENVIO : String read GetPAIS_ENVIOValue write SetPAIS_ENVIOValue;
|
||||
property PAIS_ENVIOIsNull : Boolean read GetPAIS_ENVIOIsNull write SetPAIS_ENVIOIsNull;
|
||||
property OldPAIS_ENVIO : String read GetOldPAIS_ENVIOValue;
|
||||
property OldPAIS_ENVIOIsNull : Boolean read GetOldPAIS_ENVIOIsNull;
|
||||
property IDIOMA_ISO : String read GetIDIOMA_ISOValue write SetIDIOMA_ISOValue;
|
||||
property IDIOMA_ISOIsNull : Boolean read GetIDIOMA_ISOIsNull write SetIDIOMA_ISOIsNull;
|
||||
property OldIDIOMA_ISO : String read GetOldIDIOMA_ISOValue;
|
||||
property OldIDIOMA_ISOIsNull : Boolean read GetOldIDIOMA_ISOIsNull;
|
||||
property IDIOMA : String read GetIDIOMAValue write SetIDIOMAValue;
|
||||
property IDIOMAIsNull : Boolean read GetIDIOMAIsNull write SetIDIOMAIsNull;
|
||||
property OldIDIOMA : String read GetOldIDIOMAValue;
|
||||
property OldIDIOMAIsNull : Boolean read GetOldIDIOMAIsNull;
|
||||
|
||||
public
|
||||
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
|
||||
@ -626,7 +674,7 @@ type
|
||||
|
||||
{ IAlbaranesCliente_DetallesDelta }
|
||||
IAlbaranesCliente_DetallesDelta = interface(IAlbaranesCliente_Detalles)
|
||||
['{6E38A603-223E-4266-AB5E-8ECFB13DFFC3}']
|
||||
['{34014D71-6E3C-4D68-A04E-CE44C8433129}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldID_ALBARANValue : Integer;
|
||||
@ -2325,6 +2373,130 @@ begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteNOTAS_ENVIO] := Null;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetPAISValue: String;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClientePAIS];
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetPAISIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClientePAIS]);
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetOldPAISValue: String;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClientePAIS];
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetOldPAISIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClientePAIS]);
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteBusinessProcessorRules.SetPAISValue(const aValue: String);
|
||||
begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClientePAIS] := aValue;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteBusinessProcessorRules.SetPAISIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClientePAIS] := Null;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetPAIS_ENVIOValue: String;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClientePAIS_ENVIO];
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetPAIS_ENVIOIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClientePAIS_ENVIO]);
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetOldPAIS_ENVIOValue: String;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClientePAIS_ENVIO];
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetOldPAIS_ENVIOIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClientePAIS_ENVIO]);
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteBusinessProcessorRules.SetPAIS_ENVIOValue(const aValue: String);
|
||||
begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClientePAIS_ENVIO] := aValue;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteBusinessProcessorRules.SetPAIS_ENVIOIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClientePAIS_ENVIO] := Null;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetIDIOMA_ISOValue: String;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteIDIOMA_ISO];
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetIDIOMA_ISOIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteIDIOMA_ISO]);
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetOldIDIOMA_ISOValue: String;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteIDIOMA_ISO];
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetOldIDIOMA_ISOIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteIDIOMA_ISO]);
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteBusinessProcessorRules.SetIDIOMA_ISOValue(const aValue: String);
|
||||
begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteIDIOMA_ISO] := aValue;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteBusinessProcessorRules.SetIDIOMA_ISOIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteIDIOMA_ISO] := Null;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetIDIOMAValue: String;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteIDIOMA];
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetIDIOMAIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteIDIOMA]);
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetOldIDIOMAValue: String;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteIDIOMA];
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteBusinessProcessorRules.GetOldIDIOMAIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteIDIOMA]);
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteBusinessProcessorRules.SetIDIOMAValue(const aValue: String);
|
||||
begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteIDIOMA] := aValue;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteBusinessProcessorRules.SetIDIOMAIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteIDIOMA] := Null;
|
||||
end;
|
||||
|
||||
|
||||
{ TAlbaranesCliente_DetallesBusinessProcessorRules }
|
||||
constructor TAlbaranesCliente_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
|
||||
|
||||
@ -252,6 +252,7 @@ begin
|
||||
POBLACION := FCliente.POBLACION;
|
||||
CODIGO_POSTAL := FCliente.CODIGO_POSTAL;
|
||||
PROVINCIA := FCliente.PROVINCIA;
|
||||
PAIS := FCliente.PAIS;
|
||||
PERSONA_CONTACTO := FCliente.NOMBRE;
|
||||
TELEFONO := FCliente.TELEFONO_1;
|
||||
|
||||
|
||||
@ -78,6 +78,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'PAIS_FISCAL'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CODIGO_POSTAL_FISCAL'
|
||||
DataType = datString
|
||||
@ -108,6 +113,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'PAIS'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CODIGO_POSTAL'
|
||||
DataType = datString
|
||||
@ -229,6 +239,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
Name = 'PAGINA_WEB_EMPRESA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'IDIOMA_ISO'
|
||||
DataType = datString
|
||||
Size = 2
|
||||
end>
|
||||
Params = <
|
||||
item
|
||||
@ -377,33 +392,34 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
'ANES_CLIENTE.REFERENCIA_CLIENTE,'#10' CONTACTOS.NIF_CIF,'#10' ALBARANE' +
|
||||
'S_CLIENTE.FECHA_ALBARAN,'#10' ALBARANES_CLIENTE.REFERENCIA,'#10' CONTA' +
|
||||
'CTOS.CALLE AS CALLE_FISCAL,'#10' CONTACTOS.POBLACION AS POBLACION_F' +
|
||||
'ISCAL,'#10' CONTACTOS.PROVINCIA AS PROVINCIA_FISCAL,'#10' CONTACTOS.CO' +
|
||||
'DIGO_POSTAL AS CODIGO_POSTAL_FISCAL,'#10' CONTACTOS.TELEFONO_1 AS T' +
|
||||
'ELEFONO_POSTAL_FISCAL,'#10' CONTACTOS.MOVIL_1 AS MOVIL_FISCAL,'#10' AL' +
|
||||
'BARANES_CLIENTE.CALLE,'#10' ALBARANES_CLIENTE.POBLACION,'#10' ALBARANE' +
|
||||
'S_CLIENTE.PROVINCIA,'#10' ALBARANES_CLIENTE.CODIGO_POSTAL,'#10' ALBARA' +
|
||||
'NES_CLIENTE.TELEFONO,'#10' ALBARANES_CLIENTE.MOVIL,'#10' ALBARANES_CLI' +
|
||||
'ENTE.PERSONA_CONTACTO,'#10' ALBARANES_CLIENTE.NOTAS_ENVIO,'#10' ALBARA' +
|
||||
'NES_CLIENTE.OBSERVACIONES,'#10' ALBARANES_CLIENTE.IMPORTE_NETO,'#10' A' +
|
||||
'LBARANES_CLIENTE.DESCUENTO,'#10' ALBARANES_CLIENTE.IMPORTE_DESCUENT' +
|
||||
'O,'#10' ALBARANES_CLIENTE.BASE_IMPONIBLE,'#10' ALBARANES_CLIENTE.IMPOR' +
|
||||
'TE_TOTAL,'#10' ALBARANES_CLIENTE.FECHA_PREVISTA_ENVIO,'#10' CONTRATOS_' +
|
||||
'CLIENTE.REFERENCIA AS REF_CONTRATO,'#10' CONTRATOS_CLIENTE.FECHA_CO' +
|
||||
'NTRATO,'#10' EMPRESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10' EMPRESAS.NOMBRE' +
|
||||
' AS NOMBRE_EMPRESA,'#10' EMPRESAS.RAZON_SOCIAL AS RAZON_SOCIAL_EMPR' +
|
||||
'ESA,'#10' EMPRESAS.CALLE AS CALLE_EMPRESA,'#10' EMPRESAS.CODIGO_POSTAL' +
|
||||
' AS CODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.POBLACION AS POBLACION_EMP' +
|
||||
'RESA,'#10' EMPRESAS.PROVINCIA AS PROVINCIA_EMPRESA,'#10' EMPRESAS.TELE' +
|
||||
'FONO_1 AS TELEFONO_1_EMPRESA,'#10' EMPRESAS.FAX AS FAX_EMPRESA,'#10' E' +
|
||||
'MPRESAS.MOVIL_1 AS MOVIL_1_EMPRESA,'#10' EMPRESAS.EMAIL_1 AS EMAIL_' +
|
||||
'1_EMPRESA,'#10' EMPRESAS.PAGINA_WEB AS PAGINA_WEB_EMPRESA'#10'FROM'#10' AL' +
|
||||
'BARANES_CLIENTE'#10' INNER JOIN EMPRESAS ON (EMPRESAS.ID = ALBARANE' +
|
||||
'S_CLIENTE.ID_EMPRESA)'#10' INNER JOIN CONTACTOS ON (CONTACTOS.ID = ' +
|
||||
'ALBARANES_CLIENTE.ID_CLIENTE)'#10' LEFT OUTER JOIN CONTRATOS_CLIENT' +
|
||||
'E ON (CONTRATOS_CLIENTE.ID = ALBARANES_CLIENTE.ID_PEDIDO)'#10'/* LE' +
|
||||
'FT OUTER JOIN CONTACTOS_DIRECCIONES ON (CONTACTOS_DIRECCIONES.ID' +
|
||||
' = ALBARANES_CLIENTE.ID_DIRECCION)*/'#10'WHERE ALBARANES_CLIENTE.ID ' +
|
||||
'= :ID'#10
|
||||
'ISCAL,'#10' CONTACTOS.PROVINCIA AS PROVINCIA_FISCAL,'#10' CONTACTOS.PA' +
|
||||
'IS AS PAIS_FISCAL,'#10' CONTACTOS.CODIGO_POSTAL AS CODIGO_POSTAL_FI' +
|
||||
'SCAL,'#10' CONTACTOS.TELEFONO_1 AS TELEFONO_POSTAL_FISCAL,'#10' CONTAC' +
|
||||
'TOS.MOVIL_1 AS MOVIL_FISCAL,'#10' ALBARANES_CLIENTE.CALLE,'#10' ALBARA' +
|
||||
'NES_CLIENTE.POBLACION,'#10' ALBARANES_CLIENTE.PROVINCIA,'#10' ALBARANE' +
|
||||
'S_CLIENTE.PAIS,'#10' ALBARANES_CLIENTE.CODIGO_POSTAL,'#10' ALBARANES_C' +
|
||||
'LIENTE.TELEFONO,'#10' ALBARANES_CLIENTE.MOVIL,'#10' ALBARANES_CLIENTE.' +
|
||||
'PERSONA_CONTACTO,'#10' ALBARANES_CLIENTE.NOTAS_ENVIO,'#10' ALBARANES_C' +
|
||||
'LIENTE.OBSERVACIONES,'#10' ALBARANES_CLIENTE.IMPORTE_NETO,'#10' ALBARA' +
|
||||
'NES_CLIENTE.DESCUENTO,'#10' ALBARANES_CLIENTE.IMPORTE_DESCUENTO,'#10' ' +
|
||||
'ALBARANES_CLIENTE.BASE_IMPONIBLE,'#10' ALBARANES_CLIENTE.IMPORTE_TO' +
|
||||
'TAL,'#10' ALBARANES_CLIENTE.FECHA_PREVISTA_ENVIO,'#10' CONTRATOS_CLIEN' +
|
||||
'TE.REFERENCIA AS REF_CONTRATO,'#10' CONTRATOS_CLIENTE.FECHA_CONTRAT' +
|
||||
'O,'#10' EMPRESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10' EMPRESAS.NOMBRE AS N' +
|
||||
'OMBRE_EMPRESA,'#10' EMPRESAS.RAZON_SOCIAL AS RAZON_SOCIAL_EMPRESA,'#10 +
|
||||
' EMPRESAS.CALLE AS CALLE_EMPRESA,'#10' EMPRESAS.CODIGO_POSTAL AS C' +
|
||||
'ODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.POBLACION AS POBLACION_EMPRESA,' +
|
||||
#10' EMPRESAS.PROVINCIA AS PROVINCIA_EMPRESA,'#10' EMPRESAS.TELEFONO_' +
|
||||
'1 AS TELEFONO_1_EMPRESA,'#10' EMPRESAS.FAX AS FAX_EMPRESA,'#10' EMPRES' +
|
||||
'AS.MOVIL_1 AS MOVIL_1_EMPRESA,'#10' EMPRESAS.EMAIL_1 AS EMAIL_1_EMP' +
|
||||
'RESA,'#10' EMPRESAS.PAGINA_WEB AS PAGINA_WEB_EMPRESA,'#10' ALBARANES_C' +
|
||||
'LIENTE.IDIOMA_ISO'#10'FROM'#10' ALBARANES_CLIENTE'#10' INNER JOIN EMPRESAS' +
|
||||
' ON (EMPRESAS.ID = ALBARANES_CLIENTE.ID_EMPRESA)'#10' INNER JOIN CO' +
|
||||
'NTACTOS ON (CONTACTOS.ID = ALBARANES_CLIENTE.ID_CLIENTE)'#10' LEFT ' +
|
||||
'OUTER JOIN CONTRATOS_CLIENTE ON (CONTRATOS_CLIENTE.ID = ALBARANE' +
|
||||
'S_CLIENTE.ID_PEDIDO)'#10'/* LEFT OUTER JOIN CONTACTOS_DIRECCIONES O' +
|
||||
'N (CONTACTOS_DIRECCIONES.ID = ALBARANES_CLIENTE.ID_DIRECCION)*/'#10 +
|
||||
'WHERE ALBARANES_CLIENTE.ID = :ID'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
@ -596,6 +612,19 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
item
|
||||
DatasetField = 'NOTAS_ENVIO'
|
||||
TableField = 'NOTAS_ENVIO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'PAIS_FISCAL'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'PAIS_FISCAL'
|
||||
end
|
||||
item
|
||||
DatasetField = 'PAIS'
|
||||
TableField = 'PAIS'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IDIOMA_ISO'
|
||||
TableField = 'IDIOMA_ISO'
|
||||
end>
|
||||
end>
|
||||
Name = 'Informe_Cabecera'
|
||||
@ -660,6 +689,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'PAIS_FISCAL'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CODIGO_POSTAL_FISCAL'
|
||||
DataType = datString
|
||||
@ -690,6 +724,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'PAIS'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CODIGO_POSTAL'
|
||||
DataType = datString
|
||||
@ -811,6 +850,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
Name = 'PAGINA_WEB_EMPRESA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'IDIOMA_ISO'
|
||||
DataType = datString
|
||||
Size = 2
|
||||
end>
|
||||
end
|
||||
item
|
||||
|
||||
@ -231,6 +231,22 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
|
||||
item
|
||||
DatasetField = 'NOTAS_ENVIO'
|
||||
TableField = 'NOTAS_ENVIO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'PAIS'
|
||||
TableField = 'PAIS'
|
||||
end
|
||||
item
|
||||
DatasetField = 'PAIS_ENVIO'
|
||||
TableField = 'PAIS_ENVIO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IDIOMA_ISO'
|
||||
TableField = 'IDIOMA_ISO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IDIOMA'
|
||||
TableField = 'IDIOMA'
|
||||
end>
|
||||
end>
|
||||
Name = 'AlbaranesCliente'
|
||||
@ -490,6 +506,30 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
|
||||
Name = 'NOTAS_ENVIO'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'PAIS'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
ServerAutoRefresh = True
|
||||
end
|
||||
item
|
||||
Name = 'PAIS_ENVIO'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
ServerAutoRefresh = True
|
||||
end
|
||||
item
|
||||
Name = 'IDIOMA_ISO'
|
||||
DataType = datString
|
||||
Size = 2
|
||||
ServerAutoRefresh = True
|
||||
end
|
||||
item
|
||||
Name = 'IDIOMA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
ServerAutoRefresh = True
|
||||
end>
|
||||
end
|
||||
item
|
||||
@ -862,6 +902,24 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PAIS'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PAIS_ENVIO'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'IDIOMA_ISO'
|
||||
DataType = datString
|
||||
Size = 2
|
||||
Value = ''
|
||||
end>
|
||||
Statements = <
|
||||
item
|
||||
@ -877,17 +935,18 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
|
||||
' BASE_IMPONIBLE, IVA, IMPORTE_IVA, IMPORTE_TOTAL, OBSERVACIO' +
|
||||
'NES, '#10' INCIDENCIAS, INCIDENCIAS_ACTIVAS, FECHA_ALTA, FECHA_M' +
|
||||
'ODIFICACION, '#10' USUARIO, ID_FORMA_PAGO, FECHA_PREVISTA_ENVIO,' +
|
||||
' FECHA_ENVIO, '#10' FECHA_RECEPCION, ID_TIENDA, NOTAS_ENVIO)'#10' V' +
|
||||
'ALUES'#10' (:ID, :ID_EMPRESA, :ID_CLIENTE, :FECHA_ALBARAN, :TIPO,' +
|
||||
' :REFERENCIA,'#10' :REFERENCIA_CLIENTE, :ID_ALMACEN, :ID_PEDIDO,' +
|
||||
' :ID_FACTURA, :ID_DIRECCION,'#10' :CALLE, :CODIGO_POSTAL, :POBLA' +
|
||||
'CION, :PROVINCIA, :PERSONA_CONTACTO,'#10' :TELEFONO, :MOVIL, :IM' +
|
||||
'PORTE_NETO, :IMPORTE_PORTE, :DESCUENTO, :IMPORTE_DESCUENTO,'#10' ' +
|
||||
' :BASE_IMPONIBLE, :IVA, :IMPORTE_IVA, :IMPORTE_TOTAL, :OBSERVACI' +
|
||||
'ONES,'#10' :INCIDENCIAS, :INCIDENCIAS_ACTIVAS, CURRENT_TIMESTAMP' +
|
||||
', :FECHA_MODIFICACION,'#10' :USUARIO, :ID_FORMA_PAGO, :FECHA_PRE' +
|
||||
'VISTA_ENVIO, :FECHA_ENVIO, :FECHA_RECEPCION,'#10' :ID_TIENDA, :N' +
|
||||
'OTAS_ENVIO)'#10' '#10' '#10#10
|
||||
' FECHA_ENVIO, '#10' FECHA_RECEPCION, ID_TIENDA, NOTAS_ENVIO, PAI' +
|
||||
'S, PAIS_ENVIO, IDIOMA_ISO)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :ID_C' +
|
||||
'LIENTE, :FECHA_ALBARAN, :TIPO, :REFERENCIA,'#10' :REFERENCIA_CLI' +
|
||||
'ENTE, :ID_ALMACEN, :ID_PEDIDO, :ID_FACTURA, :ID_DIRECCION,'#10' ' +
|
||||
':CALLE, :CODIGO_POSTAL, :POBLACION, :PROVINCIA, :PERSONA_CONTACT' +
|
||||
'O,'#10' :TELEFONO, :MOVIL, :IMPORTE_NETO, :IMPORTE_PORTE, :DESCU' +
|
||||
'ENTO, :IMPORTE_DESCUENTO,'#10' :BASE_IMPONIBLE, :IVA, :IMPORTE_I' +
|
||||
'VA, :IMPORTE_TOTAL, :OBSERVACIONES,'#10' :INCIDENCIAS, :INCIDENC' +
|
||||
'IAS_ACTIVAS, CURRENT_TIMESTAMP, :FECHA_MODIFICACION,'#10' :USUAR' +
|
||||
'IO, :ID_FORMA_PAGO, :FECHA_PREVISTA_ENVIO, :FECHA_ENVIO, :FECHA_' +
|
||||
'RECEPCION,'#10' :ID_TIENDA, :NOTAS_ENVIO, :PAIS, :PAIS_ENVIO, :I' +
|
||||
'DIOMA_ISO)'#10' '#10' '#10#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
@ -1099,6 +1158,24 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PAIS'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PAIS_ENVIO'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'IDIOMA_ISO'
|
||||
DataType = datString
|
||||
Size = 2
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'OLD_ID'
|
||||
Value = ''
|
||||
@ -1128,7 +1205,8 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
|
||||
'_PAGO = :ID_FORMA_PAGO, '#10' FECHA_PREVISTA_ENVIO = :FECHA_PREVI' +
|
||||
'STA_ENVIO, '#10' FECHA_ENVIO = :FECHA_ENVIO, '#10' FECHA_RECEPCION' +
|
||||
' = :FECHA_RECEPCION,'#10' ID_TIENDA = :ID_TIENDA,'#10' NOTAS_ENVIO' +
|
||||
' = :NOTAS_ENVIO'#10' WHERE'#10' (ID = :OLD_ID)'#10
|
||||
' = :NOTAS_ENVIO,'#10' PAIS = :PAIS,'#10' PAIS_ENVIO = :PAIS_ENVIO,' +
|
||||
#10' IDIOMA_ISO = :IDIOMA_ISO'#10' WHERE'#10' (ID = :OLD_ID)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
|
||||
@ -2,7 +2,6 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
Caption = 'Lista de albaranes de cliente'
|
||||
ClientWidth = 899
|
||||
ExplicitWidth = 907
|
||||
ExplicitHeight = 482
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
@ -130,7 +129,7 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
end
|
||||
end
|
||||
inherited tbxFiltro: TTBXToolbar
|
||||
ExplicitWidth = 454
|
||||
ExplicitWidth = 379
|
||||
inherited lblAno: TTBXLabelItem
|
||||
Visible = True
|
||||
end
|
||||
@ -149,7 +148,7 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
DockPos = 460
|
||||
Visible = True
|
||||
ExplicitLeft = 460
|
||||
ExplicitWidth = 271
|
||||
ExplicitWidth = 322
|
||||
object TBXItem42: TTBXItem
|
||||
Action = actEnviar
|
||||
DisplayMode = nbdmImageAndText
|
||||
@ -167,9 +166,11 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
object TBXSeparatorItem19: TTBXSeparatorItem
|
||||
end
|
||||
object TBXItem45: TTBXItem
|
||||
Action = actGenerarFactura
|
||||
Action = actGenerarFacturaProforma
|
||||
DisplayMode = nbdmImageAndText
|
||||
end
|
||||
object TBXSeparatorItem20: TTBXSeparatorItem
|
||||
end
|
||||
object TBXItem38: TTBXItem
|
||||
Action = actGenerarEtiquetas
|
||||
DisplayMode = nbdmImageAndText
|
||||
@ -193,12 +194,12 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
inherited actAnchoAuto: TAction
|
||||
ImageIndex = 22
|
||||
end
|
||||
object actGenerarFactura: TAction
|
||||
object actGenerarFacturaProforma: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Generar factura...'
|
||||
Caption = 'Generar factura proforma'
|
||||
ImageIndex = 23
|
||||
OnExecute = actGenerarFacturaExecute
|
||||
OnUpdate = actGenerarFacturaUpdate
|
||||
OnExecute = actGenerarFacturaProformaExecute
|
||||
OnUpdate = actGenerarFacturaProformaUpdate
|
||||
end
|
||||
object actEnviar: TAction
|
||||
Category = 'Acciones'
|
||||
@ -1683,7 +1684,7 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
Action = actEnviar
|
||||
end
|
||||
object Generarfactura1: TMenuItem [7]
|
||||
Action = actGenerarFactura
|
||||
Action = actGenerarFacturaProforma
|
||||
end
|
||||
end
|
||||
object JsNuevoAlbaranDialog: TJSDialog
|
||||
|
||||
@ -17,7 +17,7 @@ uses
|
||||
type
|
||||
TfEditorAlbaranesCliente = class(TfEditorGridBase, IEditorAlbaranesCliente)
|
||||
JsNuevoAlbaranDialog: TJSDialog;
|
||||
actGenerarFactura: TAction;
|
||||
actGenerarFacturaProforma: TAction;
|
||||
N4: TMenuItem;
|
||||
Generarfactura1: TMenuItem;
|
||||
TBXSeparatorItem17: TTBXSeparatorItem;
|
||||
@ -36,9 +36,10 @@ type
|
||||
actGenerarEtiquetas: TAction;
|
||||
TBXItem38: TTBXItem;
|
||||
JsListaAlbaranesNoEliminados: TJSDialog;
|
||||
TBXSeparatorItem20: TTBXSeparatorItem;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actGenerarFacturaUpdate(Sender: TObject);
|
||||
procedure actGenerarFacturaExecute(Sender: TObject);
|
||||
procedure actGenerarFacturaProformaUpdate(Sender: TObject);
|
||||
procedure actGenerarFacturaProformaExecute(Sender: TObject);
|
||||
procedure actEnviarUpdate(Sender: TObject);
|
||||
procedure actEnviarExecute(Sender: TObject);
|
||||
procedure actEliminarUpdate(Sender: TObject);
|
||||
@ -184,13 +185,16 @@ begin
|
||||
and ViewGrid.esSeleccionCeldaDatos;
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranesCliente.actGenerarFacturaExecute(Sender: TObject);
|
||||
procedure TfEditorAlbaranesCliente.actGenerarFacturaProformaExecute(Sender: TObject);
|
||||
begin
|
||||
GenerarFacturaCli(Albaranes.ID);
|
||||
//Se desactiva poder generar facturas a partir de albaranes ya que no lo usan, ellos facturan a partir del contrato.
|
||||
//lo que si necesitan es hacer facturas proforma a partir de un determinado albarán por lo que el ID_FACTURA siempre referenciará a una factura proforma
|
||||
|
||||
GenerarFacturaProformaCli(Albaranes.ID);
|
||||
actRefrescar.Execute;
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranesCliente.actGenerarFacturaUpdate(Sender: TObject);
|
||||
procedure TfEditorAlbaranesCliente.actGenerarFacturaProformaUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := HayDatos
|
||||
|
||||
@ -3,7 +3,7 @@ object fEditorDireccionEntregaAlbaranCliente: TfEditorDireccionEntregaAlbaranCli
|
||||
Top = 108
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Datos de la direcci'#243'n de entrega:'
|
||||
ClientHeight = 257
|
||||
ClientHeight = 316
|
||||
ClientWidth = 453
|
||||
Color = clBtnFace
|
||||
ParentFont = True
|
||||
@ -13,14 +13,14 @@ object fEditorDireccionEntregaAlbaranCliente: TfEditorDireccionEntregaAlbaranCli
|
||||
OnShow = FormShow
|
||||
DesignSize = (
|
||||
453
|
||||
257)
|
||||
316)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object Bevel1: TBevel
|
||||
Left = 8
|
||||
Top = 14
|
||||
Width = 349
|
||||
Height = 225
|
||||
Height = 251
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Shape = bsFrame
|
||||
end
|
||||
@ -58,7 +58,7 @@ object fEditorDireccionEntregaAlbaranCliente: TfEditorDireccionEntregaAlbaranCli
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 20
|
||||
Top = 185
|
||||
Top = 203
|
||||
Width = 109
|
||||
Height = 13
|
||||
AutoSize = False
|
||||
@ -66,12 +66,20 @@ object fEditorDireccionEntregaAlbaranCliente: TfEditorDireccionEntregaAlbaranCli
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 21
|
||||
Top = 210
|
||||
Top = 228
|
||||
Width = 109
|
||||
Height = 13
|
||||
AutoSize = False
|
||||
Caption = 'Tel'#233'fono:'
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 20
|
||||
Top = 171
|
||||
Width = 110
|
||||
Height = 13
|
||||
AutoSize = False
|
||||
Caption = 'Pa'#237's:'
|
||||
end
|
||||
object OKBtn: TButton
|
||||
Left = 370
|
||||
Top = 13
|
||||
@ -134,7 +142,7 @@ object fEditorDireccionEntregaAlbaranCliente: TfEditorDireccionEntregaAlbaranCli
|
||||
end
|
||||
object ePersonaContacto: TDBEdit
|
||||
Left = 135
|
||||
Top = 182
|
||||
Top = 200
|
||||
Width = 210
|
||||
Height = 21
|
||||
DataField = 'PERSONA_CONTACTO'
|
||||
@ -143,7 +151,7 @@ object fEditorDireccionEntregaAlbaranCliente: TfEditorDireccionEntregaAlbaranCli
|
||||
end
|
||||
object eTelefono: TDBEdit
|
||||
Left = 136
|
||||
Top = 207
|
||||
Top = 225
|
||||
Width = 210
|
||||
Height = 21
|
||||
DataField = 'TELEFONO'
|
||||
@ -159,6 +167,35 @@ object fEditorDireccionEntregaAlbaranCliente: TfEditorDireccionEntregaAlbaranCli
|
||||
Height = 58
|
||||
Width = 211
|
||||
end
|
||||
object cbPais: TcxDBComboBox
|
||||
Left = 134
|
||||
Top = 167
|
||||
DataBinding.DataField = 'PAIS'
|
||||
DataBinding.DataSource = dsDireccion
|
||||
Properties.DropDownListStyle = lsEditFixedList
|
||||
Properties.ImmediatePost = True
|
||||
Properties.ImmediateUpdateText = True
|
||||
Properties.PostPopupValueOnTab = True
|
||||
Properties.OnInitPopup = cbPaisPropertiesInitPopup
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.ButtonStyle = bts3D
|
||||
Style.PopupBorderStyle = epbsFrame3D
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
TabOrder = 9
|
||||
Width = 211
|
||||
end
|
||||
object dsDireccion: TDADataSource
|
||||
Left = 16
|
||||
Top = 46
|
||||
|
||||
@ -6,7 +6,7 @@ uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
|
||||
Buttons, ExtCtrls, Mask, DBCtrls, DB, uDADataTable,
|
||||
cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit,
|
||||
uIEditorDireccionEntregaAlbaranCliente, uBizAlbaranesCliente, uDAInterfaces,
|
||||
cxMemo;
|
||||
cxMemo, cxGraphics, cxMaskEdit, cxDropDownEdit;
|
||||
|
||||
type
|
||||
TfEditorDireccionEntregaAlbaranCliente = class(TForm, IEditorDireccionEntregaAlbaranCliente)
|
||||
@ -27,9 +27,12 @@ type
|
||||
Label7: TLabel;
|
||||
eTelefono: TDBEdit;
|
||||
eDireccion: TcxDBMemo;
|
||||
cbPais: TcxDBComboBox;
|
||||
Label5: TLabel;
|
||||
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure cbPaisPropertiesInitPopup(Sender: TObject);
|
||||
|
||||
private
|
||||
pDireccion: String;
|
||||
@ -38,8 +41,11 @@ type
|
||||
pCodigoPostal: String;
|
||||
pPersonaContacto: String;
|
||||
pTelefono: String;
|
||||
|
||||
pPais: String;
|
||||
FPaises : TStringList;
|
||||
FAlbaran : IBizAlbaranCliente;
|
||||
|
||||
procedure CargarPaises;
|
||||
function GetAlbaran: IBizAlbaranCliente;
|
||||
procedure SetAlbaran(const Value: IBizAlbaranCliente);
|
||||
property Albaran: IBizAlbaranCliente read GetAlbaran write SetAlbaran;
|
||||
@ -47,9 +53,44 @@ type
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
{ TfEditorDireccionEntrega }
|
||||
uses uProvinciasPoblacionesController;
|
||||
|
||||
procedure TfEditorDireccionEntregaAlbaranCliente.CargarPaises;
|
||||
var
|
||||
i : integer;
|
||||
begin
|
||||
with TProvinciasPoblacionesController.Create do
|
||||
try
|
||||
FPaises := DarListaPaises;
|
||||
|
||||
with cbPais.Properties.Items do
|
||||
begin
|
||||
BeginUpdate;
|
||||
try
|
||||
Clear;
|
||||
for i := 0 to FPaises.Count - 1 do
|
||||
Add(FPaises.Names[i]);
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorDireccionEntregaAlbaranCliente.cbPaisPropertiesInitPopup(
|
||||
Sender: TObject);
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
if not Assigned(FPaises) then
|
||||
CargarPaises;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorDireccionEntregaAlbaranCliente.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
@ -59,6 +100,7 @@ begin
|
||||
eDireccion.EditValue := pDireccion;
|
||||
ePoblacion.Field.Value := pPoblacion;
|
||||
eProvincia.Field.Value := pProvincia;
|
||||
cbPais.EditValue := pPais;
|
||||
eCodigoPostal.Field.Value := pCodigoPostal;
|
||||
ePersonaContacto.Field.Value := pPersonaContacto;
|
||||
eTelefono.Field.Value := pTelefono;
|
||||
@ -74,6 +116,7 @@ begin
|
||||
pCodigoPostal := eCodigoPostal.Text;
|
||||
pPersonaContacto := ePersonaContacto.Text;
|
||||
pTelefono := eTelefono.Text;
|
||||
pPais := cbPais.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorDireccionEntregaAlbaranCliente.GetAlbaran: IBizAlbaranCliente;
|
||||
|
||||
@ -20,7 +20,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
671)
|
||||
object Label1: TLabel
|
||||
Left = 412
|
||||
Top = 618
|
||||
Top = 729
|
||||
Width = 299
|
||||
Height = 26
|
||||
Caption =
|
||||
@ -30,7 +30,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object edtFechaAlbaran: TcxDBDateEdit
|
||||
Left = 116
|
||||
Top = 22
|
||||
Top = 82
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DataBinding.DataField = 'FECHA_ALBARAN'
|
||||
DataBinding.DataSource = DADataSource
|
||||
@ -56,7 +56,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eReferencia: TcxDBTextEdit
|
||||
Left = 116
|
||||
Top = -32
|
||||
Top = 28
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DataBinding.DataField = 'REFERENCIA'
|
||||
DataBinding.DataSource = DADataSource
|
||||
@ -82,9 +82,9 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
inline frViewClienteAlbaran: TfrViewDatosYSeleccionClienteAlbaran
|
||||
Left = 412
|
||||
Top = -32
|
||||
Width = 442
|
||||
Height = 221
|
||||
Top = 28
|
||||
Width = 604
|
||||
Height = 245
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
@ -94,12 +94,12 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
TabOrder = 10
|
||||
ReadOnly = False
|
||||
ExplicitLeft = 412
|
||||
ExplicitTop = -32
|
||||
ExplicitWidth = 442
|
||||
ExplicitHeight = 221
|
||||
ExplicitTop = 28
|
||||
ExplicitWidth = 604
|
||||
ExplicitHeight = 245
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 442
|
||||
Height = 221
|
||||
Width = 604
|
||||
Height = 245
|
||||
ExplicitWidth = 442
|
||||
ExplicitHeight = 221
|
||||
inherited edtlNombre: TcxDBTextEdit
|
||||
@ -132,6 +132,10 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
ExplicitWidth = 103
|
||||
Width = 103
|
||||
end
|
||||
inherited edtIdioma: TcxDBTextEdit
|
||||
ExplicitWidth = 371
|
||||
Width = 371
|
||||
end
|
||||
end
|
||||
inherited ActionList1: TActionList
|
||||
Left = 306
|
||||
@ -142,7 +146,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object ePoblacion: TcxDBTextEdit
|
||||
Left = 506
|
||||
Top = 392
|
||||
Top = 476
|
||||
DataBinding.DataField = 'POBLACION'
|
||||
DataBinding.DataSource = DADataSource
|
||||
Style.BorderColor = clWindowFrame
|
||||
@ -161,7 +165,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eCodigoPostal: TcxDBTextEdit
|
||||
Left = 951
|
||||
Top = 392
|
||||
Top = 476
|
||||
DataBinding.DataField = 'CODIGO_POSTAL'
|
||||
DataBinding.DataSource = DADataSource
|
||||
Style.BorderColor = clWindowFrame
|
||||
@ -180,7 +184,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eProvincia: TcxDBTextEdit
|
||||
Left = 506
|
||||
Top = 419
|
||||
Top = 503
|
||||
DataBinding.DataField = 'PROVINCIA'
|
||||
DataBinding.DataSource = DADataSource
|
||||
Style.BorderColor = clWindowFrame
|
||||
@ -199,7 +203,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object ePersonaContacto: TcxDBTextEdit
|
||||
Left = 506
|
||||
Top = 446
|
||||
Top = 557
|
||||
DataBinding.DataField = 'PERSONA_CONTACTO'
|
||||
DataBinding.DataSource = DADataSource
|
||||
Style.BorderColor = clWindowFrame
|
||||
@ -214,12 +218,12 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 18
|
||||
TabOrder = 19
|
||||
Width = 284
|
||||
end
|
||||
object eTlfTrabajo: TcxDBTextEdit
|
||||
Left = 506
|
||||
Top = 473
|
||||
Top = 584
|
||||
DataBinding.DataField = 'TELEFONO'
|
||||
DataBinding.DataSource = DADataSource
|
||||
Style.BorderColor = clWindowFrame
|
||||
@ -233,12 +237,12 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 19
|
||||
TabOrder = 20
|
||||
Width = 284
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 250
|
||||
Top = 78
|
||||
Top = 138
|
||||
Width = 132
|
||||
Height = 23
|
||||
Action = actVerPedidoCli
|
||||
@ -246,7 +250,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eReferenciaPedidoCli: TcxTextEdit
|
||||
Left = 116
|
||||
Top = 78
|
||||
Top = 138
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Enabled = False
|
||||
Properties.ReadOnly = False
|
||||
@ -269,7 +273,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object cbFormaPago: TcxDBLookupComboBox
|
||||
Left = 116
|
||||
Top = 49
|
||||
Top = 109
|
||||
DataBinding.DataField = 'ID_FORMA_PAGO'
|
||||
DataBinding.DataSource = DADataSource
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
@ -300,7 +304,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object bFormasPago: TButton
|
||||
Left = 250
|
||||
Top = 49
|
||||
Top = 109
|
||||
Width = 132
|
||||
Height = 23
|
||||
Caption = 'Ver las formas de pago...'
|
||||
@ -309,7 +313,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eFechaRecepcion: TcxDBDateEdit
|
||||
Left = 546
|
||||
Top = 279
|
||||
Top = 363
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DataBinding.DataField = 'FECHA_RECEPCION'
|
||||
DataBinding.DataSource = DADataSource
|
||||
@ -334,16 +338,16 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object cbConAlmacen: TCheckBox
|
||||
Left = 422
|
||||
Top = 586
|
||||
Top = 697
|
||||
Width = 179
|
||||
Height = 21
|
||||
Caption = 'Asociar este albar'#225'n al almac'#233'n:'
|
||||
TabOrder = 21
|
||||
TabOrder = 22
|
||||
OnClick = cbConAlmacenClick
|
||||
end
|
||||
object cbAlmacen: TcxDBLookupComboBox
|
||||
Left = 607
|
||||
Top = 586
|
||||
Top = 697
|
||||
DataBinding.DataField = 'ID_ALMACEN'
|
||||
DataBinding.DataSource = DADataSource
|
||||
Properties.KeyFieldNames = 'ID'
|
||||
@ -368,12 +372,12 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 22
|
||||
TabOrder = 23
|
||||
Width = 586
|
||||
end
|
||||
object eRefFacturaCli: TcxDBTextEdit
|
||||
Left = 116
|
||||
Top = 107
|
||||
Top = 167
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DataBinding.DataField = 'REF_FACTURA'
|
||||
DataBinding.DataSource = DADataSource
|
||||
@ -399,7 +403,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eFechaPrevista: TcxDBDateEdit
|
||||
Left = 546
|
||||
Top = 225
|
||||
Top = 309
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DataBinding.DataField = 'FECHA_PREVISTA_ENVIO'
|
||||
DataBinding.DataSource = DADataSource
|
||||
@ -426,7 +430,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eRefCliente: TcxDBTextEdit
|
||||
Left = 116
|
||||
Top = -5
|
||||
Top = 55
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DataBinding.DataField = 'REFERENCIA_CLIENTE'
|
||||
DataBinding.DataSource = DADataSource
|
||||
@ -450,7 +454,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eFechaEnvio: TcxDBDateEdit
|
||||
Left = 546
|
||||
Top = 252
|
||||
Top = 336
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DataBinding.DataField = 'FECHA_ENVIO'
|
||||
DataBinding.DataSource = DADataSource
|
||||
@ -475,7 +479,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
inline frViewTienda1: TfrViewTienda
|
||||
Left = 22
|
||||
Top = 164
|
||||
Top = 224
|
||||
Width = 373
|
||||
Height = 41
|
||||
Enabled = False
|
||||
@ -488,7 +492,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
TabOrder = 8
|
||||
ReadOnly = False
|
||||
ExplicitLeft = 22
|
||||
ExplicitTop = 164
|
||||
ExplicitTop = 224
|
||||
ExplicitWidth = 373
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 373
|
||||
@ -501,7 +505,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
inline frViewObservaciones1: TfrViewObservaciones
|
||||
Left = 22
|
||||
Top = 241
|
||||
Top = 301
|
||||
Width = 521
|
||||
Height = 228
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
@ -513,7 +517,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
TabOrder = 9
|
||||
ReadOnly = False
|
||||
ExplicitLeft = 22
|
||||
ExplicitTop = 241
|
||||
ExplicitTop = 301
|
||||
ExplicitHeight = 228
|
||||
inherited memObservaciones: TcxDBMemo
|
||||
DataBinding.DataField = 'OBSERVACIONES'
|
||||
@ -524,7 +528,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eCalle: TcxDBMemo
|
||||
Left = 506
|
||||
Top = 336
|
||||
Top = 420
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
DataBinding.DataField = 'CALLE'
|
||||
DataBinding.DataSource = DADataSource
|
||||
@ -546,7 +550,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
end
|
||||
object eNotasEnvio: TcxDBMemo
|
||||
Left = 506
|
||||
Top = 500
|
||||
Top = 611
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
DataBinding.DataField = 'NOTAS_ENVIO'
|
||||
DataBinding.DataSource = DADataSource
|
||||
@ -562,10 +566,39 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 20
|
||||
TabOrder = 21
|
||||
Height = 50
|
||||
Width = 510
|
||||
end
|
||||
object cbPais: TcxDBComboBox
|
||||
Left = 506
|
||||
Top = 530
|
||||
DataBinding.DataField = 'PAIS'
|
||||
DataBinding.DataSource = DADataSource
|
||||
Properties.DropDownListStyle = lsEditFixedList
|
||||
Properties.ImmediatePost = True
|
||||
Properties.ImmediateUpdateText = True
|
||||
Properties.PostPopupValueOnTab = True
|
||||
Properties.OnInitPopup = cbPaisPropertiesInitPopup
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.ButtonStyle = bts3D
|
||||
Style.PopupBorderStyle = epbsFrame3D
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
TabOrder = 18
|
||||
Width = 772
|
||||
end
|
||||
object dxLayoutControl1Group_Root: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
Hidden = True
|
||||
@ -755,10 +788,20 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
end
|
||||
object dxLayoutControl1Item11: TdxLayoutItem
|
||||
Caption = 'Provincia:'
|
||||
Control = eProvincia
|
||||
ControlOptions.ShowBorder = False
|
||||
object dxLayoutControl1Group16: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
Hidden = True
|
||||
ShowBorder = False
|
||||
object dxLayoutControl1Item11: TdxLayoutItem
|
||||
Caption = 'Provincia:'
|
||||
Control = eProvincia
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
object dxLayoutControl1Item25: TdxLayoutItem
|
||||
Caption = 'Pa'#237's:'
|
||||
Control = cbPais
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
end
|
||||
object dxLayoutControl1Item12: TdxLayoutItem
|
||||
Caption = 'Pers. de contacto:'
|
||||
|
||||
@ -102,6 +102,9 @@ type
|
||||
eCalle: TcxDBMemo;
|
||||
dxLayoutControl1Item8: TdxLayoutItem;
|
||||
eNotasEnvio: TcxDBMemo;
|
||||
dxLayoutControl1Item25: TdxLayoutItem;
|
||||
cbPais: TcxDBComboBox;
|
||||
dxLayoutControl1Group16: TdxLayoutGroup;
|
||||
procedure CustomViewCreate(Sender: TObject);
|
||||
procedure CustomViewDestroy(Sender: TObject);
|
||||
procedure actVerPedidoCliExecute(Sender: TObject);
|
||||
@ -120,6 +123,11 @@ type
|
||||
procedure frViewClienteAlbaranButton2Click(Sender: TObject);
|
||||
procedure frViewClienteAlbaranactAnadirContactoUpdate(Sender: TObject);
|
||||
procedure actModificarDireccionExecute(Sender: TObject);
|
||||
procedure cbPaisPropertiesInitPopup(Sender: TObject);
|
||||
|
||||
private
|
||||
FPaises : TStringList;
|
||||
procedure CargarPaises;
|
||||
|
||||
protected
|
||||
FAlbaran : IBizAlbaranCliente;
|
||||
@ -150,7 +158,7 @@ implementation
|
||||
uses
|
||||
uClientesController, uBizDireccionesContacto,
|
||||
schAlbaranesClienteClient_Intf, uBizAlmacenes, uDateUtils,
|
||||
uDialogUtils, uFactuGES_App;
|
||||
uDialogUtils, uFactuGES_App, uProvinciasPoblacionesController;
|
||||
|
||||
|
||||
procedure TfrViewAlbaranCliente.actModificarDireccionExecute(Sender: TObject);
|
||||
@ -179,6 +187,30 @@ begin
|
||||
FFormasPagoController.VerTodos(FFormasPago);
|
||||
end;
|
||||
|
||||
procedure TfrViewAlbaranCliente.CargarPaises;
|
||||
var
|
||||
i : integer;
|
||||
begin
|
||||
with TProvinciasPoblacionesController.Create do
|
||||
try
|
||||
FPaises := DarListaPaises;
|
||||
|
||||
with cbPais.Properties.Items do
|
||||
begin
|
||||
BeginUpdate;
|
||||
try
|
||||
Clear;
|
||||
for i := 0 to FPaises.Count - 1 do
|
||||
Add(FPaises.Names[i]);
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewAlbaranCliente.cbConAlmacenClick(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
@ -198,6 +230,17 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewAlbaranCliente.cbPaisPropertiesInitPopup(Sender: TObject);
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
if not Assigned(FPaises) then
|
||||
CargarPaises;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewAlbaranCliente.CustomViewCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -121,6 +121,7 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente
|
||||
Width = 45
|
||||
end
|
||||
object cxGridViewREF_FACTURA: TcxGridDBColumn
|
||||
Caption = 'Factura proforma'
|
||||
DataBinding.FieldName = 'REF_FACTURA'
|
||||
BestFitMaxWidth = 45
|
||||
Width = 61
|
||||
@ -192,6 +193,14 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente
|
||||
FooterAlignmentHorz = taRightJustify
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
object cxGridViewPAIS: TcxGridDBColumn
|
||||
Caption = 'Pa'#237's'
|
||||
DataBinding.FieldName = 'PAIS'
|
||||
end
|
||||
object cxGridViewIDIOMA: TcxGridDBColumn
|
||||
Caption = 'Idioma'
|
||||
DataBinding.FieldName = 'IDIOMA'
|
||||
end
|
||||
end
|
||||
inherited cxGridLevel: TcxGridLevel
|
||||
Caption = 'Todos'
|
||||
@ -256,6 +265,8 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 419
|
||||
ExplicitWidth = 250
|
||||
Width = 250
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
|
||||
@ -63,6 +63,8 @@ type
|
||||
cxGridViewIMPORTE_NETO: TcxGridDBColumn;
|
||||
cxGridViewDESCUENTO: TcxGridDBColumn;
|
||||
cxGridViewIMPORTE_DESCUENTO: TcxGridDBColumn;
|
||||
cxGridViewPAIS: TcxGridDBColumn;
|
||||
cxGridViewIDIOMA: TcxGridDBColumn;
|
||||
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
|
||||
TcxGridLevel);
|
||||
procedure cxGridViewCODIGOCustomDrawCell(Sender: TcxCustomGridTableView;
|
||||
|
||||
@ -17,8 +17,6 @@ inherited frViewDatosYSeleccionClienteAlbaran: TfrViewDatosYSeleccionClienteAlba
|
||||
TabOrder = 0
|
||||
TabStop = False
|
||||
AutoContentSizes = [acsWidth, acsHeight]
|
||||
ExplicitWidth = 579
|
||||
ExplicitHeight = 220
|
||||
DesignSize = (
|
||||
598
|
||||
299)
|
||||
@ -156,12 +154,12 @@ inherited frViewDatosYSeleccionClienteAlbaran: TfrViewDatosYSeleccionClienteAlba
|
||||
end
|
||||
object bVerFichaCliente: TBitBtn
|
||||
Left = 396
|
||||
Top = 181
|
||||
Top = 208
|
||||
Width = 192
|
||||
Height = 25
|
||||
Action = actVerContacto
|
||||
Caption = 'Ver ficha completa del cliente...'
|
||||
TabOrder = 8
|
||||
TabOrder = 9
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000000000000000000000000000000000000FF00FF00FF00
|
||||
@ -265,6 +263,28 @@ inherited frViewDatosYSeleccionClienteAlbaran: TfrViewDatosYSeleccionClienteAlba
|
||||
Height = 21
|
||||
Width = 103
|
||||
end
|
||||
object edtIdioma: TcxDBTextEdit
|
||||
Left = 66
|
||||
Top = 181
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
AutoSize = False
|
||||
DataBinding.DataField = 'IDIOMA'
|
||||
DataBinding.DataSource = dsCliente
|
||||
ParentFont = False
|
||||
Properties.ReadOnly = True
|
||||
Properties.UseLeftAlignmentOnEditing = False
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.HotTrack = False
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.TextColor = clWindowText
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 8
|
||||
Height = 21
|
||||
Width = 371
|
||||
end
|
||||
object dxLayoutControl1Group_Root: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
Hidden = True
|
||||
@ -347,6 +367,11 @@ inherited frViewDatosYSeleccionClienteAlbaran: TfrViewDatosYSeleccionClienteAlba
|
||||
Control = edtTelefonos
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
object dxLayoutControl1Item3: TdxLayoutItem
|
||||
Caption = 'Idioma:'
|
||||
Control = edtIdioma
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
end
|
||||
object dxLayoutControl1Item9: TdxLayoutItem
|
||||
AutoAligns = [aaVertical]
|
||||
|
||||
@ -73,6 +73,8 @@ type
|
||||
edtReferencia: TcxDBTextEdit;
|
||||
dxLayoutControl1Group6: TdxLayoutGroup;
|
||||
dxLayoutControl1Group3: TdxLayoutGroup;
|
||||
dxLayoutControl1Item3: TdxLayoutItem;
|
||||
edtIdioma: TcxDBTextEdit;
|
||||
procedure actElegirContactoExecute(Sender: TObject);
|
||||
procedure actAnadirContactoExecute(Sender: TObject);
|
||||
procedure actVerContactoUpdate(Sender: TObject);
|
||||
@ -186,6 +188,7 @@ begin
|
||||
edtDireccion.Enabled := False;
|
||||
edtReferencia.Enabled := False;
|
||||
edtTelefonos.Enabled := False;
|
||||
edtIdioma.Enabled := False;
|
||||
end;
|
||||
|
||||
destructor TfrViewDatosYSeleccionClienteAlbaran.Destroy;
|
||||
@ -246,6 +249,7 @@ begin
|
||||
POBLACION := ADireccion.POBLACION;
|
||||
CODIGO_POSTAL := ADireccion.CODIGO_POSTAL;
|
||||
PROVINCIA := ADireccion.PROVINCIA;
|
||||
PAIS := ADireccion.PAIS;
|
||||
PERSONA_CONTACTO := ADireccion.PERSONA_CONTACTO;
|
||||
TELEFONO := ADireccion.TELEFONO;
|
||||
MOVIL := ADireccion.MOVIL;
|
||||
@ -264,8 +268,9 @@ begin
|
||||
ACadena := '';
|
||||
|
||||
if Assigned(FAlbaran) then
|
||||
ACadena := Format('%s %s %s %s',
|
||||
[FAlbaran.CLIENTE.CALLE, FAlbaran.CLIENTE.POBLACION, FAlbaran.CLIENTE.CODIGO_POSTAL, FAlbaran.CLIENTE.PROVINCIA]);
|
||||
ACadena := Format('%s %s %s %s %s',
|
||||
[FAlbaran.CLIENTE.CALLE, FAlbaran.CLIENTE.POBLACION, FAlbaran.CLIENTE.CODIGO_POSTAL,
|
||||
FAlbaran.CLIENTE.PROVINCIA, FAlbaran.CLIENTE.PAIS]);
|
||||
|
||||
edtDireccion.Text := ACadena;
|
||||
end;
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
inherited frViewDireccionEntregaAlbaranCliente: TfrViewDireccionEntregaAlbaranCliente
|
||||
Width = 846
|
||||
Height = 157
|
||||
Height = 188
|
||||
ExplicitWidth = 846
|
||||
ExplicitHeight = 157
|
||||
ExplicitHeight = 188
|
||||
object dxLayoutControl1: TdxLayoutControl
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 846
|
||||
Height = 157
|
||||
Height = 188
|
||||
Align = alClient
|
||||
ParentBackground = True
|
||||
TabOrder = 0
|
||||
TabStop = False
|
||||
AutoContentSizes = [acsWidth, acsHeight]
|
||||
ExplicitHeight = 266
|
||||
ExplicitHeight = 157
|
||||
DesignSize = (
|
||||
846
|
||||
157)
|
||||
188)
|
||||
object ePoblacion: TcxDBTextEdit
|
||||
Left = 64
|
||||
Top = 66
|
||||
@ -76,7 +76,7 @@ inherited frViewDireccionEntregaAlbaranCliente: TfrViewDireccionEntregaAlbaranCl
|
||||
end
|
||||
object eTlfTrabajo: TcxDBTextEdit
|
||||
Left = 714
|
||||
Top = 120
|
||||
Top = 147
|
||||
DataBinding.DataField = 'TELEFONO'
|
||||
DataBinding.DataSource = dsAlbaran
|
||||
Style.BorderColor = clWindowFrame
|
||||
@ -90,12 +90,12 @@ inherited frViewDireccionEntregaAlbaranCliente: TfrViewDireccionEntregaAlbaranCl
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 5
|
||||
TabOrder = 6
|
||||
Width = 122
|
||||
end
|
||||
object ePersonaContacto: TcxDBTextEdit
|
||||
Left = 64
|
||||
Top = 120
|
||||
Top = 147
|
||||
DataBinding.DataField = 'PERSONA_CONTACTO'
|
||||
DataBinding.DataSource = dsAlbaran
|
||||
Style.BorderColor = clWindowFrame
|
||||
@ -110,7 +110,7 @@ inherited frViewDireccionEntregaAlbaranCliente: TfrViewDireccionEntregaAlbaranCl
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 4
|
||||
TabOrder = 5
|
||||
Width = 281
|
||||
end
|
||||
object eCalle: TcxDBMemo
|
||||
@ -135,6 +135,34 @@ inherited frViewDireccionEntregaAlbaranCliente: TfrViewDireccionEntregaAlbaranCl
|
||||
Height = 50
|
||||
Width = 886
|
||||
end
|
||||
object cbPais: TcxDBComboBox
|
||||
Left = 64
|
||||
Top = 120
|
||||
DataBinding.DataField = 'PAIS'
|
||||
Properties.DropDownListStyle = lsEditFixedList
|
||||
Properties.ImmediatePost = True
|
||||
Properties.ImmediateUpdateText = True
|
||||
Properties.PostPopupValueOnTab = True
|
||||
Properties.OnInitPopup = cbPaisPropertiesInitPopup
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.ButtonStyle = bts3D
|
||||
Style.PopupBorderStyle = epbsFrame3D
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
TabOrder = 4
|
||||
Width = 211
|
||||
end
|
||||
object dxLayoutGroup1: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
Hidden = True
|
||||
@ -177,6 +205,11 @@ inherited frViewDireccionEntregaAlbaranCliente: TfrViewDireccionEntregaAlbaranCl
|
||||
Control = eProvincia
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
object dxLayoutControl1Item1: TdxLayoutItem
|
||||
Caption = 'Pa'#237's:'
|
||||
Control = cbPais
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
end
|
||||
object dxLayoutControl1Group4: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
|
||||
@ -39,11 +39,20 @@ type
|
||||
dxLayoutControl1Group4: TdxLayoutGroup;
|
||||
dxLayoutControl1Item7: TdxLayoutItem;
|
||||
eCalle: TcxDBMemo;
|
||||
dxLayoutControl1Item1: TdxLayoutItem;
|
||||
cbPais: TcxDBComboBox;
|
||||
procedure cbPaisPropertiesInitPopup(Sender: TObject);
|
||||
|
||||
private
|
||||
FPaises : TStringList;
|
||||
procedure CargarPaises;
|
||||
|
||||
protected
|
||||
FAlbaran : IBizAlbaranCliente;
|
||||
FController : IAlbaranesClienteController;
|
||||
function GetAlbaranCliente: IBizAlbaranCliente;
|
||||
procedure SetAlbaranCliente(const Value: IBizAlbaranCliente);
|
||||
|
||||
public
|
||||
property AlbaranCliente: IBizAlbaranCliente read GetAlbaranCliente write SetAlbaranCliente;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -55,7 +64,43 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uEditorRegistryUtils;
|
||||
uEditorRegistryUtils, uProvinciasPoblacionesController;
|
||||
|
||||
procedure TfrViewDireccionEntregaAlbaranCliente.CargarPaises;
|
||||
var
|
||||
i : integer;
|
||||
begin
|
||||
with TProvinciasPoblacionesController.Create do
|
||||
try
|
||||
FPaises := DarListaPaises;
|
||||
|
||||
with cbPais.Properties.Items do
|
||||
begin
|
||||
BeginUpdate;
|
||||
try
|
||||
Clear;
|
||||
for i := 0 to FPaises.Count - 1 do
|
||||
Add(FPaises.Names[i]);
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewDireccionEntregaAlbaranCliente.cbPaisPropertiesInitPopup(
|
||||
Sender: TObject);
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
if not Assigned(FPaises) then
|
||||
CargarPaises;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TfrViewDireccionEntregaAlbaranCliente.Create(AOwner: TComponent);
|
||||
begin
|
||||
|
||||
@ -705,6 +705,7 @@ begin
|
||||
AAlbaran.POBLACION := ADireccionEnvio.POBLACION;
|
||||
AAlbaran.CODIGO_POSTAL := ADireccionEnvio.CODIGO_POSTAL;
|
||||
AAlbaran.PROVINCIA := ADireccionEnvio.PROVINCIA;
|
||||
// AAlbaran.PAIS := ADireccionEnvio.PAIS;
|
||||
AAlbaran.TELEFONO := ADireccionEnvio.TELEFONO;
|
||||
AAlbaran.PERSONA_CONTACTO := ADireccionEnvio.PERSONA_CONTACTO;
|
||||
|
||||
@ -1289,6 +1290,7 @@ begin
|
||||
AAlbaran.DataTable.FieldByName(fld_AlbaranesProveedorPOBLACION).Clear;
|
||||
AAlbaran.DataTable.FieldByName(fld_AlbaranesProveedorCODIGO_POSTAL).Clear;
|
||||
AAlbaran.DataTable.FieldByName(fld_AlbaranesProveedorPROVINCIA).Clear;
|
||||
// AAlbaran.DataTable.FieldByName(fld_AlbaranesProveedorPAIS).Clear;
|
||||
AAlbaran.DataTable.FieldByName(fld_AlbaranesProveedorTELEFONO).Clear;
|
||||
AAlbaran.DataTable.FieldByName(fld_AlbaranesProveedorPERSONA_CONTACTO).Clear;
|
||||
|
||||
|
||||
@ -6,6 +6,9 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran
|
||||
Height = 286
|
||||
ExplicitHeight = 286
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
inherited cxGridViewNOMBRE_PROVEEDOR: TcxGridDBColumn
|
||||
Visible = True
|
||||
end
|
||||
inherited cxGridViewPRECIO_COSTE: TcxGridDBColumn
|
||||
Caption = 'Precio material'
|
||||
Properties.DecimalPlaces = 4
|
||||
@ -43,9 +46,6 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran
|
||||
inherited cxGridLevel2: TcxGridLevel
|
||||
Visible = False
|
||||
end
|
||||
inherited cxGridLevel3: TcxGridLevel
|
||||
Caption = 'COMPRAS'
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
|
||||
@ -47,6 +47,7 @@ type
|
||||
function GetPrecioPunto: Currency;
|
||||
property PrecioPunto : Currency read GetPrecioPunto write SetPrecioPunto;
|
||||
procedure AsignarTarifa(AArticulos: IBizArticulo);
|
||||
procedure Comisionable(AArticulos: IBizArticulo; Valor: Integer);
|
||||
end;
|
||||
|
||||
TArticulosController = class(TControllerBase, IArticulosController)
|
||||
@ -105,8 +106,9 @@ type
|
||||
procedure VerProveedor(AArticulo : IBizArticulo);
|
||||
|
||||
procedure AsignarTarifa(AArticulos: IBizArticulo);
|
||||
procedure Comisionable(AArticulos: IBizArticulo; Valor: Integer);
|
||||
|
||||
property PrecioPunto : Currency read GetPrecioPunto write SetPrecioPunto;
|
||||
property PrecioPunto : Currency read GetPrecioPunto write SetPrecioPunto;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -376,6 +378,28 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TArticulosController.Comisionable(AArticulos: IBizArticulo; Valor: Integer);
|
||||
begin
|
||||
if Assigned(AArticulos) then
|
||||
begin
|
||||
//Asignamos en articulo
|
||||
with AArticulos.DataTable do
|
||||
begin
|
||||
First;
|
||||
while not EOF do
|
||||
begin
|
||||
begin
|
||||
Edit;
|
||||
AArticulos.COMISIONABLE := Valor;
|
||||
Post;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
ApplyUpdates;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TArticulosController.Create;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -43,11 +43,22 @@ inherited fEditorArticulos: TfEditorArticulos
|
||||
DockPos = 275
|
||||
Visible = True
|
||||
ExplicitLeft = 406
|
||||
ExplicitWidth = 117
|
||||
ExplicitWidth = 137
|
||||
object TBXItem38: TTBXItem
|
||||
Action = actAsignarTarifa
|
||||
DisplayMode = nbdmImageAndText
|
||||
ImageIndex = 25
|
||||
end
|
||||
object TBXSeparatorItem17: TTBXSeparatorItem
|
||||
end
|
||||
object TBXItem39: TTBXItem
|
||||
Action = actNoComisionable
|
||||
DisplayMode = nbdmImageAndText
|
||||
end
|
||||
object TBXSeparatorItem18: TTBXSeparatorItem
|
||||
end
|
||||
object TBXItem40: TTBXItem
|
||||
Action = actComisionable
|
||||
DisplayMode = nbdmImageAndText
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -68,9 +79,22 @@ inherited fEditorArticulos: TfEditorArticulos
|
||||
end
|
||||
object actAsignarTarifa: TAction
|
||||
Caption = 'Asignar tarifa'
|
||||
ImageIndex = 25
|
||||
OnExecute = actAsignarTarifaExecute
|
||||
OnUpdate = actAsignarTarifaUpdate
|
||||
end
|
||||
object actNoComisionable: TAction
|
||||
Caption = 'No comisionable'
|
||||
ImageIndex = 26
|
||||
OnExecute = actNoComisionableExecute
|
||||
OnUpdate = actNoComisionableUpdate
|
||||
end
|
||||
object actComisionable: TAction
|
||||
Caption = 'Comisionable'
|
||||
ImageIndex = 27
|
||||
OnExecute = actComisionableExecute
|
||||
OnUpdate = actComisionableUpdate
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList
|
||||
PngImages = <
|
||||
@ -741,6 +765,50 @@ inherited fEditorArticulos: TfEditorArticulos
|
||||
0049454E44AE426082}
|
||||
Name = 'PngImage25'
|
||||
Background = clWindow
|
||||
end
|
||||
item
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D4948445200000010000000100803000000282D0F
|
||||
530000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C000000C9504C5445BFBFBF6F6F6F4F4F4FAFAFAF3F3F3FEFEFEF
|
||||
F7ECEC4B4B4B000000DA2000B01007D3250EA82A2AE74E33F5E7E7968785D01B
|
||||
04EACBCBC039298F8F8FC41C08E9BCB9D07B78D65B4BE18D85F3E3E3A7A3A7E9
|
||||
E8E92D0706A80D079F1500E5CFCED48987DFDFDFA51F1F636363ABABABBB3028
|
||||
D08180AD2E2DD18988F5E8E8C83F33B51B12BA3824CC220DBF1200FDFBFBF3F4
|
||||
F34B514BCD220DC01502EC5A445A3C39C01603C3C3C3F2DEDEBD5C5CD3D1D3E5
|
||||
C0C0716666F83408C26969D28380E8573BBA3731FFFFFF2C2D387A0000004374
|
||||
524E53FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFF00416204EF0000009F4944415478DA63746240058C9802FB9818FE
|
||||
3931DC7CE60813D80F147064B8F1CA0E2670EC2F03B3D53BC60F8A282A1E3DB0
|
||||
4335E3E84F27145BBE9EB583980D13D8CF64FF4AE4FC27C7CBA2A260811F67AD
|
||||
19EEC85FE0FFF38749122CF0F0833EC3AF6BDF9934DE2A41B41C62B465D8677A
|
||||
5BEE2F2F17C2E9777FC8BFFFC105D502029F7E8A1C357DFE8A172EF0E106BB21
|
||||
C3116356B8C01326291075060052053EBADF40E4040000000049454E44AE4260
|
||||
82}
|
||||
Name = 'PngImage26'
|
||||
Background = clWindow
|
||||
end
|
||||
item
|
||||
PngImage.Data = {
|
||||
89504E470D0A1A0A0000000D4948445200000010000000100803000000282D0F
|
||||
530000001974455874536F6674776172650041646F626520496D616765526561
|
||||
647971C9653C000000A5504C54456F6F6FAFAFAFBFBFBF4F4F4FEFEFEF3F3F3F
|
||||
0000004B4B4BFEFCFDE29B94F3F4F3E6A49DF6E8E78F8F8FD57367ECC4C15121
|
||||
1BC3C3C3D89693ABABABFBF6F6D1402CD55544D03B27C70900E48C7FD4503DA7
|
||||
A3A7D44431D24734DA6757EFC0BADB7C71E1978DF3CCC7D34C39CB1D04DFDFDF
|
||||
D3D1D3C09D99F1C7C28F7B79EFC4BFEEB8B2E9E8E9A18B89DEA5A1F2E2E3D869
|
||||
5AF7F4F54B514B636363EFC7C2FEFBFAFFFFFF5941A1600000003774524E53FF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0010599D8B000000944944
|
||||
415478DA63346340058C9802671819FE9B307CBB620613380514306378FACA10
|
||||
2670E11F0393C1158DCF82282AEE7E324435E3E26F1310EFFF2D21882DB7BF18
|
||||
82C5BF7C1381089C623405E9D466FDC10716F8F0509F0168360F17AB38C4617F
|
||||
6F69BE61BFA1F6ED9D36D4A5E7FF1B3D63E2FFF65A9915E1F4C7DC9FFE7FD742
|
||||
F2CBCF178C621CC89EBBC4C8C9A484D5B70099B2395A84FFCF76000000004945
|
||||
4E44AE426082}
|
||||
Name = 'PngImage27'
|
||||
Background = clWindow
|
||||
end>
|
||||
Bitmap = {}
|
||||
end
|
||||
|
||||
@ -19,11 +19,21 @@ type
|
||||
actFamilias: TAction;
|
||||
actAsignarTarifa: TAction;
|
||||
TBXItem38: TTBXItem;
|
||||
actNoComisionable: TAction;
|
||||
TBXSeparatorItem17: TTBXSeparatorItem;
|
||||
TBXItem39: TTBXItem;
|
||||
actComisionable: TAction;
|
||||
TBXSeparatorItem18: TTBXSeparatorItem;
|
||||
TBXItem40: TTBXItem;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actFamiliasExecute(Sender: TObject);
|
||||
procedure actAsignarTarifaExecute(Sender: TObject);
|
||||
procedure actAsignarTarifaUpdate(Sender: TObject);
|
||||
procedure actEliminarUpdate(Sender: TObject);
|
||||
procedure actNoComisionableExecute(Sender: TObject);
|
||||
procedure actNoComisionableUpdate(Sender: TObject);
|
||||
procedure actComisionableExecute(Sender: TObject);
|
||||
procedure actComisionableUpdate(Sender: TObject);
|
||||
private
|
||||
FArticulos: IBizArticulo;
|
||||
FController : IArticulosController;
|
||||
@ -200,6 +210,38 @@ begin
|
||||
(Sender as TAction).Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfEditorArticulos.actComisionableExecute(Sender: TObject);
|
||||
var
|
||||
AArticulos: IBizArticulo;
|
||||
i: integer;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
|
||||
ViewGrid.SaveGridStatus;
|
||||
try
|
||||
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Articulos as ISeleccionable).SelectedRecords);
|
||||
AArticulos := (Controller as IArticulosController).ExtraerSeleccionados(Articulos) as IBizArticulo;
|
||||
Controller.Comisionable(AArticulos, 1);
|
||||
finally
|
||||
ViewGrid.RestoreGridStatus;
|
||||
end;
|
||||
|
||||
if (AArticulos.DataTable.RecordCount > 0) then
|
||||
RefrescarInterno;
|
||||
end;
|
||||
|
||||
procedure TfEditorArticulos.actComisionableUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
if HayDatos and Assigned(ViewGrid) then
|
||||
(Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes)
|
||||
and ViewGrid.esSeleccionCeldaDatos
|
||||
and (ViewGrid.NumSeleccionados > 0)
|
||||
else
|
||||
(Sender as TAction).Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfEditorArticulos.actEliminarUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
@ -223,6 +265,38 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorArticulos.actNoComisionableExecute(Sender: TObject);
|
||||
var
|
||||
AArticulos: IBizArticulo;
|
||||
i: integer;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
|
||||
ViewGrid.SaveGridStatus;
|
||||
try
|
||||
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Articulos as ISeleccionable).SelectedRecords);
|
||||
AArticulos := (Controller as IArticulosController).ExtraerSeleccionados(Articulos) as IBizArticulo;
|
||||
Controller.Comisionable(AArticulos, 0);
|
||||
finally
|
||||
ViewGrid.RestoreGridStatus;
|
||||
end;
|
||||
|
||||
if (AArticulos.DataTable.RecordCount > 0) then
|
||||
RefrescarInterno;
|
||||
end;
|
||||
|
||||
procedure TfEditorArticulos.actNoComisionableUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
if HayDatos and Assigned(ViewGrid) then
|
||||
(Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes)
|
||||
and ViewGrid.esSeleccionCeldaDatos
|
||||
and (ViewGrid.NumSeleccionados > 0)
|
||||
else
|
||||
(Sender as TAction).Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfEditorArticulos.AsignarVista;
|
||||
begin
|
||||
ViewGrid := CreateView(TfrViewArticulos) as IViewArticulos;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
inherited frViewArticulo: TfrViewArticulo
|
||||
Width = 1088
|
||||
Height = 588
|
||||
Width = 1437
|
||||
Height = 333
|
||||
Align = alClient
|
||||
OnCreate = CustomViewCreate
|
||||
OnDestroy = CustomViewDestroy
|
||||
@ -10,19 +10,19 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
object dxLayoutControlArticulo: TdxLayoutControl
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1088
|
||||
Height = 481
|
||||
Width = 1437
|
||||
Height = 833
|
||||
Align = alTop
|
||||
ParentBackground = True
|
||||
TabOrder = 0
|
||||
TabStop = False
|
||||
AutoContentSizes = [acsWidth]
|
||||
ExplicitWidth = 451
|
||||
ExplicitWidth = 832
|
||||
DesignSize = (
|
||||
1088
|
||||
481)
|
||||
1437
|
||||
833)
|
||||
object PngSpeedButton2: TPngSpeedButton
|
||||
Left = 1024
|
||||
Left = 1373
|
||||
Top = 731
|
||||
Width = 23
|
||||
Height = 22
|
||||
@ -49,7 +49,7 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
|
||||
end
|
||||
object PngSpeedButton1: TPngSpeedButton
|
||||
Left = 1024
|
||||
Left = 1373
|
||||
Top = 759
|
||||
Width = 23
|
||||
Height = 22
|
||||
@ -97,31 +97,6 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
TabOrder = 4
|
||||
Width = 108
|
||||
end
|
||||
object eNoComisionable: TcxDBCheckBox
|
||||
Left = 116
|
||||
Top = 331
|
||||
Caption = 'Art'#237'culo no comisionable'
|
||||
DataBinding.DataField = 'COMISIONABLE'
|
||||
DataBinding.DataSource = dsViewArticulo
|
||||
Enabled = False
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Properties.ValueChecked = 0
|
||||
Properties.ValueUnchecked = 1
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.HotTrack = False
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 12
|
||||
Width = 144
|
||||
end
|
||||
object eImagen: TcxImage
|
||||
Left = 22
|
||||
Top = 731
|
||||
@ -202,12 +177,12 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
Width = 327
|
||||
end
|
||||
inherited edtCodigoPostal: TcxDBTextEdit
|
||||
Left = 933
|
||||
ExplicitLeft = 933
|
||||
Left = 1282
|
||||
ExplicitLeft = 1282
|
||||
end
|
||||
inherited Button3: TBitBtn
|
||||
Left = 817
|
||||
ExplicitLeft = 817
|
||||
Left = 1166
|
||||
ExplicitLeft = 1166
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -324,10 +299,10 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
object cbNoInventariable: TcxDBCheckBox
|
||||
Left = 22
|
||||
Top = 220
|
||||
Caption = 'Art'#237'culo no inventariable'
|
||||
Caption = ' Art'#237'culo no inventariable'
|
||||
DataBinding.DataField = 'INVENTARIABLE'
|
||||
DataBinding.DataSource = dsViewArticulo
|
||||
Properties.Alignment = taRightJustify
|
||||
Properties.Alignment = taLeftJustify
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Properties.ValueChecked = 0
|
||||
@ -344,7 +319,7 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 6
|
||||
Width = 144
|
||||
Width = 175
|
||||
end
|
||||
object ePrecioPVP: TcxDBCurrencyEdit
|
||||
Left = 116
|
||||
@ -392,7 +367,7 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
Width = 448
|
||||
end
|
||||
object ePrecioPVP2: TcxCurrencyEdit
|
||||
Left = 407
|
||||
Left = 438
|
||||
Top = 193
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
Properties.ReadOnly = False
|
||||
@ -427,7 +402,7 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
end
|
||||
object eFabricante: TcxDBTextEdit
|
||||
Left = 116
|
||||
Top = 247
|
||||
Top = 274
|
||||
DataBinding.DataField = 'FABRICANTE'
|
||||
DataBinding.DataSource = dsViewArticulo
|
||||
Style.BorderColor = clWindowFrame
|
||||
@ -442,31 +417,31 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 9
|
||||
Width = 664
|
||||
end
|
||||
object eReferenciaFab: TcxDBTextEdit
|
||||
Left = 644
|
||||
Top = 247
|
||||
DataBinding.DataField = 'REFERENCIA_FAB'
|
||||
DataBinding.DataSource = dsViewArticulo
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.Color = 14745599
|
||||
Style.HotTrack = False
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 10
|
||||
Width = 664
|
||||
end
|
||||
object eReferenciaFab: TcxDBTextEdit
|
||||
Left = 817
|
||||
Top = 274
|
||||
DataBinding.DataField = 'REFERENCIA_FAB'
|
||||
DataBinding.DataSource = dsViewArticulo
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.Color = 14745599
|
||||
Style.HotTrack = False
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 11
|
||||
Width = 664
|
||||
end
|
||||
object eStockmin: TcxDBSpinEdit
|
||||
Left = 242
|
||||
Left = 273
|
||||
Top = 220
|
||||
DataBinding.DataField = 'STOCK_MIN'
|
||||
DataBinding.DataSource = dsViewArticulo
|
||||
@ -493,7 +468,7 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
end
|
||||
object cbUnidadMedida: TcxDBComboBox
|
||||
Left = 116
|
||||
Top = 274
|
||||
Top = 301
|
||||
DataBinding.DataField = 'UNIDAD_MEDIDA'
|
||||
DataBinding.DataSource = dsViewArticulo
|
||||
Properties.DropDownRows = 16
|
||||
@ -512,9 +487,33 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 11
|
||||
TabOrder = 12
|
||||
Width = 420
|
||||
end
|
||||
object eNoComisionable: TcxDBCheckBox
|
||||
Left = 22
|
||||
Top = 247
|
||||
Caption = ' Art'#237'culo no comisionable'
|
||||
DataBinding.DataField = 'COMISIONABLE'
|
||||
DataBinding.DataSource = dsViewArticulo
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Properties.ValueChecked = 0
|
||||
Properties.ValueUnchecked = 1
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.HotTrack = False
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 9
|
||||
Width = 675
|
||||
end
|
||||
object dxLayoutControlArticuloGroup_Root: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
Hidden = True
|
||||
@ -572,39 +571,49 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
object dxLayoutControlArticuloGroup6: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
Hidden = True
|
||||
LayoutDirection = ldHorizontal
|
||||
ShowBorder = False
|
||||
object dxLayoutControlArticuloGroup8: TdxLayoutGroup
|
||||
object dxLayoutControlArticuloGroup9: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
Hidden = True
|
||||
LayoutDirection = ldHorizontal
|
||||
ShowBorder = False
|
||||
object dxLayoutControlArticuloItem16: TdxLayoutItem
|
||||
Caption = 'Puntos:'
|
||||
Control = ePrecioCoste
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
object dxLayoutControlArticuloGroup7: TdxLayoutGroup
|
||||
object dxLayoutControlArticuloGroup8: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
Hidden = True
|
||||
LayoutDirection = ldHorizontal
|
||||
ShowBorder = False
|
||||
object dxLayoutControlArticuloItem7: TdxLayoutItem
|
||||
AutoAligns = [aaVertical]
|
||||
Caption = ' '
|
||||
ShowCaption = False
|
||||
Control = cbNoInventariable
|
||||
object dxLayoutControlArticuloItem16: TdxLayoutItem
|
||||
Caption = 'Puntos:'
|
||||
Control = ePrecioCoste
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
object dxLayoutControlArticuloItem21: TdxLayoutItem
|
||||
Caption = 'Stock m'#237'nimo:'
|
||||
Control = eStockmin
|
||||
ControlOptions.ShowBorder = False
|
||||
object dxLayoutControlArticuloGroup7: TdxLayoutGroup
|
||||
ShowCaption = False
|
||||
Hidden = True
|
||||
LayoutDirection = ldHorizontal
|
||||
ShowBorder = False
|
||||
object dxLayoutControlArticuloItem7: TdxLayoutItem
|
||||
AutoAligns = [aaVertical]
|
||||
Caption = ' '
|
||||
ShowCaption = False
|
||||
Control = cbNoInventariable
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
object dxLayoutControlArticuloItem21: TdxLayoutItem
|
||||
Caption = 'Stock m'#237'nimo:'
|
||||
Control = eStockmin
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
end
|
||||
end
|
||||
object dxLayoutControlArticuloItem11: TdxLayoutItem
|
||||
Caption = 'Precio PVP:'
|
||||
Control = ePrecioPVP2
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
end
|
||||
object dxLayoutControlArticuloItem11: TdxLayoutItem
|
||||
Caption = 'Precio PVP:'
|
||||
Control = ePrecioPVP2
|
||||
object dxLayoutControlArticuloItem1: TdxLayoutItem
|
||||
ShowCaption = False
|
||||
Control = eNoComisionable
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
end
|
||||
@ -642,15 +651,6 @@ inherited frViewArticulo: TfrViewArticulo
|
||||
Caption = 'Proveedor para el art'#237'culo'
|
||||
Enabled = False
|
||||
Visible = False
|
||||
object dxLayoutControlArticuloItem1: TdxLayoutItem
|
||||
AutoAligns = [aaVertical]
|
||||
AlignHorz = ahClient
|
||||
Caption = ' '
|
||||
Enabled = False
|
||||
Visible = False
|
||||
Control = eNoComisionable
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
object dxLayoutControlArticuloItem15: TdxLayoutItem
|
||||
Caption = 'Ref. del prov:'
|
||||
Enabled = False
|
||||
|
||||
@ -34,8 +34,6 @@ type
|
||||
dxLayoutControlArticuloItem8: TdxLayoutItem;
|
||||
eDescripcion: TcxDBTextEdit;
|
||||
dxLayoutControlArticuloGroup2: TdxLayoutGroup;
|
||||
dxLayoutControlArticuloItem1: TdxLayoutItem;
|
||||
eNoComisionable: TcxDBCheckBox;
|
||||
dxLayoutControlArticuloGroup4: TdxLayoutGroup;
|
||||
OpenDialog1: TOpenDialog;
|
||||
SmallImages: TPngImageList;
|
||||
@ -88,6 +86,9 @@ type
|
||||
cbUnidadMedida: TcxDBComboBox;
|
||||
dxLayoutControlArticuloGroup6: TdxLayoutGroup;
|
||||
dxLayoutControlArticuloGroup10: TdxLayoutGroup;
|
||||
dxLayoutControlArticuloItem1: TdxLayoutItem;
|
||||
eNoComisionable: TcxDBCheckBox;
|
||||
dxLayoutControlArticuloGroup9: TdxLayoutGroup;
|
||||
procedure actEliminarExecute(Sender: TObject);
|
||||
procedure actAnadirExecute(Sender: TObject);
|
||||
procedure cbFamiliaPropertiesInitPopup(Sender: TObject);
|
||||
|
||||
@ -68,19 +68,12 @@ inherited frViewArticulos: TfrViewArticulos
|
||||
item
|
||||
Description = 'No'
|
||||
Value = 0
|
||||
end
|
||||
item
|
||||
Description = 'S'#237
|
||||
ImageIndex = 1
|
||||
Tag = 1
|
||||
end>
|
||||
Properties.PostPopupValueOnTab = True
|
||||
Properties.ShowDescriptions = False
|
||||
Visible = False
|
||||
BestFitMaxWidth = 22
|
||||
MinWidth = 22
|
||||
Options.HorzSizing = False
|
||||
VisibleForCustomization = False
|
||||
Width = 22
|
||||
end
|
||||
object cxGridViewREFERENCIA: TcxGridDBColumn
|
||||
@ -193,7 +186,7 @@ inherited frViewArticulos: TfrViewArticulos
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
Tag = 1
|
||||
Caption = 'TARIFA 2020'
|
||||
Caption = 'TARIFA 2023'
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
Tag = 2
|
||||
@ -217,6 +210,8 @@ inherited frViewArticulos: TfrViewArticulos
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 250
|
||||
Width = 250
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
Enabled = False
|
||||
@ -224,6 +219,8 @@ inherited frViewArticulos: TfrViewArticulos
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 250
|
||||
Width = 250
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 511
|
||||
@ -233,6 +230,8 @@ inherited frViewArticulos: TfrViewArticulos
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 511
|
||||
ExplicitWidth = 250
|
||||
Width = 250
|
||||
end
|
||||
inherited txtFiltroTodo2: TcxTextEdit
|
||||
Left = 511
|
||||
@ -241,6 +240,8 @@ inherited frViewArticulos: TfrViewArticulos
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 511
|
||||
ExplicitWidth = 250
|
||||
Width = 250
|
||||
end
|
||||
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
|
||||
inherited dxLayoutControl1Group2: TdxLayoutGroup
|
||||
|
||||
@ -165,14 +165,14 @@ begin
|
||||
FFiltro := AddFilterGrid(fboAnd);
|
||||
|
||||
case cxGrid.ActiveLevel.Index of
|
||||
1 : FFiltro.AddItem(cxGridViewTARIFA, foEqual, 'TARIFA 2020', 'TARIFA 2020');
|
||||
1 : FFiltro.AddItem(cxGridViewTARIFA, foEqual, 'TARIFA 2023', 'TARIFA 2023');
|
||||
2 : FFiltro.AddItem(cxGridViewTARIFA, foEqual, 'COMPRAS', 'COMPRAS');
|
||||
3 : begin
|
||||
FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, NULL, 'ARTICULOS CON TARIFA ASIGNADA');
|
||||
FFiltro := AddFilterGrid(fboAnd);
|
||||
FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, 'COMPRAS', 'OTRAS TARIFAS');
|
||||
FFiltro := AddFilterGrid(fboAnd);
|
||||
FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, 'TARIFA 2020', 'OTRAS TARIFAS');
|
||||
FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, 'TARIFA 2023', 'OTRAS TARIFAS');
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -5,7 +5,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, uDADataTable, uControllerBase, uEditorDBItem,
|
||||
uIDataModuleComisiones, uBizComisiones; //, uFacturasClienteController, uBizFacturasCliente;
|
||||
uIDataModuleComisiones, uBizComisiones, uBizFacturasCliente, uFacturasClienteController;
|
||||
|
||||
type
|
||||
IComisionesController = interface(IControllerBase)
|
||||
@ -17,25 +17,27 @@ type
|
||||
function Anadir(AComision : IBizComisiones): Boolean;
|
||||
function Eliminar(AComision : IBizComisiones): Boolean;
|
||||
function Guardar(AComision : IBizComisiones): Boolean;
|
||||
procedure Preview(AComision : IBizComisiones; AllItems: Boolean = false);
|
||||
procedure Print(AComision : IBizComisiones; AllItems: Boolean = false);
|
||||
procedure DescartarCambios(AComision : IBizComisiones);
|
||||
procedure Preview(AComision : IBizComisiones; AllItems: Boolean = false; AllDetails: Boolean = false);
|
||||
procedure Print(AComision : IBizComisiones; AllItems: Boolean = false; AllDetails: Boolean = false);
|
||||
function ExtraerSeleccionados(AComisiones: IBizComisiones) : IBizComisiones;
|
||||
function ElegirFacturasComision(AComision : IBizComisiones): Boolean;
|
||||
function ElegirVendedoresComision(AComision : IBizComisiones): Boolean;
|
||||
procedure RecalcularComisiones(AComision : IBizComisiones; Const ImporteTotal: Variant);
|
||||
procedure EliminarFactura(AComision : IBizComisiones);
|
||||
procedure AsignarImporteTotal(AComision : IBizComisiones; Const ImporteTotal: Variant);
|
||||
end;
|
||||
|
||||
TComisionesController = class(TControllerBase, IComisionesController)
|
||||
private
|
||||
// function BuscarFacturasDesglosadas(AFacturas: IBizFacturaCliente): IBizFacturasComision;
|
||||
function BuscarFacturasDesglosadas(AFacturas: IBizFacturaCliente): IBizFacturasComision;
|
||||
// procedure QuitarExistentes(AFacturas: IBizFacturaCliente; AFacturasComision: IBizFacturasComision);
|
||||
|
||||
procedure FiltrarEmpresa(AComisiones: IBizComisiones);
|
||||
|
||||
protected
|
||||
FDataModule : IDataModuleComisiones;
|
||||
// FFacturasClienteController: IFacturasClienteController;
|
||||
FFacturasClienteController: IFacturasClienteController;
|
||||
|
||||
procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override;
|
||||
function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean;
|
||||
@ -49,17 +51,19 @@ type
|
||||
|
||||
function Eliminar(AComision : IBizComisiones): Boolean;
|
||||
function Guardar(AComision : IBizComisiones): Boolean;
|
||||
procedure DescartarCambios(AComision : IBizComisiones);
|
||||
function Anadir(AComision : IBizComisiones): Boolean;
|
||||
function BuscarTodos: IBizComisiones;
|
||||
function Buscar(const ID: Integer): IBizComisiones;
|
||||
procedure VerTodos(AComision: IBizComisiones);
|
||||
procedure Ver(AComision: IBizComisiones);
|
||||
procedure Preview(AComision : IBizComisiones; AllItems: Boolean = false);
|
||||
procedure Print(AComision : IBizComisiones; AllItems: Boolean = false);
|
||||
procedure Preview(AComision : IBizComisiones; AllItems: Boolean = false; AllDetails: Boolean = false);
|
||||
procedure Print(AComision : IBizComisiones; AllItems: Boolean = false; AllDetails: Boolean = false);
|
||||
function ExtraerSeleccionados(AComisiones: IBizComisiones) : IBizComisiones;
|
||||
function ElegirFacturasComision(AComision : IBizComisiones): Boolean;
|
||||
function ElegirVendedoresComision(AComision : IBizComisiones): Boolean;
|
||||
procedure RecalcularComisiones(AComision : IBizComisiones; Const ImporteTotal: Variant);
|
||||
procedure EliminarFactura(AComision : IBizComisiones);
|
||||
procedure AsignarImporteTotal(AComision : IBizComisiones; Const ImporteTotal: Variant);
|
||||
end;
|
||||
|
||||
@ -71,7 +75,7 @@ uses
|
||||
uDAInterfaces, uDataTableUtils, uIEditorComision, uComisionesReportController,
|
||||
uDateUtils, uROTypes, DateUtils, Controls, Windows, uDialogUtils, uNumUtils,
|
||||
|
||||
uBizContactos, uVendedoresController, uBizFacturasCliente, uFacturasClienteController;
|
||||
uBizContactos, uVendedoresController;
|
||||
|
||||
{ TComisionesController }
|
||||
|
||||
@ -199,40 +203,42 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{
|
||||
function TComisionesController.BuscarFacturasDesglosadas(AFacturas: IBizFacturaCliente): IBizFacturasComision;
|
||||
var
|
||||
Cadena: String;
|
||||
Condicion: TDAWhereExpression;
|
||||
AArray : Array of TDAWhereExpression;
|
||||
i: Integer;
|
||||
|
||||
begin
|
||||
if Assigned(AFacturas) then
|
||||
Result := FDataModule.GetFacturasDesglosadas;
|
||||
with Result.DataTable.DynamicWhere do
|
||||
begin
|
||||
with AFacturas.DataTable do
|
||||
//Solo sacaremos las facturas elegidas y pasadas por parámetro
|
||||
if Assigned(AFacturas) then
|
||||
begin
|
||||
if not Active then Active := True;
|
||||
First;
|
||||
Cadena := '';
|
||||
While not Eof do
|
||||
with AFacturas.DataTable do
|
||||
begin
|
||||
if (Length(Cadena) > 0) then
|
||||
Cadena := Cadena + ', ';
|
||||
Cadena := Cadena + IntToStr(AFacturas.ID);
|
||||
Next;
|
||||
if not Active then Active := True;
|
||||
SetLength(AArray, AFacturas.DataTable.RecordCount);
|
||||
First;
|
||||
i := 0;
|
||||
While not Eof do
|
||||
begin
|
||||
AArray[i] := NewConstant(AFacturas.ID, datInteger);
|
||||
Next;
|
||||
Inc(i);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// Showmessage(Cadena);
|
||||
Result := FDataModule.GetFacturasDesglosadas;
|
||||
with Result.DataTable.Where do
|
||||
begin
|
||||
if NotEmpty then
|
||||
AddOperator(opAND);
|
||||
OpenBraket;
|
||||
AddText('ID_FACTURA in (' + Cadena + ')');
|
||||
CloseBraket;
|
||||
Condicion := NewBinaryExpression(NewField('', fld_Facturas_ComisionID_FACTURA), NewList(AArray), dboIn);
|
||||
|
||||
if IsEmpty then
|
||||
Expression := Condicion
|
||||
else
|
||||
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||
end;
|
||||
end;
|
||||
}
|
||||
|
||||
function TComisionesController.Buscar(const ID: Integer): IBizComisiones;
|
||||
begin
|
||||
@ -250,7 +256,7 @@ constructor TComisionesController.Create;
|
||||
begin
|
||||
inherited;
|
||||
AsignarDataModule;
|
||||
// FFacturasClienteController := TFacturasClienteController.Create;
|
||||
FFacturasClienteController := TFacturasClienteController.Create;
|
||||
end;
|
||||
|
||||
function TComisionesController.CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean;
|
||||
@ -258,9 +264,25 @@ begin
|
||||
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
|
||||
end;
|
||||
|
||||
procedure TComisionesController.DescartarCambios(AComision: IBizComisiones);
|
||||
begin
|
||||
if not Assigned(AComision) then
|
||||
raise Exception.Create ('Almacen no asignado');
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
if (AComision.State in dsEditModes) then
|
||||
AComision.Cancel;
|
||||
|
||||
AComision.DataTable.CancelUpdates;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TComisionesController.Destroy;
|
||||
begin
|
||||
// FFacturasClienteController := Nil;
|
||||
FFacturasClienteController := Nil;
|
||||
FDataModule := Nil;
|
||||
inherited;
|
||||
end;
|
||||
@ -281,11 +303,11 @@ begin
|
||||
if (AComision.Facturas.DataTable.State in dsEditModes) then
|
||||
AComision.Facturas.DataTable.Post;
|
||||
|
||||
if (AComision.Vendedores.DataTable.State in dsEditModes) then
|
||||
AComision.Vendedores.DataTable.Post;
|
||||
// if (AComision.Vendedores.DataTable.State in dsEditModes) then
|
||||
// AComision.Vendedores.DataTable.Post;
|
||||
|
||||
// if AComision.DataTable.FieldByName(fld_ComisionesID_AGENTE).IsNull then
|
||||
// raise Exception.Create('Debe indicar el agente de esta liquidación de comisiones.');
|
||||
if AComision.DataTable.FieldByName(fld_ComisionesID_AGENTE).IsNull then
|
||||
raise Exception.Create('Debe indicar el agente de esta liquidación de comisiones.');
|
||||
|
||||
if AComision.DataTable.FieldByName(fld_ComisionesFECHA).IsNull then
|
||||
raise Exception.Create('Debe indicar la fecha de esta liquidación de comisiones.');
|
||||
@ -342,49 +364,59 @@ function TComisionesController.ElegirFacturasComision(AComision: IBizComisiones)
|
||||
var
|
||||
AFacturasSeleccionadas : IBizFacturaCliente;
|
||||
AFacturasController: IFacturasClienteController;
|
||||
AFacturasDesglosadas: IBizFacturasComision;
|
||||
Cadena: TStringList;
|
||||
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if Assigned(AComision.Facturas) then
|
||||
if (AComision.ID_AGENTE <> 0) then
|
||||
begin
|
||||
//Recogemos los id de las facturas que ya tiene asociada la liquidación
|
||||
with AComision.Facturas.DataTable do
|
||||
|
||||
if Assigned(AComision.Facturas) then
|
||||
begin
|
||||
if not Active then Active := True;
|
||||
First;
|
||||
Cadena := TStringList.Create;
|
||||
While not Eof do
|
||||
//Recogemos los id de las facturas que ya tiene asociada la liquidación
|
||||
with AComision.Facturas.DataTable do
|
||||
begin
|
||||
Cadena.Add(IntToStr(AComision.Facturas.ID));
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
AFacturasController := TFacturasClienteController.Create;
|
||||
try
|
||||
AFacturasSeleccionadas := AFacturasController.BuscarTodasPendientesComision(AComision.ID_AGENTE, AComision.ID, Cadena.CommaText);
|
||||
AFacturasSeleccionadas := (AFacturasController.ElegirFacturas(AFacturasSeleccionadas, 'Elija uno o más facturas para incluirlos en esta liquidación de comisiones', True) as IBizFacturaCliente);
|
||||
|
||||
if Assigned(AFacturasSeleccionadas) then
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
//Copia las facturas desglosadas de las facturas seleccionadas
|
||||
DuplicarRegistros(AFacturasSeleccionadas.DataTable, AComision.Facturas.DataTable, mdrTodos, True, True, True);
|
||||
Result := True;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
if not Active then Active := True;
|
||||
First;
|
||||
Cadena := TStringList.Create;
|
||||
While not Eof do
|
||||
begin
|
||||
Cadena.Add(IntToStr(AComision.Facturas.ID_FACTURA));
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
Cadena.Free;
|
||||
AFacturasController := Nil;
|
||||
AFacturasSeleccionadas := Nil;
|
||||
AFacturasController := TFacturasClienteController.Create;
|
||||
try
|
||||
AFacturasSeleccionadas := AFacturasController.BuscarTodasPendientesComision(AComision.ID_AGENTE, AComision.ID, Cadena.CommaText);
|
||||
AFacturasSeleccionadas := (AFacturasController.ElegirFacturas(AFacturasSeleccionadas, 'Elija uno o más facturas para incluirlos en esta liquidación de comisiones', True) as IBizFacturaCliente);
|
||||
|
||||
if Assigned(AFacturasSeleccionadas) then
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
AFacturasDesglosadas := BuscarFacturasDesglosadas(AFacturasSeleccionadas);
|
||||
AFacturasDesglosadas.DataTable.Active := True;
|
||||
|
||||
//Copia las facturas desglosadas de las facturas seleccionadas
|
||||
DuplicarRegistros(AFacturasDesglosadas.DataTable, AComision.Facturas.DataTable, mdrTodos, True, True, False);
|
||||
Result := True;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
Cadena.Free;
|
||||
AFacturasController := Nil;
|
||||
AFacturasSeleccionadas := Nil;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
ShowWarningMessage('Debe elegir primero el comercial asociado a la liquidación');
|
||||
end;
|
||||
|
||||
|
||||
@ -396,7 +428,7 @@ var
|
||||
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
{
|
||||
if Assigned(AComision.Vendedores) then
|
||||
begin
|
||||
//Recogemos los id de los vendedores que ya tiene asociada la liquidación
|
||||
@ -451,6 +483,7 @@ begin
|
||||
AVendedoresSeleccionados := Nil;
|
||||
end;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
function TComisionesController.Eliminar(AComision: IBizComisiones): Boolean;
|
||||
@ -474,6 +507,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TComisionesController.EliminarFactura(AComision: IBizComisiones);
|
||||
var
|
||||
IdFactura: Variant;
|
||||
begin
|
||||
IdFactura := AComision.Facturas.ID_FACTURA;
|
||||
|
||||
AComision.Facturas.First;
|
||||
while AComision.Facturas.DataTable.Locate('ID_FACTURA', IdFactura,[]) do
|
||||
begin
|
||||
AComision.Facturas.Delete;
|
||||
AComision.Facturas.First;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TComisionesController.ExtraerSeleccionados(AComisiones: IBizComisiones): IBizComisiones;
|
||||
var
|
||||
ASeleccionados : IBizComisiones;
|
||||
@ -481,7 +528,6 @@ begin
|
||||
ASeleccionados := (Self.Buscar(ID_NULO) as IBizComisiones);
|
||||
CopyDataTableDA5(AComisiones.DataTable, ASeleccionados.DataTable, True);
|
||||
Result := ASeleccionados;
|
||||
|
||||
end;
|
||||
|
||||
procedure TComisionesController.FiltrarEmpresa(AComisiones: IBizComisiones);
|
||||
@ -506,6 +552,7 @@ end;
|
||||
|
||||
procedure TComisionesController.RecalcularComisiones(AComision: IBizComisiones; const ImporteTotal: Variant);
|
||||
begin
|
||||
{
|
||||
if Assigned(AComision)
|
||||
and Assigned(AComision.Vendedores)
|
||||
and (not AComision.Vendedores.IsEmpty) then
|
||||
@ -524,6 +571,7 @@ begin
|
||||
AComision.Vendedores.DataTable.EnableControls;
|
||||
end;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
procedure TComisionesController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
|
||||
@ -546,6 +594,8 @@ begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
AComision.DataTable.ApplyUpdates;
|
||||
AComision.Facturas.DataTable.ApplyUpdates;
|
||||
AComision.Facturas.DataTable.Refresh;
|
||||
|
||||
Result := True;
|
||||
finally
|
||||
@ -553,7 +603,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
procedure TComisionesController.Preview(AComision: IBizComisiones; AllItems: Boolean = false);
|
||||
procedure TComisionesController.Preview(AComision: IBizComisiones; AllItems: Boolean = false; AllDetails: Boolean = false);
|
||||
var
|
||||
AReportController : IComisionesReportController;
|
||||
ID_Comisiones: TStringList;
|
||||
@ -580,7 +630,7 @@ begin
|
||||
else
|
||||
ID_Comisiones.Add(IntToStr(AComision.ID));
|
||||
|
||||
AReportController.Preview(ID_Comisiones.CommaText);
|
||||
AReportController.Preview(ID_Comisiones.CommaText, AllDetails);
|
||||
|
||||
finally
|
||||
AReportController := NIL;
|
||||
@ -588,7 +638,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TComisionesController.Print(AComision: IBizComisiones; AllItems: Boolean = false);
|
||||
procedure TComisionesController.Print(AComision: IBizComisiones; AllItems: Boolean = false; AllDetails: Boolean = false);
|
||||
var
|
||||
AReportController : IComisionesReportController;
|
||||
ID_Comisiones: TStringList;
|
||||
@ -615,7 +665,7 @@ begin
|
||||
else
|
||||
ID_Comisiones.Add(IntToStr(AComision.ID));
|
||||
|
||||
AReportController.Print(ID_Comisiones.CommaText);
|
||||
AReportController.Print(ID_Comisiones.CommaText, AllDetails);
|
||||
|
||||
finally
|
||||
AReportController := NIL;
|
||||
|
||||
@ -10,8 +10,8 @@ uses
|
||||
type
|
||||
IComisionesReportController = interface(IControllerBase)
|
||||
['{7ABB74C2-050C-4737-BC4C-C5F20883CED8}']
|
||||
procedure Preview(const AComisionID : String);
|
||||
procedure Print(const AComisionID : String);
|
||||
procedure Preview(const AComisionID : String; const AllDetails: Boolean = False);
|
||||
procedure Print(const AComisionID : String; const AllDetails: Boolean = False);
|
||||
end;
|
||||
|
||||
TComisionesReportController = class(TControllerBase, IComisionesReportController)
|
||||
@ -22,8 +22,8 @@ type
|
||||
constructor Create; override;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure Preview(const AComisionID : String);
|
||||
procedure Print(const AComisionID : String);
|
||||
procedure Preview(const AComisionID : String; const AllDetails: Boolean = False);
|
||||
procedure Print(const AComisionID : String; const AllDetails: Boolean = False);
|
||||
end;
|
||||
|
||||
|
||||
@ -54,14 +54,14 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TComisionesReportController.Preview(const AComisionID : String);
|
||||
procedure TComisionesReportController.Preview(const AComisionID : String; const AllDetails: Boolean);
|
||||
var
|
||||
AStream: Binary;
|
||||
AEditor : IEditorComisionesPreview;
|
||||
begin
|
||||
AEditor := NIL;
|
||||
|
||||
AStream := FDataModule.GetReport(AComisionID);
|
||||
AStream := FDataModule.GetReport(AComisionID, AllDetails);
|
||||
try
|
||||
CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
@ -77,7 +77,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TComisionesReportController.Print(const AComisionID : String);
|
||||
procedure TComisionesReportController.Print(const AComisionID : String; const AllDetails: Boolean);
|
||||
var
|
||||
AStream: Binary;
|
||||
AEditor : IEditorComisionesPreview;
|
||||
@ -86,7 +86,7 @@ begin
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
AStream := FDataModule.GetReport(AComisionID);
|
||||
AStream := FDataModule.GetReport(AComisionID, AllDetails);
|
||||
try
|
||||
CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
|
||||
@ -14,12 +14,12 @@ inherited DataModuleComisiones: TDataModuleComisiones
|
||||
Top = 84
|
||||
end
|
||||
object rda_Comisiones: TDARemoteDataAdapter
|
||||
DataStreamer = Bin2DataStreamer
|
||||
GetSchemaCall.RemoteService = RORemoteService
|
||||
GetDataCall.RemoteService = RORemoteService
|
||||
UpdateDataCall.RemoteService = RORemoteService
|
||||
GetScriptsCall.RemoteService = RORemoteService
|
||||
RemoteService = RORemoteService
|
||||
DataStreamer = Bin2DataStreamer
|
||||
Left = 51
|
||||
Top = 143
|
||||
end
|
||||
@ -74,26 +74,30 @@ inherited DataModuleComisiones: TDataModuleComisiones
|
||||
Alignment = taRightJustify
|
||||
DictionaryEntry = 'Comisiones_IMPORTE_TOTAL'
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_ALTA'
|
||||
DataType = datDateTime
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_MODIFICACION'
|
||||
DataType = datDateTime
|
||||
end
|
||||
item
|
||||
Name = 'USUARIO'
|
||||
DataType = datString
|
||||
Size = 20
|
||||
DisplayLabel = 'Usuario'
|
||||
DictionaryEntry = 'Comisiones_USUARIO'
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'DELEGACION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'COMISION'
|
||||
DataType = datFloat
|
||||
end>
|
||||
Params = <>
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
RemoteDataAdapter = rda_Comisiones
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'Comisiones'
|
||||
IndexDefs = <>
|
||||
Left = 224
|
||||
@ -109,11 +113,20 @@ inherited DataModuleComisiones: TDataModuleComisiones
|
||||
RemoteUpdatesOptions = []
|
||||
Fields = <
|
||||
item
|
||||
Name = 'ID'
|
||||
Name = 'ID_FACTURA'
|
||||
DataType = datInteger
|
||||
DisplayLabel = 'Facturas_Comision_ID'
|
||||
DictionaryEntry = 'Facturas_Comision_ID'
|
||||
InPrimaryKey = True
|
||||
end
|
||||
item
|
||||
Name = 'COMISION'
|
||||
DataType = datFloat
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_COMISIONABLE'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_COMISION'
|
||||
DataType = datFloat
|
||||
end
|
||||
item
|
||||
Name = 'ID_EMPRESA'
|
||||
@ -121,20 +134,6 @@ inherited DataModuleComisiones: TDataModuleComisiones
|
||||
DisplayLabel = 'Facturas_Comision_ID_EMPRESA'
|
||||
DictionaryEntry = 'Facturas_Comision_ID_EMPRESA'
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Referencia'
|
||||
DictionaryEntry = 'Facturas_Comision_REFERENCIA'
|
||||
end
|
||||
item
|
||||
Name = 'TIPO'
|
||||
DataType = datString
|
||||
Size = 1
|
||||
DisplayLabel = 'Facturas_Comision_TIPO'
|
||||
DictionaryEntry = 'Facturas_Comision_TIPO'
|
||||
end
|
||||
item
|
||||
Name = 'ID_COMISION_LIQUIDADA'
|
||||
DataType = datInteger
|
||||
@ -143,10 +142,15 @@ inherited DataModuleComisiones: TDataModuleComisiones
|
||||
DictionaryEntry = 'Facturas_Comision_ID_COMISION_LIQUIDADA'
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_FACTURA'
|
||||
Name = 'FECHA'
|
||||
DataType = datDateTime
|
||||
DisplayLabel = 'Fecha'
|
||||
DictionaryEntry = 'Facturas_Comision_FECHA_FACTURA'
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Referencia'
|
||||
DictionaryEntry = 'Facturas_Comision_REFERENCIA'
|
||||
end
|
||||
item
|
||||
Name = 'SITUACION'
|
||||
@ -155,172 +159,12 @@ inherited DataModuleComisiones: TDataModuleComisiones
|
||||
DisplayLabel = 'Situaci'#243'n'
|
||||
DictionaryEntry = 'Facturas_Comision_SITUACION'
|
||||
end
|
||||
item
|
||||
Name = 'BASE_IMPONIBLE'
|
||||
DataType = datCurrency
|
||||
DisplayLabel = 'Base imponible'
|
||||
Alignment = taRightJustify
|
||||
DictionaryEntry = 'Facturas_Comision_BASE_IMPONIBLE'
|
||||
end
|
||||
item
|
||||
Name = 'DESCUENTO'
|
||||
DataType = datFloat
|
||||
DisplayLabel = 'Facturas_Comision_DESCUENTO'
|
||||
DictionaryEntry = 'Facturas_Comision_DESCUENTO'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_DESCUENTO'
|
||||
DataType = datCurrency
|
||||
DisplayLabel = 'Facturas_Comision_IMPORTE_DESCUENTO'
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_DESCUENTO'
|
||||
end
|
||||
item
|
||||
Name = 'IVA'
|
||||
DataType = datFloat
|
||||
DisplayLabel = 'Facturas_Comision_IVA'
|
||||
DictionaryEntry = 'Facturas_Comision_IVA'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_IVA'
|
||||
DataType = datCurrency
|
||||
DisplayLabel = 'Facturas_Comision_IMPORTE_IVA'
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_IVA'
|
||||
end
|
||||
item
|
||||
Name = 'RE'
|
||||
DataType = datFloat
|
||||
DisplayLabel = 'Facturas_Comision_RE'
|
||||
DictionaryEntry = 'Facturas_Comision_RE'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_RE'
|
||||
DataType = datCurrency
|
||||
DisplayLabel = 'Facturas_Comision_IMPORTE_RE'
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_RE'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_TOTAL'
|
||||
DataType = datCurrency
|
||||
DisplayLabel = 'Facturas_Comision_IMPORTE_TOTAL'
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_TOTAL'
|
||||
end
|
||||
item
|
||||
Name = 'OBSERVACIONES'
|
||||
DataType = datMemo
|
||||
DisplayLabel = 'Facturas_Comision_OBSERVACIONES'
|
||||
DictionaryEntry = 'Facturas_Comision_OBSERVACIONES'
|
||||
end
|
||||
item
|
||||
Name = 'ID_CLIENTE'
|
||||
DataType = datInteger
|
||||
DisplayLabel = 'IdCliente'
|
||||
DictionaryEntry = 'Facturas_Comision_ID_CLIENTE'
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE_CLIENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Nombre cliente'
|
||||
DictionaryEntry = 'Facturas_Comision_NOMBRE_CLIENTE'
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE_COMERCIAL_CLIENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Nombre comercial cliente'
|
||||
DictionaryEntry = 'Facturas_Comision_NOMBRE_COMERCIAL_CLIENTE'
|
||||
end
|
||||
item
|
||||
Name = 'NIF_CIF'
|
||||
DataType = datString
|
||||
Size = 15
|
||||
DisplayLabel = 'Facturas_Comision_NIF_CIF'
|
||||
DictionaryEntry = 'Facturas_Comision_NIF_CIF'
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Raz'#243'n social'
|
||||
DictionaryEntry = 'Facturas_Comision_NOMBRE'
|
||||
end
|
||||
item
|
||||
Name = 'CALLE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Facturas_Comision_CALLE'
|
||||
DictionaryEntry = 'Facturas_Comision_CALLE'
|
||||
end
|
||||
item
|
||||
Name = 'POBLACION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Facturas_Comision_POBLACION'
|
||||
DictionaryEntry = 'Facturas_Comision_POBLACION'
|
||||
end
|
||||
item
|
||||
Name = 'PROVINCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Facturas_Comision_PROVINCIA'
|
||||
DictionaryEntry = 'Facturas_Comision_PROVINCIA'
|
||||
end
|
||||
item
|
||||
Name = 'CODIGO_POSTAL'
|
||||
DataType = datString
|
||||
Size = 10
|
||||
DisplayLabel = 'Facturas_Comision_CODIGO_POSTAL'
|
||||
DictionaryEntry = 'Facturas_Comision_CODIGO_POSTAL'
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_ALTA'
|
||||
DataType = datDateTime
|
||||
DisplayLabel = 'Facturas_Comision_FECHA_ALTA'
|
||||
DictionaryEntry = 'Facturas_Comision_FECHA_ALTA'
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_MODIFICACION'
|
||||
DataType = datDateTime
|
||||
DisplayLabel = 'Facturas_Comision_FECHA_MODIFICACION'
|
||||
DictionaryEntry = 'Facturas_Comision_FECHA_MODIFICACION'
|
||||
end
|
||||
item
|
||||
Name = 'USUARIO'
|
||||
DataType = datString
|
||||
Size = 30
|
||||
DisplayLabel = 'Facturas_Comision_USUARIO'
|
||||
DictionaryEntry = 'Facturas_Comision_USUARIO'
|
||||
end
|
||||
item
|
||||
Name = 'ID_FORMA_PAGO'
|
||||
DataType = datInteger
|
||||
DisplayLabel = 'Facturas_Comision_ID_FORMA_PAGO'
|
||||
DictionaryEntry = 'Facturas_Comision_ID_FORMA_PAGO'
|
||||
end
|
||||
item
|
||||
Name = 'RECARGO_EQUIVALENCIA'
|
||||
DataType = datSmallInt
|
||||
DisplayLabel = 'Facturas_Comision_RECARGO_EQUIVALENCIA'
|
||||
DictionaryEntry = 'Facturas_Comision_RECARGO_EQUIVALENCIA'
|
||||
end
|
||||
item
|
||||
Name = 'ID_TIPO_IVA'
|
||||
DataType = datInteger
|
||||
DisplayLabel = 'Facturas_Comision_ID_TIPO_IVA'
|
||||
DictionaryEntry = 'Facturas_Comision_ID_TIPO_IVA'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_NETO'
|
||||
DataType = datCurrency
|
||||
DisplayLabel = 'Facturas_Comision_IMPORTE_NETO'
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_NETO'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_PORTE'
|
||||
DataType = datCurrency
|
||||
DisplayLabel = 'Facturas_Comision_IMPORTE_PORTE'
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_PORTE'
|
||||
end
|
||||
item
|
||||
Name = 'ID_AGENTE'
|
||||
DataType = datInteger
|
||||
@ -328,43 +172,14 @@ inherited DataModuleComisiones: TDataModuleComisiones
|
||||
DictionaryEntry = 'Facturas_Comision_ID_AGENTE'
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA_COMISION'
|
||||
Name = 'AGENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Facturas_Comision_REFERENCIA_COMISION'
|
||||
DictionaryEntry = 'Facturas_Comision_REFERENCIA_COMISION'
|
||||
end
|
||||
item
|
||||
Name = 'IGNORAR_CONTABILIDAD'
|
||||
DataType = datSmallInt
|
||||
DisplayLabel = 'Facturas_Comision_IGNORAR_CONTABILIDAD'
|
||||
DictionaryEntry = 'Facturas_Comision_IGNORAR_CONTABILIDAD'
|
||||
end
|
||||
item
|
||||
Name = 'ID_TIENDA'
|
||||
DataType = datInteger
|
||||
DisplayLabel = 'Facturas_Comision_ID_TIENDA'
|
||||
DictionaryEntry = 'Facturas_Comision_ID_TIENDA'
|
||||
end
|
||||
item
|
||||
Name = 'TIENDA'
|
||||
Name = 'CLIENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Facturas_Comision_TIENDA'
|
||||
DictionaryEntry = 'Facturas_Comision_TIENDA'
|
||||
end
|
||||
item
|
||||
Name = 'ID_SUBCUENTA'
|
||||
DataType = datInteger
|
||||
DisplayLabel = 'Facturas_Comision_ID_SUBCUENTA'
|
||||
DictionaryEntry = 'Facturas_Comision_ID_SUBCUENTA'
|
||||
end
|
||||
item
|
||||
Name = 'SUBCUENTA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DisplayLabel = 'Facturas_Comision_SUBCUENTA'
|
||||
DictionaryEntry = 'Facturas_Comision_SUBCUENTA'
|
||||
end>
|
||||
Params = <>
|
||||
MasterMappingMode = mmWhere
|
||||
@ -373,8 +188,6 @@ inherited DataModuleComisiones: TDataModuleComisiones
|
||||
MasterSource = ds_Comisiones
|
||||
MasterFields = 'ID'
|
||||
DetailFields = 'ID_COMISION_LIQUIDADA'
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'Facturas_Comision'
|
||||
IndexDefs = <>
|
||||
Left = 376
|
||||
@ -435,8 +248,6 @@ inherited DataModuleComisiones: TDataModuleComisiones
|
||||
MasterSource = ds_Comisiones
|
||||
MasterFields = 'ID'
|
||||
DetailFields = 'ID_COMISION'
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'Vendedores_Comision'
|
||||
IndexDefs = <>
|
||||
Left = 384
|
||||
|
||||
@ -26,13 +26,15 @@ type
|
||||
function _GetFacturas : IBizFacturasComision;
|
||||
function _GetVendedores : IBizVendedoresComision;
|
||||
public
|
||||
function GetItems : IBizComisiones; overload;
|
||||
function GetFacturasSinComision : IBizFacturasComision;
|
||||
// function GetItems : IBizComisiones; overload;
|
||||
function GetItems (withDetails: Boolean = true) : IBizComisiones; overload;
|
||||
// function GetFacturasSinComision : IBizFacturasComision;
|
||||
function GetFacturasDesglosadas : IBizFacturasComision;
|
||||
function GetItem(const ID : Integer) : IBizComisiones;
|
||||
function NewItem : IBizComisiones;
|
||||
|
||||
// Report
|
||||
function GetReport(const AComisionID: String): Binary;
|
||||
function GetReport(const AComisionID: String; const AllDetails: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -50,7 +52,7 @@ begin
|
||||
RORemoteService.Message := dmConexion.Message;
|
||||
end;
|
||||
|
||||
function TDataModuleComisiones.GetItems: IBizComisiones;
|
||||
{function TDataModuleComisiones.GetItems: IBizComisiones;
|
||||
var
|
||||
AComisiones : TDAMemDataTable;
|
||||
begin
|
||||
@ -65,14 +67,14 @@ begin
|
||||
with TBizComisiones(AComisiones.BusinessEventsObj) do
|
||||
begin
|
||||
Facturas := _GetFacturas;
|
||||
Vendedores := _GetVendedores;
|
||||
// Vendedores := _GetVendedores;
|
||||
end;
|
||||
|
||||
Result := (AComisiones as IBizComisiones);
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
end;}
|
||||
|
||||
function TDataModuleComisiones._GetFacturas: IBizFacturasComision;
|
||||
var
|
||||
@ -110,7 +112,21 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDataModuleComisiones.GetFacturasSinComision: IBizFacturasComision;
|
||||
function TDataModuleComisiones.GetFacturasDesglosadas: IBizFacturasComision;
|
||||
var
|
||||
AFacturasDesglosadas : TDAMemDataTable;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
AFacturasDesglosadas := CloneDataTable(tbl_Facturas_Comision);
|
||||
AFacturasDesglosadas.BusinessRulesID := BIZ_CLIENT_FACTURAS_COMISION;
|
||||
Result := (AFacturasDesglosadas as IBizFacturasComision);
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
{function TDataModuleComisiones.GetFacturasSinComision: IBizFacturasComision;
|
||||
var
|
||||
AFacturasSinComision : TDAMemDataTable;
|
||||
begin
|
||||
@ -122,7 +138,7 @@ begin
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
end;}
|
||||
|
||||
function TDataModuleComisiones.GetItem(const ID: Integer): IBizComisiones;
|
||||
var
|
||||
@ -148,9 +164,39 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDataModuleComisiones.GetReport(const AComisionID: String): Binary;
|
||||
function TDataModuleComisiones.GetItems(withDetails: Boolean): IBizComisiones;
|
||||
var
|
||||
AComisiones : TDAMemDataTable;
|
||||
begin
|
||||
Result := (RORemoteService as IsrvComisiones).GenerateReport(AComisionID);
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
AComisiones := CloneDataTable(tbl_Comisiones);
|
||||
|
||||
// EL CAMPO REFERENCIA TIENE QUE SER AUTOREFRESH!!!!!
|
||||
AComisiones.FieldByName(fld_ComisionesREFERENCIA).ServerAutoRefresh := TRUE;
|
||||
AComisiones.BusinessRulesID := BIZ_CLIENT_COMISIONES;
|
||||
|
||||
if (withDetails = True) then
|
||||
with TBizComisiones(AComisiones.BusinessEventsObj) do
|
||||
begin
|
||||
Facturas := _GetFacturas;
|
||||
// Vendedores := _GetVendedores;
|
||||
end;
|
||||
|
||||
Result := (AComisiones as IBizComisiones);
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDataModuleComisiones.GetReport(const AComisionID: String; const AllDetails: Boolean): Binary;
|
||||
begin
|
||||
try
|
||||
ShowHourglassCursor;
|
||||
Result := (RORemoteService as IsrvComisiones).GenerateReport(AComisionID, AllDetails);
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDataModuleComisiones.NewItem: IBizComisiones;
|
||||
|
||||
@ -8,10 +8,12 @@ uses
|
||||
type
|
||||
IDataModuleComisiones = interface
|
||||
['{91E197D0-2356-46ED-81CD-4907D47A961F}']
|
||||
function GetItems: IBizComisiones;
|
||||
// function GetItems: IBizComisiones; overload;
|
||||
function GetItems (withDetails: Boolean = true) : IBizComisiones; overload;
|
||||
function GetItem(const ID : Integer) : IBizComisiones;
|
||||
function NewItem : IBizComisiones;
|
||||
function GetFacturasSinComision : IBizFacturasComision;
|
||||
// function GetFacturasSinComision : IBizFacturasComision;
|
||||
function GetFacturasDesglosadas : IBizFacturasComision;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
@ -8,7 +8,7 @@ uses
|
||||
type
|
||||
IDataModuleComisionesReport = interface
|
||||
['{81994438-6047-4B97-83C1-257ED9CCDA74}']
|
||||
function GetReport(const AComisionID: String): Binary;
|
||||
function GetReport(const AComisionID: String; const AllDetails: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -65,9 +65,7 @@ object PluginComisiones: TPluginComisiones
|
||||
object actComisiones: TAction
|
||||
Category = 'Comisiones'
|
||||
Caption = 'Liquidaciones de comisiones'
|
||||
Enabled = False
|
||||
ImageIndex = 0
|
||||
Visible = False
|
||||
OnExecute = actComisionesExecute
|
||||
OnUpdate = actComisionesUpdate
|
||||
end
|
||||
@ -79,7 +77,7 @@ object PluginComisiones: TPluginComisiones
|
||||
object Empresas1: TMenuItem
|
||||
Caption = 'Empresa'
|
||||
object Comisiones1: TMenuItem
|
||||
Tag = 201
|
||||
Tag = 300
|
||||
Action = actComisiones
|
||||
SubMenuImages = SmallImages
|
||||
end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -23,21 +23,24 @@ type
|
||||
frxDBCabecera: TfrxDBDataset;
|
||||
frxReport: TfrxReport;
|
||||
Bin2DataStreamer: TDABin2DataStreamer;
|
||||
frxDBDetalles1: TfrxDBDataset;
|
||||
DADataDetalles1: TDADataSource;
|
||||
tbl_Facturas: TDAMemDataTable;
|
||||
frxDBDetalles2: TfrxDBDataset;
|
||||
DADataDetalles2: TDADataSource;
|
||||
tbl_Vendedores: TDAMemDataTable;
|
||||
tbl_FacturasComision: TDAMemDataTable;
|
||||
DADataDetalles: TDADataSource;
|
||||
frxDBDetalles: TfrxDBDataset;
|
||||
tbl_FacturasComisionDesglosado: TDAMemDataTable;
|
||||
DADataDetalles3: TDADataSource;
|
||||
frxDBDetalles3: TfrxDBDataset;
|
||||
schReport: TDASchema;
|
||||
DataDictionary: TDADataDictionary;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
private
|
||||
FConnection: IDAConnection;
|
||||
//Genera cada uno de los albaranes a imprimir
|
||||
procedure GenerarComision(const ID: integer); overload;
|
||||
procedure GenerarComision(const ID: integer; const AllDetails: Boolean); overload;
|
||||
public
|
||||
function GenerarComision(const AComisionID : String): Binary; overload;
|
||||
function GenerarComision(const AComisionID : String; const AllDetails: Boolean): Binary; overload;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -59,7 +62,7 @@ begin
|
||||
frxReport.EngineOptions.NewSilentMode := simReThrow;
|
||||
end;
|
||||
|
||||
procedure TRptComisiones.GenerarComision(const ID: integer);
|
||||
procedure TRptComisiones.GenerarComision(const ID: integer; const AllDetails: Boolean);
|
||||
var
|
||||
AInforme: Variant;
|
||||
|
||||
@ -67,22 +70,23 @@ begin
|
||||
FConnection.BeginTransaction;
|
||||
try
|
||||
tbl_Comisiones.Active := False;
|
||||
tbl_Facturas.Active := False;
|
||||
tbl_Vendedores.Active := False;
|
||||
tbl_FacturasComision.Active := False;
|
||||
tbl_FacturasComisionDesglosado.Active := False;
|
||||
|
||||
tbl_Comisiones.ParamByName('ID').AsInteger := ID;
|
||||
tbl_Facturas.ParamByName('ID').AsInteger := ID;
|
||||
tbl_Vendedores.ParamByName('ID').AsInteger := ID;
|
||||
tbl_FacturasComision.ParamByName('ID').AsInteger := ID;
|
||||
|
||||
|
||||
tbl_Comisiones.Active := True;
|
||||
tbl_Facturas.Active := True;
|
||||
tbl_Vendedores.Active := True;
|
||||
tbl_FacturasComision.Active := True;
|
||||
// tbl_FacturasComisionDesglosado.Active := True;
|
||||
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptComision, tbl_Comisiones.FieldByName('ID_EMPRESA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: GenerarComision, no encuentra informe' + rptComision));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.Variables.Variables['AllDetails'] := AllDetails;
|
||||
frxReport.ReportOptions.Name := 'Comisiones';
|
||||
frxReport.PrepareReport(False);
|
||||
finally
|
||||
@ -90,7 +94,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRptComisiones.GenerarComision(const AComisionID: String): Binary;
|
||||
function TRptComisiones.GenerarComision(const AComisionID: String; const AllDetails: Boolean): Binary;
|
||||
var
|
||||
ID_Comisiones: TStringList;
|
||||
i: Integer;
|
||||
@ -103,7 +107,7 @@ begin
|
||||
|
||||
//Vamos generando todos y cada uno de las comisiones pedidas
|
||||
for i := 0 to ID_Comisiones.Count - 1 do
|
||||
GenerarComision(StrToInt(ID_Comisiones.Strings[i]));
|
||||
GenerarComision(StrToInt(ID_Comisiones.Strings[i]), AllDetails);
|
||||
|
||||
frxReport.PreviewPages.SaveToStream(Result);
|
||||
end;
|
||||
|
||||
@ -301,13 +301,24 @@ object srvComisiones: TsrvComisiones
|
||||
Statements = <
|
||||
item
|
||||
Connection = 'IBX'
|
||||
TargetTable = 'V_FACTURAS_CLIENTE'
|
||||
StatementType = stAutoSQL
|
||||
Default = True
|
||||
TargetTable = 'V_AGEN_COM_DET_AGRU'
|
||||
SQL =
|
||||
'select'#10' V_AGEN_COM_DET_AGRU.ID_FACTURA,'#10' V_AGEN_COM_' +
|
||||
'DET_AGRU.COMISION,'#10' V_AGEN_COM_DET_AGRU.IMPORTE_COMISIONAB' +
|
||||
'LE,'#10' V_AGEN_COM_DET_AGRU.IMPORTE_COMISION,'#10#10' FACTURA' +
|
||||
'S_CLIENTE.ID_EMPRESA,'#10' FACTURAS_CLIENTE.ID_COMISION_LIQUID' +
|
||||
'ADA,'#10' FACTURAS_CLIENTE.FECHA_FACTURA as FECHA,'#10' FACT' +
|
||||
'URAS_CLIENTE.REFERENCIA,'#10' FACTURAS_CLIENTE.SITUACION,'#10' ' +
|
||||
' FACTURAS_CLIENTE.ID_CLIENTE,'#10' FACTURAS_CLIENTE.ID_AGENT' +
|
||||
'E,'#10#10' CONTACTOS1.NOMBRE as AGENTE,'#10' CONTACTOS2.NOMBRE' +
|
||||
' as CLIENTE'#10#10#10'from V_AGEN_COM_DET_AGRU'#10'LEFT JOIN FACTURAS_CLIENT' +
|
||||
'E on (FACTURAS_CLIENTE.ID = V_AGEN_COM_DET_AGRU.ID_FACTURA)'#10'LEFT' +
|
||||
' JOIN CONTACTOS CONTACTOS1 ON (CONTACTOS1.ID = FACTURAS_CLIENTE.' +
|
||||
'ID_AGENTE)'#10'LEFT JOIN CONTACTOS CONTACTOS2 ON (CONTACTOS2.ID = FA' +
|
||||
'CTURAS_CLIENTE.ID_CLIENTE)'#10'where {where}'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
DatasetField = 'ID'
|
||||
TableField = 'ID'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_EMPRESA'
|
||||
TableField = 'ID_EMPRESA'
|
||||
@ -316,180 +327,77 @@ object srvComisiones: TsrvComisiones
|
||||
DatasetField = 'REFERENCIA'
|
||||
TableField = 'REFERENCIA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'TIPO'
|
||||
TableField = 'TIPO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_COMISION_LIQUIDADA'
|
||||
TableField = 'ID_COMISION_LIQUIDADA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'FECHA_FACTURA'
|
||||
TableField = 'FECHA_FACTURA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'SITUACION'
|
||||
TableField = 'SITUACION'
|
||||
end
|
||||
item
|
||||
DatasetField = 'BASE_IMPONIBLE'
|
||||
TableField = 'BASE_IMPONIBLE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'DESCUENTO'
|
||||
TableField = 'DESCUENTO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_DESCUENTO'
|
||||
TableField = 'IMPORTE_DESCUENTO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IVA'
|
||||
TableField = 'IVA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_IVA'
|
||||
TableField = 'IMPORTE_IVA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'RE'
|
||||
TableField = 'RE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_RE'
|
||||
TableField = 'IMPORTE_RE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_TOTAL'
|
||||
TableField = 'IMPORTE_TOTAL'
|
||||
end
|
||||
item
|
||||
DatasetField = 'OBSERVACIONES'
|
||||
TableField = 'OBSERVACIONES'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_CLIENTE'
|
||||
TableField = 'ID_CLIENTE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'NOMBRE_CLIENTE'
|
||||
TableField = 'NOMBRE_CLIENTE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'NOMBRE_COMERCIAL_CLIENTE'
|
||||
TableField = 'NOMBRE_COMERCIAL_CLIENTE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'NIF_CIF'
|
||||
TableField = 'NIF_CIF'
|
||||
end
|
||||
item
|
||||
DatasetField = 'NOMBRE'
|
||||
TableField = 'NOMBRE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'CALLE'
|
||||
TableField = 'CALLE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'POBLACION'
|
||||
TableField = 'POBLACION'
|
||||
end
|
||||
item
|
||||
DatasetField = 'PROVINCIA'
|
||||
TableField = 'PROVINCIA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'CODIGO_POSTAL'
|
||||
TableField = 'CODIGO_POSTAL'
|
||||
end
|
||||
item
|
||||
DatasetField = 'FECHA_ALTA'
|
||||
TableField = 'FECHA_ALTA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'FECHA_MODIFICACION'
|
||||
TableField = 'FECHA_MODIFICACION'
|
||||
end
|
||||
item
|
||||
DatasetField = 'USUARIO'
|
||||
TableField = 'USUARIO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_FORMA_PAGO'
|
||||
TableField = 'ID_FORMA_PAGO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'RECARGO_EQUIVALENCIA'
|
||||
TableField = 'RECARGO_EQUIVALENCIA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_TIPO_IVA'
|
||||
TableField = 'ID_TIPO_IVA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_NETO'
|
||||
TableField = 'IMPORTE_NETO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_PORTE'
|
||||
TableField = 'IMPORTE_PORTE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_AGENTE'
|
||||
TableField = 'ID_AGENTE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'REFERENCIA_COMISION'
|
||||
TableField = 'REFERENCIA_COMISION'
|
||||
DatasetField = 'AGENTE'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'AGENTE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IGNORAR_CONTABILIDAD'
|
||||
TableField = 'IGNORAR_CONTABILIDAD'
|
||||
DatasetField = 'ID_FACTURA'
|
||||
TableField = 'ID_FACTURA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_TIENDA'
|
||||
TableField = 'ID_TIENDA'
|
||||
DatasetField = 'FECHA'
|
||||
TableField = 'FECHA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'TIENDA'
|
||||
TableField = 'TIENDA'
|
||||
DatasetField = 'CLIENTE'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'CLIENTE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_SUBCUENTA'
|
||||
TableField = 'ID_SUBCUENTA'
|
||||
DatasetField = 'COMISION'
|
||||
TableField = 'COMISION'
|
||||
end
|
||||
item
|
||||
DatasetField = 'SUBCUENTA'
|
||||
TableField = 'SUBCUENTA'
|
||||
DatasetField = 'IMPORTE_COMISIONABLE'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'IMPORTE_COMISIONABLE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_COMISION'
|
||||
TableField = 'IMPORTE_COMISION'
|
||||
end>
|
||||
end>
|
||||
Name = 'Facturas_Comision'
|
||||
Fields = <
|
||||
item
|
||||
Name = 'ID'
|
||||
Name = 'ID_FACTURA'
|
||||
DataType = datInteger
|
||||
DictionaryEntry = 'Facturas_Comision_ID'
|
||||
InPrimaryKey = True
|
||||
end
|
||||
item
|
||||
Name = 'COMISION'
|
||||
DataType = datFloat
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_COMISIONABLE'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_COMISION'
|
||||
DataType = datFloat
|
||||
end
|
||||
item
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
DictionaryEntry = 'Facturas_Comision_ID_EMPRESA'
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_REFERENCIA'
|
||||
end
|
||||
item
|
||||
Name = 'TIPO'
|
||||
DataType = datString
|
||||
Size = 1
|
||||
DictionaryEntry = 'Facturas_Comision_TIPO'
|
||||
end
|
||||
item
|
||||
Name = 'ID_COMISION_LIQUIDADA'
|
||||
DataType = datInteger
|
||||
@ -497,9 +405,14 @@ object srvComisiones: TsrvComisiones
|
||||
DictionaryEntry = 'Facturas_Comision_ID_COMISION_LIQUIDADA'
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_FACTURA'
|
||||
Name = 'FECHA'
|
||||
DataType = datDateTime
|
||||
DictionaryEntry = 'Facturas_Comision_FECHA_FACTURA'
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_REFERENCIA'
|
||||
end
|
||||
item
|
||||
Name = 'SITUACION'
|
||||
@ -507,182 +420,25 @@ object srvComisiones: TsrvComisiones
|
||||
Size = 19
|
||||
DictionaryEntry = 'Facturas_Comision_SITUACION'
|
||||
end
|
||||
item
|
||||
Name = 'BASE_IMPONIBLE'
|
||||
DataType = datCurrency
|
||||
DictionaryEntry = 'Facturas_Comision_BASE_IMPONIBLE'
|
||||
end
|
||||
item
|
||||
Name = 'DESCUENTO'
|
||||
DataType = datFloat
|
||||
DictionaryEntry = 'Facturas_Comision_DESCUENTO'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_DESCUENTO'
|
||||
DataType = datCurrency
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_DESCUENTO'
|
||||
end
|
||||
item
|
||||
Name = 'IVA'
|
||||
DataType = datFloat
|
||||
DictionaryEntry = 'Facturas_Comision_IVA'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_IVA'
|
||||
DataType = datCurrency
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_IVA'
|
||||
end
|
||||
item
|
||||
Name = 'RE'
|
||||
DataType = datFloat
|
||||
DictionaryEntry = 'Facturas_Comision_RE'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_RE'
|
||||
DataType = datCurrency
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_RE'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_TOTAL'
|
||||
DataType = datCurrency
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_TOTAL'
|
||||
end
|
||||
item
|
||||
Name = 'OBSERVACIONES'
|
||||
DataType = datMemo
|
||||
DictionaryEntry = 'Facturas_Comision_OBSERVACIONES'
|
||||
end
|
||||
item
|
||||
Name = 'ID_CLIENTE'
|
||||
DataType = datInteger
|
||||
DictionaryEntry = 'Facturas_Comision_ID_CLIENTE'
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE_CLIENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_NOMBRE_CLIENTE'
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE_COMERCIAL_CLIENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_NOMBRE_COMERCIAL_CLIENTE'
|
||||
end
|
||||
item
|
||||
Name = 'NIF_CIF'
|
||||
DataType = datString
|
||||
Size = 15
|
||||
DictionaryEntry = 'Facturas_Comision_NIF_CIF'
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_NOMBRE'
|
||||
end
|
||||
item
|
||||
Name = 'CALLE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_CALLE'
|
||||
end
|
||||
item
|
||||
Name = 'POBLACION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_POBLACION'
|
||||
end
|
||||
item
|
||||
Name = 'PROVINCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_PROVINCIA'
|
||||
end
|
||||
item
|
||||
Name = 'CODIGO_POSTAL'
|
||||
DataType = datString
|
||||
Size = 10
|
||||
DictionaryEntry = 'Facturas_Comision_CODIGO_POSTAL'
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_ALTA'
|
||||
DataType = datDateTime
|
||||
DictionaryEntry = 'Facturas_Comision_FECHA_ALTA'
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_MODIFICACION'
|
||||
DataType = datDateTime
|
||||
DictionaryEntry = 'Facturas_Comision_FECHA_MODIFICACION'
|
||||
end
|
||||
item
|
||||
Name = 'USUARIO'
|
||||
DataType = datString
|
||||
Size = 30
|
||||
DictionaryEntry = 'Facturas_Comision_USUARIO'
|
||||
end
|
||||
item
|
||||
Name = 'ID_FORMA_PAGO'
|
||||
DataType = datInteger
|
||||
DictionaryEntry = 'Facturas_Comision_ID_FORMA_PAGO'
|
||||
end
|
||||
item
|
||||
Name = 'RECARGO_EQUIVALENCIA'
|
||||
DataType = datSmallInt
|
||||
DictionaryEntry = 'Facturas_Comision_RECARGO_EQUIVALENCIA'
|
||||
end
|
||||
item
|
||||
Name = 'ID_TIPO_IVA'
|
||||
DataType = datInteger
|
||||
DictionaryEntry = 'Facturas_Comision_ID_TIPO_IVA'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_NETO'
|
||||
DataType = datCurrency
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_NETO'
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_PORTE'
|
||||
DataType = datCurrency
|
||||
DictionaryEntry = 'Facturas_Comision_IMPORTE_PORTE'
|
||||
end
|
||||
item
|
||||
Name = 'ID_AGENTE'
|
||||
DataType = datInteger
|
||||
DictionaryEntry = 'Facturas_Comision_ID_AGENTE'
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA_COMISION'
|
||||
Name = 'AGENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_REFERENCIA_COMISION'
|
||||
end
|
||||
item
|
||||
Name = 'IGNORAR_CONTABILIDAD'
|
||||
DataType = datSmallInt
|
||||
DictionaryEntry = 'Facturas_Comision_IGNORAR_CONTABILIDAD'
|
||||
end
|
||||
item
|
||||
Name = 'ID_TIENDA'
|
||||
DataType = datInteger
|
||||
DictionaryEntry = 'Facturas_Comision_ID_TIENDA'
|
||||
end
|
||||
item
|
||||
Name = 'TIENDA'
|
||||
Name = 'CLIENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_TIENDA'
|
||||
end
|
||||
item
|
||||
Name = 'ID_SUBCUENTA'
|
||||
DataType = datInteger
|
||||
DictionaryEntry = 'Facturas_Comision_ID_SUBCUENTA'
|
||||
end
|
||||
item
|
||||
Name = 'SUBCUENTA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
DictionaryEntry = 'Facturas_Comision_SUBCUENTA'
|
||||
end>
|
||||
end
|
||||
item
|
||||
@ -762,7 +518,7 @@ object srvComisiones: TsrvComisiones
|
||||
Statements = <
|
||||
item
|
||||
Connection = 'IBX'
|
||||
TargetTable = 'COMISIONES_LIQUIDADAS'
|
||||
TargetTable = 'V_AGENTES_COMISIONES'
|
||||
StatementType = stAutoSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
@ -793,17 +549,21 @@ object srvComisiones: TsrvComisiones
|
||||
DatasetField = 'IMPORTE_TOTAL'
|
||||
TableField = 'IMPORTE_TOTAL'
|
||||
end
|
||||
item
|
||||
DatasetField = 'FECHA_ALTA'
|
||||
TableField = 'FECHA_ALTA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'FECHA_MODIFICACION'
|
||||
TableField = 'FECHA_MODIFICACION'
|
||||
end
|
||||
item
|
||||
DatasetField = 'USUARIO'
|
||||
TableField = 'USUARIO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'NOMBRE'
|
||||
TableField = 'NOMBRE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'DELEGACION'
|
||||
TableField = 'DELEGACION'
|
||||
end
|
||||
item
|
||||
DatasetField = 'COMISION'
|
||||
TableField = 'COMISION'
|
||||
end>
|
||||
end>
|
||||
Name = 'Comisiones'
|
||||
@ -848,19 +608,25 @@ object srvComisiones: TsrvComisiones
|
||||
DataType = datCurrency
|
||||
DictionaryEntry = 'Comisiones_IMPORTE_TOTAL'
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_ALTA'
|
||||
DataType = datDateTime
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_MODIFICACION'
|
||||
DataType = datDateTime
|
||||
end
|
||||
item
|
||||
Name = 'USUARIO'
|
||||
DataType = datString
|
||||
Size = 20
|
||||
DictionaryEntry = 'Comisiones_USUARIO'
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'DELEGACION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'COMISION'
|
||||
DataType = datFloat
|
||||
end>
|
||||
end>
|
||||
JoinDataTables = <>
|
||||
@ -870,10 +636,11 @@ object srvComisiones: TsrvComisiones
|
||||
Params = <
|
||||
item
|
||||
Name = 'ID_COMISION_LIQUIDADA'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'ID'
|
||||
Name = 'ID_FACTURA'
|
||||
Value = ''
|
||||
end>
|
||||
Statements = <
|
||||
@ -882,7 +649,7 @@ object srvComisiones: TsrvComisiones
|
||||
TargetTable = 'FACTURAS_CLIENTE'
|
||||
SQL =
|
||||
'UPDATE FACTURAS_CLIENTE'#10'SET ID_COMISION_LIQUIDADA = :ID_COMISION' +
|
||||
'_LIQUIDADA'#10'WHERE (ID = :ID)'#10
|
||||
'_LIQUIDADA'#10'WHERE (ID = :ID_FACTURA)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
@ -891,7 +658,7 @@ object srvComisiones: TsrvComisiones
|
||||
item
|
||||
Params = <
|
||||
item
|
||||
Name = 'OLD_ID'
|
||||
Name = 'OLD_ID_FACTURA'
|
||||
Value = ''
|
||||
end>
|
||||
Statements = <
|
||||
@ -900,7 +667,7 @@ object srvComisiones: TsrvComisiones
|
||||
TargetTable = 'FACTURAS_CLIENTE'
|
||||
SQL =
|
||||
'UPDATE FACTURAS_CLIENTE'#10'SET ID_COMISION_LIQUIDADA = Null'#10'WHERE (' +
|
||||
'ID = :OLD_ID)'#10
|
||||
'ID = :OLD_ID_FACTURA)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
@ -910,10 +677,11 @@ object srvComisiones: TsrvComisiones
|
||||
Params = <
|
||||
item
|
||||
Name = 'ID_COMISION_LIQUIDADA'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'OLD_ID'
|
||||
Name = 'OLD_ID_FACTURA'
|
||||
Value = ''
|
||||
end>
|
||||
Statements = <
|
||||
@ -922,7 +690,7 @@ object srvComisiones: TsrvComisiones
|
||||
TargetTable = 'FACTURAS_CLIENTE'
|
||||
SQL =
|
||||
'UPDATE FACTURAS_CLIENTE'#10'SET ID_COMISION_LIQUIDADA = :ID_COMISION' +
|
||||
'_LIQUIDADA'#10'WHERE (ID = :OLD_ID)'#10
|
||||
'_LIQUIDADA'#10'WHERE (ID = :OLD_ID_FACTURA)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
@ -1032,6 +800,151 @@ object srvComisiones: TsrvComisiones
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
Name = 'Update_Vendedores_Comision'
|
||||
end
|
||||
item
|
||||
Params = <
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = datAutoInc
|
||||
GeneratorName = 'GEN_COMISIONES_LIQUID_ID'
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'ID_AGENTE'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'DESCRIPCION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'FECHA'
|
||||
DataType = datDateTime
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_TOTAL'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'USUARIO'
|
||||
DataType = datString
|
||||
Size = 30
|
||||
Value = ''
|
||||
end>
|
||||
Statements = <
|
||||
item
|
||||
Connection = 'IBX'
|
||||
Default = True
|
||||
TargetTable = 'COMISIONES_LIQUIDADAS'
|
||||
SQL =
|
||||
'INSERT'#10' INTO COMISIONES_LIQUIDADAS'#10' (ID, ID_EMPRESA, REFEREN' +
|
||||
'CIA, ID_AGENTE, DESCRIPCION, FECHA, IMPORTE_TOTAL, USUARIO)'#10' VA' +
|
||||
'LUES'#10' (:ID, :ID_EMPRESA, :REFERENCIA, :ID_AGENTE, :DESCRIPCIO' +
|
||||
'N, :FECHA, :IMPORTE_TOTAL, :USUARIO)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
Name = 'Insert_Comisiones'
|
||||
end
|
||||
item
|
||||
Params = <
|
||||
item
|
||||
Name = 'OLD_ID'
|
||||
Value = ''
|
||||
end>
|
||||
Statements = <
|
||||
item
|
||||
Connection = 'IBX'
|
||||
Default = True
|
||||
TargetTable = 'COMISIONES_LIQUIDADAS'
|
||||
SQL =
|
||||
'DELETE'#10' FROM'#10' COMISIONES_LIQUIDADAS'#10' WHERE'#10' (ID = :OLD_I' +
|
||||
'D)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
Name = 'Delete_Comisiones'
|
||||
end
|
||||
item
|
||||
Params = <
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'ID_AGENTE'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'DESCRIPCION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'FECHA'
|
||||
DataType = datDateTime
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_TOTAL'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'USUARIO'
|
||||
DataType = datString
|
||||
Size = 30
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'OLD_ID'
|
||||
Value = ''
|
||||
end>
|
||||
Statements = <
|
||||
item
|
||||
Connection = 'IBX'
|
||||
Default = True
|
||||
TargetTable = 'COMISIONES_LIQUIDADAS'
|
||||
SQL =
|
||||
'UPDATE COMISIONES_LIQUIDADAS'#10' SET'#10' ID = :ID,'#10' ID_EMPRESA ' +
|
||||
'= :ID_EMPRESA,'#10' REFERENCIA = :REFERENCIA,'#10' ID_AGENTE = :ID' +
|
||||
'_AGENTE,'#10' DESCRIPCION = :DESCRIPCION,'#10' FECHA = :FECHA,'#10' ' +
|
||||
' IMPORTE_TOTAL = :IMPORTE_TOTAL,'#10' USUARIO = :USUARIO'#10' WHERE'#10 +
|
||||
' (ID = :OLD_ID)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
Name = 'Update_Comisiones'
|
||||
end>
|
||||
RelationShips = <
|
||||
item
|
||||
@ -1124,7 +1037,7 @@ object srvComisiones: TsrvComisiones
|
||||
DeleteCommandName = 'Delete_Facturas_Comision'
|
||||
UpdateCommandName = 'Update_Facturas_Comision'
|
||||
ReferencedDataset = 'Facturas_Comision'
|
||||
ProcessorOptions = [poPrepareCommands]
|
||||
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
|
||||
UpdateMode = updWhereKeyOnly
|
||||
Left = 248
|
||||
Top = 80
|
||||
@ -1146,8 +1059,11 @@ object srvComisiones: TsrvComisiones
|
||||
end
|
||||
object bpComisiones: TDABusinessProcessor
|
||||
Schema = schComisiones
|
||||
InsertCommandName = 'Insert_Comisiones'
|
||||
DeleteCommandName = 'Delete_Comisiones'
|
||||
UpdateCommandName = 'Update_Comisiones'
|
||||
ReferencedDataset = 'Comisiones'
|
||||
ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poAutoGenerateRefreshDataset, poPrepareCommands]
|
||||
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
|
||||
UpdateMode = updWhereKeyOnly
|
||||
Left = 248
|
||||
Top = 144
|
||||
|
||||
@ -33,7 +33,7 @@ type
|
||||
var aConnectionName: string);
|
||||
{ IsrvComisiones methods }
|
||||
protected
|
||||
function GenerateReport(const AComisionID: String): Binary;
|
||||
function GenerateReport(const AComisionID: String; const AllDetails: Boolean): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -61,13 +61,13 @@ procedure TsrvComisiones.DataAbstractServiceBeforeAcquireConnection(
|
||||
begin
|
||||
ConnectionName := dmServer.ConnectionName;
|
||||
end;
|
||||
function TsrvComisiones.GenerateReport(const AComisionID: String): Binary;
|
||||
function TsrvComisiones.GenerateReport(const AComisionID: String; const AllDetails: Boolean): Binary;
|
||||
var
|
||||
AReportGenerator : TRptComisiones;
|
||||
begin
|
||||
AReportGenerator := TRptComisiones.Create(nil);
|
||||
try
|
||||
Result := AReportGenerator.GenerarComision(AComisionID);
|
||||
Result := AReportGenerator.GenerarComision(AComisionID, AllDetails);
|
||||
finally
|
||||
FreeAndNIL(AReportGenerator);
|
||||
end;
|
||||
|
||||
@ -47,85 +47,41 @@
|
||||
<DelphiCompile Include="Comisiones_view.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\adortl.dcp" />
|
||||
<DCCReference Include="..\ApplicationBase.dcp" />
|
||||
<DCCReference Include="..\Base.dcp" />
|
||||
<DCCReference Include="..\ccpackD11.dcp" />
|
||||
<DCCReference Include="..\cfpack_d11.dcp" />
|
||||
<DCCReference Include="..\Comisiones_controller.dcp" />
|
||||
<DCCReference Include="..\Comisiones_model.dcp" />
|
||||
<DCCReference Include="..\Comisiones_modelteeUI.dcp" />
|
||||
<DCCReference Include="..\Contactos_controller.dcp" />
|
||||
<DCCReference Include="..\Contactos_model.dcp" />
|
||||
<DCCReference Include="..\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\cxExportD11.dcp" />
|
||||
<DCCReference Include="..\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="..\cxGridD11.dcp" />
|
||||
<DCCReference Include="..\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="..\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="..\dbrtl.dcp" />
|
||||
<DCCReference Include="..\designide.dcp" />
|
||||
<DCCReference Include="..\dsnap.dcp" />
|
||||
<DCCReference Include="..\dxComnD11.dcp" />
|
||||
<DCCReference Include="..\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\dxLayoutControlD11.dcp" />
|
||||
<DCCReference Include="..\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\frx11.dcp" />
|
||||
<DCCReference Include="..\frxe11.dcp" />
|
||||
<DCCReference Include="..\frxTee11.dcp" />
|
||||
<DCCReference Include="..\fs11.dcp" />
|
||||
<DCCReference Include="..\fsTee11.dcp" />
|
||||
<DCCReference Include="..\GUIBase.dcp" />
|
||||
<DCCReference Include="..\GUISDK_D11.dcp" />
|
||||
<DCCReference Include="..\Jcl.dcp" />
|
||||
<DCCReference Include="..\JclVcl.dcp" />
|
||||
<DCCReference Include="..\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="..\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="..\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="..\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="..\PNG_D10.dcp" />
|
||||
<DCCReference Include="..\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="..\rtl.dcp" />
|
||||
<DCCReference Include="..\tb2k_d10.dcp" />
|
||||
<DCCReference Include="..\tbx_d10.dcp" />
|
||||
<DCCReference Include="..\tee.dcp" />
|
||||
<DCCReference Include="..\vcl.dcp" />
|
||||
<DCCReference Include="..\vclactnband.dcp" />
|
||||
<DCCReference Include="..\vcldb.dcp" />
|
||||
<DCCReference Include="..\vcljpg.dcp" />
|
||||
<DCCReference Include="..\vclx.dcp" />
|
||||
<DCCReference Include="..\xmlrtl.dcp" />
|
||||
<DCCReference Include="..\..\..\Servidor\ApplicationBase.dcp" />
|
||||
<DCCReference Include="..\..\..\Servidor\Base.dcp" />
|
||||
<DCCReference Include="..\..\..\Servidor\Comisiones_controller.dcp" />
|
||||
<DCCReference Include="..\..\..\Servidor\Comisiones_model.dcp" />
|
||||
<DCCReference Include="..\..\..\Servidor\Contactos_controller.dcp" />
|
||||
<DCCReference Include="..\..\..\Servidor\Contactos_model.dcp" />
|
||||
<DCCReference Include="..\..\..\Servidor\GUIBase.dcp" />
|
||||
<DCCReference Include="uComisionesViewRegister.pas" />
|
||||
<DCCReference Include="uEditorComision.pas">
|
||||
<DesignClass>TfEditorComision</DesignClass>
|
||||
<Form>fEditorComision</Form>
|
||||
<DesignClass>TfEditorComision</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorComisiones.pas">
|
||||
<DesignClass>TfEditorComisiones</DesignClass>
|
||||
<Form>fEditorComisiones</Form>
|
||||
<DesignClass>TfEditorComisiones</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorComisionesReport.pas">
|
||||
<DesignClass>TfEditorComision</DesignClass>
|
||||
<Form>fEditorComisionesPreview</Form>
|
||||
<DesignClass>TfEditorComision</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uViewComision.pas">
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
<Form>frViewComision</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uViewComisiones.pas">
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
<Form>frViewComisiones</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uViewFacturasComision.pas">
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
<Form>frViewFacturasComision</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uViewVendedoresComision.pas">
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
<Form>frViewVendedoresComision</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -42,9 +42,9 @@ type
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); override; //Importante, es donde deben quitarse eventos para que afecten a la tabla una vez que se cierre el editor
|
||||
|
||||
private
|
||||
FImporteTotalFacturas: Variant;
|
||||
FImporteTotalVendedores: Variant;
|
||||
FTotalVendedores: Variant;
|
||||
// FImporteTotalFacturas: Variant;
|
||||
// FImporteTotalVendedores: Variant;
|
||||
// FTotalVendedores: Variant;
|
||||
|
||||
protected
|
||||
FController : IComisionesController;
|
||||
@ -115,37 +115,51 @@ var
|
||||
bEsNuevo : Boolean;
|
||||
begin
|
||||
inherited;
|
||||
bEsNuevo := False;
|
||||
|
||||
//Quitamos los eventos antes de eliminar para que no intercedan en la operacion
|
||||
ShowHourglassCursor;
|
||||
frViewFacturasComision1.OnViewModified := Nil;
|
||||
//frViewDetallesFacturaCliente1.SaveGridStatus; // Para guardar estado del grid
|
||||
frViewFacturasComision1.cxGrid.ActiveView.BeginUpdate; // Para que no se mueva el foco
|
||||
frViewVendedoresComision1.cxGrid.ActiveView.BeginUpdate; // Para que no se mueva el foco
|
||||
frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil;
|
||||
// frViewVendedoresComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil;
|
||||
|
||||
// frViewRecibosComision1.OnViewModified := Nil;
|
||||
//frViewDetallesFacturaCliente1.SaveGridStatus; // Para guardar estado del grid
|
||||
// frViewDetallesFacturaCliente1.BeginUpdate; // Para que no se mueva el foco
|
||||
try
|
||||
bEsNuevo := FComision.EsNuevo;
|
||||
|
||||
// AImporteTotal := ASender.FooterSummaryValues[1];
|
||||
// if Assigned(FController) then
|
||||
FController.AsignarImporteTotal(Comision, frViewFacturasComision1.cxGridView.DataController.Summary.FooterSummaryValues[2]);
|
||||
FController.Guardar(FComision);
|
||||
|
||||
finally
|
||||
frViewFacturasComision1.cxGrid.ActiveView.EndUpdate;
|
||||
frViewVendedoresComision1.cxGrid.ActiveView.EndUpdate;
|
||||
// frViewDetallesFacturaCliente1.EndUpdate;
|
||||
// frViewDetallesFacturaCliente1.RestoreGridStatus;
|
||||
|
||||
frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := OnFacturasComisionAfterSummary;
|
||||
// frViewVendedoresComision1.cxGridView.DataController.Summary.OnAfterSummary := OnVendedoresComisionAfterSummary;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
|
||||
if bEsNuevo then
|
||||
ShowInfoMessage('La liquidación de comisiones se ha dado de alta con el código ' + FComision.REFERENCIA);
|
||||
|
||||
Modified := False;
|
||||
frViewFacturasComision1.Modified := False;
|
||||
// frViewFacturasComision1.OnViewModified := OnFacturasChanged;
|
||||
|
||||
// frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := OnFacturasComisionSummaryAfterSummary;
|
||||
// frViewRecibosComision1.Modified := False;
|
||||
// frViewRecibosComision1.OnViewModified := OnRecibosChanged;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfEditorComision.ImprimirInterno;
|
||||
begin
|
||||
inherited;
|
||||
if (Application.MessageBox('¿Desea previsualizar la liquidación de comisiones sin desglosar?', 'Atención', MB_YESNO) = IDYES) then
|
||||
FController.Print(FComision, False)
|
||||
if (Application.MessageBox('¿Desea imprimir la liquidación de comisiones sin desglosar?', 'Atención', MB_YESNO) = IDYES) then
|
||||
FController.Preview(FComision, False, False)
|
||||
else
|
||||
FController.Print(FComision, True);
|
||||
FController.Preview(FComision, False, True);
|
||||
end;
|
||||
|
||||
procedure TfEditorComision.JvFormStorageRestorePlacement(Sender: TObject);
|
||||
@ -182,9 +196,9 @@ procedure TfEditorComision.PrevisualizarInterno;
|
||||
begin
|
||||
inherited;
|
||||
if (Application.MessageBox('¿Desea previsualizar la liquidación de comisiones sin desglosar?', 'Atención', MB_YESNO) = IDYES) then
|
||||
FController.Preview(FComision, False)
|
||||
FController.Preview(FComision, False, False)
|
||||
else
|
||||
FController.Preview(FComision, True);
|
||||
FController.Preview(FComision, False, True);
|
||||
end;
|
||||
|
||||
procedure TfEditorComision.SetComision(const Value: IBizComisiones);
|
||||
@ -194,13 +208,13 @@ begin
|
||||
begin
|
||||
dsDataTable.DataTable := FComision.DataTable;
|
||||
frViewFacturasComision1.Comision := FComision;
|
||||
frViewVendedoresComision1.Comision := FComision;
|
||||
// frViewVendedoresComision1.Comision := FComision;
|
||||
end
|
||||
else
|
||||
begin
|
||||
dsDataTable.DataTable := Nil;
|
||||
frViewFacturasComision1.Comision := Nil;
|
||||
frViewVendedoresComision1.Comision := Nil;
|
||||
// frViewVendedoresComision1.Comision := Nil;
|
||||
end;
|
||||
|
||||
if Assigned(FViewComision) then
|
||||
@ -233,7 +247,7 @@ end;
|
||||
procedure TfEditorComision.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil;
|
||||
frViewVendedoresComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil;
|
||||
// frViewVendedoresComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
@ -249,31 +263,28 @@ begin
|
||||
raise Exception.Create('No hay ningún almacén asignado');
|
||||
|
||||
frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := OnFacturasComisionAfterSummary;
|
||||
frViewVendedoresComision1.cxGridView.DataController.Summary.OnAfterSummary := OnVendedoresComisionAfterSummary;
|
||||
// frViewVendedoresComision1.cxGridView.DataController.Summary.OnAfterSummary := OnVendedoresComisionAfterSummary;
|
||||
|
||||
Comision.DataTable.Active := True;
|
||||
end;
|
||||
|
||||
procedure TfEditorComision.OnFacturasComisionAfterSummary(ASender: TcxDataSummary);
|
||||
Var
|
||||
AImporteTotal: Variant;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (FImporteTotalFacturas <> ASender.FooterSummaryValues[1]) then
|
||||
begin
|
||||
FImporteTotalFacturas := ASender.FooterSummaryValues[1];
|
||||
AImporteTotal := ASender.FooterSummaryValues[2];
|
||||
|
||||
//Recalculamos comisiones
|
||||
if Assigned(FController)
|
||||
and (not VarIsNull(FImporteTotalFacturas))
|
||||
and (FImporteTotalFacturas > 0) then
|
||||
FController.RecalcularComisiones(Comision, FImporteTotalFacturas);
|
||||
end;
|
||||
if Assigned(FController) then
|
||||
FController.AsignarImporteTotal(Comision, AImporteTotal);
|
||||
end;
|
||||
|
||||
procedure TfEditorComision.OnVendedoresComisionAfterSummary(ASender: TcxDataSummary);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
{
|
||||
if (FTotalVendedores <> ASender.FooterSummaryValues[2]) then
|
||||
begin
|
||||
FTotalVendedores := ASender.FooterSummaryValues[2];
|
||||
@ -293,6 +304,7 @@ begin
|
||||
if Assigned(FController) then
|
||||
FController.AsignarImporteTotal(Comision, FImporteTotalVendedores);
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
destructor TfEditorComision.Destroy;
|
||||
@ -310,9 +322,9 @@ end;
|
||||
constructor TfEditorComision.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FImporteTotalFacturas := -1;
|
||||
FImporteTotalVendedores := -1;
|
||||
FTotalVendedores := -1;
|
||||
// FImporteTotalFacturas := -1;
|
||||
// FImporteTotalVendedores := -1;
|
||||
// FTotalVendedores := -1;
|
||||
pgPaginas.ActivePageIndex := 0;
|
||||
FViewComision := frViewComision1;
|
||||
end;
|
||||
|
||||
@ -56,10 +56,10 @@ inherited fEditorComisiones: TfEditorComisiones
|
||||
Width = 820
|
||||
ExplicitWidth = 820
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 561
|
||||
ExplicitWidth = 632
|
||||
end
|
||||
inherited tbxFiltro: TTBXToolbar
|
||||
ExplicitWidth = 269
|
||||
ExplicitWidth = 201
|
||||
inherited tbxEditFiltro: TTBXEditItem
|
||||
EditOptions = [tboUseEditWhenVertical]
|
||||
end
|
||||
@ -77,16 +77,138 @@ inherited fEditorComisiones: TfEditorComisiones
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited TBXTMain2: TTBXToolbar
|
||||
Left = 334
|
||||
ExplicitLeft = 334
|
||||
end
|
||||
end
|
||||
inherited StatusBar: TJvStatusBar
|
||||
Width = 820
|
||||
ExplicitWidth = 820
|
||||
end
|
||||
inherited EditorActionList: TActionList
|
||||
inline frViewComisiones1: TfrViewComisiones [3]
|
||||
Left = 0
|
||||
Top = 106
|
||||
Width = 820
|
||||
Height = 319
|
||||
Align = alClient
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
ReadOnly = False
|
||||
ExplicitTop = 106
|
||||
ExplicitWidth = 820
|
||||
ExplicitHeight = 319
|
||||
inherited cxGrid: TcxGrid
|
||||
Width = 820
|
||||
Height = 191
|
||||
ExplicitWidth = 820
|
||||
ExplicitHeight = 191
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = frViewComisiones1.cxGridViewIMPORTE_TOTAL
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Format = '0 almacenes'
|
||||
Kind = skCount
|
||||
end
|
||||
item
|
||||
Format = '0 Art'#237'culos'
|
||||
Kind = skCount
|
||||
end
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Column = frViewComisiones1.cxGridViewIMPORTE_TOTAL
|
||||
end
|
||||
item
|
||||
Format = '0 liquidaciones'
|
||||
Kind = skCount
|
||||
Column = frViewComisiones1.cxGridViewREFERENCIA
|
||||
end>
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
Width = 820
|
||||
ExplicitWidth = 820
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
ExplicitWidth = 820
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 820
|
||||
ExplicitWidth = 820
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 469
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 469
|
||||
end
|
||||
inherited txtFiltroTodo2: TcxTextEdit
|
||||
Left = 469
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 469
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 820
|
||||
ExplicitWidth = 820
|
||||
inherited tbxBotones: TTBXToolbar
|
||||
Width = 810
|
||||
ExplicitWidth = 810
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||
Top = 293
|
||||
ExplicitTop = 293
|
||||
ExplicitWidth = 820
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 820
|
||||
ExplicitWidth = 820
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
Width = 810
|
||||
ExplicitWidth = 810
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited dxComponentPrinter: TdxComponentPrinter
|
||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||
ReportDocument.CreationDate = 45247.519370289350000000
|
||||
BuiltInReportLink = True
|
||||
end
|
||||
end
|
||||
inherited cxViewGridPopupMenu: TcxGridPopupMenu
|
||||
PopupMenus = <
|
||||
item
|
||||
GridView = frViewComisiones1.cxGridView
|
||||
HitTypes = [gvhtCell]
|
||||
Index = 0
|
||||
end>
|
||||
end
|
||||
end
|
||||
inherited EditorActionList: TActionList [4]
|
||||
inherited actNuevo: TAction
|
||||
ImageIndex = 23
|
||||
end
|
||||
@ -100,7 +222,7 @@ inherited fEditorComisiones: TfEditorComisiones
|
||||
Visible = False
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList
|
||||
inherited SmallImages: TPngImageList [5]
|
||||
PngImages = <
|
||||
item
|
||||
PngImage.Data = {
|
||||
@ -643,7 +765,7 @@ inherited fEditorComisiones: TfEditorComisiones
|
||||
end>
|
||||
Bitmap = {}
|
||||
end
|
||||
inherited LargeImages: TPngImageList
|
||||
inherited LargeImages: TPngImageList [6]
|
||||
PngImages = <
|
||||
item
|
||||
PngImage.Data = {
|
||||
@ -1484,6 +1606,14 @@ inherited fEditorComisiones: TfEditorComisiones
|
||||
end>
|
||||
Bitmap = {}
|
||||
end
|
||||
inherited JvFormStorage: TJvFormStorage [7]
|
||||
end
|
||||
inherited dsDataTable: TDADataSource [8]
|
||||
end
|
||||
inherited JvAppRegistryStorage: TJvAppRegistryStorage [9]
|
||||
end
|
||||
inherited StatusBarImages: TPngImageList [10]
|
||||
end
|
||||
inherited GridPopupMenu: TPopupMenu
|
||||
object N4: TMenuItem [8]
|
||||
Caption = '-'
|
||||
|
||||
@ -22,6 +22,7 @@ type
|
||||
TBXItem38: TTBXItem;
|
||||
JsPrevisualizarDialog: TJSDialog;
|
||||
JsImprimirDialog: TJSDialog;
|
||||
frViewComisiones1: TfrViewComisiones;
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
FComisiones: IBizComisiones;
|
||||
@ -56,6 +57,7 @@ implementation
|
||||
uses
|
||||
uCustomEditor, uDataModuleComisiones, uDataModuleUsuarios, uGridUtils,
|
||||
//uEditorRemesaCliente,
|
||||
uFactuGES_App,
|
||||
uEditorDBBase, cxGrid, cxGridCustomTableView, uDBSelectionListUtils;
|
||||
|
||||
{$R *.dfm}
|
||||
@ -117,8 +119,11 @@ begin
|
||||
else
|
||||
AComisiones := Comisiones;
|
||||
|
||||
if Assigned(AComisiones) then
|
||||
FController.Print(AComisiones, AllItems);
|
||||
if Assigned(AComisiones) then
|
||||
if (Application.MessageBox('¿Desea imprimir la liquidación de comisiones sin desglosar?', 'Atención', MB_YESNO) = IDYES) then
|
||||
FController.Print(AComisiones, AllItems, False)
|
||||
else
|
||||
FController.Print(AComisiones, AllItems, True);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -131,9 +136,13 @@ begin
|
||||
end;
|
||||
|
||||
procedure TfEditorComisiones.ModificarInterno;
|
||||
var
|
||||
AComision: IBizComisiones;
|
||||
begin
|
||||
inherited;
|
||||
// AComision := FController.Buscar(Comisiones.ID);
|
||||
FController.Ver(Comisiones);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfEditorComisiones.NuevoInterno;
|
||||
@ -147,7 +156,7 @@ procedure TfEditorComisiones.PonerTitulos(const ATitulo: string);
|
||||
var
|
||||
FTitulo : String;
|
||||
begin
|
||||
// FTitulo := 'Lista de liquidaciones de comisiones - ' + AppFactuGES.EmpresaActiva.NOMBRE;
|
||||
FTitulo := 'Lista de liquidaciones de comisiones - ' + AppFactuGES.EmpresaActiva.NOMBRE;
|
||||
inherited PonerTitulos(FTitulo);
|
||||
end;
|
||||
|
||||
@ -184,8 +193,11 @@ begin
|
||||
else
|
||||
AComisiones := Comisiones;
|
||||
|
||||
if Assigned(AComisiones) then
|
||||
FController.Preview(AComisiones, AllItems);
|
||||
if Assigned(AComisiones) then
|
||||
if (Application.MessageBox('¿Desea previsualizar la liquidación de comisiones sin desglosar?', 'Atención', MB_YESNO) = IDYES) then
|
||||
FController.Preview(AComisiones, AllItems, False)
|
||||
else
|
||||
FController.Preview(AComisiones, AllItems, True);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -232,7 +244,8 @@ end;
|
||||
constructor TfEditorComisiones.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
AsignarVista;
|
||||
//AsignarVista;
|
||||
ViewGrid := frViewComisiones1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -2,6 +2,7 @@ inherited frViewComision: TfrViewComision
|
||||
Width = 451
|
||||
Height = 304
|
||||
Align = alClient
|
||||
OnCreate = CustomViewCreate
|
||||
OnDestroy = CustomViewDestroy
|
||||
OnShow = CustomViewShow
|
||||
ExplicitWidth = 451
|
||||
@ -17,8 +18,6 @@ inherited frViewComision: TfrViewComision
|
||||
TabStop = False
|
||||
AutoContentSizes = [acsWidth]
|
||||
LookAndFeel = dxLayoutOfficeLookAndFeel1
|
||||
ExplicitWidth = 473
|
||||
ExplicitHeight = 128
|
||||
DesignSize = (
|
||||
451
|
||||
304)
|
||||
@ -97,6 +96,9 @@ inherited frViewComision: TfrViewComision
|
||||
Properties.ListColumns = <
|
||||
item
|
||||
FieldName = 'NOMBRE'
|
||||
end
|
||||
item
|
||||
FieldName = 'DELEGACION'
|
||||
end>
|
||||
Properties.ListOptions.GridLines = glNone
|
||||
Properties.ListOptions.ShowHeader = False
|
||||
@ -149,7 +151,6 @@ inherited frViewComision: TfrViewComision
|
||||
end
|
||||
object dxLayoutControlComisionItem1: TdxLayoutItem
|
||||
Caption = 'Agente:'
|
||||
Visible = False
|
||||
Control = cbAgente
|
||||
ControlOptions.ShowBorder = False
|
||||
end
|
||||
|
||||
@ -12,7 +12,7 @@ uses
|
||||
uComisionesController, cxSpinEdit, cxCurrencyEdit,
|
||||
uBizComisiones, cxCalendar,
|
||||
dxLayoutLookAndFeels, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox,
|
||||
uDAInterfaces;
|
||||
uDAInterfaces, uBizContactos, uComercialesController;
|
||||
|
||||
type
|
||||
IViewComision = interface(IViewBase)
|
||||
@ -35,9 +35,13 @@ type
|
||||
dsAgentes: TDADataSource;
|
||||
procedure CustomViewShow(Sender: TObject);
|
||||
procedure CustomViewDestroy(Sender: TObject);
|
||||
procedure CustomViewCreate(Sender: TObject);
|
||||
|
||||
protected
|
||||
FComision: IBizComisiones;
|
||||
FAgentes: IBizContacto;
|
||||
FComercialesController: IComercialesController;
|
||||
|
||||
function GetComision: IBizComisiones;
|
||||
procedure SetComision(const Value: IBizComisiones); virtual;
|
||||
public
|
||||
@ -49,9 +53,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uDataModuleUsuarios,
|
||||
//uAgentesController,
|
||||
uBizContactos;
|
||||
uDataModuleUsuarios;
|
||||
|
||||
|
||||
{ TfrViewComisions }
|
||||
@ -60,28 +62,27 @@ uses
|
||||
******************************* TfrViewComisions ********************************
|
||||
}
|
||||
|
||||
procedure TfrViewComision.CustomViewCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FComercialesController := TComercialesController.Create;
|
||||
FAgentes := Nil;
|
||||
end;
|
||||
|
||||
procedure TfrViewComision.CustomViewDestroy(Sender: TObject);
|
||||
begin
|
||||
FComercialesController := Nil;
|
||||
FAgentes := Nil;
|
||||
dsAgentes.DataTable := Nil;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfrViewComision.CustomViewShow(Sender: TObject);
|
||||
//Var
|
||||
// AAgentes: IBizContacto;
|
||||
// FAgentesController: IAgentesController;
|
||||
begin
|
||||
inherited;
|
||||
{ try
|
||||
FAgentesController := TAgentesController.Create;
|
||||
AAgentes := FAgentesController.BuscarTodos;
|
||||
AAgentes.DataTable.Active := True;
|
||||
dsAgentes.DataTable := AAgentes.DataTable;
|
||||
finally
|
||||
AAgentes := Nil;
|
||||
FAgentesController := Nil;
|
||||
end;
|
||||
}
|
||||
FAgentes := FComercialesController.BuscarActivos;
|
||||
dsAgentes.DataTable := FAgentes.DataTable;
|
||||
dsAgentes.DataTable.Active := True;
|
||||
end;
|
||||
|
||||
function TfrViewComision.GetComision: IBizComisiones;
|
||||
|
||||
@ -34,23 +34,34 @@ inherited frViewComisiones: TfrViewComisiones
|
||||
DataBinding.FieldName = 'REFERENCIA'
|
||||
Width = 80
|
||||
end
|
||||
object cxGridViewAGENTE: TcxGridDBColumn
|
||||
Caption = 'Agente'
|
||||
DataBinding.FieldName = 'NOMBRE'
|
||||
Visible = False
|
||||
VisibleForCustomization = False
|
||||
Width = 77
|
||||
end
|
||||
object cxGridViewFECHA: TcxGridDBColumn
|
||||
Caption = 'Fecha'
|
||||
DataBinding.FieldName = 'FECHA'
|
||||
Width = 71
|
||||
end
|
||||
object cxGridViewDELEGACION: TcxGridDBColumn
|
||||
Caption = 'Delegacion'
|
||||
DataBinding.FieldName = 'DELEGACION'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
end
|
||||
object cxGridViewAGENTE: TcxGridDBColumn
|
||||
Caption = 'Comercial'
|
||||
DataBinding.FieldName = 'NOMBRE'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Width = 77
|
||||
end
|
||||
object cxGridViewDESCRIPCION: TcxGridDBColumn
|
||||
Caption = 'Descripci'#243'n'
|
||||
DataBinding.FieldName = 'DESCRIPCION'
|
||||
Width = 400
|
||||
end
|
||||
object cxGridViewCOMISION: TcxGridDBColumn
|
||||
Caption = 'Comisi'#243'n'
|
||||
DataBinding.FieldName = 'COMISION'
|
||||
PropertiesClassName = 'TcxSpinEditProperties'
|
||||
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
|
||||
Properties.MaxValue = 100.000000000000000000
|
||||
end
|
||||
object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn
|
||||
Caption = 'Importe'
|
||||
DataBinding.FieldName = 'IMPORTE_TOTAL'
|
||||
@ -62,6 +73,44 @@ inherited frViewComisiones: TfrViewComisiones
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 250
|
||||
Width = 250
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 250
|
||||
Width = 250
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 250
|
||||
Width = 250
|
||||
end
|
||||
inherited txtFiltroTodo2: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 250
|
||||
Width = 250
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited dxComponentPrinter: TdxComponentPrinter
|
||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||
ReportDocument.CreationDate = 38673.842406053240000000
|
||||
|
||||
@ -14,7 +14,8 @@ uses
|
||||
dxPSEdgePatterns, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxCurrencyEdit, cxSpinEdit, cxCheckBox,
|
||||
cxCheckComboBox, cxImageComboBox, TB2Item, TBX, TB2Toolbar, TBXDkPanels,
|
||||
TB2Dock, uViewFiltroBase, dxPgsDlg, uDAInterfaces;
|
||||
TB2Dock, uViewFiltroBase, dxPgsDlg, uDAInterfaces, uCustomView, uViewBase,
|
||||
cxTextEdit;
|
||||
|
||||
type
|
||||
IViewComisiones = interface(IViewGrid)
|
||||
@ -31,6 +32,8 @@ type
|
||||
cxGridViewDESCRIPCION: TcxGridDBColumn;
|
||||
cxGridViewAGENTE: TcxGridDBColumn;
|
||||
cxGridViewIMPORTE_TOTAL: TcxGridDBColumn;
|
||||
cxGridViewDELEGACION: TcxGridDBColumn;
|
||||
cxGridViewCOMISION: TcxGridDBColumn;
|
||||
procedure cxGridViewIDCustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
inherited frViewFacturasComision: TfrViewFacturasComision
|
||||
Width = 549
|
||||
Height = 376
|
||||
Width = 1032
|
||||
Height = 411
|
||||
OnShow = CustomViewShow
|
||||
ExplicitWidth = 549
|
||||
ExplicitHeight = 376
|
||||
ExplicitWidth = 1032
|
||||
ExplicitHeight = 411
|
||||
inherited cxGrid: TcxGrid
|
||||
Width = 549
|
||||
Height = 351
|
||||
ExplicitWidth = 549
|
||||
ExplicitHeight = 351
|
||||
Width = 1032
|
||||
Height = 386
|
||||
ExplicitWidth = 1032
|
||||
ExplicitHeight = 386
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
DataController.KeyFieldNames = 'ID_FACTURA'
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
@ -18,6 +19,16 @@ inherited frViewFacturasComision: TfrViewFacturasComision
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Column = cxGridViewBASE_IMPONIBLE
|
||||
end
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Column = cxGridViewIMPORTE_COMISION
|
||||
end
|
||||
item
|
||||
Format = '0 Facturas'
|
||||
Kind = skCount
|
||||
Column = cxGridViewREFERENCIA
|
||||
end>
|
||||
OptionsCustomize.ColumnMoving = True
|
||||
OptionsData.Appending = False
|
||||
@ -33,6 +44,7 @@ inherited frViewFacturasComision: TfrViewFacturasComision
|
||||
VisibleForCustomization = False
|
||||
end
|
||||
inherited cxGridViewID: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID_FACTURA'
|
||||
VisibleForCustomization = False
|
||||
end
|
||||
object cxGridViewID_EMPRESA: TcxGridDBColumn
|
||||
@ -47,37 +59,52 @@ inherited frViewFacturasComision: TfrViewFacturasComision
|
||||
end
|
||||
object cxGridViewFECHA: TcxGridDBColumn
|
||||
Caption = 'Fecha factura'
|
||||
DataBinding.FieldName = 'FECHA_FACTURA'
|
||||
DataBinding.FieldName = 'FECHA'
|
||||
end
|
||||
object cxGridViewREFERENCIA: TcxGridDBColumn
|
||||
Caption = 'Ref. factura'
|
||||
DataBinding.FieldName = 'REFERENCIA'
|
||||
end
|
||||
object cxGridViewSITUACION: TcxGridDBColumn
|
||||
Caption = 'Situaci'#243'n factura'
|
||||
DataBinding.FieldName = 'SITUACION'
|
||||
Visible = False
|
||||
VisibleForCustomization = False
|
||||
end
|
||||
object cxGridViewID_CLIENTE: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID_CLIENTE'
|
||||
Visible = False
|
||||
VisibleForCustomization = False
|
||||
end
|
||||
object cxGridViewCLIENTE: TcxGridDBColumn
|
||||
Caption = 'Raz'#243'n social'
|
||||
DataBinding.FieldName = 'NOMBRE'
|
||||
Caption = 'Cliente'
|
||||
DataBinding.FieldName = 'CLIENTE'
|
||||
end
|
||||
object cxGridViewBASE_IMPONIBLE: TcxGridDBColumn
|
||||
Caption = 'Base imponible'
|
||||
DataBinding.FieldName = 'BASE_IMPONIBLE'
|
||||
Caption = 'Importe comisionable'
|
||||
DataBinding.FieldName = 'IMPORTE_COMISIONABLE'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
FooterAlignmentHorz = taRightJustify
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
object cxGridViewCOMISION: TcxGridDBColumn
|
||||
Caption = 'Porcentaje'
|
||||
DataBinding.FieldName = 'COMISION'
|
||||
PropertiesClassName = 'TcxSpinEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
Properties.DisplayFormat = '0.0 %;-0.0 %'
|
||||
Properties.MaxValue = 100.000000000000000000
|
||||
FooterAlignmentHorz = taRightJustify
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
object cxGridViewIMPORTE_COMISION: TcxGridDBColumn
|
||||
Caption = 'Importe comisi'#243'n'
|
||||
DataBinding.FieldName = 'IMPORTE_COMISION'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
FooterAlignmentHorz = taRightJustify
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ToolBar1: TToolBar
|
||||
Width = 549
|
||||
ExplicitWidth = 549
|
||||
Width = 1032
|
||||
ExplicitWidth = 1032
|
||||
inherited ToolButton1: TToolButton
|
||||
ExplicitWidth = 62
|
||||
end
|
||||
|
||||
@ -30,7 +30,6 @@ type
|
||||
cxGridViewID_COMISION_LIQUIDADA: TcxGridDBColumn;
|
||||
cxGridViewFECHA: TcxGridDBColumn;
|
||||
cxGridViewREFERENCIA: TcxGridDBColumn;
|
||||
cxGridViewSITUACION: TcxGridDBColumn;
|
||||
cxGridViewID_CLIENTE: TcxGridDBColumn;
|
||||
cxGridViewCLIENTE: TcxGridDBColumn;
|
||||
cxGridViewBASE_IMPONIBLE: TcxGridDBColumn;
|
||||
@ -38,6 +37,8 @@ type
|
||||
actContraer: TAction;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton8: TToolButton;
|
||||
cxGridViewCOMISION: TcxGridDBColumn;
|
||||
cxGridViewIMPORTE_COMISION: TcxGridDBColumn;
|
||||
procedure actExpandirExecute(Sender: TObject);
|
||||
procedure actContraerExecute(Sender: TObject);
|
||||
procedure CustomViewShow(Sender: TObject);
|
||||
|
||||
@ -86,6 +86,7 @@ contains
|
||||
uComercialesController in 'uComercialesController.pas',
|
||||
uInstaladoresController in 'uInstaladoresController.pas',
|
||||
uIEditorElegirComerciales in 'View\uIEditorElegirComerciales.pas',
|
||||
uIEditorElegirInstaladores in 'View\uIEditorElegirInstaladores.pas';
|
||||
uIEditorElegirInstaladores in 'View\uIEditorElegirInstaladores.pas',
|
||||
uIEditorVendedores in 'View\uIEditorVendedores.pas';
|
||||
|
||||
end.
|
||||
|
||||
@ -49,27 +49,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Excluded_Packages Name="D:\MISDOC~1\BORLAN~1\Bpl\JclDebugExpert100.bpl">JCL Debug IDE extension</Excluded_Packages>
|
||||
<Excluded_Packages Name="D:\MISDOC~1\BORLAN~1\Bpl\JclProjectAnalysisExpert100.bpl">JCL Project Analyzer</Excluded_Packages>
|
||||
<Excluded_Packages Name="D:\MISDOC~1\BORLAN~1\Bpl\JclFavoriteFoldersExpert100.bpl">JCL Open and Save IDE dialogs with favorite folders</Excluded_Packages>
|
||||
@ -135,6 +114,7 @@
|
||||
<DCCReference Include="View\uIEditorProveedor.pas" />
|
||||
<DCCReference Include="View\uIEditorProveedores.pas" />
|
||||
<DCCReference Include="View\uIEditorVendedor.pas" />
|
||||
<DCCReference Include="View\uIEditorVendedores.pas" />
|
||||
<DCCReference Include="View\vcl.dcp" />
|
||||
<DCCReference Include="View\vclactnband.dcp" />
|
||||
<DCCReference Include="View\vcldb.dcp" />
|
||||
|
||||
@ -18,6 +18,7 @@ type
|
||||
function DarListaComerciales : TStringList;
|
||||
function BuscarTodos: IBizContacto; overload;
|
||||
function BuscarTodos(const CadenaIDs: String): IBizContacto; overload;
|
||||
function BuscarActivos: IBizContacto;
|
||||
// function DarIDComercialDeUsuario(const AUsuario: Integer): Integer;
|
||||
end;
|
||||
|
||||
@ -28,6 +29,7 @@ type
|
||||
function Buscar(const ID: Integer): IBizContacto; override;
|
||||
function BuscarTodos: IBizContacto; overload; override;
|
||||
function BuscarTodos(const CadenaIDs: String): IBizContacto; overload;
|
||||
function BuscarActivos: IBizContacto;
|
||||
function Nuevo : IBizContacto; override;
|
||||
procedure Ver(AContacto : IBizContacto); override;
|
||||
procedure VerTodos(AContactos: IBizContacto); override;
|
||||
@ -62,6 +64,30 @@ begin
|
||||
FiltrarEmpresa(Result);
|
||||
end;
|
||||
|
||||
function TComercialesController.BuscarActivos: IBizContacto;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
Result := BuscarTodos;
|
||||
|
||||
with Result.DataTable.DynamicWhere do
|
||||
begin
|
||||
// INACTIVOS
|
||||
Condicion := NewBinaryExpression(NewField('', fld_ComercialesFECHA_BAJA), NewNull(), dboEqual);
|
||||
|
||||
if IsEmpty then
|
||||
Expression := Condicion
|
||||
else
|
||||
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||
end;
|
||||
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TComercialesController.BuscarTodos(const CadenaIDs: String): IBizContacto;
|
||||
var
|
||||
Cadena : TStringList;
|
||||
|
||||
@ -7,13 +7,15 @@ uses
|
||||
Windows, Forms, Classes, Controls, Contnrs, SysUtils, uDADataTable,
|
||||
uBizContactos, uBizContactosDatosBancarios, uIDataModuleContactos,
|
||||
uBizDireccionesContacto, uDireccionesContactoController,
|
||||
uControllerBase, uBizContactosPersonal, uBizContactosDirecciones;
|
||||
uControllerBase, uBizContactosPersonal, uBizContactosDirecciones,
|
||||
uBizIdiomas;
|
||||
|
||||
type
|
||||
IContactosController = interface(IControllerBase)
|
||||
['{E91C24EB-D4D9-4203-809B-0AF90F41B32E}']
|
||||
function Buscar(const ID: Integer): IBizContacto;
|
||||
function BuscarTodos: IBizContacto;
|
||||
function BuscarIdiomas: IBizIdiomas;
|
||||
procedure Ver(AContacto : IBizContacto);
|
||||
procedure VerTodos(AContactos: IBizContacto);
|
||||
function Nuevo : IBizContacto;
|
||||
@ -60,6 +62,7 @@ type
|
||||
// Se implementa en los controladores hijos
|
||||
function Buscar(const ID: Integer): IBizContacto; virtual; abstract;
|
||||
function BuscarTodos: IBizContacto; virtual; abstract;
|
||||
function BuscarIdiomas: IBizIdiomas;
|
||||
function Nuevo : IBizContacto; virtual; abstract;
|
||||
procedure Ver(AContacto : IBizContacto); virtual; abstract;
|
||||
procedure VerTodos(AContactos: IBizContacto); virtual; abstract;
|
||||
@ -76,7 +79,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
Dialogs, uEditorRegistryUtils, cxControls, DB, uDAInterfaces, uDataTableUtils,
|
||||
uStringsUtils, Dialogs, uEditorRegistryUtils, cxControls, DB, uDAInterfaces, uDataTableUtils,
|
||||
schContactosClient_Intf, uFactuGES_App, Variants, JSDialogs, JSDialog,
|
||||
uIEditorElegirPersonaContacto;
|
||||
|
||||
@ -112,6 +115,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TContactosController.BuscarIdiomas: IBizIdiomas;
|
||||
begin
|
||||
Result := (FDataModule as IDataModuleContactos).GetIdiomas;
|
||||
end;
|
||||
|
||||
constructor TContactosController.Create;
|
||||
begin
|
||||
inherited;
|
||||
@ -137,6 +145,7 @@ begin
|
||||
POBLACION := AContacto.POBLACION;
|
||||
CODIGO_POSTAL := AContacto.CODIGO_POSTAL;
|
||||
PROVINCIA := AContacto.PROVINCIA;
|
||||
PAIS := AContacto.PAIS;
|
||||
TELEFONO := AContacto.TELEFONO_1;
|
||||
FAX := AContacto.FAX;
|
||||
MOVIL := AContacto.MOVIL_1;
|
||||
@ -194,6 +203,7 @@ begin
|
||||
Caption := AContacto.NOMBRE + ' ' + AContacto.NIF_CIF;
|
||||
Info.Add(AContacto.CALLE);
|
||||
Info.Add(AContacto.CODIGO_POSTAL + ' ' + AContacto.POBLACION + ' ' + AContacto.PROVINCIA);
|
||||
Info.Add(AContacto.PAIS);
|
||||
Value := -1;
|
||||
Default := True;
|
||||
end;
|
||||
@ -207,6 +217,7 @@ begin
|
||||
Caption := AContacto.Direcciones.NOMBRE + ' ' + AContacto.Direcciones.NIF_CIF;
|
||||
Info.Add(AContacto.Direcciones.CALLE);
|
||||
Info.Add(AContacto.Direcciones.CODIGO_POSTAL + ' ' + AContacto.Direcciones.POBLACION + ' ' + AContacto.Direcciones.PROVINCIA);
|
||||
Info.Add(AContacto.Direcciones.PAIS);
|
||||
Value := AContacto.Direcciones.ID;
|
||||
end;
|
||||
AContacto.Direcciones.DataTable.Next;
|
||||
@ -389,7 +400,15 @@ begin
|
||||
end;}
|
||||
|
||||
function TContactosController.ValidarContacto(AContacto: IBizContacto): Boolean;
|
||||
var
|
||||
NifCifTratado: String;
|
||||
NifValido: Boolean;
|
||||
CifValido: Boolean;
|
||||
|
||||
begin
|
||||
NifValido:= false;
|
||||
CifValido:= false;
|
||||
|
||||
if not Assigned(AContacto) then
|
||||
raise Exception.Create ('Contacto no asignado');
|
||||
|
||||
@ -399,9 +418,23 @@ begin
|
||||
if Length(AContacto.NOMBRE) = 0 then
|
||||
raise Exception.Create('Debe indicar al menos el nombre de este contacto.');
|
||||
|
||||
if Length(AContacto.NIF_CIF) = 0 then
|
||||
raise Exception.Create('Debe indicar el NIF/CIF del este contacto.')
|
||||
else
|
||||
begin
|
||||
NifCifTratado := uStringsUtils.CadLimpiaCar(AContacto.NIF_CIF);
|
||||
NifValido := uStringsUtils.comprobarLetraNIF(NifCifTratado);
|
||||
if not NifValido then
|
||||
CifValido := uStringsUtils.validarCIF(NifCifTratado);
|
||||
|
||||
if not (NifValido or CifValido) then
|
||||
raise Exception.Create('El DNI/NIF/CIF introducido no es correcto.')
|
||||
end;
|
||||
|
||||
// Asegurarse de valores en campos "automáticos"
|
||||
AContacto.Edit;
|
||||
AContacto.USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
||||
AContacto.NIF_CIF := NifCifTratado;
|
||||
AContacto.Post;
|
||||
|
||||
Result := True;
|
||||
|
||||
@ -78,6 +78,7 @@ begin
|
||||
CALLE := AContacto.CALLE;
|
||||
POBLACION := AContacto.POBLACION;
|
||||
PROVINCIA := AContacto.PROVINCIA;
|
||||
PAIS := AContacto.PAIS;
|
||||
CODIGO_POSTAL := AContacto.CODIGO_POSTAL;
|
||||
TELEFONO := AContacto.TELEFONO_1;
|
||||
FAX := AContacto.FAX;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user