Se adpatan para guardar el número de impresiones de todos los documentos, y se ha repasado toda la lógica de relaciones en la parte de cliente, falta solo recibos de cliente y remesas
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES2/trunk@48 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2
This commit is contained in:
parent
3e8b527835
commit
fb0bf72b63
@ -77,7 +77,8 @@ requires
|
|||||||
dxPSCoreD11,
|
dxPSCoreD11,
|
||||||
cxIntl6D11,
|
cxIntl6D11,
|
||||||
cxIntlPrintSys3D11,
|
cxIntlPrintSys3D11,
|
||||||
RemObjects_Indy_D11;
|
RemObjects_Indy_D11,
|
||||||
|
dxCoreD11;
|
||||||
|
|
||||||
contains
|
contains
|
||||||
uDataTableUtils in 'Utiles\uDataTableUtils.pas',
|
uDataTableUtils in 'Utiles\uDataTableUtils.pas',
|
||||||
@ -114,6 +115,8 @@ contains
|
|||||||
uReferenciasUtils in 'Utiles\uReferenciasUtils.pas',
|
uReferenciasUtils in 'Utiles\uReferenciasUtils.pas',
|
||||||
uEMailUtils in 'Utiles\uEMailUtils.pas',
|
uEMailUtils in 'Utiles\uEMailUtils.pas',
|
||||||
uSaveClipboard in 'Utiles\uSaveClipboard.pas',
|
uSaveClipboard in 'Utiles\uSaveClipboard.pas',
|
||||||
MidasSpeedFix in 'Utiles\MidasSpeedFix.pas';
|
MidasSpeedFix in 'Utiles\MidasSpeedFix.pas',
|
||||||
|
uDataModuleImpresiones in '..\Modulos\Impresiones\Data\uDataModuleImpresiones.pas' {DataModuleImpresiones: TDataModule},
|
||||||
|
uDataModuleRegistroCorreos in '..\Modulos\Registro de correos\Data\uDataModuleRegistroCorreos.pas' {DataModuleRegistroCorreos: TDataModule};
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -54,58 +54,61 @@
|
|||||||
<DelphiCompile Include="Base.dpk">
|
<DelphiCompile Include="Base.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\adortl.dcp" />
|
<DCCReference Include="..\Modulos\Impresiones\Data\uDataModuleImpresiones.pas" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxDataD11.dcp" />
|
<DCCReference Include="..\Modulos\Registro de correos\Data\uDataModuleRegistroCorreos.pas" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxEditorsD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxExportD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxExtEditorsD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxGridD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxIntl6D11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxIntlPrintSys3D11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxLibraryD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\cxPageControlD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\DataAbstract_Core_D11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dbrtl.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dclIndyCore.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\designide.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dsnap.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dxGDIPlusD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dxPSCoreD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\dxThemeD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\GUISDK_D11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\IndyCore.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\IndyProtocols.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\IndySystem.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\Jcl.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JclVcl.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JSDialog100.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvCmpD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvCoreD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvCtrlsD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvDlgsD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvMMD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvNetD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvPageCompsD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvStdCtrlsD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\JvSystemD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\pckMD5.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\pckUCDataConnector.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\pckUserControl_RT.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\PngComponentsD10.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\PNG_D10.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\RemObjects_Core_D11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\RemObjects_Indy_D11.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\VclSmp.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\vclx.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Facturas de proveedor\xmlrtl.dcp" />
|
|
||||||
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\adortl.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxDataD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxEditorsD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxExportD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxExtEditorsD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxGridD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntl6D11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntlPrintSys3D11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxPageControlD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\DataAbstract_Core_D11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\dclIndyCore.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\designide.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\dsnap.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxCoreD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxPSCoreD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\GUISDK_D11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\IndyCore.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\IndyProtocols.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\IndySystem.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\Jcl.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JclVcl.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JSDialog100.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvCmpD11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvCoreD11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvDlgsD11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvMMD11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvNetD11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvPageCompsD11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvStdCtrlsD11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvSystemD11R.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\pckMD5.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\pckUCDataConnector.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\pckUserControl_RT.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Core_D11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Indy_D11.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\TB2k_D10.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\VclSmp.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
|
||||||
|
<DCCReference Include="C:\Documents and Settings\Usuario\xmlrtl.dcp" />
|
||||||
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
||||||
<Form>fConfigurarConexion</Form>
|
<Form>fConfigurarConexion</Form>
|
||||||
<DesignClass>TForm</DesignClass>
|
<DesignClass>TForm</DesignClass>
|
||||||
|
|||||||
@ -15,10 +15,14 @@ type
|
|||||||
function Find(Value: integer; var Index: Integer): Boolean;
|
function Find(Value: integer; var Index: Integer): Boolean;
|
||||||
property Integers[index: integer]: integer read GetInteger write SetInteger; default;
|
property Integers[index: integer]: integer read GetInteger write SetInteger; default;
|
||||||
function ToIntegerArray : TIntegerArray;
|
function ToIntegerArray : TIntegerArray;
|
||||||
|
function ToString : String;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils;
|
||||||
|
|
||||||
function TIntegerList.GetInteger(Index: integer): integer;
|
function TIntegerList.GetInteger(Index: integer): integer;
|
||||||
begin
|
begin
|
||||||
Result := Integer(Items[index]);
|
Result := Integer(Items[index]);
|
||||||
@ -38,6 +42,21 @@ begin
|
|||||||
Result.Add(Integers[i]);
|
Result.Add(Integers[i]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TIntegerList.ToString: String;
|
||||||
|
var
|
||||||
|
i : Integer;
|
||||||
|
AList : TStringList;
|
||||||
|
begin
|
||||||
|
AList := TStringList.Create;
|
||||||
|
try
|
||||||
|
for i := 0 to Count - 1 do
|
||||||
|
AList.Add(IntToStr(Integers[i]));
|
||||||
|
Result := AList.CommaText;
|
||||||
|
finally
|
||||||
|
FreeANDNIL(AList);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIntegerList.Add(Value: integer);
|
procedure TIntegerList.Add(Value: integer);
|
||||||
var
|
var
|
||||||
Index: integer;
|
Index: integer;
|
||||||
|
|||||||
@ -13,8 +13,8 @@ procedure Terminate;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uDMBase, uDataModuleConexion, uDataModuleConfiguracion, uPlugins_Intf,
|
uDMBase, uDataModuleConexion, uDataModuleConfiguracion, uDataModuleImpresiones,
|
||||||
uMainMenuController, uNavPaneController, uPantallaPrincipal;
|
uPlugins_Intf, uMainMenuController, uNavPaneController, uPantallaPrincipal;
|
||||||
|
|
||||||
procedure DoAppLoadModules;
|
procedure DoAppLoadModules;
|
||||||
begin
|
begin
|
||||||
@ -71,6 +71,7 @@ begin
|
|||||||
dmConexion := TdmConexion.Create(NIL);
|
dmConexion := TdmConexion.Create(NIL);
|
||||||
dmConfiguracion := TdmConfiguracion.Create(NIL);
|
dmConfiguracion := TdmConfiguracion.Create(NIL);
|
||||||
dmBase := TdmBase.Create(NIL);
|
dmBase := TdmBase.Create(NIL);
|
||||||
|
dmImpresiones := TDataModuleImpresiones.Create(NIL);
|
||||||
|
|
||||||
AppFactuGES := TAppFactuGES.Create;
|
AppFactuGES := TAppFactuGES.Create;
|
||||||
with AppFactuGES do
|
with AppFactuGES do
|
||||||
@ -100,6 +101,7 @@ begin
|
|||||||
FreeANDNIL(dmBase);
|
FreeANDNIL(dmBase);
|
||||||
FreeANDNIL(dmConfiguracion);
|
FreeANDNIL(dmConfiguracion);
|
||||||
FreeAndNil(dmConexion);
|
FreeAndNil(dmConexion);
|
||||||
|
FreeAndNil(dmImpresiones);
|
||||||
|
|
||||||
Application.ProcessMessages
|
Application.ProcessMessages
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -2478,7 +2478,7 @@ inherited fEditorPreview: TfEditorPreview
|
|||||||
Bitmap = {}
|
Bitmap = {}
|
||||||
end
|
end
|
||||||
object frxReport1: TfrxReport
|
object frxReport1: TfrxReport
|
||||||
Version = '4.3'
|
Version = '4.7.71'
|
||||||
DotMatrixReport = False
|
DotMatrixReport = False
|
||||||
EngineOptions.DoublePass = True
|
EngineOptions.DoublePass = True
|
||||||
IniFile = '\Software\Fast Reports'
|
IniFile = '\Software\Fast Reports'
|
||||||
@ -2529,6 +2529,7 @@ inherited fEditorPreview: TfEditorPreview
|
|||||||
ShowDialog = False
|
ShowDialog = False
|
||||||
UseFileCache = True
|
UseFileCache = True
|
||||||
ShowProgress = True
|
ShowProgress = True
|
||||||
|
OverwritePrompt = False
|
||||||
Monochrome = True
|
Monochrome = True
|
||||||
Left = 120
|
Left = 120
|
||||||
Top = 384
|
Top = 384
|
||||||
@ -2536,13 +2537,21 @@ inherited fEditorPreview: TfEditorPreview
|
|||||||
object frxPDFExport1: TfrxPDFExport
|
object frxPDFExport1: TfrxPDFExport
|
||||||
UseFileCache = True
|
UseFileCache = True
|
||||||
ShowProgress = True
|
ShowProgress = True
|
||||||
|
OverwritePrompt = False
|
||||||
PrintOptimized = True
|
PrintOptimized = True
|
||||||
Outline = False
|
Outline = False
|
||||||
|
Background = False
|
||||||
|
HTMLTags = False
|
||||||
Author = 'FastReport'#174
|
Author = 'FastReport'#174
|
||||||
Subject = 'FastReport PDF export'
|
Subject = 'FastReport PDF export'
|
||||||
Background = False
|
|
||||||
Creator = 'FastReport (http://www.fast-report.com)'
|
Creator = 'FastReport (http://www.fast-report.com)'
|
||||||
HTMLTags = False
|
ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
|
||||||
|
HideToolbar = False
|
||||||
|
HideMenubar = False
|
||||||
|
HideWindowUI = False
|
||||||
|
FitWindow = False
|
||||||
|
CenterWindow = False
|
||||||
|
PrintScaling = False
|
||||||
Left = 160
|
Left = 160
|
||||||
Top = 384
|
Top = 384
|
||||||
end
|
end
|
||||||
@ -2550,6 +2559,7 @@ inherited fEditorPreview: TfEditorPreview
|
|||||||
ShowDialog = False
|
ShowDialog = False
|
||||||
UseFileCache = True
|
UseFileCache = True
|
||||||
ShowProgress = True
|
ShowProgress = True
|
||||||
|
OverwritePrompt = False
|
||||||
Monochrome = True
|
Monochrome = True
|
||||||
Left = 192
|
Left = 192
|
||||||
Top = 384
|
Top = 384
|
||||||
@ -2557,6 +2567,8 @@ inherited fEditorPreview: TfEditorPreview
|
|||||||
object frxXLSExport1: TfrxXLSExport
|
object frxXLSExport1: TfrxXLSExport
|
||||||
UseFileCache = True
|
UseFileCache = True
|
||||||
ShowProgress = True
|
ShowProgress = True
|
||||||
|
OverwritePrompt = False
|
||||||
|
ExportEMF = True
|
||||||
AsText = False
|
AsText = False
|
||||||
Background = True
|
Background = True
|
||||||
FastExport = True
|
FastExport = True
|
||||||
@ -2569,25 +2581,32 @@ inherited fEditorPreview: TfEditorPreview
|
|||||||
object frxMailExport1: TfrxMailExport
|
object frxMailExport1: TfrxMailExport
|
||||||
UseFileCache = True
|
UseFileCache = True
|
||||||
ShowProgress = True
|
ShowProgress = True
|
||||||
|
OverwritePrompt = False
|
||||||
ShowExportDialog = True
|
ShowExportDialog = True
|
||||||
SmtpPort = 25
|
SmtpPort = 25
|
||||||
UseIniFile = True
|
UseIniFile = True
|
||||||
|
TimeOut = 60
|
||||||
|
ConfurmReading = False
|
||||||
Left = 80
|
Left = 80
|
||||||
Top = 384
|
Top = 384
|
||||||
end
|
end
|
||||||
object frxRTFExport: TfrxRTFExport
|
object frxRTFExport: TfrxRTFExport
|
||||||
UseFileCache = True
|
UseFileCache = True
|
||||||
ShowProgress = True
|
ShowProgress = True
|
||||||
|
OverwritePrompt = False
|
||||||
|
ExportEMF = True
|
||||||
Wysiwyg = True
|
Wysiwyg = True
|
||||||
Creator = 'FastReport http://www.fast-report.com'
|
Creator = 'FastReport http://www.fast-report.com'
|
||||||
SuppressPageHeadersFooters = False
|
SuppressPageHeadersFooters = False
|
||||||
HeaderFooterMode = hfText
|
HeaderFooterMode = hfText
|
||||||
|
AutoSize = False
|
||||||
Left = 232
|
Left = 232
|
||||||
Top = 384
|
Top = 384
|
||||||
end
|
end
|
||||||
object frxSimpleTextExport1: TfrxSimpleTextExport
|
object frxSimpleTextExport1: TfrxSimpleTextExport
|
||||||
UseFileCache = True
|
UseFileCache = True
|
||||||
ShowProgress = True
|
ShowProgress = True
|
||||||
|
OverwritePrompt = False
|
||||||
Frames = False
|
Frames = False
|
||||||
EmptyLines = False
|
EmptyLines = False
|
||||||
OEMCodepage = False
|
OEMCodepage = False
|
||||||
|
|||||||
@ -26,7 +26,7 @@ type
|
|||||||
|
|
||||||
procedure LoadFromStream(AStream : TStream);
|
procedure LoadFromStream(AStream : TStream);
|
||||||
function ExportToFile : String;
|
function ExportToFile : String;
|
||||||
procedure Print;
|
function Print: Boolean;
|
||||||
procedure Preview;
|
procedure Preview;
|
||||||
|
|
||||||
function GetController : IControllerBase;
|
function GetController : IControllerBase;
|
||||||
@ -38,6 +38,13 @@ type
|
|||||||
procedure SetListaID (const Value : TIntegerList);
|
procedure SetListaID (const Value : TIntegerList);
|
||||||
property ListaID : TIntegerList read GetListaID
|
property ListaID : TIntegerList read GetListaID
|
||||||
write SetListaID;
|
write SetListaID;
|
||||||
|
|
||||||
|
function GetTablaImpresion: String;
|
||||||
|
function GetIdTablaImpresion: String;
|
||||||
|
procedure SetTablaImpresion (Value: String);
|
||||||
|
procedure SetIdTablaImpresion (Value: String);
|
||||||
|
property TablaImpresion: String read GetTablaImpresion write SetTablaImpresion;
|
||||||
|
property IdTablaImpresion: String read GetIdTablaImpresion write SetIdTablaImpresion;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TfEditorPreview = class(TfEditorBase, IEditorPreview)
|
TfEditorPreview = class(TfEditorBase, IEditorPreview)
|
||||||
@ -142,13 +149,23 @@ type
|
|||||||
procedure actExportarRTFExecute(Sender: TObject);
|
procedure actExportarRTFExecute(Sender: TObject);
|
||||||
procedure actExportarTextoExecute(Sender: TObject);
|
procedure actExportarTextoExecute(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
FVariable: Boolean;
|
||||||
FPreview : TfrViewPreview;
|
FPreview : TfrViewPreview;
|
||||||
FTitle : TCaption;
|
FTitle : TCaption;
|
||||||
FController : IControllerBase;
|
FController : IControllerBase;
|
||||||
FListaID : TIntegerList;
|
FListaID : TIntegerList;
|
||||||
procedure OnPageChanged(Sender: TfrxPreview; PageNo: Integer);
|
procedure OnPageChanged(Sender: TfrxPreview; PageNo: Integer);
|
||||||
procedure UpdateZoom;
|
procedure UpdateZoom;
|
||||||
|
procedure OnPrint(Sender: Tobject);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
FTablaImpresion: String;
|
||||||
|
FIdTablaImpresion: String;
|
||||||
|
function GetTablaImpresion: String;
|
||||||
|
function GetIdTablaImpresion: String;
|
||||||
|
procedure SetTablaImpresion (Value: String);
|
||||||
|
procedure SetIdTablaImpresion (Value: String);
|
||||||
|
|
||||||
function GetReport: TfrxReport; virtual;
|
function GetReport: TfrxReport; virtual;
|
||||||
procedure SetTitle(const Value: string);
|
procedure SetTitle(const Value: string);
|
||||||
function GetTitle: string;
|
function GetTitle: string;
|
||||||
@ -157,7 +174,11 @@ type
|
|||||||
procedure SetController (const Value : IControllerBase);
|
procedure SetController (const Value : IControllerBase);
|
||||||
procedure SetListaID (const Value : TIntegerList);
|
procedure SetListaID (const Value : TIntegerList);
|
||||||
function GetListaID : TIntegerList;
|
function GetListaID : TIntegerList;
|
||||||
|
|
||||||
public
|
public
|
||||||
|
property TablaImpresion: String read GetTablaImpresion write SetTablaImpresion;
|
||||||
|
property IdTablaImpresion: String read GetIdTablaImpresion write SetIdTablaImpresion;
|
||||||
|
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
property ListaID : TIntegerList read GetListaID
|
property ListaID : TIntegerList read GetListaID
|
||||||
write SetListaID;
|
write SetListaID;
|
||||||
@ -165,7 +186,7 @@ type
|
|||||||
write SetController;
|
write SetController;
|
||||||
property Title: string read GetTitle write SetTitle;
|
property Title: string read GetTitle write SetTitle;
|
||||||
property Report: TfrxReport read GetReport;
|
property Report: TfrxReport read GetReport;
|
||||||
procedure Print;
|
function Print: boolean;
|
||||||
procedure Preview;
|
procedure Preview;
|
||||||
procedure LoadFromStream(AStream : TStream);
|
procedure LoadFromStream(AStream : TStream);
|
||||||
function ExportToFile : String;
|
function ExportToFile : String;
|
||||||
@ -175,7 +196,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
frxRes, frxUtils, frxPrinter,
|
frxRes, frxUtils, frxPrinter, uDataModuleImpresiones,
|
||||||
uCustomEditor, uSistemaFunc;
|
uCustomEditor, uSistemaFunc;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
@ -187,6 +208,11 @@ begin
|
|||||||
Result := FController;
|
Result := FController;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TfEditorPreview.GetIdTablaImpresion: String;
|
||||||
|
begin
|
||||||
|
Result := FIdTablaImpresion;
|
||||||
|
end;
|
||||||
|
|
||||||
function TfEditorPreview.GetListaID: TIntegerList;
|
function TfEditorPreview.GetListaID: TIntegerList;
|
||||||
begin
|
begin
|
||||||
Result := FListaID;
|
Result := FListaID;
|
||||||
@ -198,6 +224,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TfEditorPreview.GetTablaImpresion: String;
|
||||||
|
begin
|
||||||
|
Result := FTablaImpresion;
|
||||||
|
end;
|
||||||
|
|
||||||
function TfEditorPreview.GetTitle: string;
|
function TfEditorPreview.GetTitle: string;
|
||||||
begin
|
begin
|
||||||
Result := FTitle;
|
Result := FTitle;
|
||||||
@ -399,6 +430,13 @@ begin
|
|||||||
[PageNo, Sender.PageCount]);
|
[PageNo, Sender.PageCount]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorPreview.OnPrint(Sender: Tobject);
|
||||||
|
begin
|
||||||
|
FVariable := True;
|
||||||
|
if (FTablaImpresion <> '-1') and (FIdTablaImpresion <> '-1') then
|
||||||
|
dmImpresiones.AnadirMarcaImpresion(TablaImpresion, IdTablaImpresion);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TfEditorPreview.Create(AOwner: TComponent);
|
constructor TfEditorPreview.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
@ -441,13 +479,18 @@ begin
|
|||||||
Self.ShowModal;
|
Self.ShowModal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorPreview.Print;
|
function TfEditorPreview.Print: Boolean;
|
||||||
begin
|
begin
|
||||||
|
FVariable := False;
|
||||||
|
FPreview.Preview.Report.OnPrintReport := OnPrint;
|
||||||
|
|
||||||
if not frxPrinters.HasPhysicalPrinters then
|
if not frxPrinters.HasPhysicalPrinters then
|
||||||
frxErrorMsg(frxResources.Get('clNoPrinters'))
|
frxErrorMsg(frxResources.Get('clNoPrinters'))
|
||||||
else
|
else
|
||||||
FPreview.Preview.Print;
|
FPreview.Preview.Print;
|
||||||
|
|
||||||
Enabled := True;
|
Enabled := True;
|
||||||
|
Result := FVariable;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorPreview.SetController(const Value: IControllerBase);
|
procedure TfEditorPreview.SetController(const Value: IControllerBase);
|
||||||
@ -455,11 +498,21 @@ begin
|
|||||||
FController := Value;
|
FController := Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorPreview.SetIdTablaImpresion(Value: String);
|
||||||
|
begin
|
||||||
|
FIdTablaImpresion := Value;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorPreview.SetListaID(const Value: TIntegerList);
|
procedure TfEditorPreview.SetListaID(const Value: TIntegerList);
|
||||||
begin
|
begin
|
||||||
FListaID := Value;
|
FListaID := Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorPreview.SetTablaImpresion(Value: String);
|
||||||
|
begin
|
||||||
|
FTablaImpresion := Value;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorPreview.SetTitle(const Value: string);
|
procedure TfEditorPreview.SetTitle(const Value: string);
|
||||||
begin
|
begin
|
||||||
FTitle := Value;
|
FTitle := Value;
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
<Projects Include="..\Facturas de cliente\Controller\FacturasCliente_controller.dproj" />
|
<Projects Include="..\Facturas de cliente\Controller\FacturasCliente_controller.dproj" />
|
||||||
<Projects Include="..\Facturas de proveedor\Views\FacturasProveedor_view.dproj" />
|
<Projects Include="..\Facturas de proveedor\Views\FacturasProveedor_view.dproj" />
|
||||||
<Projects Include="..\Pedidos a proveedor\Views\PedidosProveedor_view.dproj" />
|
<Projects Include="..\Pedidos a proveedor\Views\PedidosProveedor_view.dproj" />
|
||||||
|
<Projects Include="..\Pedidos de cliente\Views\PedidosCliente_view.dproj" />
|
||||||
<Projects Include="..\Presupuestos de cliente\Views\PresupuestosCliente_view.dproj" />
|
<Projects Include="..\Presupuestos de cliente\Views\PresupuestosCliente_view.dproj" />
|
||||||
<Projects Include="..\Recibos de cliente\Views\RecibosCliente_view.dproj" />
|
<Projects Include="..\Recibos de cliente\Views\RecibosCliente_view.dproj" />
|
||||||
<Projects Include="..\Recibos de proveedor\Views\RecibosProveedor_view.dproj" />
|
<Projects Include="..\Recibos de proveedor\Views\RecibosProveedor_view.dproj" />
|
||||||
@ -261,14 +262,23 @@
|
|||||||
<Target Name="RemesasProveedor_view:Make">
|
<Target Name="RemesasProveedor_view:Make">
|
||||||
<MSBuild Projects="..\Remesas de proveedor\Views\RemesasProveedor_view.dproj" Targets="Make" />
|
<MSBuild Projects="..\Remesas de proveedor\Views\RemesasProveedor_view.dproj" Targets="Make" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<Target Name="PedidosCliente_view">
|
||||||
|
<MSBuild Projects="..\Pedidos de cliente\Views\PedidosCliente_view.dproj" Targets="" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="PedidosCliente_view:Clean">
|
||||||
|
<MSBuild Projects="..\Pedidos de cliente\Views\PedidosCliente_view.dproj" Targets="Clean" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="PedidosCliente_view:Make">
|
||||||
|
<MSBuild Projects="..\Pedidos de cliente\Views\PedidosCliente_view.dproj" Targets="Make" />
|
||||||
|
</Target>
|
||||||
<Target Name="Build">
|
<Target Name="Build">
|
||||||
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_controller;Articulos_view;AlbaranesCliente_model;AlbaranesCliente_data;AlbaranesCliente_controller;FacturasCliente_controller;AlbCli_FacCli_relation;AlbaranesCliente_view;AlbaranesCliente_plugin;FactuGES;FactuGES_Server;AlbaranesProveedor_view;AlbProv_FacProv_relation;Contactos_controller;FacturasProveedor_view;PedidosProveedor_view;PresupuestosCliente_view;RecibosCliente_view;RecibosProveedor_view;RemesasCliente_view;RemesasProveedor_view" />
|
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_controller;Articulos_view;AlbaranesCliente_model;AlbaranesCliente_data;AlbaranesCliente_controller;FacturasCliente_controller;AlbCli_FacCli_relation;AlbaranesCliente_view;AlbaranesCliente_plugin;FactuGES;FactuGES_Server;AlbaranesProveedor_view;AlbProv_FacProv_relation;Contactos_controller;FacturasProveedor_view;PedidosProveedor_view;PresupuestosCliente_view;RecibosCliente_view;RecibosProveedor_view;RemesasCliente_view;RemesasProveedor_view;PedidosCliente_view" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Clean">
|
<Target Name="Clean">
|
||||||
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_controller: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;AlbaranesProveedor_view:Clean;AlbProv_FacProv_relation:Clean;Contactos_controller:Clean;FacturasProveedor_view:Clean;PedidosProveedor_view:Clean;PresupuestosCliente_view:Clean;RecibosCliente_view:Clean;RecibosProveedor_view:Clean;RemesasCliente_view:Clean;RemesasProveedor_view:Clean" />
|
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_controller: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;AlbaranesProveedor_view:Clean;AlbProv_FacProv_relation:Clean;Contactos_controller:Clean;FacturasProveedor_view:Clean;PedidosProveedor_view:Clean;PresupuestosCliente_view:Clean;RecibosCliente_view:Clean;RecibosProveedor_view:Clean;RemesasCliente_view:Clean;RemesasProveedor_view:Clean;PedidosCliente_view:Clean" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Make">
|
<Target Name="Make">
|
||||||
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_controller: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;AlbaranesProveedor_view:Make;AlbProv_FacProv_relation:Make;Contactos_controller:Make;FacturasProveedor_view:Make;PedidosProveedor_view:Make;PresupuestosCliente_view:Make;RecibosCliente_view:Make;RecibosProveedor_view:Make;RemesasCliente_view:Make;RemesasProveedor_view:Make" />
|
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_controller: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;AlbaranesProveedor_view:Make;AlbProv_FacProv_relation:Make;Contactos_controller:Make;FacturasProveedor_view:Make;PedidosProveedor_view:Make;PresupuestosCliente_view:Make;RecibosCliente_view:Make;RecibosProveedor_view:Make;RemesasCliente_view:Make;RemesasProveedor_view:Make;PedidosCliente_view:Make" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@ -43,6 +43,7 @@ type
|
|||||||
procedure DescartarCambios(AAlbaran : IBizAlbaranCliente);
|
procedure DescartarCambios(AAlbaran : IBizAlbaranCliente);
|
||||||
function Existe(const ID: Integer) : Boolean;
|
function Existe(const ID: Integer) : Boolean;
|
||||||
function Duplicar(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
|
function Duplicar(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
|
||||||
|
function GenerarOrdenDev(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
|
||||||
|
|
||||||
function ExtraerSeleccionados(AAlbaran: IBizAlbaranCliente) : IBizAlbaranCliente;
|
function ExtraerSeleccionados(AAlbaran: IBizAlbaranCliente) : IBizAlbaranCliente;
|
||||||
function ElegirAlbaranes(AAlbaran: IBizAlbaranCliente; AMensaje: String; AMultiSelect: Boolean): IBizAlbaranCliente;
|
function ElegirAlbaranes(AAlbaran: IBizAlbaranCliente; AMensaje: String; AMultiSelect: Boolean): IBizAlbaranCliente;
|
||||||
@ -132,6 +133,7 @@ type
|
|||||||
const AHeaderText: String = '');
|
const AHeaderText: String = '');
|
||||||
procedure VerDireccionEntrega(AAlbaran : IBizAlbaranCliente);
|
procedure VerDireccionEntrega(AAlbaran : IBizAlbaranCliente);
|
||||||
function Duplicar(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
|
function Duplicar(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
|
||||||
|
function GenerarOrdenDev(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
|
||||||
procedure CopiarDireccionEnvio (const ADireccionEnvio: IBizDireccionesContacto;
|
procedure CopiarDireccionEnvio (const ADireccionEnvio: IBizDireccionesContacto;
|
||||||
AAlbaran: IBizAlbaranCliente);
|
AAlbaran: IBizAlbaranCliente);
|
||||||
|
|
||||||
@ -162,6 +164,7 @@ type
|
|||||||
|
|
||||||
function DarListaAnosAlbaranes: TStringList;
|
function DarListaAnosAlbaranes: TStringList;
|
||||||
procedure FiltrarAno(AAlbaran: IBizAlbaranCliente; ADynWhereDataTable: WideString; const Ano: String);
|
procedure FiltrarAno(AAlbaran: IBizAlbaranCliente; ADynWhereDataTable: WideString; const Ano: String);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -479,7 +482,9 @@ begin
|
|||||||
FECHA_ENVIO := 0;
|
FECHA_ENVIO := 0;
|
||||||
FECHA_RECEPCION := 0;
|
FECHA_RECEPCION := 0;
|
||||||
ID_FACTURA := 0;
|
ID_FACTURA := 0;
|
||||||
|
REF_FACTURA := '';
|
||||||
ID_PEDIDO := 0;
|
ID_PEDIDO := 0;
|
||||||
|
REF_PEDIDO := '';
|
||||||
end;
|
end;
|
||||||
Result.Post;
|
Result.Post;
|
||||||
finally
|
finally
|
||||||
@ -490,6 +495,8 @@ end;
|
|||||||
function TAlbaranesClienteController.ValidarAlbaran(
|
function TAlbaranesClienteController.ValidarAlbaran(
|
||||||
AAlbaran: IBizAlbaranCliente): Boolean;
|
AAlbaran: IBizAlbaranCliente): Boolean;
|
||||||
begin
|
begin
|
||||||
|
Result := False;
|
||||||
|
|
||||||
if not Assigned(AAlbaran) then
|
if not Assigned(AAlbaran) then
|
||||||
raise Exception.Create ('Albarán no asignado');
|
raise Exception.Create ('Albarán no asignado');
|
||||||
|
|
||||||
@ -502,8 +509,6 @@ begin
|
|||||||
|
|
||||||
if (AAlbaran.ID_Cliente <= 0) then
|
if (AAlbaran.ID_Cliente <= 0) then
|
||||||
// Si hay altas automáticas no hay objeto Cliente pero sí hay ID_CLIENTE
|
// Si hay altas automáticas no hay objeto Cliente pero sí hay ID_CLIENTE
|
||||||
{ (not Assigned(AAlbaran.Cliente)) or
|
|
||||||
(AAlbaran.Cliente.IsEmpty) then}
|
|
||||||
raise Exception.Create('Debe indicar el cliente de este albarán');
|
raise Exception.Create('Debe indicar el cliente de este albarán');
|
||||||
|
|
||||||
if (EsFechaVacia(AAlbaran.FECHA_ALBARAN)) then
|
if (EsFechaVacia(AAlbaran.FECHA_ALBARAN)) then
|
||||||
@ -524,8 +529,8 @@ begin
|
|||||||
raise Exception.Create('Una orden de devolución no puede tener un importe total positivo');
|
raise Exception.Create('Una orden de devolución no puede tener un importe total positivo');
|
||||||
|
|
||||||
//Una orden de devolución debe tener relleno el almacén de entrada de material
|
//Una orden de devolución debe tener relleno el almacén de entrada de material
|
||||||
// if (AAlbaran.ID_ALMACEN < 0) or (AAlbaran.ID_ALMACEN = 0) then
|
if (AAlbaran.ID_ALMACEN < 0) or (AAlbaran.ID_ALMACEN = 0) then
|
||||||
// raise Exception.Create('Debe indicar el almacén de entrada de esta orden de devolución');
|
raise Exception.Create('Debe indicar el almacén de entrada de esta orden de devolución');
|
||||||
|
|
||||||
//Ponemos la fecha del albaran de devolución como fecha de envio para que se contabilice según dicha fecha
|
//Ponemos la fecha del albaran de devolución como fecha de envio para que se contabilice según dicha fecha
|
||||||
AAlbaran.Edit;
|
AAlbaran.Edit;
|
||||||
@ -1162,7 +1167,6 @@ begin
|
|||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
AAlbaran.IMPORTE_NETO := FDetallesController.DarTotalImporteTotal(AAlbaran.Detalles);
|
AAlbaran.IMPORTE_NETO := FDetallesController.DarTotalImporteTotal(AAlbaran.Detalles);
|
||||||
AAlbaran.IMPORTE_PORTE := FDetallesController.DarTotalPorteTotal(AAlbaran.Detalles);
|
|
||||||
|
|
||||||
if not bEnEdicion then
|
if not bEnEdicion then
|
||||||
AAlbaran.Post;
|
AAlbaran.Post;
|
||||||
@ -1173,6 +1177,33 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TAlbaranesClienteController.GenerarOrdenDev(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
|
||||||
|
var
|
||||||
|
AOrden : IBizAlbaranCliente;
|
||||||
|
IdAlbaran: Integer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if Assigned(AAlbaran) then
|
||||||
|
begin
|
||||||
|
IdAlbaran := AAlbaran.ID;
|
||||||
|
AOrden := Duplicar(AAlbaran);
|
||||||
|
if Assigned(AOrden) then
|
||||||
|
begin
|
||||||
|
if not AOrden.DataTable.Editing then
|
||||||
|
AOrden.Edit;
|
||||||
|
|
||||||
|
AOrden.TIPO := CTE_TIPO_ALBARAN_DEV;
|
||||||
|
AOrden.ID_ALBARAN_DEV := IdAlbaran;
|
||||||
|
AOrden.Post;
|
||||||
|
|
||||||
|
//Convierte todos los articulos del albaran a negativos por se una orden de devolucion
|
||||||
|
FDetallesController.CambiarSignoDetalles(AOrden.Detalles);
|
||||||
|
|
||||||
|
end;
|
||||||
|
Ver(AOrden);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TAlbaranesClienteController.GetClienteController: IClientesController;
|
function TAlbaranesClienteController.GetClienteController: IClientesController;
|
||||||
begin
|
begin
|
||||||
Result := FClienteController;
|
Result := FClienteController;
|
||||||
@ -1184,4 +1215,3 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
| |||||||