diff --git a/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas
index 741c6845..475d91dd 100644
--- a/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas
+++ b/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas
@@ -53,7 +53,7 @@ begin
try
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
ActualizarDetalles(ADetalles, AArticulos);
- ShowInfoMessage('Se han actualizado los descuentos para el cliente seleccionado');
+// ShowInfoMessage('Se ha actualizado el descuento para el cliente seleccionado'); Esta desactivado el descuento general para los albaranes de cliente
finally
AArticulos := Nil;
end;
@@ -151,10 +151,13 @@ end;
procedure TDetallesAlbaranClienteController.RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);
begin
- if Assigned(AArticulos) then
- ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP_TOTAL
- else
- ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null;
+//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
+ 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 74a93251..db2569f0 100644
--- a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas
+++ b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas
@@ -236,6 +236,7 @@ begin
ID_CLIENTE := FCliente.ID;
ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
+ //DESCUENTO := FCliente.DESCUENTO; //No esta activado el descuento general para los albaranes
DataTable.Post; //Muy importante ya que es necesario hacer un post de la cabecera antes de añadir detalles
//si se quita el id de la cabecera y los detalles se desincroniza
diff --git a/Source/Modulos/Contactos/Model/uBizContactos.pas b/Source/Modulos/Contactos/Model/uBizContactos.pas
index 5bc7bd24..141cd1f6 100644
--- a/Source/Modulos/Contactos/Model/uBizContactos.pas
+++ b/Source/Modulos/Contactos/Model/uBizContactos.pas
@@ -79,6 +79,9 @@ type
function GetTIENDA_WEBValue: Integer;
procedure SetTIENDA_WEBValue(const aValue: Integer);
+ function GetDESCUENTOValue: Double;
+ procedure SetDESCUENTOValue(const aValue: Double);
+
function GetDescuentos: IBizClienteDescuentos;
procedure SetDescuentos(Value: IBizClienteDescuentos);
property Descuentos: IBizClienteDescuentos read GetDescuentos write SetDescuentos;
@@ -94,6 +97,7 @@ type
property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property TIENDA_WEB: Integer read GetTIENDA_WEBValue write SetTIENDA_WEBValue;
+ property DESCUENTO: Double read GetDESCUENTOValue write SetDESCUENTOValue;
end;
IBizProveedor = interface (IBizContacto)
@@ -259,6 +263,9 @@ type
function GetTIENDA_WEBValue: Integer;
procedure SetTIENDA_WEBValue(const aValue: Integer);
+ function GetDESCUENTOValue: Double;
+ procedure SetDESCUENTOValue(const aValue: Double);
+
function GetDescuentos: IBizClienteDescuentos;
procedure SetDescuentos(Value: IBizClienteDescuentos);
public
@@ -276,6 +283,7 @@ type
property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property TIENDA_WEB: Integer read GetTIENDA_WEBValue write SetTIENDA_WEBValue;
+ property DESCUENTO: Double read GetDESCUENTOValue write SetDESCUENTOValue;
end;
@@ -489,6 +497,11 @@ begin
Result := FDescuentos;
end;
+function TBizCliente.GetDESCUENTOValue: Double;
+begin
+ result := DataTable.Fields[idx_ClientesDESCUENTO].AsFloat;
+end;
+
function TBizCliente.GetGRUPO_CLIENTEValue: String;
begin
result := DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString;
@@ -525,6 +538,11 @@ begin
EnlazarMaestroDetalle(FDescuentosLink, FDescuentos);
end;
+procedure TBizCliente.SetDESCUENTOValue(const aValue: Double);
+begin
+ DataTable.Fields[idx_ClientesDESCUENTO].AsFloat := aValue;
+end;
+
procedure TBizCliente.SetGRUPO_CLIENTEValue(const aValue: String);
begin
DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString := aValue;
diff --git a/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas
index d6cc8de1..202fc5c0 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas
@@ -58,7 +58,7 @@ begin
try
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
ActualizarDetalles(ADetalles, AArticulos);
- ShowInfoMessage('Se han actualizado los descuentos para el cliente seleccionado');
+ ShowInfoMessage('Se ha actualizado el descuento para el cliente seleccionado');
finally
AArticulos := Nil;
end;
@@ -160,10 +160,13 @@ end;
procedure TDetallesFacturaClienteController.RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);
begin
- if Assigned(AArticulos) then
- ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP_TOTAL
- else
- ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null;
+//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
+ else
+ ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null;
end;
end.
diff --git a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
index 0fcb6380..0b9ca10a 100644
--- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
@@ -306,6 +306,7 @@ begin
ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
ID_TIPO_IVA := FCliente.ID_TIPO_IVA;
RECARGO_EQUIVALENCIA := FCliente.RECARGO_EQUIVALENCIA;
+ DESCUENTO := FCliente.DESCUENTO;
Post;
if bEnEdicion then
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
index 884b80f6..0b1e47fc 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
@@ -180,10 +180,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
- ExplicitLeft = 0
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente
Left = 0
Top = 0
@@ -204,103 +200,106 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitHeight = 316
inherited ToolBar1: TToolBar
Width = 815
- Height = 46
+ Height = 51
ExplicitWidth = 815
- ExplicitHeight = 46
+ ExplicitHeight = 51
inherited ToolButton3: TToolButton
Wrap = False
end
inherited ToolButton4: TToolButton
Left = 278
Top = 0
- Wrap = True
ExplicitLeft = 278
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
- Left = 0
+ Left = 334
+ Top = 0
Wrap = False
- ExplicitLeft = 0
+ ExplicitLeft = 334
+ ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
- Left = 65
- Top = 22
- ExplicitLeft = 65
- ExplicitTop = 22
+ Left = 399
+ Top = 0
+ ExplicitLeft = 399
+ ExplicitTop = 0
end
inherited FontSize: TEdit
- Left = 210
- Top = 22
- Width = 104
- ExplicitLeft = 210
- ExplicitTop = 22
- ExplicitWidth = 104
+ Left = 544
+ Top = 0
+ Width = 120
+ ExplicitLeft = 544
+ ExplicitTop = 0
+ ExplicitWidth = 120
end
- inherited UpDown1: TUpDown
- Left = 314
- Top = 22
- ExplicitLeft = 314
- ExplicitTop = 22
+ inherited ToolButton13: TToolButton [7]
+ Left = 0
+ Top = 0
+ Wrap = True
+ ExplicitLeft = 0
+ ExplicitTop = 0
+ ExplicitHeight = 27
end
- inherited ToolButton13: TToolButton
- Left = 331
- Top = 22
- ExplicitLeft = 331
- ExplicitTop = 22
+ inherited UpDown1: TUpDown [8]
+ Left = 0
+ Top = 27
+ ExplicitLeft = 0
+ ExplicitTop = 27
end
inherited ToolButton6: TToolButton
- Left = 339
- Top = 22
- ExplicitLeft = 339
- ExplicitTop = 22
+ Left = 17
+ Top = 27
+ ExplicitLeft = 17
+ ExplicitTop = 27
end
inherited ToolButton7: TToolButton
- Left = 405
- Top = 22
- ExplicitLeft = 405
- ExplicitTop = 22
+ Left = 83
+ Top = 27
+ ExplicitLeft = 83
+ ExplicitTop = 27
end
inherited ToolButton8: TToolButton
- Left = 472
- Top = 22
- ExplicitLeft = 472
- ExplicitTop = 22
+ Left = 150
+ Top = 27
+ ExplicitLeft = 150
+ ExplicitTop = 27
end
inherited ToolButton12: TToolButton
- Left = 555
- Top = 22
- ExplicitLeft = 555
- ExplicitTop = 22
+ Left = 233
+ Top = 27
+ ExplicitLeft = 233
+ ExplicitTop = 27
end
inherited ToolButton9: TToolButton
- Left = 563
- Top = 22
- ExplicitLeft = 563
- ExplicitTop = 22
+ Left = 241
+ Top = 27
+ ExplicitLeft = 241
+ ExplicitTop = 27
end
inherited ToolButton10: TToolButton
- Left = 708
- Top = 22
- ExplicitLeft = 708
- ExplicitTop = 22
+ Left = 386
+ Top = 27
+ ExplicitLeft = 386
+ ExplicitTop = 27
end
inherited ToolButton11: TToolButton
- Left = 833
- Top = 22
- ExplicitLeft = 833
- ExplicitTop = 22
+ Left = 511
+ Top = 27
+ ExplicitLeft = 511
+ ExplicitTop = 27
end
end
inherited cxGrid: TcxGrid
- Top = 72
+ Top = 77
Width = 815
- Height = 244
+ Height = 239
ExplicitTop = 77
ExplicitWidth = 815
ExplicitHeight = 239
end
inherited TBXDock1: TTBXDock
- Top = 46
+ Top = 51
Width = 815
ExplicitTop = 51
ExplicitWidth = 815
@@ -465,7 +464,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Top = 84
ExplicitTop = 84
ExplicitWidth = 255
- ExplicitHeight = 0
Width = 255
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
@@ -474,15 +472,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited dxLayoutControl1Item10: TdxLayoutItem
Visible = False
end
- inherited dxLayoutControl1Group7: TdxLayoutGroup
- Visible = False
- inherited dxLayoutControl1Item4: TdxLayoutItem
- Visible = False
- end
- inherited dxLayoutControl1Item1: TdxLayoutItem
- Visible = False
- end
- end
end
inherited dxLayoutControl1Group5: TdxLayoutGroup
inherited dxLayoutControl1Group3: TdxLayoutGroup
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
index cce2e337..bda888a0 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
@@ -16,7 +16,8 @@ uses
uIEditorFacturaCliente, uFacturasClienteController, uViewDetallesBase,
uViewDetallesFacturaCliente, dxLayoutLookAndFeels, JvExComCtrls, JvStatusBar,
uViewDetallesDTO, uViewDetallesArticulos, uTiposIVAController, uDAInterfaces,
- cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit, Grids, DBGrids;
+ cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit, Grids, DBGrids,
+ uViewDetallesArticulosParaVenta;
type
diff --git a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas
index 9460ae67..7022ba11 100644
--- a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas
+++ b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas
@@ -3,15 +3,15 @@ unit schFacturasProveedorClient_Intf;
interface
uses
- Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
+ Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
- RID_FacturasProveedor = '{AE0EA268-0DA7-41DD-ADB3-A93E0C579B3F}';
- RID_FacturasProveedor_Detalles = '{050FBBA0-032E-4364-961D-11C1A07418F8}';
- RID_FacturasProveedor_Pedidos = '{49F51901-D17A-4576-BB9F-3078AE8C735A}';
+ RID_FacturasProveedor = '{668D34B1-893D-4529-86AA-ADAE4EA41B3D}';
+ RID_FacturasProveedor_Detalles = '{214E2F2C-3EFA-4E9B-9961-0741C288B080}';
+ RID_FacturasProveedor_Pedidos = '{B0578036-330F-4C44-8BB1-857BAE16CCFF}';
{ Data table names }
nme_FacturasProveedor = 'FacturasProveedor';
@@ -139,7 +139,7 @@ const
type
{ IFacturasProveedor }
IFacturasProveedor = interface(IDAStronglyTypedDataTable)
- ['{B4FB668F-2EDF-4700-830A-E2624E9AD50D}']
+ ['{EF92220E-B532-4BFA-9C3E-87E5C05BA7BB}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -332,7 +332,7 @@ type
end;
{ TFacturasProveedorDataTableRules }
- TFacturasProveedorDataTableRules = class(TIntfObjectDADataTableRules, IFacturasProveedor)
+ TFacturasProveedorDataTableRules = class(TDADataTableRules, IFacturasProveedor)
private
f_OBSERVACIONES: IROStrings;
procedure OBSERVACIONES_OnChange(Sender: TObject);
@@ -534,7 +534,7 @@ type
{ IFacturasProveedor_Detalles }
IFacturasProveedor_Detalles = interface(IDAStronglyTypedDataTable)
- ['{286BC424-AC55-429E-B234-266BFB82C7A4}']
+ ['{EA98DA5E-BBB7-4000-9097-305553C42E6C}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -632,7 +632,7 @@ type
end;
{ TFacturasProveedor_DetallesDataTableRules }
- TFacturasProveedor_DetallesDataTableRules = class(TIntfObjectDADataTableRules, IFacturasProveedor_Detalles)
+ TFacturasProveedor_DetallesDataTableRules = class(TDADataTableRules, IFacturasProveedor_Detalles)
private
protected
{ Property getters and setters }
@@ -737,7 +737,7 @@ type
{ IFacturasProveedor_Pedidos }
IFacturasProveedor_Pedidos = interface(IDAStronglyTypedDataTable)
- ['{5C524428-4841-4EAE-AEAE-4199417B80E2}']
+ ['{8D8CD7B6-E0DF-48AD-924E-FB7C28A1553A}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -787,7 +787,7 @@ type
end;
{ TFacturasProveedor_PedidosDataTableRules }
- TFacturasProveedor_PedidosDataTableRules = class(TIntfObjectDADataTableRules, IFacturasProveedor_Pedidos)
+ TFacturasProveedor_PedidosDataTableRules = class(TDADataTableRules, IFacturasProveedor_Pedidos)
private
protected
{ Property getters and setters }
diff --git a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas
index a1a5b0e9..42176489 100644
--- a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas
+++ b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas
@@ -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_FacturasProveedorDelta = '{4CD57CEE-063B-490E-BCA3-828A01B7BEC8}';
- RID_FacturasProveedor_DetallesDelta = '{C614C36B-3791-466E-827C-F2184A1F6BE2}';
- RID_FacturasProveedor_PedidosDelta = '{A664F250-5578-4C8F-A9AB-6B916F981183}';
+ RID_FacturasProveedorDelta = '{609D016A-A645-4D5C-A002-F68E937C37BF}';
+ RID_FacturasProveedor_DetallesDelta = '{43388866-5A44-43D9-BFCF-77961F55F28E}';
+ RID_FacturasProveedor_PedidosDelta = '{3F25A4A3-D3D3-4581-B0DB-1A0C1B1305FB}';
type
{ IFacturasProveedorDelta }
IFacturasProveedorDelta = interface(IFacturasProveedor)
- ['{4CD57CEE-063B-490E-BCA3-828A01B7BEC8}']
+ ['{609D016A-A645-4D5C-A002-F68E937C37BF}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -411,7 +411,7 @@ type
{ IFacturasProveedor_DetallesDelta }
IFacturasProveedor_DetallesDelta = interface(IFacturasProveedor_Detalles)
- ['{C614C36B-3791-466E-827C-F2184A1F6BE2}']
+ ['{43388866-5A44-43D9-BFCF-77961F55F28E}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
@@ -613,7 +613,7 @@ type
{ IFacturasProveedor_PedidosDelta }
IFacturasProveedor_PedidosDelta = interface(IFacturasProveedor_Pedidos)
- ['{A664F250-5578-4C8F-A9AB-6B916F981183}']
+ ['{3F25A4A3-D3D3-4581-B0DB-1A0C1B1305FB}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
diff --git a/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm b/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm
index 88fc496c..b264fc40 100644
--- a/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm
+++ b/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm
@@ -1181,7 +1181,7 @@ object srvFacturasProveedor: TsrvFacturasProveedor
Name = 'FK_FacturasProveedor_Detalles'
MasterDatasetName = 'FacturasProveedor'
MasterFields = 'ID'
- DetailDatasetName = 'FacturasProveedor_Pedidos'
+ DetailDatasetName = 'FacturasProveedor_Detalles'
DetailFields = 'ID_FACTURA'
RelationshipType = rtForeignKey
end>
diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm
index 7fb56f1c..07e7f884 100644
--- a/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm
+++ b/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm
@@ -96,6 +96,7 @@ inherited frViewDetallesFacturaProveedor: TfrViewDetallesFacturaProveedor
end>
Properties.ReadOnly = True
Properties.OnButtonClick = nil
+ Visible = False
Options.Editing = False
end
inherited cxGridViewREFERENCIA_FABRICANTE: TcxGridDBColumn
@@ -107,6 +108,7 @@ inherited frViewDetallesFacturaProveedor: TfrViewDetallesFacturaProveedor
end>
Properties.ReadOnly = True
Properties.OnButtonClick = nil
+ Visible = False
Options.Editing = False
end
inherited cxGridViewIMPORTEUNIDAD: TcxGridDBColumn
diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas
index 6b1b11ee..7da2f9d9 100644
--- a/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas
+++ b/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas
@@ -53,7 +53,7 @@ begin
try
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
ActualizarDetalles(ADetalles, AArticulos);
- ShowInfoMessage('Se han actualizado los descuentos para el cliente seleccionado');
+ ShowInfoMessage('Se ha actualizado el descuento para el cliente seleccionado');
finally
AArticulos := Nil;
end;
@@ -153,10 +153,13 @@ end;
procedure TDetallesPresupuestoClienteController.RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);
begin
- if Assigned(AArticulos) then
- ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP_TOTAL
- else
- ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null;
+//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
+ else
+ ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null;
end;
end.
diff --git a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas
index 6561d1ab..149a4480 100644
--- a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas
+++ b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas
@@ -244,6 +244,7 @@ begin
ID_CLIENTE := FCliente.ID;
ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
+ DESCUENTO := FCliente.DESCUENTO;
DataTable.Post; //Muy importante ya que es necesario hacer un post de la cabecera antes de añadir detalles
//si se quita el id de la cabecera y los detalles se desincroniza
diff --git a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
index 76868042..3b393349 100644
--- a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
+++ b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
@@ -15,6 +15,8 @@
+
+
@@ -221,14 +223,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm
index 5019f595..93647524 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm
@@ -204,14 +204,13 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitLeft = 278
ExplicitTop = 0
end
- inherited ToolButton14: TToolButton
+ inherited ToolButton14: TToolButton [4]
Left = 334
Top = 0
- Wrap = False
ExplicitLeft = 334
ExplicitTop = 0
end
- inherited FontName: TJvFontComboBox
+ inherited FontName: TJvFontComboBox [5]
Left = 399
Top = 0
ExplicitLeft = 399
@@ -239,43 +238,44 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitTop = 0
ExplicitHeight = 27
end
- inherited ToolButton6: TToolButton
+ inherited ToolButton6: TToolButton [9]
Left = 0
Top = 27
ExplicitLeft = 0
ExplicitTop = 27
end
- inherited ToolButton7: TToolButton
+ inherited ToolButton7: TToolButton [10]
Left = 66
Top = 27
ExplicitLeft = 66
ExplicitTop = 27
end
- inherited ToolButton8: TToolButton
+ inherited ToolButton8: TToolButton [11]
Left = 133
Top = 27
ExplicitLeft = 133
ExplicitTop = 27
end
- inherited ToolButton12: TToolButton
+ inherited ToolButton12: TToolButton [12]
Left = 216
Top = 27
ExplicitLeft = 216
ExplicitTop = 27
+ ExplicitHeight = 22
end
- inherited ToolButton9: TToolButton
+ inherited ToolButton9: TToolButton [13]
Left = 224
Top = 27
ExplicitLeft = 224
ExplicitTop = 27
end
- inherited ToolButton10: TToolButton
+ inherited ToolButton10: TToolButton [14]
Left = 369
Top = 27
ExplicitLeft = 369
ExplicitTop = 27
end
- inherited ToolButton11: TToolButton
+ inherited ToolButton11: TToolButton [15]
Left = 494
Top = 27
ExplicitLeft = 494
diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES
index 083b1de5..b19c972a 100644
Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ
diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr
index cfd5e82a..a299d7ee 100644
--- a/Source/Servidor/FactuGES_Server.dpr
+++ b/Source/Servidor/FactuGES_Server.dpr
@@ -117,8 +117,6 @@ uses
schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
schAlmacenesClient_Intf in '..\Modulos\Almacenes\Model\schAlmacenesClient_Intf.pas',
schAlmacenesServer_Intf in '..\Modulos\Almacenes\Model\schAlmacenesServer_Intf.pas',
- schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
- schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas',
schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas',
@@ -128,7 +126,9 @@ uses
schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas',
uRptPresupuestosCliente_Server in '..\Modulos\Presupuestos de cliente\Reports\uRptPresupuestosCliente_Server.pas' {RptPresupuestosCliente: TDataModule},
- uRptWordPresupuestoCliente in '..\Modulos\Presupuestos de cliente\Reports\uRptWordPresupuestoCliente.pas' {RptWordPresupuestoCliente: TDataModule};
+ uRptWordPresupuestoCliente in '..\Modulos\Presupuestos de cliente\Reports\uRptWordPresupuestoCliente.pas' {RptWordPresupuestoCliente: TDataModule},
+ schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
+ schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas';
{$R *.res}
{$R ..\Servicios\RODLFile.res}
diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj
index 55c67cd7..b2a9ec17 100644
--- a/Source/Servidor/FactuGES_Server.dproj
+++ b/Source/Servidor/FactuGES_Server.dproj
@@ -1,290 +1,290 @@
-
+
-
- {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
- FactuGES_Server.dpr
- Debug
- AnyCPU
- DCC32
- ..\..\Output\Debug\Servidor\FactuGES_Server.exe
- vcl;rtl;vclx;vclactnband;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;teeUI;teedb;tee;adortl;vclib;ibxpress;dbxcds;dbexpress;DbxCommonDriver;IndyCore;IndySystem;IndyProtocols;VclSmp;vclie;webdsnap;xmlrtl;inet;inetdbbde;inetdbxpress;RemObjects_BPDX_D11;RemObjects_RODX_D11;RemObjects_Indy_D11;RemObjects_Synapse_D11;RemObjects_WebBroker_D11;DataAbstract_Core_D11;DataAbstract_DBXDriver_D11;DataAbstract_IDE_D11;DataAbstract_Scripting_D11;DataAbstract_SDACDriver_D11;sdac105;dac105;DataAbstract_SQLiteDriver_D11;cxEditorsD10;cxLibraryD10;dxThemeD10;cxDataD10;cxExtEditorsD10;cxGridD10;cxPageControlD10;cxSchedulerD10;cxTreeListD10;cxVerticalGridD10;dxBarD10;dxComnD10;dxBarDBNavD10;dxBarExtDBItemsD10;dxBarExtItemsD10;dxDockingD10;dxLayoutControlD10;dxNavBarD10;dxPSCoreD10;dxsbD10;dxPScxCommonD10;dxPSLnksD10;vclshlctrls;dxPScxExtCommonD10;dxPScxGridLnkD10;dxPScxPCProdD10;dxPScxScheduler2LnkD10;dxPScxTLLnkD10;dxPSdxLCLnkD10;dxPsPrVwAdvD10;pckMD5;pckUCDataConnector;pckUserControl_RT;PluginSDK_D10R;PNG_D10;PngComponentsD10;tb2k_d10;tbx_d10;JclVcl;Jcl;JvXPCtrlsD11R;JvCoreD11R;JvSystemD11R;JvStdCtrlsD11R;JvAppFrmD11R;JvBandsD11R;JvDBD11R;JvDlgsD11R;JvBDED11R;JvCmpD11R;JvCryptD11R;JvCtrlsD11R;JvCustomD11R;JvDockingD11R;JvDotNetCtrlsD11R;JvEDID11R;JvGlobusD11R;JvHMID11R;JvInterpreterD11R;JvJansD11R;JvManagedThreadsD11R;JvMMD11R;JvNetD11R;JvPageCompsD11R;JvPluginD11R;JvPrintPreviewD11R;JvRuntimeDesignD11R;JvTimeFrameworkD11R;JvUIBD11R;JvValidatorsD11R;JvWizardD11R;pckUCADOConn;pckUCBDEConn;pckUCIBXConn;pckUCMidasConn;cxIntlPrintSys3D10;cxExportD10;cxIntl5D10;GUISDK_D11;ccpackD11;JSDialog100;fsTee11;fs11;frx11;frxADO11;frxBDE11;frxDB11;frxDBX11;frxe11;frxIBX11;frxTee11;fsADO11;fsBDE11;fsDB11;fsIBX11;websnap;soaprtl;IntrawebDB_90_100;Intraweb_90_100
-
-
- 7.0
- False
- False
- 0
- 3
- ..\..\Output\Release\Servidor
- RELEASE
-
-
- 7.0
- 3
- ..\..\Output\Debug\Servidor
- DEBUG;
- True
- True
- True
- $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10
- $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10
- $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10
- $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10
-
-
- Delphi.Personality
-
-
- FalseTrueFalse/standaloneTrueFalse1230FalseFalseFalseFalseFalse308212521.2.3.01.2.3.0martes, 12 de agosto de 2008 12:17FactuGES_Server.dpr
-
-
-
-
- MainSource
-
-
-
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataModule
-
-
-
- TDARemoteService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataModule
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
- TFrame
-
-
-
- TFrame
-
-
-
- TForm
-
-
-
- TFrame
-
-
-
- TDARemoteService
-
-
-
-
-
-
- TDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
+ FactuGES_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Output\Debug\Servidor\FactuGES_Server.exe
+ vcl;rtl;vclx;vclactnband;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;teeUI;teedb;tee;adortl;vclib;ibxpress;dbxcds;dbexpress;DbxCommonDriver;IndyCore;IndySystem;IndyProtocols;VclSmp;vclie;webdsnap;xmlrtl;inet;inetdbbde;inetdbxpress;RemObjects_BPDX_D11;RemObjects_RODX_D11;RemObjects_Indy_D11;RemObjects_Synapse_D11;RemObjects_WebBroker_D11;DataAbstract_Core_D11;DataAbstract_DBXDriver_D11;DataAbstract_IDE_D11;DataAbstract_Scripting_D11;DataAbstract_SDACDriver_D11;sdac105;dac105;DataAbstract_SQLiteDriver_D11;cxEditorsD10;cxLibraryD10;dxThemeD10;cxDataD10;cxExtEditorsD10;cxGridD10;cxPageControlD10;cxSchedulerD10;cxTreeListD10;cxVerticalGridD10;dxBarD10;dxComnD10;dxBarDBNavD10;dxBarExtDBItemsD10;dxBarExtItemsD10;dxDockingD10;dxLayoutControlD10;dxNavBarD10;dxPSCoreD10;dxsbD10;dxPScxCommonD10;dxPSLnksD10;vclshlctrls;dxPScxExtCommonD10;dxPScxGridLnkD10;dxPScxPCProdD10;dxPScxScheduler2LnkD10;dxPScxTLLnkD10;dxPSdxLCLnkD10;dxPsPrVwAdvD10;pckMD5;pckUCDataConnector;pckUserControl_RT;PluginSDK_D10R;PNG_D10;PngComponentsD10;tb2k_d10;tbx_d10;JclVcl;Jcl;JvXPCtrlsD11R;JvCoreD11R;JvSystemD11R;JvStdCtrlsD11R;JvAppFrmD11R;JvBandsD11R;JvDBD11R;JvDlgsD11R;JvBDED11R;JvCmpD11R;JvCryptD11R;JvCtrlsD11R;JvCustomD11R;JvDockingD11R;JvDotNetCtrlsD11R;JvEDID11R;JvGlobusD11R;JvHMID11R;JvInterpreterD11R;JvJansD11R;JvManagedThreadsD11R;JvMMD11R;JvNetD11R;JvPageCompsD11R;JvPluginD11R;JvPrintPreviewD11R;JvRuntimeDesignD11R;JvTimeFrameworkD11R;JvUIBD11R;JvValidatorsD11R;JvWizardD11R;pckUCADOConn;pckUCBDEConn;pckUCIBXConn;pckUCMidasConn;cxIntlPrintSys3D10;cxExportD10;cxIntl5D10;GUISDK_D11;ccpackD11;JSDialog100;fsTee11;fs11;frx11;frxADO11;frxBDE11;frxDB11;frxDBX11;frxe11;frxIBX11;frxTee11;fsADO11;fsBDE11;fsDB11;fsIBX11;websnap;soaprtl;IntrawebDB_90_100;Intraweb_90_100
+
+
+ 7.0
+ False
+ False
+ 0
+ 3
+ ..\..\Output\Release\Servidor
+ RELEASE
+
+
+ 7.0
+ 3
+ ..\..\Output\Debug\Servidor
+ DEBUG;
+ True
+ True
+ True
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10
+
+
+ Delphi.Personality
+
+
+FalseTrueFalse/standaloneTrueFalse1230FalseFalseFalseFalseFalse308212521.2.3.01.2.3.0martes, 12 de agosto de 2008 12:17FactuGES_Server.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataModule
+
+
+
+ TDARemoteService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataModule
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TFrame
+
+
+
+ TFrame
+
+
+
+ TForm
+
+
+
+ TFrame
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+
+