diff --git a/Source/Base/Base.dpk b/Source/Base/Base.dpk
index 50cf0f2..2c02bf9 100644
--- a/Source/Base/Base.dpk
+++ b/Source/Base/Base.dpk
@@ -77,7 +77,8 @@ requires
dxPSCoreD11,
cxIntl6D11,
cxIntlPrintSys3D11,
- RemObjects_Indy_D11;
+ RemObjects_Indy_D11,
+ dxCoreD11;
contains
uDataTableUtils in 'Utiles\uDataTableUtils.pas',
@@ -114,6 +115,8 @@ contains
uReferenciasUtils in 'Utiles\uReferenciasUtils.pas',
uEMailUtils in 'Utiles\uEMailUtils.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.
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index 5f09cb2..bf19392 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -54,58 +54,61 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TForm
diff --git a/Source/Base/Utiles/uIntegerListUtils.pas b/Source/Base/Utiles/uIntegerListUtils.pas
index 9ea3429..14d9628 100644
--- a/Source/Base/Utiles/uIntegerListUtils.pas
+++ b/Source/Base/Utiles/uIntegerListUtils.pas
@@ -15,10 +15,14 @@ type
function Find(Value: integer; var Index: Integer): Boolean;
property Integers[index: integer]: integer read GetInteger write SetInteger; default;
function ToIntegerArray : TIntegerArray;
+ function ToString : String;
end;
implementation
+uses
+ SysUtils;
+
function TIntegerList.GetInteger(Index: integer): integer;
begin
Result := Integer(Items[index]);
@@ -38,6 +42,21 @@ begin
Result.Add(Integers[i]);
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);
var
Index: integer;
diff --git a/Source/Cliente/uBootStrap.pas b/Source/Cliente/uBootStrap.pas
index 3441df3..189f1d8 100644
--- a/Source/Cliente/uBootStrap.pas
+++ b/Source/Cliente/uBootStrap.pas
@@ -13,8 +13,8 @@ procedure Terminate;
implementation
uses
- uDMBase, uDataModuleConexion, uDataModuleConfiguracion, uPlugins_Intf,
- uMainMenuController, uNavPaneController, uPantallaPrincipal;
+ uDMBase, uDataModuleConexion, uDataModuleConfiguracion, uDataModuleImpresiones,
+ uPlugins_Intf, uMainMenuController, uNavPaneController, uPantallaPrincipal;
procedure DoAppLoadModules;
begin
@@ -71,6 +71,7 @@ begin
dmConexion := TdmConexion.Create(NIL);
dmConfiguracion := TdmConfiguracion.Create(NIL);
dmBase := TdmBase.Create(NIL);
+ dmImpresiones := TDataModuleImpresiones.Create(NIL);
AppFactuGES := TAppFactuGES.Create;
with AppFactuGES do
@@ -78,7 +79,7 @@ begin
AppSplashForm := TAppSplashForm.Create;
DoMainFormEvent := DoAppMainForm;
DoLoadModulesEvent := DoAppLoadModules;
- DoRefreshMainFormEvent := DoRefreshMainForm;
+ DoRefreshMainFormEvent := DoRefreshMainForm;
end;
NavPaneController := TNavPaneController.Create;
@@ -100,6 +101,7 @@ begin
FreeANDNIL(dmBase);
FreeANDNIL(dmConfiguracion);
FreeAndNil(dmConexion);
+ FreeAndNil(dmImpresiones);
Application.ProcessMessages
end;
diff --git a/Source/GUIBase/uEditorPreview.dfm b/Source/GUIBase/uEditorPreview.dfm
index e0f9966..576ff9f 100644
--- a/Source/GUIBase/uEditorPreview.dfm
+++ b/Source/GUIBase/uEditorPreview.dfm
@@ -2478,7 +2478,7 @@ inherited fEditorPreview: TfEditorPreview
Bitmap = {}
end
object frxReport1: TfrxReport
- Version = '4.3'
+ Version = '4.7.71'
DotMatrixReport = False
EngineOptions.DoublePass = True
IniFile = '\Software\Fast Reports'
@@ -2529,6 +2529,7 @@ inherited fEditorPreview: TfEditorPreview
ShowDialog = False
UseFileCache = True
ShowProgress = True
+ OverwritePrompt = False
Monochrome = True
Left = 120
Top = 384
@@ -2536,13 +2537,21 @@ inherited fEditorPreview: TfEditorPreview
object frxPDFExport1: TfrxPDFExport
UseFileCache = True
ShowProgress = True
+ OverwritePrompt = False
PrintOptimized = True
Outline = False
+ Background = False
+ HTMLTags = False
Author = 'FastReport'#174
Subject = 'FastReport PDF export'
- Background = False
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
Top = 384
end
@@ -2550,6 +2559,7 @@ inherited fEditorPreview: TfEditorPreview
ShowDialog = False
UseFileCache = True
ShowProgress = True
+ OverwritePrompt = False
Monochrome = True
Left = 192
Top = 384
@@ -2557,6 +2567,8 @@ inherited fEditorPreview: TfEditorPreview
object frxXLSExport1: TfrxXLSExport
UseFileCache = True
ShowProgress = True
+ OverwritePrompt = False
+ ExportEMF = True
AsText = False
Background = True
FastExport = True
@@ -2569,25 +2581,32 @@ inherited fEditorPreview: TfEditorPreview
object frxMailExport1: TfrxMailExport
UseFileCache = True
ShowProgress = True
+ OverwritePrompt = False
ShowExportDialog = True
SmtpPort = 25
UseIniFile = True
+ TimeOut = 60
+ ConfurmReading = False
Left = 80
Top = 384
end
object frxRTFExport: TfrxRTFExport
UseFileCache = True
ShowProgress = True
+ OverwritePrompt = False
+ ExportEMF = True
Wysiwyg = True
Creator = 'FastReport http://www.fast-report.com'
SuppressPageHeadersFooters = False
HeaderFooterMode = hfText
+ AutoSize = False
Left = 232
Top = 384
end
object frxSimpleTextExport1: TfrxSimpleTextExport
UseFileCache = True
ShowProgress = True
+ OverwritePrompt = False
Frames = False
EmptyLines = False
OEMCodepage = False
diff --git a/Source/GUIBase/uEditorPreview.pas b/Source/GUIBase/uEditorPreview.pas
index 61f4067..d4a6df2 100644
--- a/Source/GUIBase/uEditorPreview.pas
+++ b/Source/GUIBase/uEditorPreview.pas
@@ -26,7 +26,7 @@ type
procedure LoadFromStream(AStream : TStream);
function ExportToFile : String;
- procedure Print;
+ function Print: Boolean;
procedure Preview;
function GetController : IControllerBase;
@@ -38,6 +38,13 @@ type
procedure SetListaID (const Value : TIntegerList);
property ListaID : TIntegerList read GetListaID
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;
TfEditorPreview = class(TfEditorBase, IEditorPreview)
@@ -142,13 +149,23 @@ type
procedure actExportarRTFExecute(Sender: TObject);
procedure actExportarTextoExecute(Sender: TObject);
private
+ FVariable: Boolean;
FPreview : TfrViewPreview;
FTitle : TCaption;
FController : IControllerBase;
FListaID : TIntegerList;
procedure OnPageChanged(Sender: TfrxPreview; PageNo: Integer);
procedure UpdateZoom;
+ procedure OnPrint(Sender: Tobject);
+
protected
+ FTablaImpresion: String;
+ FIdTablaImpresion: String;
+ function GetTablaImpresion: String;
+ function GetIdTablaImpresion: String;
+ procedure SetTablaImpresion (Value: String);
+ procedure SetIdTablaImpresion (Value: String);
+
function GetReport: TfrxReport; virtual;
procedure SetTitle(const Value: string);
function GetTitle: string;
@@ -157,7 +174,11 @@ type
procedure SetController (const Value : IControllerBase);
procedure SetListaID (const Value : TIntegerList);
function GetListaID : TIntegerList;
+
public
+ property TablaImpresion: String read GetTablaImpresion write SetTablaImpresion;
+ property IdTablaImpresion: String read GetIdTablaImpresion write SetIdTablaImpresion;
+
constructor Create(AOwner: TComponent); override;
property ListaID : TIntegerList read GetListaID
write SetListaID;
@@ -165,7 +186,7 @@ type
write SetController;
property Title: string read GetTitle write SetTitle;
property Report: TfrxReport read GetReport;
- procedure Print;
+ function Print: boolean;
procedure Preview;
procedure LoadFromStream(AStream : TStream);
function ExportToFile : String;
@@ -175,7 +196,7 @@ type
implementation
uses
- frxRes, frxUtils, frxPrinter,
+ frxRes, frxUtils, frxPrinter, uDataModuleImpresiones,
uCustomEditor, uSistemaFunc;
{$R *.dfm}
@@ -187,6 +208,11 @@ begin
Result := FController;
end;
+function TfEditorPreview.GetIdTablaImpresion: String;
+begin
+ Result := FIdTablaImpresion;
+end;
+
function TfEditorPreview.GetListaID: TIntegerList;
begin
Result := FListaID;
@@ -198,6 +224,11 @@ begin
end;
+function TfEditorPreview.GetTablaImpresion: String;
+begin
+ Result := FTablaImpresion;
+end;
+
function TfEditorPreview.GetTitle: string;
begin
Result := FTitle;
@@ -399,6 +430,13 @@ begin
[PageNo, Sender.PageCount]);
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);
begin
inherited;
@@ -441,13 +479,18 @@ begin
Self.ShowModal;
end;
-procedure TfEditorPreview.Print;
+function TfEditorPreview.Print: Boolean;
begin
+ FVariable := False;
+ FPreview.Preview.Report.OnPrintReport := OnPrint;
+
if not frxPrinters.HasPhysicalPrinters then
frxErrorMsg(frxResources.Get('clNoPrinters'))
else
FPreview.Preview.Print;
+
Enabled := True;
+ Result := FVariable;
end;
procedure TfEditorPreview.SetController(const Value: IControllerBase);
@@ -455,11 +498,21 @@ begin
FController := Value;
end;
+procedure TfEditorPreview.SetIdTablaImpresion(Value: String);
+begin
+ FIdTablaImpresion := Value;
+end;
+
procedure TfEditorPreview.SetListaID(const Value: TIntegerList);
begin
FListaID := Value;
end;
+procedure TfEditorPreview.SetTablaImpresion(Value: String);
+begin
+ FTablaImpresion := Value;
+end;
+
procedure TfEditorPreview.SetTitle(const Value: string);
begin
FTitle := Value;
diff --git a/Source/Modulos/Albaranes de cliente/AlbaranesCliente_Group.groupproj b/Source/Modulos/Albaranes de cliente/AlbaranesCliente_Group.groupproj
index 1a986eb..9424dd9 100644
--- a/Source/Modulos/Albaranes de cliente/AlbaranesCliente_Group.groupproj
+++ b/Source/Modulos/Albaranes de cliente/AlbaranesCliente_Group.groupproj
@@ -17,6 +17,7 @@
+
@@ -261,14 +262,23 @@
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas
index 8e0ea5e..6bc3d95 100644
--- a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas
+++ b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas
@@ -43,6 +43,7 @@ type
procedure DescartarCambios(AAlbaran : IBizAlbaranCliente);
function Existe(const ID: Integer) : Boolean;
function Duplicar(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
+ function GenerarOrdenDev(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
function ExtraerSeleccionados(AAlbaran: IBizAlbaranCliente) : IBizAlbaranCliente;
function ElegirAlbaranes(AAlbaran: IBizAlbaranCliente; AMensaje: String; AMultiSelect: Boolean): IBizAlbaranCliente;
@@ -132,6 +133,7 @@ type
const AHeaderText: String = '');
procedure VerDireccionEntrega(AAlbaran : IBizAlbaranCliente);
function Duplicar(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
+ function GenerarOrdenDev(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
procedure CopiarDireccionEnvio (const ADireccionEnvio: IBizDireccionesContacto;
AAlbaran: IBizAlbaranCliente);
@@ -162,6 +164,7 @@ type
function DarListaAnosAlbaranes: TStringList;
procedure FiltrarAno(AAlbaran: IBizAlbaranCliente; ADynWhereDataTable: WideString; const Ano: String);
+
end;
implementation
@@ -479,7 +482,9 @@ begin
FECHA_ENVIO := 0;
FECHA_RECEPCION := 0;
ID_FACTURA := 0;
+ REF_FACTURA := '';
ID_PEDIDO := 0;
+ REF_PEDIDO := '';
end;
Result.Post;
finally
@@ -490,6 +495,8 @@ end;
function TAlbaranesClienteController.ValidarAlbaran(
AAlbaran: IBizAlbaranCliente): Boolean;
begin
+ Result := False;
+
if not Assigned(AAlbaran) then
raise Exception.Create ('Albarán no asignado');
@@ -502,8 +509,6 @@ begin
if (AAlbaran.ID_Cliente <= 0) then
// 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');
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');
//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
-// raise Exception.Create('Debe indicar el almacén de entrada de esta orden de devolución');
+ 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');
//Ponemos la fecha del albaran de devolución como fecha de envio para que se contabilice según dicha fecha
AAlbaran.Edit;
@@ -1162,7 +1167,6 @@ begin
ShowHourglassCursor;
try
AAlbaran.IMPORTE_NETO := FDetallesController.DarTotalImporteTotal(AAlbaran.Detalles);
- AAlbaran.IMPORTE_PORTE := FDetallesController.DarTotalPorteTotal(AAlbaran.Detalles);
if not bEnEdicion then
AAlbaran.Post;
@@ -1173,6 +1177,33 @@ begin
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;
begin
Result := FClienteController;
@@ -1184,4 +1215,3 @@ begin
end;
end.
-
\ No newline at end of file
diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas
index 7b7d5b4..d202c85 100644
--- a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas
+++ b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas
@@ -49,7 +49,7 @@ implementation
uses
uROTypes, uEditorRegistryUtils, uIEditorAlbaranesClientePreview,
uEditorPreview, uDataModuleAlbaranesCliente, uEditorBase, cxControls,
- uStringsUtils, uSistemaFunc, uFactuGES_App;
+ uStringsUtils, uSistemaFunc, uFactuGES_App, schAlbaranesClienteClient_Intf;
{ TAlbaranesClienteReportController }
@@ -238,6 +238,8 @@ begin
AEditor.ListaID := AListaID;
AEditor.Title := 'Albarán - ' + AppFactuGES.EmpresaActiva.NOMBRE;
AEditor.LoadFromStream(AStream);
+ AEditor.TablaImpresion := nme_AlbaranesCliente;
+ AEditor.IdTablaImpresion := AListaID.ToString;
AEditor.Print;
finally
AEditor.Release;
diff --git a/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas
index f2411e2..67b0d0b 100644
--- a/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas
+++ b/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas
@@ -19,7 +19,6 @@ type
private
FDataModule : IDataModuleAlbaranesCliente;
protected
-// procedure AsignarDatos(ADetalles: IDAStronglyTypedDataTable; IDCabecera: Integer); override;
procedure RellenarOtros(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); override;
procedure RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); override;
@@ -53,7 +52,7 @@ begin
try
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
ActualizarDetalles(ADetalles, AArticulos);
-// ShowInfoMessage('Se ha actualizado el descuento para el cliente seleccionado'); Esta desactivado el descuento general para los albaranes de cliente
+ ShowInfoMessage('Se ha actualizado el descuento para el cliente seleccionado');
finally
AArticulos := Nil;
end;
@@ -92,19 +91,6 @@ begin
FArticulosController := TArticulosAlbaranClienteController.Create;
end;
-{procedure TDetallesAlbaranClienteController.AsignarDatos(ADetalles: IDAStronglyTypedDataTable; IDCabecera: Integer);
-begin
- inherited;
-
- with (ADetalles as IBizDetallesAlbaranCliente) do
- begin
- Edit;
-// ID := FDataModule.GetNextID(DataTable.LogicalName);
- ID_ALBARAN := IDCabecera;
- Post
- end;
-end;}
-
function TDetallesAlbaranClienteController.CalcularImporteTotalConcepto(DataTable: TDADataTable): Double;
begin
Result := CalcularLineaConcepto(DataTable);
@@ -136,11 +122,10 @@ end;
procedure TDetallesAlbaranClienteController.RellenarOtros(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);
begin
-//En Tecsitel no se tiene en cuenta el descuento de cliente para el precio PVP
-// if Assigned(AArticulos) then
-// ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := AArticulos.DESCUENTO
-// else
-// ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := 0;
+ if Assigned(AArticulos) then
+ ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := AArticulos.DESCUENTO
+ else
+ ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := 0;
end;
procedure TDetallesAlbaranClienteController.ValidarCampos(DataTable: TDADataTable);
@@ -151,14 +136,10 @@ end;
procedure TDetallesAlbaranClienteController.RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);
begin
-//Como en tecsitel no hay descuento por linea de detalle, solo recuperamos nuevamente el valor del articulo cuando el detalle no tenga niguno
-//de esta forma evitamos que al cambiar de cliente se quiten los importes que se hubiesen establecido para los articulos.
- if ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).IsNull then
- if Assigned(AArticulos) then
-// ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP_TOTAL
- ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_NETO
- else
- ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null;
+ if Assigned(AArticulos) then
+ ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_COSTE
+ else
+ ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null;
end;
end.
diff --git a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas
index 096db5e..5beb637 100644
--- a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas
+++ b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas
@@ -190,9 +190,7 @@ begin
SITUACION := SITUACION_ALBARAN_PENDIENTE;
REFERENCIA := '';
TIPO := CTE_TIPO_ALBARAN;
-
- // NO SE TIENEN EN CUENTA LOS ALBARANES DE CLIENTE PARA EL STOCK DE ALMACEN "DE MOMENTO"
- ID_ALMACEN := ID_NULO;
+ ID_ALMACEN := AppFactuGES.EmpresaActiva.ID_ALMACEN;
end;
procedure TBizAlbaranCliente.IVAOnChange(Sender: TDACustomField);
diff --git a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm
index ca4fa6a..c57eb2e 100644
--- a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm
+++ b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm
@@ -524,12 +524,11 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
'E_UNIDAD,'#10' ALBARANES_CLIENTE_DETALLES.DESCUENTO, ALBARANES_CL' +
'IENTE_DETALLES.IMPORTE_PORTE,'#10' ALBARANES_CLIENTE_DETALLES.IMP' +
'ORTE_TOTAL,'#10' ALBARANES_CLIENTE_DETALLES.VISIBLE,'#10' ALBARANE' +
- 'S_CLIENTE_DETALLES.ID_ARTICULO, ARTICULOS.REFERENCIA,'#10' '#39#39' as ' +
- 'REFERENCIA_PROVEEDOR, /*Es necesario para que no pete detalles p' +
- 'orque tanto en la rama de cliente como de proveedor es comun*/'#10' ' +
- ' ALBARANES_CLIENTE_DETALLES.ID_PEDIDO'#10#10#10'FROM ALBARANES_CLIENTE' +
- '_DETALLES'#10'LEFT JOIN ARTICULOS ON ALBARANES_CLIENTE_DETALLES.ID_A' +
- 'RTICULO = ARTICULOS.ID'#10'where {where}'#10'ORDER BY POSICION;'#10#10
+ 'S_CLIENTE_DETALLES.ID_ARTICULO, ARTICULOS.REFERENCIA, ARTICULOS.' +
+ 'REFERENCIA_PROV as REFERENCIA_PROVEEDOR,'#10' ALBARANES_CLIENTE_D' +
+ 'ETALLES.ID_PEDIDO'#10#10#10'FROM ALBARANES_CLIENTE_DETALLES'#10'LEFT JOIN AR' +
+ 'TICULOS ON ALBARANES_CLIENTE_DETALLES.ID_ARTICULO = ARTICULOS.ID' +
+ #10'where {where}'#10'ORDER BY POSICION;'#10#10
StatementType = stSQL
ColumnMappings = <
item
diff --git a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk
index 8fe2fd5..e8d68b1 100644
--- a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk
+++ b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk
@@ -34,7 +34,12 @@ requires
Almacenes_controller,
AlbCli_FacCli_relation,
rtl,
- vcl;
+ vcl,
+ PedidosCliente_controller,
+ PedidosCliente_model,
+ Inventario_controller,
+ FacturasCliente_model,
+ FacturasCliente_controller;
contains
uAlbaranesClienteViewRegister in 'uAlbaranesClienteViewRegister.pas',
@@ -53,6 +58,6 @@ contains
uEditorAlbaranDevCliente in 'uEditorAlbaranDevCliente.pas' {fEditorAlbaranDevCliente: TCustomEditor},
uViewAlbaranDevCliente in 'uViewAlbaranDevCliente.pas' {frViewAlbaranDevCliente: TCustomView},
uViewDatosYSeleccionClienteAlbaran in 'uViewDatosYSeleccionClienteAlbaran.pas' {frViewDatosYSeleccionClienteAlbaran: TCustomView},
- uDialogOpcionesImpresionAlbaranesCliente in 'uDialogOpcionesImpresionAlbaranesCliente.pas' {frDialogOpcionesImpresionAlbaranesCliente: TForm};
+ uDialogOpcionesImpresionAlbaranesCliente in 'uDialogOpcionesImpresionAlbaranesCliente.pas' {frDialogOpcionesImpresionAlbaranesCliente: T};
end.
diff --git a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj
index 00cf438..fb2bb04 100644
--- a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj
+++ b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj
@@ -54,15 +54,21 @@
MainSource
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -128,7 +134,6 @@
TFrame
-