Fallo en lista de articulos no sacaba la referencia del fabricante.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@461 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2008-06-18 15:10:06 +00:00
parent 9f901c2937
commit ed8598d8d9
13 changed files with 104 additions and 78 deletions

View File

@ -3,14 +3,14 @@ unit schEmpresasClient_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_Empresas = '{0818A25D-E23C-4CFF-82F0-313FD818251C}';
RID_EmpresasDatosBanco = '{3F6CB778-A561-495F-AA36-903B1F94E7B7}';
RID_Empresas = '{44B01133-DAC4-424A-9152-B369DB57858D}';
RID_EmpresasDatosBanco = '{FA3FAB23-9A95-4DD2-8AF7-046B04689D22}';
{ Data table names }
nme_Empresas = 'Empresas';
@ -99,7 +99,7 @@ const
type
{ IEmpresas }
IEmpresas = interface(IDAStronglyTypedDataTable)
['{80F28C5F-7541-4940-8747-D39D8B8426D9}']
['{1ACDCBE0-0B63-44A7-974E-40FB704DE038}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -255,7 +255,7 @@ type
end;
{ TEmpresasDataTableRules }
TEmpresasDataTableRules = class(TIntfObjectDADataTableRules, IEmpresas)
TEmpresasDataTableRules = class(TDADataTableRules, IEmpresas)
private
f_NOTAS: IROStrings;
f_LOGOTIPO: IROStream;
@ -422,7 +422,7 @@ type
{ IEmpresasDatosBanco }
IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable)
['{2808E04A-4851-4816-ACAD-9B4B8357B765}']
['{5FEF9BFD-162A-4DBA-9B7B-6F99C3672E57}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -496,7 +496,7 @@ type
end;
{ TEmpresasDatosBancoDataTableRules }
TEmpresasDatosBancoDataTableRules = class(TIntfObjectDADataTableRules, IEmpresasDatosBanco)
TEmpresasDatosBancoDataTableRules = class(TDADataTableRules, IEmpresasDatosBanco)
private
protected
{ Property getters and setters }

View File

@ -9,13 +9,13 @@ 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_EmpresasDelta = '{39AC9440-BEDB-4468-8B08-49600891084A}';
RID_EmpresasDatosBancoDelta = '{A084800E-091E-40AD-9B45-63974394595E}';
RID_EmpresasDelta = '{56A33A56-CCD5-4F9C-A1AE-2A164D288BB2}';
RID_EmpresasDatosBancoDelta = '{0B56774E-9818-404A-AB4E-F54B831D2794}';
type
{ IEmpresasDelta }
IEmpresasDelta = interface(IEmpresas)
['{39AC9440-BEDB-4468-8B08-49600891084A}']
['{56A33A56-CCD5-4F9C-A1AE-2A164D288BB2}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldNIF_CIFValue : String;
@ -339,7 +339,7 @@ type
{ IEmpresasDatosBancoDelta }
IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco)
['{A084800E-091E-40AD-9B45-63974394595E}']
['{0B56774E-9818-404A-AB4E-F54B831D2794}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;

View File

@ -30,6 +30,8 @@ procedure TBizEmpresasServer.AfterProcessChange(Sender: TDABusinessProcessor;
aChange: TDADeltaChange; Processed: Boolean; var CanRemoveFromDelta: Boolean);
var
AConn : IDAConnection;
ParamTiempo: Variant;
ParamMargen: Variant;
begin
inherited;
@ -39,14 +41,16 @@ begin
case aChange.ChangeType of
ctInsert, ctUpdate: begin
if ((Sender.CurrentChange.OldValueByName[fld_EmpresasPARAM_TIEMPO] <> Sender.CurrentChange.NewValueByName[fld_EmpresasPARAM_TIEMPO])
or (Sender.CurrentChange.OldValueByName[fld_EmpresasPARAM_MARGEN] <> Sender.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN])) then
ParamTiempo := Sender.CurrentChange.NewValueByName[fld_EmpresasPARAM_TIEMPO];
ParamMargen := Sender.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN];
if ((Sender.CurrentChange.OldValueByName[fld_EmpresasPARAM_TIEMPO] <> ParamTiempo)
or (Sender.CurrentChange.OldValueByName[fld_EmpresasPARAM_MARGEN] <> ParamMargen)) then
begin
try
//Recalculamos los PVP del catalogo
AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
AConn.BeginTransaction;
Sender.Schema.NewCommand(AConn, 'RecalcularPVPArticulos', ['ID_EMPRESA'], [Sender.CurrentChange.OldValueByName[fld_EmpresasID]]);
Sender.Schema.NewCommand(AConn, 'RecalcularPVPArticulos', ['ID_EMPRESA', 'PARAM_MARGEN', 'PARAM_TIEMPO'], [Sender.CurrentChange.OldValueByName[fld_EmpresasID], ParamMargen, ParamTiempo]);
AConn.CommitTransaction;
except
AConn.RollbackTransaction;

View File

@ -405,6 +405,14 @@ object srvEmpresas: TsrvEmpresas
item
Name = 'id_empresa'
Value = ''
end
item
Name = 'param_margen'
Value = ''
end
item
Name = 'param_tiempo'
Value = ''
end>
Statements = <
item
@ -412,7 +420,9 @@ object srvEmpresas: TsrvEmpresas
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL = 'execute procedure PRO_ART_RECALCULAR_PVP :id_empresa'#10
SQL =
'execute procedure PRO_ART_RECALCULAR_PVP :id_empresa, :param_mar' +
'gen, :param_tiempo'#10
StatementType = stSQL
ColumnMappings = <>
end>

View File

@ -363,8 +363,9 @@ begin
Result.Edit;
with Result do
begin
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
USUARIO := AppFactuGES.UsuarioActivo.UserName;
REFERENCIA := '';
end;
Result.Post;

View File

@ -1,6 +1,6 @@
inherited frViewArticulo: TfrViewArticulo
Width = 1042
Height = 510
Width = 953
Height = 514
Align = alClient
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
@ -10,16 +10,16 @@ inherited frViewArticulo: TfrViewArticulo
object dxLayoutControlArticulo: TdxLayoutControl
Left = 0
Top = 0
Width = 1042
Width = 953
Height = 507
Align = alTop
ParentBackground = True
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth]
ExplicitWidth = 954
ExplicitWidth = 451
DesignSize = (
1042
953
507)
object PngSpeedButton2: TPngSpeedButton
Left = 529
@ -58,10 +58,11 @@ inherited frViewArticulo: TfrViewArticulo
end
object eReferencia: TcxDBTextEdit
Left = 132
Top = 55
Top = 28
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'REFERENCIA'
DataBinding.DataSource = dsViewArticulo
Enabled = False
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Color = clWindow
@ -74,12 +75,12 @@ inherited frViewArticulo: TfrViewArticulo
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 1
Width = 200
TabOrder = 0
Width = 420
end
object eDescripcion: TcxDBTextEdit
Left = 132
Top = 28
Top = 55
DataBinding.DataField = 'DESCRIPCION'
DataBinding.DataSource = dsViewArticulo
Style.BorderColor = clWindowFrame
@ -94,8 +95,8 @@ inherited frViewArticulo: TfrViewArticulo
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
Width = 200
TabOrder = 1
Width = 420
end
object eNoComisionable: TcxDBCheckBox
Left = 132
@ -119,7 +120,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 5
Width = 200
Width = 420
end
object eImagen: TcxImage
Left = 28
@ -141,7 +142,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 14
Height = 98
Width = 200
Width = 495
end
object cbFamilia: TcxDBComboBox
Left = 132
@ -165,7 +166,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 2
Width = 200
Width = 420
end
inline frViewDatosYSeleccionProveedor1: TfrViewDatosYSeleccionProveedor
Left = 582
@ -207,12 +208,12 @@ inherited frViewArticulo: TfrViewArticulo
Width = 221
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 329
ExplicitLeft = 329
Left = 240
ExplicitLeft = 240
end
inherited Button3: TBitBtn
Left = 213
ExplicitLeft = 213
Left = 124
ExplicitLeft = 124
end
end
end
@ -251,7 +252,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 17
Width = 340
Width = 86
end
object eDescuento: TcxDBSpinEdit
Left = 663
@ -276,7 +277,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 18
Width = 340
Width = 86
end
object ePrecioNeto: TcxDBCurrencyEdit
Left = 663
@ -301,7 +302,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 19
Width = 340
Width = 86
end
object ePrecioPorte: TcxDBCurrencyEdit
Left = 663
@ -345,7 +346,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 4
Width = 200
Width = 420
end
object cbUnidadMedida: TcxDBComboBox
Left = 132
@ -369,7 +370,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 3
Width = 200
Width = 420
end
object cbFabricante: TcxDBComboBox
Left = 132
@ -393,7 +394,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 12
Width = 200
Width = 420
end
object eReferenciaFabr: TcxDBTextEdit
Left = 132
@ -490,7 +491,7 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 10
Width = 100
Width = 112
end
object eParamMargen: TcxDBSpinEdit
Left = 132
@ -584,13 +585,6 @@ inherited frViewArticulo: TfrViewArticulo
AutoAligns = []
AlignHorz = ahClient
Caption = 'Datos del art'#237'culo'
object dxLayoutControlArticuloItem8: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Descripci'#243'n:'
Control = eDescripcion
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloItem3: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
@ -598,6 +592,13 @@ inherited frViewArticulo: TfrViewArticulo
Control = eReferencia
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloItem8: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Descripci'#243'n:'
Control = eDescripcion
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloGroup4: TdxLayoutGroup
ShowCaption = False
Hidden = True

View File

@ -94,7 +94,7 @@ inherited frViewArticulos: TfrViewArticulos
end
object cxGridViewREFERENCIA_FABR: TcxGridDBColumn
Caption = 'Ref. fabricante'
DataBinding.FieldName = 'REFERENCIA_FABRICANTE'
DataBinding.FieldName = 'REFERENCIA_FABR'
BestFitMaxWidth = 60
Width = 60
end

View File

@ -63,6 +63,6 @@ contains
uEditorElegirArticulosPedidoProveedor in 'uEditorElegirArticulosPedidoProveedor.pas' {fEditorElegirArticulosPedidoProveedor: TForm},
uEditorSituacionPedidoProveedor in 'uEditorSituacionPedidoProveedor.pas' {fEditorSituacionPedidoProveedor: TfEditorSituacionPedidoProveedor},
uViewProveedorPedido in 'uViewProveedorPedido.pas' {frViewProveedorPedido: TFrame},
uEditorElegirPersonaContactoPedido in 'uEditorElegirPersonaContactoPedido.pas';
uEditorElegirPersonaContactoPedido in 'uEditorElegirPersonaContactoPedido.pas' {fEditorElegirPersonaContactoPedido: TfEditorElegirPersonaContactoPedido};
end.

View File

@ -49,28 +49,28 @@
<DelphiCompile Include="PedidosProveedor_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\Lib\Almacenes_controller.dcp" />
<DCCReference Include="..\..\Lib\Almacenes_model.dcp" />
<DCCReference Include="..\..\Lib\Articulos_view.dcp" />
<DCCReference Include="..\..\Lib\Contactos_controller.dcp" />
<DCCReference Include="..\..\Lib\Contactos_model.dcp" />
<DCCReference Include="..\..\Lib\Contactos_view.dcp" />
<DCCReference Include="..\..\Lib\cxDataD11.dcp" />
<DCCReference Include="..\..\Lib\cxEditorsD11.dcp" />
<DCCReference Include="..\..\Lib\cxLibraryD11.dcp" />
<DCCReference Include="..\..\Lib\dbrtl.dcp" />
<DCCReference Include="..\..\Lib\dxGDIPlusD11.dcp" />
<DCCReference Include="..\..\Lib\dxThemeD11.dcp" />
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
<DCCReference Include="..\..\Lib\Obras_controller.dcp" />
<DCCReference Include="..\..\Lib\Obras_model.dcp" />
<DCCReference Include="..\..\Lib\PedidosProveedor_controller.dcp" />
<DCCReference Include="..\..\Lib\PedidosProveedor_model.dcp" />
<DCCReference Include="..\..\Lib\PedProv_AlbProv_relation.dcp" />
<DCCReference Include="..\..\Lib\rtl.dcp" />
<DCCReference Include="..\..\Lib\vcl.dcp" />
<DCCReference Include="..\..\Lib\vcldb.dcp" />
<DCCReference Include="..\..\Lib\vcljpg.dcp" />
<DCCReference Include="..\Almacenes_controller.dcp" />
<DCCReference Include="..\Almacenes_model.dcp" />
<DCCReference Include="..\Articulos_view.dcp" />
<DCCReference Include="..\Contactos_controller.dcp" />
<DCCReference Include="..\Contactos_model.dcp" />
<DCCReference Include="..\Contactos_view.dcp" />
<DCCReference Include="..\cxDataD11.dcp" />
<DCCReference Include="..\cxEditorsD11.dcp" />
<DCCReference Include="..\cxLibraryD11.dcp" />
<DCCReference Include="..\dbrtl.dcp" />
<DCCReference Include="..\dxGDIPlusD11.dcp" />
<DCCReference Include="..\dxThemeD11.dcp" />
<DCCReference Include="..\GUIBase.dcp" />
<DCCReference Include="..\Obras_controller.dcp" />
<DCCReference Include="..\Obras_model.dcp" />
<DCCReference Include="..\PedidosProveedor_controller.dcp" />
<DCCReference Include="..\PedidosProveedor_model.dcp" />
<DCCReference Include="..\PedProv_AlbProv_relation.dcp" />
<DCCReference Include="..\rtl.dcp" />
<DCCReference Include="..\vcl.dcp" />
<DCCReference Include="..\vcldb.dcp" />
<DCCReference Include="..\vcljpg.dcp" />
<DCCReference Include="uEditorDireccionEntregaPedidoProveedor.pas">
<Form>fEditorDireccionEntregaPedidoProveedor </Form>
<DesignClass>TfEditorDireccionEntregaPedidoProveedor</DesignClass>
@ -83,7 +83,10 @@
<Form>fEditorElegirPedidosProveedor</Form>
<DesignClass>TForm</DesignClass>
</DCCReference>
<DCCReference Include="uEditorElegirPersonaContactoPedido.pas" />
<DCCReference Include="uEditorElegirPersonaContactoPedido.pas">
<Form>fEditorElegirPersonaContactoPedido</Form>
<DesignClass>TfEditorSituacionPedidoProveedor</DesignClass>
</DCCReference>
<DCCReference Include="uEditorPedidoProveedor.pas">
<Form>fEditorPedidoProveedor</Form>
<DesignClass>TfEditorPedidoProveedor</DesignClass>

View File

@ -7,7 +7,7 @@ inherited fEditorElegirPersonaContactoPedido: TfEditorElegirPersonaContactoPedid
OnCreate = CustomEditorCreate
OnShow = CustomEditorShow
ExplicitWidth = 416
ExplicitHeight = 294
ExplicitHeight = 301
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
@ -93,6 +93,7 @@ inherited fEditorElegirPersonaContactoPedido: TfEditorElegirPersonaContactoPedid
Width = 335
Height = 17
Action = actSubcontrata
Caption = 'Personal de contacto de la subcontrata:'
TabOrder = 4
end
object rdxDestino2: TRadioButton

View File

@ -5,7 +5,13 @@ interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
uEditorBasico, ActnList, StdCtrls, ExtCtrls, cxGraphics, cxControls,
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit;
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit, dxSkinsCore,
dxSkinBlack, dxSkinBlue, dxSkinCaramel, dxSkinCoffee, dxSkinGlassOceans,
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue;
type
TfEditorElegirPersonaContactoPedido = class(TfEditorBasico)

View File

@ -124,10 +124,10 @@ uses
srvProvinciasPoblaciones_Impl in '..\ApplicationBase\ProvinciasPoblaciones\Servidor\srvProvinciasPoblaciones_Impl.pas',
schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas',
schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
uBizArticulosServer in '..\Modulos\Articulos\Model\uBizArticulosServer.pas',
uBizEmpresasServer in '..\ApplicationBase\Empresas\Model\uBizEmpresasServer.pas';
uBizEmpresasServer in '..\ApplicationBase\Empresas\Model\uBizEmpresasServer.pas',
schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas';
{$R *.res}
{$R ..\Servicios\RODLFile.res}