Version 4.7.4

git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@197 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
roberto 2024-10-15 19:33:58 +00:00
parent 4d7f8dfe03
commit bc47bfff68
74 changed files with 1255 additions and 1120 deletions

View File

@ -52,7 +52,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">2</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.7.2.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.7.2.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">4</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.7.4.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.7.4.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>

Binary file not shown.

View File

@ -845,5 +845,9 @@ inherited frViewDetallesBase: TfrViewDetallesBase
Font.Name = 'Lucida Console'
Font.Style = []
end
object cxStyleEdicion: TcxStyle
AssignedValues = [svColor]
Color = 13303807
end
end
end

View File

@ -109,6 +109,7 @@ type
cxStyle_DESCUENTO: TcxStyle;
cxStyleDesactivado: TcxStyle;
cxGridViewVALORADO: TcxGridDBColumn;
cxStyleEdicion: TcxStyle;
procedure actAnadirExecute(Sender: TObject);
procedure actEliminarExecute(Sender: TObject);
@ -426,6 +427,10 @@ begin
else
if Length(AEditValue) = 0 then
CurEdit.DefAttributes.Assign(FuentePorDefecto);
//Establecemos un color de edición único para evitar el fallo de color verde en conceptos
CurEdit.Style.Color := cxStyleEdicion.Color;
finally
FreeAndNil(FuentePorDefecto);
end;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -944,6 +944,8 @@ end;
function TAlbaranesClienteController.Guardar(AAlbaran: IBizAlbaranCliente): Boolean;
var
IDNuevo: Integer;
ABookmark : TBookmark;
begin
Result := False;
@ -953,6 +955,12 @@ begin
if not Assigned(FDetallesController) then
raise Exception.Create ('Controller detalles no asignado');
//Preparamos todo para recuparar la posición de los detalles para despues de guardar no vaya al principio de los detalles
//OJO en este caso si activamos la desactivación de tabla no guarda los importes de cabecera
// AAlbaran.DataTable.DisableControls;
// AAlbaran.DataTable.DisableEventHandlers;
ABookmark := AAlbaran.Detalles.DataTable.GetBookMark;
if ValidarAlbaran(AAlbaran) then
begin
ShowHourglassCursor;
@ -964,6 +972,13 @@ begin
AAlbaran.DataTable.ApplyUpdates;
Result := True;
finally
//Recuparamos la posición de los detalles para despues de guardar no vaya al principio de los detalles
//OJO en este caso si activamos la desactivación de tabla no guarda los importes de cabecera
// AAlbaran.DataTable.EnableEventHandlers;
// AAlbaran.DataTable.EnableControls;
AAlbaran.Detalles.DataTable.GotoBookmark(ABookmark);
AAlbaran.Detalles.DataTable.FreeBookmark(ABookmark);
HideHourglassCursor;
end;
end;

View File

@ -1,25 +1,27 @@
inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 1057
Height = 671
Width = 1139
Height = 790
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
ExplicitWidth = 1057
ExplicitHeight = 671
ExplicitWidth = 1139
ExplicitHeight = 790
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
Width = 1057
Height = 671
Width = 1139
Height = 790
Align = alClient
ParentBackground = True
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
ExplicitWidth = 1057
ExplicitHeight = 671
DesignSize = (
1057
671)
1139
790)
object Label1: TLabel
Left = 412
Left = 451
Top = 729
Width = 299
Height = 26
@ -81,7 +83,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 284
end
inline frViewClienteAlbaran: TfrViewDatosYSeleccionClienteAlbaran
Left = 412
Left = 451
Top = 28
Width = 604
Height = 245
@ -93,7 +95,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
ParentFont = False
TabOrder = 10
ReadOnly = False
ExplicitLeft = 412
ExplicitLeft = 451
ExplicitTop = 28
ExplicitWidth = 604
ExplicitHeight = 245
@ -111,24 +113,24 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 103
end
inherited bVerFichaCliente: TBitBtn
Left = 402
ExplicitLeft = 402
Left = 464
ExplicitLeft = 464
end
inherited edtDireccion: TcxMemo
ExplicitWidth = 437
Width = 437
end
inherited bElegirDireccion: TButton
Left = 571
ExplicitLeft = 571
Left = 633
ExplicitLeft = 633
end
inherited edtTelefonos: TcxTextEdit
ExplicitWidth = 193
Width = 193
end
inherited edtReferencia: TcxDBTextEdit
Left = 362
ExplicitLeft = 362
Left = 392
ExplicitLeft = 392
ExplicitWidth = 103
Width = 103
end
@ -145,7 +147,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
end
end
object ePoblacion: TcxDBTextEdit
Left = 506
Left = 545
Top = 476
DataBinding.DataField = 'POBLACION'
DataBinding.DataSource = DADataSource
@ -164,7 +166,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 61
end
object eCodigoPostal: TcxDBTextEdit
Left = 951
Left = 1052
Top = 476
DataBinding.DataField = 'CODIGO_POSTAL'
DataBinding.DataSource = DADataSource
@ -183,7 +185,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 65
end
object eProvincia: TcxDBTextEdit
Left = 506
Left = 545
Top = 503
DataBinding.DataField = 'PROVINCIA'
DataBinding.DataSource = DADataSource
@ -202,7 +204,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 406
end
object ePersonaContacto: TcxDBTextEdit
Left = 506
Left = 545
Top = 557
DataBinding.DataField = 'PERSONA_CONTACTO'
DataBinding.DataSource = DADataSource
@ -222,7 +224,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 284
end
object eTlfTrabajo: TcxDBTextEdit
Left = 506
Left = 545
Top = 584
DataBinding.DataField = 'TELEFONO'
DataBinding.DataSource = DADataSource
@ -241,7 +243,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 284
end
object Button1: TButton
Left = 250
Left = 289
Top = 138
Width = 132
Height = 23
@ -303,7 +305,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 146
end
object bFormasPago: TButton
Left = 250
Left = 289
Top = 109
Width = 132
Height = 23
@ -312,7 +314,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
OnClick = bFormasPagoClick
end
object eFechaRecepcion: TcxDBDateEdit
Left = 546
Left = 585
Top = 363
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'FECHA_RECEPCION'
@ -337,7 +339,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 239
end
object cbConAlmacen: TCheckBox
Left = 422
Left = 461
Top = 697
Width = 179
Height = 21
@ -346,7 +348,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
OnClick = cbConAlmacenClick
end
object cbAlmacen: TcxDBLookupComboBox
Left = 607
Left = 646
Top = 697
DataBinding.DataField = 'ID_ALMACEN'
DataBinding.DataSource = DADataSource
@ -402,7 +404,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 284
end
object eFechaPrevista: TcxDBDateEdit
Left = 546
Left = 585
Top = 309
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'FECHA_PREVISTA_ENVIO'
@ -453,7 +455,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 284
end
object eFechaEnvio: TcxDBDateEdit
Left = 546
Left = 585
Top = 336
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'FECHA_ENVIO'
@ -527,7 +529,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
end
end
object eCalle: TcxDBMemo
Left = 506
Left = 545
Top = 420
Anchors = [akLeft, akTop, akRight, akBottom]
DataBinding.DataField = 'CALLE'
@ -549,7 +551,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 772
end
object eNotasEnvio: TcxDBMemo
Left = 506
Left = 545
Top = 611
Anchors = [akLeft, akTop, akRight, akBottom]
DataBinding.DataField = 'NOTAS_ENVIO'
@ -571,7 +573,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
Width = 510
end
object cbPais: TcxDBComboBox
Left = 506
Left = 545
Top = 530
DataBinding.DataField = 'PAIS'
DataBinding.DataSource = DADataSource
@ -731,7 +733,6 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
end
object dxLayoutControl1Group12: TdxLayoutGroup
Caption = 'Fechas de envio y recepci'#243'n'
Visible = False
object dxLayoutControl1Item24: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient

View File

@ -1203,6 +1203,8 @@ end;
function TAlbaranesProveedorController.Guardar(AAlbaran: IBizAlbaranProveedor): Boolean;
var
IDNuevo: Integer;
ABookmark : TBookmark;
begin
Result := False;
@ -1212,6 +1214,12 @@ begin
if not Assigned(FDetallesController) then
raise Exception.Create ('Controller detalles no asignado');
//Preparamos todo para recuparar la posición de los detalles para despues de guardar no vaya al principio de los detalles
//OJO en este caso si activamos la desactivación de tabla no guarda los importes del pedido
// AAlbaran.DataTable.DisableControls;
// AAlbaran.DataTable.DisableEventHandlers;
ABookmark := AAlbaran.Detalles.DataTable.GetBookMark;
if ValidarAlbaran(AAlbaran) then
begin
ShowHourglassCursor;
@ -1223,6 +1231,13 @@ begin
AAlbaran.DataTable.ApplyUpdates;
Result := True;
finally
//Recuparamos la posición de los detalles para despues de guardar no vaya al principio de los detalles
//OJO en este caso si activamos la desactivación de tabla no guarda los importes del pedido
// AAlbaran.DataTable.EnableEventHandlers;
// AAlbaran.DataTable.EnableControls;
AAlbaran.Detalles.DataTable.GotoBookmark(ABookmark);
AAlbaran.Detalles.DataTable.FreeBookmark(ABookmark);
HideHourglassCursor;
end;
end;

View File

@ -43,6 +43,9 @@ type
function GetProveedoresController: IProveedoresController;
property ProveedoresController: IProveedoresController read GetProveedoresController;
function EsModificable(AArticulo : IBizArticulo): Boolean;
function EsEliminable(AArticulo : IBizArticulo): Boolean;
procedure SetPrecioPunto (const AValue: Currency);
function GetPrecioPunto: Currency;
property PrecioPunto : Currency read GetPrecioPunto write SetPrecioPunto;
@ -104,6 +107,9 @@ type
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean): IBizArticulo; virtual;
procedure CalcularPrecioNeto(AArticulos: IBizArticulo);
function EsModificable(AArticulo : IBizArticulo): Boolean;
function EsEliminable(AArticulo : IBizArticulo): Boolean;
procedure ElegirProveedor(AArticulo : IBizArticulo);
procedure AnadirProveedor(AArticulo : IBizArticulo);
procedure VerProveedor(AArticulo : IBizArticulo);
@ -395,9 +401,13 @@ begin
while not EOF do
begin
begin
Edit;
AArticulos.COMISIONABLE := Valor;
Post;
//El artículo libre comisionable no podrá cambiarse de valor
if (AArticulos.ID <> CTE_ART_COMISIONABLE_MODIFICABLE) then
begin
Edit;
AArticulos.COMISIONABLE := Valor;
Post;
end;
end;
Next;
end;
@ -632,6 +642,22 @@ begin
end;
end;
function TArticulosController.EsEliminable(AArticulo: IBizArticulo): Boolean;
begin
if not Assigned(AArticulo) then
raise Exception.Create ('Articulo no asignado (EsEliminable)');
Result := AArticulo.ID <> CTE_ART_COMISIONABLE_MODIFICABLE;
end;
function TArticulosController.EsModificable(AArticulo: IBizArticulo): Boolean;
begin
if not Assigned(AArticulo) then
raise Exception.Create ('Articulo no asignado (EsModificable)');
Result := AArticulo.ID <> CTE_ART_COMISIONABLE_MODIFICABLE;
end;
procedure TArticulosController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
begin
inherited;

View File

@ -9,6 +9,7 @@ uses
const
BIZ_CLIENT_ARTICULO = 'Client.Articulo';
CTE_TARIFA_COMPRAS = 'Compras';
CTE_ART_COMISIONABLE_MODIFICABLE = 1;
type
IBizArticulo = interface(IArticulos)

View File

@ -113,6 +113,7 @@ inherited fEditorArticulo: TfEditorArticulo
inherited pgPaginas: TPageControl
Width = 951
Height = 535
ActivePage = pagPrecios
ExplicitTop = 112
ExplicitWidth = 951
ExplicitHeight = 535

View File

@ -32,6 +32,7 @@ type
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
procedure actFamiliasExecute(Sender: TObject);
procedure actSubFamiliasExecute(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
protected
FController : IArticulosController;
FArticulo: IBizArticulo;
@ -148,6 +149,9 @@ begin
raise Exception.Create('No hay ningún almacén asignado');
Articulo.DataTable.Active := True;
if (FArticulo.ID = CTE_ART_COMISIONABLE_MODIFICABLE) then
pagPrecios.Enabled := False;
end;
destructor TfEditorArticulo.Destroy;
@ -156,6 +160,13 @@ begin
inherited;
end;
procedure TfEditorArticulo.actEliminarUpdate(Sender: TObject);
begin
inherited;
if (not FController.EsEliminable(FArticulo)) then
(Sender as TAction).Enabled := False;
end;
procedure TfEditorArticulo.actFamiliasExecute(Sender: TObject);
var
AFamiliasController : IFamiliasController;

View File

@ -277,8 +277,8 @@ end;
procedure TfEditorArticulos.actEliminarUpdate(Sender: TObject);
begin
inherited;
if (ViewGrid.NumSeleccionados <> 1) then
if (ViewGrid.NumSeleccionados <> 1)
or (not Controller.EsEliminable(FArticulos)) then
(Sender as TAction).Enabled := False;
end;

View File

@ -1,6 +1,6 @@
inherited frViewArticulo: TfrViewArticulo
Width = 1177
Height = 608
Width = 1046
Height = 571
Align = alClient
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
@ -10,7 +10,7 @@ inherited frViewArticulo: TfrViewArticulo
object dxLayoutControlArticulo: TdxLayoutControl
Left = 0
Top = 0
Width = 1177
Width = 1046
Height = 833
Align = alTop
ParentBackground = True
@ -19,10 +19,10 @@ inherited frViewArticulo: TfrViewArticulo
AutoContentSizes = [acsWidth]
ExplicitWidth = 451
DesignSize = (
1177
1046
833)
object PngSpeedButton2: TPngSpeedButton
Left = 1113
Left = 982
Top = 867
Width = 23
Height = 22
@ -49,7 +49,7 @@ inherited frViewArticulo: TfrViewArticulo
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
end
object PngSpeedButton1: TPngSpeedButton
Left = 1113
Left = 982
Top = 895
Width = 23
Height = 22
@ -160,7 +160,6 @@ inherited frViewArticulo: TfrViewArticulo
ExplicitLeft = 22
ExplicitTop = 629
inherited dxLayoutControl1: TdxLayoutControl
ExplicitWidth = 537
inherited edtNIFCIF: TcxDBTextEdit
ExplicitWidth = 562
Width = 562
@ -178,12 +177,12 @@ inherited frViewArticulo: TfrViewArticulo
Width = 327
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 1022
ExplicitLeft = 1022
Left = 891
ExplicitLeft = 891
end
inherited Button3: TBitBtn
Left = 906
ExplicitLeft = 906
Left = 775
ExplicitLeft = 775
end
end
end
@ -422,7 +421,7 @@ inherited frViewArticulo: TfrViewArticulo
Width = 664
end
object eReferenciaFab: TcxDBTextEdit
Left = 688
Left = 623
Top = 410
DataBinding.DataField = 'REFERENCIA_FAB'
DataBinding.DataSource = dsViewArticulo
@ -533,7 +532,7 @@ inherited frViewArticulo: TfrViewArticulo
ExplicitWidth = 1311
inherited cxGrid: TcxGrid
Width = 1311
ExplicitWidth = 537
ExplicitWidth = 1311
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewID_IDIOMA: TcxGridDBColumn
Properties.ReadOnly = True
@ -542,7 +541,7 @@ inherited frViewArticulo: TfrViewArticulo
end
inherited ToolBar1: TToolBar
Width = 1311
ExplicitWidth = 537
ExplicitWidth = 1311
inherited ToolButton1: TToolButton
ExplicitWidth = 92
end

View File

@ -383,6 +383,12 @@ end;
procedure TfrViewArticulo.CustomViewShow(Sender: TObject);
begin
inherited;
if (FArticulo.ID = CTE_ART_COMISIONABLE_MODIFICABLE) then
begin
dxLayoutControlArticuloGroup11.Enabled := false;
dxLayoutControlArticuloGroup13.Enabled := false;
end;
// ePrecioCoste.Properties.OnEditValueChanged := PrecioNetoChanged;
// eDescuento.Properties.OnEditValueChanged := PrecioNetoChanged;
end;

View File

@ -325,6 +325,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
AlignHorz = ahClient
Caption = 'Validez presupuestos por defecto'
Enabled = False
Visible = False
object dxLayoutControl1Item1: TdxLayoutItem
Control = eValidezDistribuidor
ControlOptions.ShowBorder = False
@ -333,6 +334,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
object dlformapago: TdxLayoutGroup
Caption = 'Forma de pago por defecto'
Enabled = False
Visible = False
object dxLayoutControl1Item3: TdxLayoutItem
Control = eFormaPagoDistribuidor
ControlOptions.ShowBorder = False
@ -342,6 +344,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
object dlnotas: TdxLayoutGroup
Caption = 'Notas por defecto'
Enabled = False
Visible = False
object dxLayoutControl1Item2: TdxLayoutItem
Control = eNotasDistribuidor
ControlOptions.ShowBorder = False
@ -351,6 +354,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
object dllopd: TdxLayoutGroup
Caption = 'LOPD del distribuidor'
Enabled = False
Visible = False
object dxLayoutControl1Item5: TdxLayoutItem
Control = eLOPDDistribuidor
ControlOptions.ShowBorder = False
@ -360,6 +364,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
object dlcondiciones: TdxLayoutGroup
Caption = 'Condiciones por defecto'
Enabled = False
Visible = False
object dxLayoutControl1Item6: TdxLayoutItem
Control = eCondicionesDistribuidor
ControlOptions.ShowBorder = False

View File

@ -131,22 +131,22 @@ begin
dlBloquear.Enabled := True;
dlusuario.Enabled := True;
dlcontrasena.Enabled := True;
dlValidez.Enabled := True;
dlFormaPago.Enabled := True;
dlNotas.Enabled := True;
dlLOPD.Enabled := True;
dlCondiciones.Enabled := True;
// dlValidez.Enabled := True;
// dlFormaPago.Enabled := True;
// dlNotas.Enabled := True;
// dlLOPD.Enabled := True;
// dlCondiciones.Enabled := True;
end
else
begin
dlBloquear.Enabled := False;
dlusuario.Enabled := False;
dlcontrasena.Enabled := False;
dlValidez.Enabled := False;
dlFormaPago.Enabled := False;
dlNotas.Enabled := False;
dlLOPD.Enabled := False;
dlCondiciones.Enabled := False;
// dlValidez.Enabled := False;
// dlFormaPago.Enabled := False;
// dlNotas.Enabled := False;
// dlLOPD.Enabled := False;
// dlCondiciones.Enabled := False;
end;
if eBloqueado.Checked then

View File

@ -79,7 +79,7 @@ type
procedure VerListadoBeneficios;
procedure VerDireccionEntrega(AContrato : IBizContratoCliente);
function MandarFabrica(AContrato: IBizContratoCliente): Boolean;
function MandarFabrica(AContrato: IBizContratoCliente; AClonarContrato: Boolean = true): Boolean;
function AceptarContrato(AContrato: IBizContratoCliente): Boolean;
function AnadirIncidenciaContrato(AIdContrato: Integer): Boolean;
end;
@ -171,7 +171,7 @@ type
procedure VerListadoBeneficios;
procedure VerDireccionEntrega(AContrato : IBizContratoCliente);
function MandarFabrica(AContrato: IBizContratoCliente): Boolean;
function MandarFabrica(AContrato: IBizContratoCliente; AClonarContrato: Boolean = true): Boolean;
function AceptarContrato(AContrato: IBizContratoCliente): Boolean;
function AnadirIncidenciaContrato(AIdContrato: Integer): Boolean;
end;
@ -914,8 +914,7 @@ begin
end;
end;
function TContratosClienteController.ValidarContrato(
AContrato: IBizContratoCliente): Boolean;
function TContratosClienteController.ValidarContrato(AContrato: IBizContratoCliente): Boolean;
begin
if not Assigned(AContrato) then
raise Exception.Create ('Contrato no asignado');
@ -943,11 +942,11 @@ begin
if (AContrato.Detalles.DataTable.RecordCount = 0) then
raise Exception.Create('El contrato debe tener en su contenido al menos un concepto');
FDetallesController.ValidarDetalles(AContrato.Detalles);
{ Asegurarse de valores en campos "automáticos" tanto
en MODIFICACIÓN como en INSERCIÓN. }
AContrato.Edit;
try
AContrato.USUARIO := AppFactuGES.UsuarioActivo.UserName;
@ -1257,7 +1256,8 @@ procedure TContratosClienteController.RecalcularImportes(
AContrato: IBizContratoCliente);
var
bEnEdicion : Boolean;
ADetallePosAct : Integer;
ADetallePosAct : Integer;
begin
if not Assigned(AContrato) then
raise Exception.Create ('Contrato no asignado (RecalcularImportes)');
@ -1307,6 +1307,8 @@ end;
procedure TContratosClienteController.RecuperarObjetos(AContrato: IBizContratoCliente);
begin
RecuperarCliente(AContrato);
if (AContrato.ENVIADA_REVISADA = 10) then
MandarFabrica(AContrato, False);
end;
procedure TContratosClienteController.RellenarValoresDefecto(AContrato: IBizContratoCliente; ATipo: TEnumTiposContrato);
@ -1497,6 +1499,9 @@ end;
}
function TContratosClienteController.Guardar(AContrato: IBizContratoCliente): Boolean;
var
ABookmark : TBookmark;
begin
Result := False;
@ -1506,6 +1511,11 @@ begin
if not Assigned(FDetallesController) then
raise Exception.Create ('Controller detalles no asignado');
//Preparamos todo para recuparar la posición de los detalles para despues de guardar no vaya al principio de los detalles
AContrato.DataTable.DisableControls;
AContrato.DataTable.DisableEventHandlers;
ABookmark := AContrato.Detalles.DataTable.GetBookMark;
if ValidarContrato(AContrato) then
begin
ShowHourglassCursor;
@ -1517,6 +1527,12 @@ begin
AContrato.DataTable.ApplyUpdates;
Result := True;
finally
//Preparamos todo para recuparar la posición de los detalles para despues de guardar no vaya al principio de los detalles
AContrato.DataTable.EnableEventHandlers;
AContrato.DataTable.EnableControls;
AContrato.Detalles.DataTable.GotoBookmark(ABookmark);
AContrato.Detalles.DataTable.FreeBookmark(ABookmark);
HideHourglassCursor;
end;
end;
@ -1541,7 +1557,7 @@ begin
end;
end;
function TContratosClienteController.MandarFabrica(AContrato: IBizContratoCliente): Boolean;
function TContratosClienteController.MandarFabrica(AContrato: IBizContratoCliente; AClonarContrato: Boolean = true): Boolean;
var
AContratoFabrica : IBizContratoCliente;
@ -1550,7 +1566,11 @@ begin
ShowHourglassCursor;
try
AContratoFabrica := Duplicar(AContrato);
//En el caso de contrato de presupuestador WEB no clonamos modificamos el contrato pasado
if AClonarContrato then
AContratoFabrica := Duplicar(AContrato)
else
AContratoFabrica := AContrato;
// Hay que dejar algunos campos como si fuera un contrato nuevo
AContratoFabrica.Edit;
@ -1559,19 +1579,36 @@ begin
ID_EMPRESA := CTE_EMPRESA_FABRICA;
ID_TIENDA := CTE_EMPRESA_FABRICA;
USUARIO := AppFactuGES.UsuarioActivo.UserName;
FECHA_CONTRATO := DateOf(Now);
//En el caso de contrato de presupuestador WEB no se toca la fecha recibida
if AClonarContrato then
begin
FECHA_CONTRATO := DateOf(Now);
REFERENCIA_CLIENTE := AContrato.REFERENCIA + ' - ' + AContrato.NOMBRE_CLIENTE;
end;
INCIDENCIAS_ACTIVAS := 0;
INCIDENCIASIsNull := True;
REFERENCIA_CLIENTE := AContrato.REFERENCIA + ' - ' + AContrato.NOMBRE_CLIENTE;
SITUACION := SITUACION_CONTRATO_PENDIENTE;
ENVIADA_REVISADA := CONST_CONTRATO_RECIBIDO_UECKO;
//ASIGNACION DE CLIENTE PARA ABETO
if (AContrato.ID_EMPRESA = CTE_EMPRESA_GUNNI) then
AContratoFabrica._Cliente := (FClienteController.darClienteGraden(CTE_CLIENTE_GUNNI_PARA_FABRICA) as IBizCliente)
//En el caso de contrato de presupuestador WEB se cambia constante
if AClonarContrato then
ENVIADA_REVISADA := CONST_CONTRATO_RECIBIDO_UECKO
else
AContratoFabrica._Cliente := (FClienteController.darClienteGraden(CTE_CLIENTE_GRADEN_PARA_FABRICA) as IBizCliente);
ENVIADA_REVISADA := CONST_CONTRATO_RECIBIDO_UECKO_DESDE_WEB;
//En el caso de contrato de presupuestador WEB se cambia constante
if AClonarContrato then
begin
//ASIGNACION DE CLIENTE PARA ABETO
if (AContrato.ID_EMPRESA = CTE_EMPRESA_GUNNI) then
AContratoFabrica._Cliente := (FClienteController.darClienteGraden(CTE_CLIENTE_GUNNI_PARA_FABRICA) as IBizCliente)
else
AContratoFabrica._Cliente := (FClienteController.darClienteGraden(CTE_CLIENTE_GRADEN_PARA_FABRICA) as IBizCliente);
end
else
AContratoFabrica._Cliente := (FClienteController.darClienteGraden(AContratoFabrica.ID_CLIENTE) as IBizCliente);
AContratoFabrica.Cliente.DataTable.Active := True;
@ -1583,7 +1620,9 @@ begin
POBLACION := AContratoFabrica.Cliente.POBLACION;
TELEFONO := AContratoFabrica.Cliente.TELEFONO_1;
MOVIL := AContratoFabrica.Cliente.MOVIL_1;
//LA DIRECCIÖN DE ENVIO SE MANTIENE LA COPIADA DEL CLIENTE FINAL
AContratoFabrica.ID_FORMA_PAGO := AContratoFabrica.Cliente.ID_FORMA_PAGO;
AContratoFabrica.ID_TIPO_IVA := AContratoFabrica.Cliente.ID_TIPO_IVA;
AContratoFabrica.IDIOMA_ISO := AContratoFabrica.Cliente.IDIOMA_ISO;
@ -1598,15 +1637,18 @@ begin
AContratoFabrica.Post;
if Guardar(AContratoFabrica) then
begin
AContrato.Edit;
AContrato.ID_CONTRATO_ASOCIADO := AContratoFabrica.ID;
AContrato.ENVIADA_REVISADA := CONST_CONTRATO_ENVIADO_UECKO;
AContrato.Post;
AContrato.DataTable.ApplyUpdates;
Result := True;
//En el caso de contrato de presupuestador WEB no se modifica el contratoorigen
if AClonarContrato then
begin
AContrato.Edit;
AContrato.ID_CONTRATO_ASOCIADO := AContratoFabrica.ID;
AContrato.ENVIADA_REVISADA := CONST_CONTRATO_ENVIADO_UECKO;
AContrato.Post;
AContrato.DataTable.ApplyUpdates;
Result := True;
end;
end;
finally
HideHourglassCursor;
end;

View File

@ -335,7 +335,7 @@ begin
ADetalles.DataTable.First;
while not ADetalles.DataTable.eof do
begin
if (ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger > 0) then
if (ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger > 1) then //Solo serán editables los conceptos libres=ID_ARTICULO=0, y el articulo libre editable ID_ARTICULO=1
begin
AArticulo := (FArticulosController.Buscar(ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger) as IBizArticulo);
AArticulo.DataTable.Open;

View File

@ -14,6 +14,7 @@ const
CONST_CONTRATO_DEFAULT = 0;
CONST_CONTRATO_ENVIADO_UECKO = 1;
CONST_CONTRATO_RECIBIDO_UECKO = 2;
CONST_CONTRATO_RECIBIDO_UECKO_DESDE_WEB = 11;
CONST_CONTRATO_ACEPTADO_UECKO = 3;
CTE_EMPRESA_FABRICA = 1;
@ -367,6 +368,7 @@ begin
TELEFONO := FCliente.TELEFONO_1;
MOVIL := FCliente.MOVIL_1;
IDIOMA_ISO := FCliente.IDIOMA_ISO;
IDIOMA := FCliente.IDIOMA;
PAIS := FCliente.PAIS;
ID_AGENTE := FCliente.ID_AGENTE;

View File

@ -187,7 +187,8 @@ begin
and not (ViewGrid.NumSeleccionados > 1)
and (FContratos.SITUACION <> SITUACION_CONTRATO_TERMINADO)
and (FContratos.SITUACION <> SITUACION_CONTRATO_CANCELADO)
and (FContratos.ENVIADA_REVISADA = CONST_CONTRATO_RECIBIDO_UECKO)
and ((FContratos.ENVIADA_REVISADA = CONST_CONTRATO_RECIBIDO_UECKO)
or (FContratos.ENVIADA_REVISADA = CONST_CONTRATO_RECIBIDO_UECKO_DESDE_WEB))
end;
procedure TfEditorContratosCliente.actAceptarExecute(Sender: TObject);

View File

@ -226,6 +226,16 @@ inherited frViewContratosCliente: TfrViewContratosCliente
Description = 'Aprobado'
ImageIndex = 4
Value = 3
end
item
Description = 'Recibido'
ImageIndex = 5
Value = 10
end
item
Description = 'Recibido'
ImageIndex = 5
Value = 11
end>
IsCaptionAssigned = True
end
@ -726,6 +736,28 @@ inherited frViewContratosCliente: TfrViewContratosCliente
49454E44AE426082}
Name = 'PngImage4'
Background = clWindow
end
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
61000001E34944415478DAA5932D72E43010855F98D934341BC1858261D10D76
8E3047305C1685051A067A59A0E042E70682863D6C608719EE6B399EADDABFAA
AD7595CAB2DCFDF5EB1FDDE13F9FBB9F0FF258225F27AEC415D109B05A35C3CC
EF32E653FD2380CE035F4388720C41609DC2D68ABA28B42688E1820E79CAE7E9
17407316E4788F43E8033CF2F46D42F804E8E29084E0A2ACBE7B90E9798334C0
40D9145AC2BD1E8591A58B5CFE27406D462915EA59AD4A70812CF142FBD3340E
750764113C8648C9A214E20A0C762560A1A925A662A8FDD0D48A06846B782220
6F80E732C7181F14858079CB69895B1D57D6824BBB99FF4A03C9952134BD9597
21ED008BF1F341F52BAA3035098CC23428DB561A70D53EC39888EFB941D4F45E
5EB2DC0021A6035BC56A0F306660BD1B464A3DB5A8B00CED89606A62B201A61D
90CB8C3E3EA03BD2F002BD8EF4550FB441D421532B62658D02CFC4C2DBFC9AD3
0EC86CDBA349DC24B2F7BA8E2D227BCF9CFD3CB573EC69409EE6D731EF804899
EC4F3CB6D631927623FFD48F5AC84741B1B572D58B4FEB5CC67A1BA4739ECE34
18D185435DE756B070B5CDB17305B63BB741A2F38F41BA41BE38C4324D8FE6C6
3E0FBE7CEF15F602716877E7DF5EA6F330B6CBC4F6A55641CAE69EC973245714
97FDD7DBF8AFCF7740E00D20BA266C3A0000000049454E44AE426082}
Name = 'PngImage5'
Background = clWindow
end>
Bitmap = {}
end
@ -750,7 +782,11 @@ inherited frViewContratosCliente: TfrViewContratosCliente
end
object cxStylePENDIENTESREVISION: TcxStyle
AssignedValues = [svTextColor]
TextColor = clMaroon
TextColor = clOlive
end
object cxStylePENDIENTESREVISIONWEB: TcxStyle
AssignedValues = [svTextColor]
TextColor = clGreen
end
end
end

View File

@ -85,6 +85,7 @@ type
cxGridViewDTO: TcxGridDBColumn;
cxGridViewIMPORTE_NETO: TcxGridDBColumn;
cxGridViewIMPORTE_DESCUENTO: TcxGridDBColumn;
cxStylePENDIENTESREVISIONWEB: TcxStyle;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
TcxGridLevel);
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
@ -328,14 +329,21 @@ end;
procedure TfrViewContratosCliente.AnadirFiltroSituaciones;
var
FFiltro : TcxFilterCriteriaItemList;
ACriterioDoble: TcxFilterCriteriaItemList;
begin
FFiltro := AddFilterGrid(fboAnd);
case cxGrid.ActiveLevel.Index of
1 : FFiltro.AddItem(cxGridViewENVIADA_REVISADA, foEqual, '2', '2');
1 : begin
ACriterioDoble := FFiltro.AddItemList(fboOr);
ACriterioDoble.AddItem(cxGridViewENVIADA_REVISADA, foEqual, '2', '2');
ACriterioDoble.AddItem(cxGridViewENVIADA_REVISADA, foEqual, '10', '10');
ACriterioDoble.AddItem(cxGridViewENVIADA_REVISADA, foEqual, '11', '11');
end;
2 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_CONTRATO_PENDIENTE, SITUACION_CONTRATO_PENDIENTE);
3 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_CONTRATO_TERMINADO, SITUACION_CONTRATO_TERMINADO);
4 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_CONTRATO_CANCELADO, SITUACION_CONTRATO_CANCELADO);
4 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_CONTRATO_CANCELADO, SITUACION_CONTRATO_CANCELADO);
end;
end;
@ -465,8 +473,10 @@ var
IndiceCol2: Integer;
IndiceCol3: Integer;
IndiceCol4: Integer;
IndiceCol5: integer;
ASituacion: string;
AFacturas: string;
AEnviadasRevisadas: Integer;
begin
inherited;
@ -476,25 +486,32 @@ begin
IndiceCol2 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteFACTURA_ASOCIADA).Index;
IndiceCol3 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteBASE_IMPONIBLE_FACTURAS).Index;
IndiceCol4 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteBASE_IMPONIBLE).Index;
IndiceCol5 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteENVIADA_REVISADA).Index;
ASituacion := VarToStr(ARecord.DisplayTexts[IndiceCol]);
AFacturas := VarToStr(ARecord.DisplayTexts[IndiceCol2]);
//Por aqui pasa muchas veces con distintos componentes del gird, de hecho algunos no tienen el elemento AStyle y si le asignamos algo por defecto como estaba
//peta estrepitosamente, hay que asegurarse que el componente que se dibuja tiene AStyle, en el resto no falla, porque no asignamos estile si no cumple ninguna
//situación, así asignamos un estile por defecto y lo cambiamos según condiciones.
if Assigned(AStyle) then
begin
AStyle.TextColor := cxStylePENDIENTESREVISION.TextColor;
AStyle.TextColor := cxStylePENDIENTES.TextColor;
if ASituacion = SITUACION_CONTRATO_PENDIENTE then
begin
if (AFacturas = '') then
AStyle.TextColor := cxStylePENDIENTES.TextColor
else if (ARecord.Values[IndiceCol3] < ARecord.Values[IndiceCol4]) then
AStyle.TextColor := cxStylePENDIENTESYFACTURADASPLUS.TextColor
else if (ARecord.Values[IndiceCol3] >= ARecord.Values[IndiceCol4]) then
AStyle.TextColor := cxStylePENDIENTESYFACTURADASOK.TextColor
else
AStyle.TextColor := cxStylePENDIENTES.TextColor;
//colores por facturacion
if (Afacturas <> '') then
if (ARecord.Values[IndiceCol3] < ARecord.Values[IndiceCol4]) then
AStyle.TextColor := cxStylePENDIENTESYFACTURADASPLUS.TextColor
else if (ARecord.Values[IndiceCol3] >= ARecord.Values[IndiceCol4]) then
AStyle.TextColor := cxStylePENDIENTESYFACTURADASOK.TextColor;
//colores por recepción del pedido
if (ARecord.Values[IndiceCol5] = 2) then
AStyle.TextColor := cxStylePENDIENTESREVISION.TextColor;
if ((ARecord.Values[IndiceCol5] = 10)
or (ARecord.Values[IndiceCol5] = 11)) then
AStyle.TextColor := cxStylePENDIENTESREVISIONWEB.TextColor;
end
else if (ASituacion = SITUACION_CONTRATO_TERMINADO)
or (ASituacion = SITUACION_CONTRATO_CANCELADO) then

View File

@ -457,7 +457,7 @@ begin
}
IndiceCol := cxGridView.GetColumnByFieldName(fld_ContratosCliente_DetallesID_ARTICULO).Index;
if not VarIsNull(AItem.GridView.Items[IndiceCol].EditValue)
and (AItem.GridView.Items[IndiceCol].EditValue > 0) then
and (AItem.GridView.Items[IndiceCol].EditValue > 1) then //Solo serán editables los conceptos libres=ID_ARTICULO=0, y el articulo libre editable ID_ARTICULO=1
Result := False;
end;
end
@ -468,7 +468,7 @@ begin
begin
IndiceCol := cxGridView.GetColumnByFieldName(fld_ContratosCliente_DetallesID_ARTICULO).Index;
if not VarIsNull(AItem.GridView.Items[IndiceCol].EditValue)
and (AItem.GridView.Items[IndiceCol].EditValue > 0) then
and (AItem.GridView.Items[IndiceCol].EditValue > 1) then //Solo serán editables los conceptos libres=ID_ARTICULO=0, y el articulo libre editable ID_ARTICULO=1
Result := False;
end;
end

View File

@ -371,7 +371,8 @@ begin
PROVINCIA := FCliente.PROVINCIA;
POBLACION := FCliente.POBLACION;
PAIS := FCliente.PAIS;
IDIOMA_ISO := FCliente.IDIOMA_ISO;
IDIOMA_ISO := FCliente.IDIOMA_ISO;
IDIOMA := FCliente.IDIOMA;
// La forma de pago se establece desde el tipo de documento y aunque cambie de cliente no se cambia la formade pago ya que desde la vista se pregunta y se cambia si el usuario lo desea
// if FCliente.ID_FORMA_PAGO > 0 then
// ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;

View File

@ -294,7 +294,7 @@ begin
inherited;
ShowHourglassCursor;
//frViewDetallesFacturaCliente1.SaveGridStatus; // Para guardar estado del grid
frViewDetallesFacturaCliente1.SaveGridStatus; // Para guardar estado del grid (Estaba comentado pero lo descomentamos para que funcione la asignación del foco tras el guardar
frViewDetallesFacturaCliente1.BeginUpdate; // Para que no se mueva el foco
try
bEsNuevo := FFactura.EsNuevo;
@ -309,7 +309,7 @@ begin
finally
frViewDetallesFacturaCliente1.EndUpdate;
//frViewDetallesFacturaCliente1.RestoreGridStatus;
frViewDetallesFacturaCliente1.RestoreGridStatus;
HideHourglassCursor;
end;

View File

@ -2,9 +2,6 @@ inherited frViewDetallesFacturaCliente: TfrViewDetallesFacturaCliente
inherited cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewID_ARTICULO: TcxGridDBColumn
Caption = '-'
PropertiesClassName = 'TcxImageComboBoxProperties'
Properties.Items = <>
end
inherited cxGridViewVALORADO: TcxGridDBColumn [4]
end

View File

@ -1164,6 +1164,8 @@ end;
function TFacturasProveedorController.Guardar(AFactura: IBizFacturaProveedor): Boolean;
var
IDNuevo : Integer;
ABookmark : TBookmark;
begin
Result := False;
@ -1188,6 +1190,7 @@ begin
Result := True;
finally
HideHourglassCursor;
end;
end;

View File

@ -210,7 +210,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited memObservaciones: TcxDBMemo
DataBinding.DataSource = frViewFacturaProveedor1.DADataSource
ExplicitWidth = 671
ExplicitHeight = 228
Height = 228
Width = 671
end

View File

@ -248,7 +248,7 @@ begin
inherited;
ShowHourglassCursor;
//frViewDetallesFacturaProveedor1.SaveGridStatus; // Para guardar estado del grid
frViewDetallesFacturaProveedor1.SaveGridStatus; // Para guardar estado del grid (ojo lo activamos de nuevo para recuperar el foco en el grid despues de guardar no se si tendrá efecto lateral
frViewDetallesFacturaProveedor1.BeginUpdate; // Para que no se mueva el foco
try
bEsNuevo := FFactura.EsNuevo;
@ -262,7 +262,7 @@ begin
FController.Guardar(FFactura);
finally
frViewDetallesFacturaProveedor1.EndUpdate;
//frViewDetallesFacturaProveedor1.RestoreGridStatus;
frViewDetallesFacturaProveedor1.RestoreGridStatus;
HideHourglassCursor;
end;

View File

@ -798,6 +798,9 @@ end;
function TPedidosProveedorController.Guardar(APedido: IBizPedidoProveedor): Boolean;
var
IDNuevo : Integer;
ABookmark : TBookmark;
ADetallePosAct : Integer;
begin
Result := False;
@ -807,6 +810,13 @@ begin
if not Assigned(FDetallesController) then
raise Exception.Create ('Controller detalles no asignado');
//Preparamos todo para recuparar la posición de los detalles para despues de guardar no vaya al principio de los detalles
//OJO en este caso si activamos la desactivación de tabla no guarda los importes del pedido
// APedido.DataTable.DisableControls;
// APedido.DataTable.DisableEventHandlers;
ABookmark := APedido.Detalles.DataTable.GetBookMark;
if ValidarPedido(APedido) then
begin
ShowHourglassCursor;
@ -816,9 +826,16 @@ begin
try
APedido.DataTable.ApplyUpdates;
Result := True;
finally
//Recuparamos la posición de los detalles para despues de guardar no vaya al principio de los detalles
APedido.Detalles.DataTable.GotoBookmark(ABookmark);
APedido.Detalles.DataTable.FreeBookmark(ABookmark);
//OJO en este caso si activamos la desactivación de tabla no guarda los importes del pedido
// APedido.DataTable.EnableEventHandlers;
// APedido.DataTable.EnableControls;
HideHourglassCursor;
end;
end;

View File

@ -555,11 +555,12 @@ object RptPedidosProveedor: TRptPedidosProveedor
EngineOptions.DoublePass = True
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
PreviewOptions.OutlineWidth = 180
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Por defecto'
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 39065.872423495400000000
ReportOptions.LastChange = 44543.822097592600000000
ReportOptions.CreateDate = 37871.995398692100000000
ReportOptions.LastChange = 45565.707618252300000000
ScriptLanguage = 'PascalScript'
ShowProgress = False
StoreInDFM = False

View File

@ -116,40 +116,40 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
ExplicitWidth = 60
end
inherited UpDown1: TUpDown
Left = 239
ExplicitLeft = 239
Left = 257
ExplicitLeft = 257
end
inherited ToolButton13: TToolButton
Left = 256
ExplicitLeft = 256
Left = 274
ExplicitLeft = 274
end
inherited ToolButton6: TToolButton
Left = 264
ExplicitLeft = 264
Left = 282
ExplicitLeft = 282
end
inherited ToolButton7: TToolButton
Left = 298
ExplicitLeft = 298
Left = 316
ExplicitLeft = 316
end
inherited ToolButton8: TToolButton
Left = 332
ExplicitLeft = 332
Left = 350
ExplicitLeft = 350
end
inherited ToolButton12: TToolButton
Left = 366
ExplicitLeft = 366
Left = 384
ExplicitLeft = 384
end
inherited ToolButton9: TToolButton
Left = 374
ExplicitLeft = 374
Left = 392
ExplicitLeft = 392
end
inherited ToolButton10: TToolButton
Left = 408
ExplicitLeft = 408
Left = 426
ExplicitLeft = 426
end
inherited ToolButton11: TToolButton
Left = 442
ExplicitLeft = 442
Left = 460
ExplicitLeft = 460
end
end
inherited cxGrid: TcxGrid

View File

@ -426,7 +426,7 @@ begin
ADetalles.DataTable.First;
while not ADetalles.DataTable.eof do
begin
if (ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger > 0) then
if (ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger > 1) then //Solo serán editables los conceptos libres=ID_ARTICULO=0, y el articulo libre editable ID_ARTICULO=1
begin
AArticulo := (FArticulosController.Buscar(ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger) as IBizArticulo);
AArticulo.DataTable.Open;

View File

@ -1196,6 +1196,9 @@ end;
}
function TPresupuestosClienteController.Guardar(APresupuesto: IBizPresupuestoCliente): Boolean;
var
ABookmark : TBookmark;
begin
Result := False;
@ -1205,6 +1208,11 @@ begin
if not Assigned(FDetallesController) then
raise Exception.Create ('Controller detalles no asignado');
//Preparamos todo para recuparar la posición de los detalles para despues de guardar no vaya al principio de los detalles
APresupuesto.DataTable.DisableControls;
APresupuesto.DataTable.DisableEventHandlers;
ABookmark := APresupuesto.Detalles.DataTable.GetBookMark;
if ValidarPresupuesto(APresupuesto) then
begin
ShowHourglassCursor;
@ -1216,6 +1224,12 @@ begin
APresupuesto.DataTable.ApplyUpdates;
Result := True;
finally
//Recuparamos la posición de los detalles para despues de guardar no vaya al principio de los detalles
APresupuesto.DataTable.EnableEventHandlers;
APresupuesto.DataTable.EnableControls;
APresupuesto.Detalles.DataTable.GotoBookmark(ABookmark);
APresupuesto.Detalles.DataTable.FreeBookmark(ABookmark);
HideHourglassCursor;
end;
end;

View File

@ -5,7 +5,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ClientHeight = 950
ClientWidth = 1430
OnClose = CustomEditorClose
ExplicitLeft = -277
ExplicitWidth = 1438
ExplicitHeight = 988
PixelsPerInch = 96
@ -179,7 +178,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
inherited pgPaginas: TPageControl
Width = 1424
Height = 588
ActivePage = pagContenido
TabOrder = 1
OnChanging = pgPaginasChanging
ExplicitTop = 112
@ -256,7 +254,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitWidth = 320
inherited dxLayoutControl1: TdxLayoutControl
Width = 320
ExplicitHeight = 250
ExplicitWidth = 320
inherited edtlNombre: TcxDBTextEdit
ExplicitWidth = 202
Width = 202
@ -326,6 +324,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitWidth = 390
inherited dxLayoutControl1: TdxLayoutControl
Width = 390
ExplicitWidth = 390
inherited cbTienda: TcxComboBox
ExplicitWidth = 390
Width = 390
@ -337,6 +336,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitWidth = 317
inherited dxLayoutControl1: TdxLayoutControl
Width = 317
ExplicitWidth = 317
inherited edtlNombreAgente: TcxDBTextEdit
DataBinding.DataSource = frViewPresupuestoCliente1.DADataSource
ExplicitWidth = 224
@ -464,6 +464,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Top = 50
Width = 1416
Height = 510
ExplicitTop = 50
ExplicitWidth = 1416
ExplicitHeight = 510
inherited cxGridView: TcxGridDBTableView
@ -496,16 +497,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Caption = ' Precio punto '
end
end
inherited bRecalcularPrecioPunto: TButton
Left = 893
Top = -1
Height = 27
Action = actRecalcularPrecioPunto
ExplicitLeft = 893
ExplicitTop = -1
ExplicitHeight = 27
end
inherited bRecalcularDescuentoCapitulo: TButton [3]
inherited bRecalcularDescuentoCapitulo: TButton [2]
Left = 1218
Top = -1
Height = 27
@ -514,6 +506,15 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitTop = -1
ExplicitHeight = 27
end
inherited bRecalcularPrecioPunto: TButton [3]
Left = 893
Top = -1
Height = 27
Action = actRecalcularPrecioPunto
ExplicitLeft = 893
ExplicitTop = -1
ExplicitHeight = 27
end
inherited edtPrecioPunto: TcxDBCurrencyEdit [4]
Left = 839
Top = -1

View File

@ -1,88 +1,5 @@
inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
Width = 1511
inherited ToolBar1: TToolBar
Width = 1511
Height = 24
inherited ToolButton4: TToolButton
Wrap = False
end
inherited ToolButton14: TToolButton
Left = 334
Top = 0
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Left = 368
Top = 0
ExplicitLeft = 368
ExplicitTop = 0
end
inherited FontSize: TEdit
Left = 513
Top = 0
ExplicitLeft = 513
ExplicitTop = 0
end
inherited UpDown1: TUpDown
Left = 555
Top = 0
ExplicitLeft = 555
ExplicitTop = 0
end
inherited ToolButton13: TToolButton
Left = 572
Top = 0
ExplicitLeft = 572
ExplicitTop = 0
end
inherited ToolButton6: TToolButton
Left = 580
Top = 0
ExplicitLeft = 580
ExplicitTop = 0
end
inherited ToolButton7: TToolButton
Left = 614
Top = 0
ExplicitLeft = 614
ExplicitTop = 0
end
inherited ToolButton8: TToolButton
Left = 648
Top = 0
ExplicitLeft = 648
ExplicitTop = 0
end
inherited ToolButton12: TToolButton
Left = 682
Top = 0
ExplicitLeft = 682
ExplicitTop = 0
end
inherited ToolButton9: TToolButton
Left = 690
Top = 0
ExplicitLeft = 690
ExplicitTop = 0
end
inherited ToolButton10: TToolButton
Left = 724
Top = 0
ExplicitLeft = 724
ExplicitTop = 0
end
inherited ToolButton11: TToolButton
Left = 758
Top = 0
ExplicitLeft = 758
ExplicitTop = 0
end
end
inherited cxGrid: TcxGrid
Top = 50
Width = 1511
Height = 254
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewID: TcxGridDBColumn
VisibleForCustomization = False
@ -160,11 +77,9 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
end
end
inherited TBXDock1: TTBXDock
Top = 24
Width = 1511
inherited TBXToolbar1: TTBXToolbar
DockPos = 0
ExplicitWidth = 839
ExplicitWidth = 325
object TBXSubmenuItem1: TTBXSubmenuItem [0]
Caption = 'A'#241'adir cap'#237'tulo'
DisplayMode = nbdmImageAndText
@ -270,7 +185,7 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
TabOrder = 2
end
object TBXToolbar2: TTBXToolbar
Left = 1064
Left = 325
Top = 0
Align = alRight
Caption = 'TBXToolbar2'

View File

@ -466,7 +466,7 @@ begin
IndiceCol := cxGridView.GetColumnByFieldName(fld_PresupuestosCliente_DetallesID_ARTICULO).Index;
if not VarIsNull(AItem.GridView.Items[IndiceCol].EditValue)
and (AItem.GridView.Items[IndiceCol].EditValue > 0) then
and (AItem.GridView.Items[IndiceCol].EditValue > 1) then //Solo serán editables los conceptos libres=ID_ARTICULO=0, y el articulo libre editable ID_ARTICULO=1
Result := False;
end;
end
@ -477,7 +477,7 @@ begin
begin
IndiceCol := cxGridView.GetColumnByFieldName(fld_PresupuestosCliente_DetallesID_ARTICULO).Index;
if not VarIsNull(AItem.GridView.Items[IndiceCol].EditValue)
and (AItem.GridView.Items[IndiceCol].EditValue > 0) then
and (AItem.GridView.Items[IndiceCol].EditValue > 1) then //Solo serán editables los conceptos libres=ID_ARTICULO=0, y el articulo libre editable ID_ARTICULO=1
Result := False;
end;
end

View File

@ -28,7 +28,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType/>
<BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">2</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.7.2.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES (Servidor)</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.7.2.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">jueves, 11 de julio de 2024 19:07</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">4</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.7.4.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES (Servidor)</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.7.4.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">martes, 15 de octubre de 2024 17:07</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\cxLibraryD11.bpl">Express Cross Platform Library by Developer Express Inc.</Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD11.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\DataAbstract_SDACDriver_D11.bpl">RemObjects Data Abstract - CoreLabs SDAC Driver</Excluded_Packages>

Binary file not shown.