Arreglo para que en los presupuestos se coja el precio PVP venta y el total y se pueda elegir

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@466 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2008-06-20 13:28:50 +00:00
parent 2448e59b34
commit e254944694
13 changed files with 166 additions and 152 deletions

View File

@ -59,6 +59,10 @@
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD10.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\PluginSDK_D10R.bpl">PluginSDK for Delphi 10 (Runtime)</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>

View File

@ -64,7 +64,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
DroppedDownWidth = 145
MaxMRUCount = 0
FontName = 'Tahoma'
ItemIndex = 42
ItemIndex = 43
Options = [foTrueTypeOnly, foNoOEMFonts, foScalableOnly, foWysiWyg]
Sorted = True
TabOrder = 2
@ -309,6 +309,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
Caption = 'Importe unidad'
DataBinding.FieldName = 'IMPORTE_UNIDAD'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 120
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify

View File

@ -19,7 +19,7 @@ uses
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue, dxSkinscxPCPainter, cxGridCustomPopupMenu, cxGridPopupMenu,
Menus, cxDBLookupComboBox, cxDropDownEdit;
Menus;
type
IViewDetallesBase = interface(IViewBase)

View File

@ -3,22 +3,23 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO
inherited ToolButton1: TToolButton
ExplicitWidth = 109
end
inherited ToolButton3: TToolButton [1]
inherited ToolButton2: TToolButton
Left = 109
ExplicitLeft = 109
end
inherited ToolButton4: TToolButton [2]
Left = 164
end
inherited ToolButton14: TToolButton [3]
Left = 220
Wrap = False
end
inherited ToolButton2: TToolButton [4]
Left = 285
ExplicitLeft = 285
ExplicitWidth = 114
end
inherited ToolButton3: TToolButton
Left = 223
ExplicitLeft = 223
end
inherited ToolButton4: TToolButton
Left = 278
ExplicitLeft = 278
end
inherited ToolButton14: TToolButton
Left = 334
ExplicitLeft = 334
end
inherited FontSize: TEdit
Width = 41
ExplicitWidth = 41
@ -45,10 +46,9 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO
end
end
inherited cxGrid: TcxGrid
ExplicitTop = 126
ExplicitHeight = 210
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewIMPORTEUNIDAD: TcxGridDBColumn
Properties.ImmediateDropDown = True
end
object cxGridViewDESCUENTO: TcxGridDBColumn [7]
Caption = 'Dto'
DataBinding.FieldName = 'DESCUENTO'
@ -87,6 +87,9 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO
end
end
end
inherited TBXDock1: TTBXDock
ExplicitTop = 100
end
inherited ActionListContenido: TActionList
inherited actAnadir: TAction
Caption = 'A'#241'adir concepto'

View File

@ -17,7 +17,7 @@ uses
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue, dxSkinscxPCPainter, Menus, cxGridCustomPopupMenu,
cxGridPopupMenu, cxDBLookupComboBox, cxDropDownEdit;
cxGridPopupMenu;
type
IViewDetallesDTO = interface(IViewDetallesBase)

View File

@ -55,13 +55,13 @@
<DelphiCompile Include="Articulos_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\Articulos_controller.dcp" />
<DCCReference Include="..\Articulos_model.dcp" />
<DCCReference Include="..\Contactos_view.dcp" />
<DCCReference Include="..\Fabricantes_controller.dcp" />
<DCCReference Include="..\Familias_controller.dcp" />
<DCCReference Include="..\GUIBase.dcp" />
<DCCReference Include="..\UnidadesMedida_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_model.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Contactos_view.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Fabricantes_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Familias_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\UnidadesMedida_controller.dcp" />
<DCCReference Include="uArticulosViewRegister.pas" />
<DCCReference Include="uEditorArticulo.pas">
<Form>fEditorArticulo</Form>

View File

@ -2,44 +2,66 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
ParentBiDiMode = False
OnShow = CustomViewShow
inherited ToolBar1: TToolBar
Height = 122
ExplicitHeight = 122
inherited ToolButton13: TToolButton [3]
Left = 0
Top = 0
Wrap = True
ExplicitLeft = 0
ExplicitTop = 0
ExplicitHeight = 27
Height = 100
ExplicitHeight = 100
inherited ToolButton14: TToolButton
Wrap = False
end
inherited ToolButton4: TToolButton [4]
Top = 27
end
inherited ToolButton7: TToolButton [5]
Left = 56
Top = 27
ExplicitLeft = 56
ExplicitTop = 27
inherited ToolButton9: TToolButton [5]
Left = 121
Top = 22
ExplicitLeft = 121
ExplicitTop = 22
end
inherited FontName: TJvFontComboBox [6]
Left = 123
Top = 27
ExplicitLeft = 123
ExplicitTop = 27
Left = 266
Top = 22
ExplicitLeft = 266
ExplicitTop = 22
end
inherited ToolButton14: TToolButton [7]
Left = 268
Top = 27
ExplicitLeft = 268
ExplicitTop = 27
inherited UpDown1: TUpDown
Left = 411
Top = 22
Width = 17
ExplicitLeft = 411
ExplicitTop = 22
ExplicitWidth = 17
end
inherited ToolButton9: TToolButton [8]
inherited ToolButton13: TToolButton
Left = 0
Top = 22
Wrap = True
ExplicitLeft = 0
ExplicitTop = 22
ExplicitHeight = 27
end
inherited ToolButton6: TToolButton
Left = 0
Top = 49
ExplicitLeft = 0
ExplicitTop = 49
end
inherited ToolButton12: TToolButton [9]
inherited ToolButton7: TToolButton
Left = 66
Top = 49
ExplicitLeft = 66
ExplicitTop = 49
end
inherited FontSize: TEdit [11]
Left = 133
Top = 49
Width = 42
ExplicitLeft = 133
ExplicitTop = 49
ExplicitWidth = 42
end
inherited ToolButton11: TToolButton [12]
Left = 175
Top = 49
ExplicitLeft = 175
ExplicitTop = 49
end
inherited ToolButton12: TToolButton [13]
Left = 0
Top = 49
Wrap = True
@ -47,53 +69,24 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
ExplicitTop = 49
ExplicitHeight = 27
end
inherited FontSize: TEdit [10]
inherited ToolButton10: TToolButton
Left = 0
Top = 76
Width = 106
ExplicitLeft = 0
ExplicitTop = 76
ExplicitWidth = 106
end
inherited UpDown1: TUpDown [11]
Left = 106
inherited ToolButton8: TToolButton [15]
Left = 125
Top = 76
Width = 17
ExplicitLeft = 106
ExplicitLeft = 125
ExplicitTop = 76
ExplicitWidth = 17
end
inherited ToolButton6: TToolButton [12]
Left = 123
Top = 76
ExplicitLeft = 123
ExplicitTop = 76
end
inherited ToolButton10: TToolButton [13]
Left = 189
Top = 76
Wrap = True
ExplicitLeft = 189
ExplicitTop = 76
end
inherited ToolButton8: TToolButton [14]
Left = 0
Top = 98
ExplicitLeft = 0
ExplicitTop = 98
end
inherited ToolButton11: TToolButton
Left = 83
Top = 98
ExplicitLeft = 83
ExplicitTop = 98
end
end
inherited cxGrid: TcxGrid
Top = 148
Height = 156
ExplicitTop = 126
ExplicitHeight = 178
Top = 126
Height = 178
ExplicitTop = 99
ExplicitHeight = 205
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewTIPO: TcxGridDBColumn
MinWidth = 69
@ -101,7 +94,6 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
end
object cxGridViewID_ARTICULO: TcxGridDBColumn [4]
DataBinding.FieldName = 'ID_ARTICULO'
PropertiesClassName = 'TcxCalcEditProperties'
Visible = False
VisibleForCustomization = False
Width = 31
@ -184,7 +176,7 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
end
end
inherited TBXDock1: TTBXDock
Top = 122
Top = 100
ExplicitTop = 68
inherited TBXToolbar1: TTBXToolbar
inherited TBXSubmenuItem1: TTBXSubmenuItem
@ -448,11 +440,15 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
Bitmap = {}
end
object cxEditRepository1: TcxEditRepository
Left = 128
Left = 112
Top = 184
object cxEditRepository1ComboBoxItem1: TcxEditRepositoryComboBoxItem
object cxEditRepositoryComboBox_IMPORTEUNIDAD: TcxEditRepositoryComboBoxItem
Properties.ImmediateDropDown = False
Properties.ImmediatePost = True
Properties.ImmediateUpdateText = True
Properties.PostPopupValueOnTab = True
end
object cxEditRepository1CurrencyItem1: TcxEditRepositoryCurrencyItem
object cxEditRepositoryCurrencyItem_IMPORTEUNIDAD: TcxEditRepositoryCurrencyItem
end
end
end

View File

@ -18,7 +18,7 @@ uses
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue, dxSkinscxPCPainter, Menus, cxGridCustomPopupMenu,
cxGridPopupMenu, cxDBLookupComboBox, cxCalc, cxEditRepositoryItems;
cxGridPopupMenu, cxEditRepositoryItems;
type
IViewDetallesArticulos = interface(IViewDetallesDTO)
@ -36,8 +36,8 @@ type
TBXItem17: TTBXItem;
cxGridViewREFERENCIA_FABRICANTE: TcxGridDBColumn;
cxEditRepository1: TcxEditRepository;
cxEditRepository1ComboBoxItem1: TcxEditRepositoryComboBoxItem;
cxEditRepository1CurrencyItem1: TcxEditRepositoryCurrencyItem;
cxEditRepositoryComboBox_IMPORTEUNIDAD: TcxEditRepositoryComboBoxItem;
cxEditRepositoryCurrencyItem_IMPORTEUNIDAD: TcxEditRepositoryCurrencyItem;
procedure CustomViewCreate(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject);
procedure actAnadirArticulosExecute(Sender: TObject);
@ -45,19 +45,21 @@ type
procedure OnValidateReferencia(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure OnValidateReferenciaProveedor(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure CustomViewShow(Sender: TObject);
procedure cxGridViewREFERENCIAPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure cxGridViewREFERENCIAPropertiesButtonClick(Sender: TObject;
AButtonIndex: Integer);
procedure actBuscarArticuloExecute(Sender: TObject);
procedure actBuscarArticuloUpdate(Sender: TObject);
procedure actDetalleCopiarExecute(Sender: TObject);
procedure actDetallePegarExecute(Sender: TObject);
procedure actDetalleCortarExecute(Sender: TObject);
procedure cxGridViewREFERENCIA_PROVEEDORPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure cxGridViewREFERENCIA_FABRICANTEPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure OnGetPropertiesForEditIMPORTE_UNIDAD(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
procedure cxGridViewREFERENCIA_PROVEEDORPropertiesButtonClick(
Sender: TObject; AButtonIndex: Integer);
procedure cxGridViewREFERENCIA_FABRICANTEPropertiesButtonClick(
Sender: TObject; AButtonIndex: Integer);
procedure cxGridViewIMPORTEUNIDADGetProperties(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
procedure cxGridViewIMPORTEUNIDAD_OnInitPopup(Sender: TObject);
private
procedure RecuperarListaUnidadesMedida;
protected
@ -96,7 +98,6 @@ end;
procedure TfrViewDetallesArticulos.CustomViewCreate(Sender: TObject);
begin
inherited;
cxGridViewIMPORTEUNIDAD.OnGetPropertiesForEdit := OnGetPropertiesForEditIMPORTE_UNIDAD;
cxGridViewREFERENCIA.Properties.OnValidate := OnValidateReferencia;
cxGridViewREFERENCIA_PROVEEDOR.Properties.OnValidate := OnValidateReferenciaProveedor;
end;
@ -104,7 +105,6 @@ end;
procedure TfrViewDetallesArticulos.CustomViewDestroy(Sender: TObject);
begin
inherited;
cxGridViewIMPORTEUNIDAD.OnGetPropertiesForEdit := Nil;
cxGridViewREFERENCIA.Properties.OnValidate := Nil;
cxGridViewREFERENCIA_PROVEEDOR.Properties.OnValidate := Nil;
end;
@ -151,14 +151,34 @@ begin
SeleccionarFilaActual;
end;
procedure TfrViewDetallesArticulos.OnGetPropertiesForEditIMPORTE_UNIDAD(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
procedure TfrViewDetallesArticulos.cxGridViewIMPORTEUNIDAD_OnInitPopup(
Sender: TObject);
var
IndiceCol: Integer;
IdArticulo: Variant;
AIndiceCol : Integer;
AIDArticulo : Variant;
begin
inherited;
AIndiceCol := cxGridView.DataController.GetItemByFieldName('REFERENCIA').Index;
AIDArticulo := cxGridView.DataController.Values[cxGridView.DataController.FocusedRecordIndex, AIndiceCol];
with cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties do
begin
BeginUpdate;
Items.BeginUpdate;
try
Items.Clear;
Items.Add('1');
Items.Add('2');
Items.Add('3');
Items.Add(VarToStr(AIDArticulo));
finally
Items.EndUpdate;
EndUpdate;
end;
end;
{
DADataSource.DataTable.DisableControls;
try
@ -182,6 +202,7 @@ begin
HideHourglassCursor;
end;
end
end
else
AProperties := cxEditRepository1CurrencyItem1.properties;
@ -189,52 +210,41 @@ begin
finally
DADataSource.DataTable.EnableControls;
end;
}
end;}
end;
procedure TfrViewDetallesArticulos.cxGridViewIMPORTEUNIDADGetProperties(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
var
IndiceCol: Integer;
IdArticulo: Variant;
Aux_IDArticulo: Variant;
begin
inherited;
{
DADataSource.DataTable.DisableControls;
try
IndiceCol := cxGridView.DataController.GetItemByFieldName('ID_ARTICULO').Index;
IdArticulo := cxGridView.DataController.Values[Sender.DataBinding.DataController.FocusedRecordIndex, IndiceCol];
Aux_IDArticulo := Null;
cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties.Items.Clear;
if not VarIsNull(IdArticulo)
and (IdArticulo > 0) then
if (_FocusedView.DataController.RecordCount > 0) then
begin
Aux_IDArticulo := ARecord.Values[cxGridViewID_ARTICULO.Index];
if not VarIsNull(Aux_IDArticulo) and (Aux_IDArticulo > 0) then
begin
//Lo tratamos como combox
AProperties := cxEditRepository1ComboBoxItem1.Properties;
{ with TcxComboBoxProperties(cxGridViewIMPORTEUNIDAD.Properties).Items do
begin
with cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties do
begin
ShowHourglassCursor;
BeginUpdate;
Items.BeginUpdate;
try
Clear;
AddStrings((Controller as IControllerDetallesArticulos).DarPrecioPVPVenta(IdArticulo));
Items.Clear;
Items.AddStrings((Controller as IControllerDetallesArticulos).DarPrecioPVPVenta(Aux_IDArticulo));
finally
EndUpdate;
Items.EndUpdate;
HideHourglassCursor;
end;
end
}
{ end
else
AProperties := cxEditRepository1CurrencyItem1.properties;
// cxGridViewIMPORTEUNIDAD.PropertiesClassName := 'TcxCurrencyEditProperties';
finally
DADataSource.DataTable.EnableControls;
end;
AProperties := cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties;
end
else begin
AProperties := cxEditRepositoryCurrencyItem_IMPORTEUNIDAD.Properties;
end;
end;
}
end;
procedure TfrViewDetallesArticulos.cxGridViewREFERENCIAPropertiesButtonClick(

View File

@ -49,13 +49,13 @@
<DelphiCompile Include="PresupuestosCliente_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\Articulos_view.dcp" />
<DCCReference Include="..\Base.dcp" />
<DCCReference Include="..\GUIBase.dcp" />
<DCCReference Include="..\PreCli_AlbCli_relation.dcp" />
<DCCReference Include="..\PreCli_FacCli_relation.dcp" />
<DCCReference Include="..\PresupuestosCliente_controller.dcp" />
<DCCReference Include="..\PresupuestosCliente_model.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_view.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PreCli_AlbCli_relation.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PreCli_FacCli_relation.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PresupuestosCliente_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PresupuestosCliente_model.dcp" />
<DCCReference Include="uEditorElegirArticulosPresupuestoCliente.pas">
<Form>fEditorElegirArticulosPresupuestoCliente</Form>
<DesignClass>TfEditorElegirArticulosPedidoCliente</DesignClass>
@ -82,7 +82,7 @@
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewDireccionEntregaPresupuestoCliente.pas">
<Form>frViewElegirArticulosPresupuestosCliente</Form>
<Form>frViewDireccionEntregaPresupuestoCliente</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewElegirArticulosPresupuestosCliente.pas">
@ -107,7 +107,7 @@ Activate Handle=1
Save Log File=1
Foreground Tab=0
Freeze Activate=0
Freeze Timeout=0
Freeze Timeout=1
SMTP From=eurekalog@email.com
SMTP Host=
SMTP Port=25
@ -580,5 +580,5 @@ Count mtException_AntiFreeze=1
mtException_AntiFreeze0="The application seems to be frozen."
Count mtInvalidEmailMsg=1
mtInvalidEmailMsg0="Invalid email."
TextsCollection=English
TextsCollection=
EurekaLog Last Line -->

Binary file not shown.

View File

@ -14,7 +14,7 @@ BEGIN
BEGIN
VALUE "FileVersion", "1.0.8.0\0"
VALUE "ProductVersion", "1.0.8.0\0"
VALUE "CompileDate", "miércoles, 18 de junio de 2008 18:49\0"
VALUE "CompileDate", "viernes, 20 de junio de 2008 9:56\0"
END
END
BLOCK "VarFileInfo"