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:
parent
4d7f8dfe03
commit
bc47bfff68
@ -52,7 +52,7 @@
|
|||||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||||
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
|
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
|
||||||
<BorlandProject>
|
<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 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>
|
</Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||||
|
|||||||
Binary file not shown.
@ -845,5 +845,9 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
|||||||
Font.Name = 'Lucida Console'
|
Font.Name = 'Lucida Console'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
end
|
end
|
||||||
|
object cxStyleEdicion: TcxStyle
|
||||||
|
AssignedValues = [svColor]
|
||||||
|
Color = 13303807
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -109,6 +109,7 @@ type
|
|||||||
cxStyle_DESCUENTO: TcxStyle;
|
cxStyle_DESCUENTO: TcxStyle;
|
||||||
cxStyleDesactivado: TcxStyle;
|
cxStyleDesactivado: TcxStyle;
|
||||||
cxGridViewVALORADO: TcxGridDBColumn;
|
cxGridViewVALORADO: TcxGridDBColumn;
|
||||||
|
cxStyleEdicion: TcxStyle;
|
||||||
|
|
||||||
procedure actAnadirExecute(Sender: TObject);
|
procedure actAnadirExecute(Sender: TObject);
|
||||||
procedure actEliminarExecute(Sender: TObject);
|
procedure actEliminarExecute(Sender: TObject);
|
||||||
@ -426,6 +427,10 @@ begin
|
|||||||
else
|
else
|
||||||
if Length(AEditValue) = 0 then
|
if Length(AEditValue) = 0 then
|
||||||
CurEdit.DefAttributes.Assign(FuentePorDefecto);
|
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
|
finally
|
||||||
FreeAndNil(FuentePorDefecto);
|
FreeAndNil(FuentePorDefecto);
|
||||||
end;
|
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
@ -944,6 +944,8 @@ end;
|
|||||||
function TAlbaranesClienteController.Guardar(AAlbaran: IBizAlbaranCliente): Boolean;
|
function TAlbaranesClienteController.Guardar(AAlbaran: IBizAlbaranCliente): Boolean;
|
||||||
var
|
var
|
||||||
IDNuevo: Integer;
|
IDNuevo: Integer;
|
||||||
|
ABookmark : TBookmark;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -953,6 +955,12 @@ begin
|
|||||||
if not Assigned(FDetallesController) then
|
if not Assigned(FDetallesController) then
|
||||||
raise Exception.Create ('Controller detalles no asignado');
|
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
|
if ValidarAlbaran(AAlbaran) then
|
||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
@ -964,6 +972,13 @@ begin
|
|||||||
AAlbaran.DataTable.ApplyUpdates;
|
AAlbaran.DataTable.ApplyUpdates;
|
||||||
Result := True;
|
Result := True;
|
||||||
finally
|
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;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1,25 +1,27 @@
|
|||||||
inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
||||||
Width = 1057
|
Width = 1139
|
||||||
Height = 671
|
Height = 790
|
||||||
OnCreate = CustomViewCreate
|
OnCreate = CustomViewCreate
|
||||||
OnDestroy = CustomViewDestroy
|
OnDestroy = CustomViewDestroy
|
||||||
ExplicitWidth = 1057
|
ExplicitWidth = 1139
|
||||||
ExplicitHeight = 671
|
ExplicitHeight = 790
|
||||||
object dxLayoutControl1: TdxLayoutControl
|
object dxLayoutControl1: TdxLayoutControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1057
|
Width = 1139
|
||||||
Height = 671
|
Height = 790
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ParentBackground = True
|
ParentBackground = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TabStop = False
|
TabStop = False
|
||||||
AutoContentSizes = [acsWidth, acsHeight]
|
AutoContentSizes = [acsWidth, acsHeight]
|
||||||
|
ExplicitWidth = 1057
|
||||||
|
ExplicitHeight = 671
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
1057
|
1139
|
||||||
671)
|
790)
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 412
|
Left = 451
|
||||||
Top = 729
|
Top = 729
|
||||||
Width = 299
|
Width = 299
|
||||||
Height = 26
|
Height = 26
|
||||||
@ -81,7 +83,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 284
|
Width = 284
|
||||||
end
|
end
|
||||||
inline frViewClienteAlbaran: TfrViewDatosYSeleccionClienteAlbaran
|
inline frViewClienteAlbaran: TfrViewDatosYSeleccionClienteAlbaran
|
||||||
Left = 412
|
Left = 451
|
||||||
Top = 28
|
Top = 28
|
||||||
Width = 604
|
Width = 604
|
||||||
Height = 245
|
Height = 245
|
||||||
@ -93,7 +95,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
ReadOnly = False
|
ReadOnly = False
|
||||||
ExplicitLeft = 412
|
ExplicitLeft = 451
|
||||||
ExplicitTop = 28
|
ExplicitTop = 28
|
||||||
ExplicitWidth = 604
|
ExplicitWidth = 604
|
||||||
ExplicitHeight = 245
|
ExplicitHeight = 245
|
||||||
@ -111,24 +113,24 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 103
|
Width = 103
|
||||||
end
|
end
|
||||||
inherited bVerFichaCliente: TBitBtn
|
inherited bVerFichaCliente: TBitBtn
|
||||||
Left = 402
|
Left = 464
|
||||||
ExplicitLeft = 402
|
ExplicitLeft = 464
|
||||||
end
|
end
|
||||||
inherited edtDireccion: TcxMemo
|
inherited edtDireccion: TcxMemo
|
||||||
ExplicitWidth = 437
|
ExplicitWidth = 437
|
||||||
Width = 437
|
Width = 437
|
||||||
end
|
end
|
||||||
inherited bElegirDireccion: TButton
|
inherited bElegirDireccion: TButton
|
||||||
Left = 571
|
Left = 633
|
||||||
ExplicitLeft = 571
|
ExplicitLeft = 633
|
||||||
end
|
end
|
||||||
inherited edtTelefonos: TcxTextEdit
|
inherited edtTelefonos: TcxTextEdit
|
||||||
ExplicitWidth = 193
|
ExplicitWidth = 193
|
||||||
Width = 193
|
Width = 193
|
||||||
end
|
end
|
||||||
inherited edtReferencia: TcxDBTextEdit
|
inherited edtReferencia: TcxDBTextEdit
|
||||||
Left = 362
|
Left = 392
|
||||||
ExplicitLeft = 362
|
ExplicitLeft = 392
|
||||||
ExplicitWidth = 103
|
ExplicitWidth = 103
|
||||||
Width = 103
|
Width = 103
|
||||||
end
|
end
|
||||||
@ -145,7 +147,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ePoblacion: TcxDBTextEdit
|
object ePoblacion: TcxDBTextEdit
|
||||||
Left = 506
|
Left = 545
|
||||||
Top = 476
|
Top = 476
|
||||||
DataBinding.DataField = 'POBLACION'
|
DataBinding.DataField = 'POBLACION'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
@ -164,7 +166,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 61
|
Width = 61
|
||||||
end
|
end
|
||||||
object eCodigoPostal: TcxDBTextEdit
|
object eCodigoPostal: TcxDBTextEdit
|
||||||
Left = 951
|
Left = 1052
|
||||||
Top = 476
|
Top = 476
|
||||||
DataBinding.DataField = 'CODIGO_POSTAL'
|
DataBinding.DataField = 'CODIGO_POSTAL'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
@ -183,7 +185,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 65
|
Width = 65
|
||||||
end
|
end
|
||||||
object eProvincia: TcxDBTextEdit
|
object eProvincia: TcxDBTextEdit
|
||||||
Left = 506
|
Left = 545
|
||||||
Top = 503
|
Top = 503
|
||||||
DataBinding.DataField = 'PROVINCIA'
|
DataBinding.DataField = 'PROVINCIA'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
@ -202,7 +204,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 406
|
Width = 406
|
||||||
end
|
end
|
||||||
object ePersonaContacto: TcxDBTextEdit
|
object ePersonaContacto: TcxDBTextEdit
|
||||||
Left = 506
|
Left = 545
|
||||||
Top = 557
|
Top = 557
|
||||||
DataBinding.DataField = 'PERSONA_CONTACTO'
|
DataBinding.DataField = 'PERSONA_CONTACTO'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
@ -222,7 +224,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 284
|
Width = 284
|
||||||
end
|
end
|
||||||
object eTlfTrabajo: TcxDBTextEdit
|
object eTlfTrabajo: TcxDBTextEdit
|
||||||
Left = 506
|
Left = 545
|
||||||
Top = 584
|
Top = 584
|
||||||
DataBinding.DataField = 'TELEFONO'
|
DataBinding.DataField = 'TELEFONO'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
@ -241,7 +243,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 284
|
Width = 284
|
||||||
end
|
end
|
||||||
object Button1: TButton
|
object Button1: TButton
|
||||||
Left = 250
|
Left = 289
|
||||||
Top = 138
|
Top = 138
|
||||||
Width = 132
|
Width = 132
|
||||||
Height = 23
|
Height = 23
|
||||||
@ -303,7 +305,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 146
|
Width = 146
|
||||||
end
|
end
|
||||||
object bFormasPago: TButton
|
object bFormasPago: TButton
|
||||||
Left = 250
|
Left = 289
|
||||||
Top = 109
|
Top = 109
|
||||||
Width = 132
|
Width = 132
|
||||||
Height = 23
|
Height = 23
|
||||||
@ -312,7 +314,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
OnClick = bFormasPagoClick
|
OnClick = bFormasPagoClick
|
||||||
end
|
end
|
||||||
object eFechaRecepcion: TcxDBDateEdit
|
object eFechaRecepcion: TcxDBDateEdit
|
||||||
Left = 546
|
Left = 585
|
||||||
Top = 363
|
Top = 363
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Anchors = [akLeft, akTop, akRight]
|
||||||
DataBinding.DataField = 'FECHA_RECEPCION'
|
DataBinding.DataField = 'FECHA_RECEPCION'
|
||||||
@ -337,7 +339,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 239
|
Width = 239
|
||||||
end
|
end
|
||||||
object cbConAlmacen: TCheckBox
|
object cbConAlmacen: TCheckBox
|
||||||
Left = 422
|
Left = 461
|
||||||
Top = 697
|
Top = 697
|
||||||
Width = 179
|
Width = 179
|
||||||
Height = 21
|
Height = 21
|
||||||
@ -346,7 +348,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
OnClick = cbConAlmacenClick
|
OnClick = cbConAlmacenClick
|
||||||
end
|
end
|
||||||
object cbAlmacen: TcxDBLookupComboBox
|
object cbAlmacen: TcxDBLookupComboBox
|
||||||
Left = 607
|
Left = 646
|
||||||
Top = 697
|
Top = 697
|
||||||
DataBinding.DataField = 'ID_ALMACEN'
|
DataBinding.DataField = 'ID_ALMACEN'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
@ -402,7 +404,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 284
|
Width = 284
|
||||||
end
|
end
|
||||||
object eFechaPrevista: TcxDBDateEdit
|
object eFechaPrevista: TcxDBDateEdit
|
||||||
Left = 546
|
Left = 585
|
||||||
Top = 309
|
Top = 309
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Anchors = [akLeft, akTop, akRight]
|
||||||
DataBinding.DataField = 'FECHA_PREVISTA_ENVIO'
|
DataBinding.DataField = 'FECHA_PREVISTA_ENVIO'
|
||||||
@ -453,7 +455,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 284
|
Width = 284
|
||||||
end
|
end
|
||||||
object eFechaEnvio: TcxDBDateEdit
|
object eFechaEnvio: TcxDBDateEdit
|
||||||
Left = 546
|
Left = 585
|
||||||
Top = 336
|
Top = 336
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Anchors = [akLeft, akTop, akRight]
|
||||||
DataBinding.DataField = 'FECHA_ENVIO'
|
DataBinding.DataField = 'FECHA_ENVIO'
|
||||||
@ -527,7 +529,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object eCalle: TcxDBMemo
|
object eCalle: TcxDBMemo
|
||||||
Left = 506
|
Left = 545
|
||||||
Top = 420
|
Top = 420
|
||||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
DataBinding.DataField = 'CALLE'
|
DataBinding.DataField = 'CALLE'
|
||||||
@ -549,7 +551,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 772
|
Width = 772
|
||||||
end
|
end
|
||||||
object eNotasEnvio: TcxDBMemo
|
object eNotasEnvio: TcxDBMemo
|
||||||
Left = 506
|
Left = 545
|
||||||
Top = 611
|
Top = 611
|
||||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
DataBinding.DataField = 'NOTAS_ENVIO'
|
DataBinding.DataField = 'NOTAS_ENVIO'
|
||||||
@ -571,7 +573,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
Width = 510
|
Width = 510
|
||||||
end
|
end
|
||||||
object cbPais: TcxDBComboBox
|
object cbPais: TcxDBComboBox
|
||||||
Left = 506
|
Left = 545
|
||||||
Top = 530
|
Top = 530
|
||||||
DataBinding.DataField = 'PAIS'
|
DataBinding.DataField = 'PAIS'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
@ -731,7 +733,6 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente
|
|||||||
end
|
end
|
||||||
object dxLayoutControl1Group12: TdxLayoutGroup
|
object dxLayoutControl1Group12: TdxLayoutGroup
|
||||||
Caption = 'Fechas de envio y recepci'#243'n'
|
Caption = 'Fechas de envio y recepci'#243'n'
|
||||||
Visible = False
|
|
||||||
object dxLayoutControl1Item24: TdxLayoutItem
|
object dxLayoutControl1Item24: TdxLayoutItem
|
||||||
AutoAligns = [aaVertical]
|
AutoAligns = [aaVertical]
|
||||||
AlignHorz = ahClient
|
AlignHorz = ahClient
|
||||||
|
|||||||
@ -1203,6 +1203,8 @@ end;
|
|||||||
function TAlbaranesProveedorController.Guardar(AAlbaran: IBizAlbaranProveedor): Boolean;
|
function TAlbaranesProveedorController.Guardar(AAlbaran: IBizAlbaranProveedor): Boolean;
|
||||||
var
|
var
|
||||||
IDNuevo: Integer;
|
IDNuevo: Integer;
|
||||||
|
ABookmark : TBookmark;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -1212,6 +1214,12 @@ begin
|
|||||||
if not Assigned(FDetallesController) then
|
if not Assigned(FDetallesController) then
|
||||||
raise Exception.Create ('Controller detalles no asignado');
|
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
|
if ValidarAlbaran(AAlbaran) then
|
||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
@ -1223,6 +1231,13 @@ begin
|
|||||||
AAlbaran.DataTable.ApplyUpdates;
|
AAlbaran.DataTable.ApplyUpdates;
|
||||||
Result := True;
|
Result := True;
|
||||||
finally
|
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;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -43,6 +43,9 @@ type
|
|||||||
function GetProveedoresController: IProveedoresController;
|
function GetProveedoresController: IProveedoresController;
|
||||||
property ProveedoresController: IProveedoresController read GetProveedoresController;
|
property ProveedoresController: IProveedoresController read GetProveedoresController;
|
||||||
|
|
||||||
|
function EsModificable(AArticulo : IBizArticulo): Boolean;
|
||||||
|
function EsEliminable(AArticulo : IBizArticulo): Boolean;
|
||||||
|
|
||||||
procedure SetPrecioPunto (const AValue: Currency);
|
procedure SetPrecioPunto (const AValue: Currency);
|
||||||
function GetPrecioPunto: Currency;
|
function GetPrecioPunto: Currency;
|
||||||
property PrecioPunto : Currency read GetPrecioPunto write SetPrecioPunto;
|
property PrecioPunto : Currency read GetPrecioPunto write SetPrecioPunto;
|
||||||
@ -104,6 +107,9 @@ type
|
|||||||
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean): IBizArticulo; virtual;
|
function ElegirArticulos(AArticulos : IBizArticulo; AMensaje: String; AMultiSelect: Boolean): IBizArticulo; virtual;
|
||||||
procedure CalcularPrecioNeto(AArticulos: IBizArticulo);
|
procedure CalcularPrecioNeto(AArticulos: IBizArticulo);
|
||||||
|
|
||||||
|
function EsModificable(AArticulo : IBizArticulo): Boolean;
|
||||||
|
function EsEliminable(AArticulo : IBizArticulo): Boolean;
|
||||||
|
|
||||||
procedure ElegirProveedor(AArticulo : IBizArticulo);
|
procedure ElegirProveedor(AArticulo : IBizArticulo);
|
||||||
procedure AnadirProveedor(AArticulo : IBizArticulo);
|
procedure AnadirProveedor(AArticulo : IBizArticulo);
|
||||||
procedure VerProveedor(AArticulo : IBizArticulo);
|
procedure VerProveedor(AArticulo : IBizArticulo);
|
||||||
@ -395,9 +401,13 @@ begin
|
|||||||
while not EOF do
|
while not EOF do
|
||||||
begin
|
begin
|
||||||
begin
|
begin
|
||||||
Edit;
|
//El artículo libre comisionable no podrá cambiarse de valor
|
||||||
AArticulos.COMISIONABLE := Valor;
|
if (AArticulos.ID <> CTE_ART_COMISIONABLE_MODIFICABLE) then
|
||||||
Post;
|
begin
|
||||||
|
Edit;
|
||||||
|
AArticulos.COMISIONABLE := Valor;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
Next;
|
Next;
|
||||||
end;
|
end;
|
||||||
@ -632,6 +642,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
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);
|
procedure TArticulosController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|||||||
@ -9,6 +9,7 @@ uses
|
|||||||
const
|
const
|
||||||
BIZ_CLIENT_ARTICULO = 'Client.Articulo';
|
BIZ_CLIENT_ARTICULO = 'Client.Articulo';
|
||||||
CTE_TARIFA_COMPRAS = 'Compras';
|
CTE_TARIFA_COMPRAS = 'Compras';
|
||||||
|
CTE_ART_COMISIONABLE_MODIFICABLE = 1;
|
||||||
|
|
||||||
type
|
type
|
||||||
IBizArticulo = interface(IArticulos)
|
IBizArticulo = interface(IArticulos)
|
||||||
|
|||||||
@ -113,6 +113,7 @@ inherited fEditorArticulo: TfEditorArticulo
|
|||||||
inherited pgPaginas: TPageControl
|
inherited pgPaginas: TPageControl
|
||||||
Width = 951
|
Width = 951
|
||||||
Height = 535
|
Height = 535
|
||||||
|
ActivePage = pagPrecios
|
||||||
ExplicitTop = 112
|
ExplicitTop = 112
|
||||||
ExplicitWidth = 951
|
ExplicitWidth = 951
|
||||||
ExplicitHeight = 535
|
ExplicitHeight = 535
|
||||||
|
|||||||
@ -32,6 +32,7 @@ type
|
|||||||
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
|
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure actFamiliasExecute(Sender: TObject);
|
procedure actFamiliasExecute(Sender: TObject);
|
||||||
procedure actSubFamiliasExecute(Sender: TObject);
|
procedure actSubFamiliasExecute(Sender: TObject);
|
||||||
|
procedure actEliminarUpdate(Sender: TObject);
|
||||||
protected
|
protected
|
||||||
FController : IArticulosController;
|
FController : IArticulosController;
|
||||||
FArticulo: IBizArticulo;
|
FArticulo: IBizArticulo;
|
||||||
@ -148,6 +149,9 @@ begin
|
|||||||
raise Exception.Create('No hay ningún almacén asignado');
|
raise Exception.Create('No hay ningún almacén asignado');
|
||||||
|
|
||||||
Articulo.DataTable.Active := True;
|
Articulo.DataTable.Active := True;
|
||||||
|
|
||||||
|
if (FArticulo.ID = CTE_ART_COMISIONABLE_MODIFICABLE) then
|
||||||
|
pagPrecios.Enabled := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TfEditorArticulo.Destroy;
|
destructor TfEditorArticulo.Destroy;
|
||||||
@ -156,6 +160,13 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
end;
|
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);
|
procedure TfEditorArticulo.actFamiliasExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
AFamiliasController : IFamiliasController;
|
AFamiliasController : IFamiliasController;
|
||||||
|
|||||||
@ -277,8 +277,8 @@ end;
|
|||||||
procedure TfEditorArticulos.actEliminarUpdate(Sender: TObject);
|
procedure TfEditorArticulos.actEliminarUpdate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
if (ViewGrid.NumSeleccionados <> 1)
|
||||||
if (ViewGrid.NumSeleccionados <> 1) then
|
or (not Controller.EsEliminable(FArticulos)) then
|
||||||
(Sender as TAction).Enabled := False;
|
(Sender as TAction).Enabled := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
inherited frViewArticulo: TfrViewArticulo
|
inherited frViewArticulo: TfrViewArticulo
|
||||||
Width = 1177
|
Width = 1046
|
||||||
Height = 608
|
Height = 571
|
||||||
Align = alClient
|
Align = alClient
|
||||||
OnCreate = CustomViewCreate
|
OnCreate = CustomViewCreate
|
||||||
OnDestroy = CustomViewDestroy
|
OnDestroy = CustomViewDestroy
|
||||||
@ -10,7 +10,7 @@ inherited frViewArticulo: TfrViewArticulo
|
|||||||
object dxLayoutControlArticulo: TdxLayoutControl
|
object dxLayoutControlArticulo: TdxLayoutControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1177
|
Width = 1046
|
||||||
Height = 833
|
Height = 833
|
||||||
Align = alTop
|
Align = alTop
|
||||||
ParentBackground = True
|
ParentBackground = True
|
||||||
@ -19,10 +19,10 @@ inherited frViewArticulo: TfrViewArticulo
|
|||||||
AutoContentSizes = [acsWidth]
|
AutoContentSizes = [acsWidth]
|
||||||
ExplicitWidth = 451
|
ExplicitWidth = 451
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
1177
|
1046
|
||||||
833)
|
833)
|
||||||
object PngSpeedButton2: TPngSpeedButton
|
object PngSpeedButton2: TPngSpeedButton
|
||||||
Left = 1113
|
Left = 982
|
||||||
Top = 867
|
Top = 867
|
||||||
Width = 23
|
Width = 23
|
||||||
Height = 22
|
Height = 22
|
||||||
@ -49,7 +49,7 @@ inherited frViewArticulo: TfrViewArticulo
|
|||||||
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
|
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
|
||||||
end
|
end
|
||||||
object PngSpeedButton1: TPngSpeedButton
|
object PngSpeedButton1: TPngSpeedButton
|
||||||
Left = 1113
|
Left = 982
|
||||||
Top = 895
|
Top = 895
|
||||||
Width = 23
|
Width = 23
|
||||||
Height = 22
|
Height = 22
|
||||||
@ -160,7 +160,6 @@ inherited frViewArticulo: TfrViewArticulo
|
|||||||
ExplicitLeft = 22
|
ExplicitLeft = 22
|
||||||
ExplicitTop = 629
|
ExplicitTop = 629
|
||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
ExplicitWidth = 537
|
|
||||||
inherited edtNIFCIF: TcxDBTextEdit
|
inherited edtNIFCIF: TcxDBTextEdit
|
||||||
ExplicitWidth = 562
|
ExplicitWidth = 562
|
||||||
Width = 562
|
Width = 562
|
||||||
@ -178,12 +177,12 @@ inherited frViewArticulo: TfrViewArticulo
|
|||||||
Width = 327
|
Width = 327
|
||||||
end
|
end
|
||||||
inherited edtCodigoPostal: TcxDBTextEdit
|
inherited edtCodigoPostal: TcxDBTextEdit
|
||||||
Left = 1022
|
Left = 891
|
||||||
ExplicitLeft = 1022
|
ExplicitLeft = 891
|
||||||
end
|
end
|
||||||
inherited Button3: TBitBtn
|
inherited Button3: TBitBtn
|
||||||
Left = 906
|
Left = 775
|
||||||
ExplicitLeft = 906
|
ExplicitLeft = 775
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -422,7 +421,7 @@ inherited frViewArticulo: TfrViewArticulo
|
|||||||
Width = 664
|
Width = 664
|
||||||
end
|
end
|
||||||
object eReferenciaFab: TcxDBTextEdit
|
object eReferenciaFab: TcxDBTextEdit
|
||||||
Left = 688
|
Left = 623
|
||||||
Top = 410
|
Top = 410
|
||||||
DataBinding.DataField = 'REFERENCIA_FAB'
|
DataBinding.DataField = 'REFERENCIA_FAB'
|
||||||
DataBinding.DataSource = dsViewArticulo
|
DataBinding.DataSource = dsViewArticulo
|
||||||
@ -533,7 +532,7 @@ inherited frViewArticulo: TfrViewArticulo
|
|||||||
ExplicitWidth = 1311
|
ExplicitWidth = 1311
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Width = 1311
|
Width = 1311
|
||||||
ExplicitWidth = 537
|
ExplicitWidth = 1311
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
inherited cxGridViewID_IDIOMA: TcxGridDBColumn
|
inherited cxGridViewID_IDIOMA: TcxGridDBColumn
|
||||||
Properties.ReadOnly = True
|
Properties.ReadOnly = True
|
||||||
@ -542,7 +541,7 @@ inherited frViewArticulo: TfrViewArticulo
|
|||||||
end
|
end
|
||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Width = 1311
|
Width = 1311
|
||||||
ExplicitWidth = 537
|
ExplicitWidth = 1311
|
||||||
inherited ToolButton1: TToolButton
|
inherited ToolButton1: TToolButton
|
||||||
ExplicitWidth = 92
|
ExplicitWidth = 92
|
||||||
end
|
end
|
||||||
|
|||||||
@ -383,6 +383,12 @@ end;
|
|||||||
procedure TfrViewArticulo.CustomViewShow(Sender: TObject);
|
procedure TfrViewArticulo.CustomViewShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
|
if (FArticulo.ID = CTE_ART_COMISIONABLE_MODIFICABLE) then
|
||||||
|
begin
|
||||||
|
dxLayoutControlArticuloGroup11.Enabled := false;
|
||||||
|
dxLayoutControlArticuloGroup13.Enabled := false;
|
||||||
|
end;
|
||||||
// ePrecioCoste.Properties.OnEditValueChanged := PrecioNetoChanged;
|
// ePrecioCoste.Properties.OnEditValueChanged := PrecioNetoChanged;
|
||||||
// eDescuento.Properties.OnEditValueChanged := PrecioNetoChanged;
|
// eDescuento.Properties.OnEditValueChanged := PrecioNetoChanged;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -325,6 +325,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
|
|||||||
AlignHorz = ahClient
|
AlignHorz = ahClient
|
||||||
Caption = 'Validez presupuestos por defecto'
|
Caption = 'Validez presupuestos por defecto'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
|
Visible = False
|
||||||
object dxLayoutControl1Item1: TdxLayoutItem
|
object dxLayoutControl1Item1: TdxLayoutItem
|
||||||
Control = eValidezDistribuidor
|
Control = eValidezDistribuidor
|
||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
@ -333,6 +334,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
|
|||||||
object dlformapago: TdxLayoutGroup
|
object dlformapago: TdxLayoutGroup
|
||||||
Caption = 'Forma de pago por defecto'
|
Caption = 'Forma de pago por defecto'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
|
Visible = False
|
||||||
object dxLayoutControl1Item3: TdxLayoutItem
|
object dxLayoutControl1Item3: TdxLayoutItem
|
||||||
Control = eFormaPagoDistribuidor
|
Control = eFormaPagoDistribuidor
|
||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
@ -342,6 +344,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
|
|||||||
object dlnotas: TdxLayoutGroup
|
object dlnotas: TdxLayoutGroup
|
||||||
Caption = 'Notas por defecto'
|
Caption = 'Notas por defecto'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
|
Visible = False
|
||||||
object dxLayoutControl1Item2: TdxLayoutItem
|
object dxLayoutControl1Item2: TdxLayoutItem
|
||||||
Control = eNotasDistribuidor
|
Control = eNotasDistribuidor
|
||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
@ -351,6 +354,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
|
|||||||
object dllopd: TdxLayoutGroup
|
object dllopd: TdxLayoutGroup
|
||||||
Caption = 'LOPD del distribuidor'
|
Caption = 'LOPD del distribuidor'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
|
Visible = False
|
||||||
object dxLayoutControl1Item5: TdxLayoutItem
|
object dxLayoutControl1Item5: TdxLayoutItem
|
||||||
Control = eLOPDDistribuidor
|
Control = eLOPDDistribuidor
|
||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
@ -360,6 +364,7 @@ inherited frViewClienteDatosDistribuidor: TfrViewClienteDatosDistribuidor
|
|||||||
object dlcondiciones: TdxLayoutGroup
|
object dlcondiciones: TdxLayoutGroup
|
||||||
Caption = 'Condiciones por defecto'
|
Caption = 'Condiciones por defecto'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
|
Visible = False
|
||||||
object dxLayoutControl1Item6: TdxLayoutItem
|
object dxLayoutControl1Item6: TdxLayoutItem
|
||||||
Control = eCondicionesDistribuidor
|
Control = eCondicionesDistribuidor
|
||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
|
|||||||
@ -131,22 +131,22 @@ begin
|
|||||||
dlBloquear.Enabled := True;
|
dlBloquear.Enabled := True;
|
||||||
dlusuario.Enabled := True;
|
dlusuario.Enabled := True;
|
||||||
dlcontrasena.Enabled := True;
|
dlcontrasena.Enabled := True;
|
||||||
dlValidez.Enabled := True;
|
// dlValidez.Enabled := True;
|
||||||
dlFormaPago.Enabled := True;
|
// dlFormaPago.Enabled := True;
|
||||||
dlNotas.Enabled := True;
|
// dlNotas.Enabled := True;
|
||||||
dlLOPD.Enabled := True;
|
// dlLOPD.Enabled := True;
|
||||||
dlCondiciones.Enabled := True;
|
// dlCondiciones.Enabled := True;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
dlBloquear.Enabled := False;
|
dlBloquear.Enabled := False;
|
||||||
dlusuario.Enabled := False;
|
dlusuario.Enabled := False;
|
||||||
dlcontrasena.Enabled := False;
|
dlcontrasena.Enabled := False;
|
||||||
dlValidez.Enabled := False;
|
// dlValidez.Enabled := False;
|
||||||
dlFormaPago.Enabled := False;
|
// dlFormaPago.Enabled := False;
|
||||||
dlNotas.Enabled := False;
|
// dlNotas.Enabled := False;
|
||||||
dlLOPD.Enabled := False;
|
// dlLOPD.Enabled := False;
|
||||||
dlCondiciones.Enabled := False;
|
// dlCondiciones.Enabled := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if eBloqueado.Checked then
|
if eBloqueado.Checked then
|
||||||
|
|||||||
@ -79,7 +79,7 @@ type
|
|||||||
procedure VerListadoBeneficios;
|
procedure VerListadoBeneficios;
|
||||||
procedure VerDireccionEntrega(AContrato : IBizContratoCliente);
|
procedure VerDireccionEntrega(AContrato : IBizContratoCliente);
|
||||||
|
|
||||||
function MandarFabrica(AContrato: IBizContratoCliente): Boolean;
|
function MandarFabrica(AContrato: IBizContratoCliente; AClonarContrato: Boolean = true): Boolean;
|
||||||
function AceptarContrato(AContrato: IBizContratoCliente): Boolean;
|
function AceptarContrato(AContrato: IBizContratoCliente): Boolean;
|
||||||
function AnadirIncidenciaContrato(AIdContrato: Integer): Boolean;
|
function AnadirIncidenciaContrato(AIdContrato: Integer): Boolean;
|
||||||
end;
|
end;
|
||||||
@ -171,7 +171,7 @@ type
|
|||||||
procedure VerListadoBeneficios;
|
procedure VerListadoBeneficios;
|
||||||
procedure VerDireccionEntrega(AContrato : IBizContratoCliente);
|
procedure VerDireccionEntrega(AContrato : IBizContratoCliente);
|
||||||
|
|
||||||
function MandarFabrica(AContrato: IBizContratoCliente): Boolean;
|
function MandarFabrica(AContrato: IBizContratoCliente; AClonarContrato: Boolean = true): Boolean;
|
||||||
function AceptarContrato(AContrato: IBizContratoCliente): Boolean;
|
function AceptarContrato(AContrato: IBizContratoCliente): Boolean;
|
||||||
function AnadirIncidenciaContrato(AIdContrato: Integer): Boolean;
|
function AnadirIncidenciaContrato(AIdContrato: Integer): Boolean;
|
||||||
end;
|
end;
|
||||||
@ -914,8 +914,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TContratosClienteController.ValidarContrato(
|
function TContratosClienteController.ValidarContrato(AContrato: IBizContratoCliente): Boolean;
|
||||||
AContrato: IBizContratoCliente): Boolean;
|
|
||||||
begin
|
begin
|
||||||
if not Assigned(AContrato) then
|
if not Assigned(AContrato) then
|
||||||
raise Exception.Create ('Contrato no asignado');
|
raise Exception.Create ('Contrato no asignado');
|
||||||
@ -943,11 +942,11 @@ begin
|
|||||||
if (AContrato.Detalles.DataTable.RecordCount = 0) then
|
if (AContrato.Detalles.DataTable.RecordCount = 0) then
|
||||||
raise Exception.Create('El contrato debe tener en su contenido al menos un concepto');
|
raise Exception.Create('El contrato debe tener en su contenido al menos un concepto');
|
||||||
|
|
||||||
|
|
||||||
FDetallesController.ValidarDetalles(AContrato.Detalles);
|
FDetallesController.ValidarDetalles(AContrato.Detalles);
|
||||||
|
|
||||||
{ Asegurarse de valores en campos "automáticos" tanto
|
{ Asegurarse de valores en campos "automáticos" tanto
|
||||||
en MODIFICACIÓN como en INSERCIÓN. }
|
en MODIFICACIÓN como en INSERCIÓN. }
|
||||||
|
|
||||||
AContrato.Edit;
|
AContrato.Edit;
|
||||||
try
|
try
|
||||||
AContrato.USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
AContrato.USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
||||||
@ -1257,7 +1256,8 @@ procedure TContratosClienteController.RecalcularImportes(
|
|||||||
AContrato: IBizContratoCliente);
|
AContrato: IBizContratoCliente);
|
||||||
var
|
var
|
||||||
bEnEdicion : Boolean;
|
bEnEdicion : Boolean;
|
||||||
ADetallePosAct : Integer;
|
ADetallePosAct : Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not Assigned(AContrato) then
|
if not Assigned(AContrato) then
|
||||||
raise Exception.Create ('Contrato no asignado (RecalcularImportes)');
|
raise Exception.Create ('Contrato no asignado (RecalcularImportes)');
|
||||||
@ -1307,6 +1307,8 @@ end;
|
|||||||
procedure TContratosClienteController.RecuperarObjetos(AContrato: IBizContratoCliente);
|
procedure TContratosClienteController.RecuperarObjetos(AContrato: IBizContratoCliente);
|
||||||
begin
|
begin
|
||||||
RecuperarCliente(AContrato);
|
RecuperarCliente(AContrato);
|
||||||
|
if (AContrato.ENVIADA_REVISADA = 10) then
|
||||||
|
MandarFabrica(AContrato, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TContratosClienteController.RellenarValoresDefecto(AContrato: IBizContratoCliente; ATipo: TEnumTiposContrato);
|
procedure TContratosClienteController.RellenarValoresDefecto(AContrato: IBizContratoCliente; ATipo: TEnumTiposContrato);
|
||||||
@ -1497,6 +1499,9 @@ end;
|
|||||||
}
|
}
|
||||||
|
|
||||||
function TContratosClienteController.Guardar(AContrato: IBizContratoCliente): Boolean;
|
function TContratosClienteController.Guardar(AContrato: IBizContratoCliente): Boolean;
|
||||||
|
var
|
||||||
|
ABookmark : TBookmark;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -1506,6 +1511,11 @@ begin
|
|||||||
if not Assigned(FDetallesController) then
|
if not Assigned(FDetallesController) then
|
||||||
raise Exception.Create ('Controller detalles no asignado');
|
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
|
if ValidarContrato(AContrato) then
|
||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
@ -1517,6 +1527,12 @@ begin
|
|||||||
AContrato.DataTable.ApplyUpdates;
|
AContrato.DataTable.ApplyUpdates;
|
||||||
Result := True;
|
Result := True;
|
||||||
finally
|
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;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1541,7 +1557,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TContratosClienteController.MandarFabrica(AContrato: IBizContratoCliente): Boolean;
|
function TContratosClienteController.MandarFabrica(AContrato: IBizContratoCliente; AClonarContrato: Boolean = true): Boolean;
|
||||||
var
|
var
|
||||||
AContratoFabrica : IBizContratoCliente;
|
AContratoFabrica : IBizContratoCliente;
|
||||||
|
|
||||||
@ -1550,7 +1566,11 @@ begin
|
|||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
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
|
// Hay que dejar algunos campos como si fuera un contrato nuevo
|
||||||
AContratoFabrica.Edit;
|
AContratoFabrica.Edit;
|
||||||
@ -1559,19 +1579,36 @@ begin
|
|||||||
ID_EMPRESA := CTE_EMPRESA_FABRICA;
|
ID_EMPRESA := CTE_EMPRESA_FABRICA;
|
||||||
ID_TIENDA := CTE_EMPRESA_FABRICA;
|
ID_TIENDA := CTE_EMPRESA_FABRICA;
|
||||||
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
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;
|
INCIDENCIAS_ACTIVAS := 0;
|
||||||
INCIDENCIASIsNull := True;
|
INCIDENCIASIsNull := True;
|
||||||
|
|
||||||
REFERENCIA_CLIENTE := AContrato.REFERENCIA + ' - ' + AContrato.NOMBRE_CLIENTE;
|
|
||||||
SITUACION := SITUACION_CONTRATO_PENDIENTE;
|
SITUACION := SITUACION_CONTRATO_PENDIENTE;
|
||||||
ENVIADA_REVISADA := CONST_CONTRATO_RECIBIDO_UECKO;
|
|
||||||
|
|
||||||
//ASIGNACION DE CLIENTE PARA ABETO
|
//En el caso de contrato de presupuestador WEB se cambia constante
|
||||||
if (AContrato.ID_EMPRESA = CTE_EMPRESA_GUNNI) then
|
if AClonarContrato then
|
||||||
AContratoFabrica._Cliente := (FClienteController.darClienteGraden(CTE_CLIENTE_GUNNI_PARA_FABRICA) as IBizCliente)
|
ENVIADA_REVISADA := CONST_CONTRATO_RECIBIDO_UECKO
|
||||||
else
|
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;
|
AContratoFabrica.Cliente.DataTable.Active := True;
|
||||||
|
|
||||||
@ -1583,7 +1620,9 @@ begin
|
|||||||
POBLACION := AContratoFabrica.Cliente.POBLACION;
|
POBLACION := AContratoFabrica.Cliente.POBLACION;
|
||||||
TELEFONO := AContratoFabrica.Cliente.TELEFONO_1;
|
TELEFONO := AContratoFabrica.Cliente.TELEFONO_1;
|
||||||
MOVIL := AContratoFabrica.Cliente.MOVIL_1;
|
MOVIL := AContratoFabrica.Cliente.MOVIL_1;
|
||||||
|
|
||||||
//LA DIRECCIÖN DE ENVIO SE MANTIENE LA COPIADA DEL CLIENTE FINAL
|
//LA DIRECCIÖN DE ENVIO SE MANTIENE LA COPIADA DEL CLIENTE FINAL
|
||||||
|
|
||||||
AContratoFabrica.ID_FORMA_PAGO := AContratoFabrica.Cliente.ID_FORMA_PAGO;
|
AContratoFabrica.ID_FORMA_PAGO := AContratoFabrica.Cliente.ID_FORMA_PAGO;
|
||||||
AContratoFabrica.ID_TIPO_IVA := AContratoFabrica.Cliente.ID_TIPO_IVA;
|
AContratoFabrica.ID_TIPO_IVA := AContratoFabrica.Cliente.ID_TIPO_IVA;
|
||||||
AContratoFabrica.IDIOMA_ISO := AContratoFabrica.Cliente.IDIOMA_ISO;
|
AContratoFabrica.IDIOMA_ISO := AContratoFabrica.Cliente.IDIOMA_ISO;
|
||||||
@ -1598,15 +1637,18 @@ begin
|
|||||||
AContratoFabrica.Post;
|
AContratoFabrica.Post;
|
||||||
if Guardar(AContratoFabrica) then
|
if Guardar(AContratoFabrica) then
|
||||||
begin
|
begin
|
||||||
AContrato.Edit;
|
//En el caso de contrato de presupuestador WEB no se modifica el contratoorigen
|
||||||
AContrato.ID_CONTRATO_ASOCIADO := AContratoFabrica.ID;
|
if AClonarContrato then
|
||||||
AContrato.ENVIADA_REVISADA := CONST_CONTRATO_ENVIADO_UECKO;
|
begin
|
||||||
AContrato.Post;
|
AContrato.Edit;
|
||||||
AContrato.DataTable.ApplyUpdates;
|
AContrato.ID_CONTRATO_ASOCIADO := AContratoFabrica.ID;
|
||||||
Result := True;
|
AContrato.ENVIADA_REVISADA := CONST_CONTRATO_ENVIADO_UECKO;
|
||||||
|
AContrato.Post;
|
||||||
|
AContrato.DataTable.ApplyUpdates;
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
finally
|
finally
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -335,7 +335,7 @@ begin
|
|||||||
ADetalles.DataTable.First;
|
ADetalles.DataTable.First;
|
||||||
while not ADetalles.DataTable.eof do
|
while not ADetalles.DataTable.eof do
|
||||||
begin
|
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
|
begin
|
||||||
AArticulo := (FArticulosController.Buscar(ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger) as IBizArticulo);
|
AArticulo := (FArticulosController.Buscar(ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger) as IBizArticulo);
|
||||||
AArticulo.DataTable.Open;
|
AArticulo.DataTable.Open;
|
||||||
|
|||||||
@ -14,6 +14,7 @@ const
|
|||||||
CONST_CONTRATO_DEFAULT = 0;
|
CONST_CONTRATO_DEFAULT = 0;
|
||||||
CONST_CONTRATO_ENVIADO_UECKO = 1;
|
CONST_CONTRATO_ENVIADO_UECKO = 1;
|
||||||
CONST_CONTRATO_RECIBIDO_UECKO = 2;
|
CONST_CONTRATO_RECIBIDO_UECKO = 2;
|
||||||
|
CONST_CONTRATO_RECIBIDO_UECKO_DESDE_WEB = 11;
|
||||||
CONST_CONTRATO_ACEPTADO_UECKO = 3;
|
CONST_CONTRATO_ACEPTADO_UECKO = 3;
|
||||||
|
|
||||||
CTE_EMPRESA_FABRICA = 1;
|
CTE_EMPRESA_FABRICA = 1;
|
||||||
@ -367,6 +368,7 @@ begin
|
|||||||
TELEFONO := FCliente.TELEFONO_1;
|
TELEFONO := FCliente.TELEFONO_1;
|
||||||
MOVIL := FCliente.MOVIL_1;
|
MOVIL := FCliente.MOVIL_1;
|
||||||
IDIOMA_ISO := FCliente.IDIOMA_ISO;
|
IDIOMA_ISO := FCliente.IDIOMA_ISO;
|
||||||
|
IDIOMA := FCliente.IDIOMA;
|
||||||
PAIS := FCliente.PAIS;
|
PAIS := FCliente.PAIS;
|
||||||
ID_AGENTE := FCliente.ID_AGENTE;
|
ID_AGENTE := FCliente.ID_AGENTE;
|
||||||
|
|
||||||
|
|||||||
@ -187,7 +187,8 @@ begin
|
|||||||
and not (ViewGrid.NumSeleccionados > 1)
|
and not (ViewGrid.NumSeleccionados > 1)
|
||||||
and (FContratos.SITUACION <> SITUACION_CONTRATO_TERMINADO)
|
and (FContratos.SITUACION <> SITUACION_CONTRATO_TERMINADO)
|
||||||
and (FContratos.SITUACION <> SITUACION_CONTRATO_CANCELADO)
|
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;
|
end;
|
||||||
|
|
||||||
procedure TfEditorContratosCliente.actAceptarExecute(Sender: TObject);
|
procedure TfEditorContratosCliente.actAceptarExecute(Sender: TObject);
|
||||||
|
|||||||
@ -226,6 +226,16 @@ inherited frViewContratosCliente: TfrViewContratosCliente
|
|||||||
Description = 'Aprobado'
|
Description = 'Aprobado'
|
||||||
ImageIndex = 4
|
ImageIndex = 4
|
||||||
Value = 3
|
Value = 3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Description = 'Recibido'
|
||||||
|
ImageIndex = 5
|
||||||
|
Value = 10
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Description = 'Recibido'
|
||||||
|
ImageIndex = 5
|
||||||
|
Value = 11
|
||||||
end>
|
end>
|
||||||
IsCaptionAssigned = True
|
IsCaptionAssigned = True
|
||||||
end
|
end
|
||||||
@ -726,6 +736,28 @@ inherited frViewContratosCliente: TfrViewContratosCliente
|
|||||||
49454E44AE426082}
|
49454E44AE426082}
|
||||||
Name = 'PngImage4'
|
Name = 'PngImage4'
|
||||||
Background = clWindow
|
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>
|
end>
|
||||||
Bitmap = {}
|
Bitmap = {}
|
||||||
end
|
end
|
||||||
@ -750,7 +782,11 @@ inherited frViewContratosCliente: TfrViewContratosCliente
|
|||||||
end
|
end
|
||||||
object cxStylePENDIENTESREVISION: TcxStyle
|
object cxStylePENDIENTESREVISION: TcxStyle
|
||||||
AssignedValues = [svTextColor]
|
AssignedValues = [svTextColor]
|
||||||
TextColor = clMaroon
|
TextColor = clOlive
|
||||||
|
end
|
||||||
|
object cxStylePENDIENTESREVISIONWEB: TcxStyle
|
||||||
|
AssignedValues = [svTextColor]
|
||||||
|
TextColor = clGreen
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -85,6 +85,7 @@ type
|
|||||||
cxGridViewDTO: TcxGridDBColumn;
|
cxGridViewDTO: TcxGridDBColumn;
|
||||||
cxGridViewIMPORTE_NETO: TcxGridDBColumn;
|
cxGridViewIMPORTE_NETO: TcxGridDBColumn;
|
||||||
cxGridViewIMPORTE_DESCUENTO: TcxGridDBColumn;
|
cxGridViewIMPORTE_DESCUENTO: TcxGridDBColumn;
|
||||||
|
cxStylePENDIENTESREVISIONWEB: TcxStyle;
|
||||||
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
|
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
|
||||||
TcxGridLevel);
|
TcxGridLevel);
|
||||||
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
|
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
|
||||||
@ -328,14 +329,21 @@ end;
|
|||||||
procedure TfrViewContratosCliente.AnadirFiltroSituaciones;
|
procedure TfrViewContratosCliente.AnadirFiltroSituaciones;
|
||||||
var
|
var
|
||||||
FFiltro : TcxFilterCriteriaItemList;
|
FFiltro : TcxFilterCriteriaItemList;
|
||||||
|
ACriterioDoble: TcxFilterCriteriaItemList;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
FFiltro := AddFilterGrid(fboAnd);
|
FFiltro := AddFilterGrid(fboAnd);
|
||||||
|
|
||||||
case cxGrid.ActiveLevel.Index of
|
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);
|
2 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_CONTRATO_PENDIENTE, SITUACION_CONTRATO_PENDIENTE);
|
||||||
3 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_CONTRATO_TERMINADO, SITUACION_CONTRATO_TERMINADO);
|
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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -465,8 +473,10 @@ var
|
|||||||
IndiceCol2: Integer;
|
IndiceCol2: Integer;
|
||||||
IndiceCol3: Integer;
|
IndiceCol3: Integer;
|
||||||
IndiceCol4: Integer;
|
IndiceCol4: Integer;
|
||||||
|
IndiceCol5: integer;
|
||||||
ASituacion: string;
|
ASituacion: string;
|
||||||
AFacturas: string;
|
AFacturas: string;
|
||||||
|
AEnviadasRevisadas: Integer;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
@ -476,25 +486,32 @@ begin
|
|||||||
IndiceCol2 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteFACTURA_ASOCIADA).Index;
|
IndiceCol2 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteFACTURA_ASOCIADA).Index;
|
||||||
IndiceCol3 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteBASE_IMPONIBLE_FACTURAS).Index;
|
IndiceCol3 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteBASE_IMPONIBLE_FACTURAS).Index;
|
||||||
IndiceCol4 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteBASE_IMPONIBLE).Index;
|
IndiceCol4 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteBASE_IMPONIBLE).Index;
|
||||||
|
IndiceCol5 := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteENVIADA_REVISADA).Index;
|
||||||
ASituacion := VarToStr(ARecord.DisplayTexts[IndiceCol]);
|
ASituacion := VarToStr(ARecord.DisplayTexts[IndiceCol]);
|
||||||
AFacturas := VarToStr(ARecord.DisplayTexts[IndiceCol2]);
|
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
|
//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
|
//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.
|
//situación, así asignamos un estile por defecto y lo cambiamos según condiciones.
|
||||||
if Assigned(AStyle) then
|
if Assigned(AStyle) then
|
||||||
begin
|
begin
|
||||||
AStyle.TextColor := cxStylePENDIENTESREVISION.TextColor;
|
AStyle.TextColor := cxStylePENDIENTES.TextColor;
|
||||||
if ASituacion = SITUACION_CONTRATO_PENDIENTE then
|
if ASituacion = SITUACION_CONTRATO_PENDIENTE then
|
||||||
begin
|
begin
|
||||||
if (AFacturas = '') then
|
//colores por facturacion
|
||||||
AStyle.TextColor := cxStylePENDIENTES.TextColor
|
if (Afacturas <> '') then
|
||||||
else if (ARecord.Values[IndiceCol3] < ARecord.Values[IndiceCol4]) then
|
if (ARecord.Values[IndiceCol3] < ARecord.Values[IndiceCol4]) then
|
||||||
AStyle.TextColor := cxStylePENDIENTESYFACTURADASPLUS.TextColor
|
AStyle.TextColor := cxStylePENDIENTESYFACTURADASPLUS.TextColor
|
||||||
else if (ARecord.Values[IndiceCol3] >= ARecord.Values[IndiceCol4]) then
|
else if (ARecord.Values[IndiceCol3] >= ARecord.Values[IndiceCol4]) then
|
||||||
AStyle.TextColor := cxStylePENDIENTESYFACTURADASOK.TextColor
|
AStyle.TextColor := cxStylePENDIENTESYFACTURADASOK.TextColor;
|
||||||
else
|
|
||||||
AStyle.TextColor := cxStylePENDIENTES.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
|
end
|
||||||
else if (ASituacion = SITUACION_CONTRATO_TERMINADO)
|
else if (ASituacion = SITUACION_CONTRATO_TERMINADO)
|
||||||
or (ASituacion = SITUACION_CONTRATO_CANCELADO) then
|
or (ASituacion = SITUACION_CONTRATO_CANCELADO) then
|
||||||
|
|||||||
@ -457,7 +457,7 @@ begin
|
|||||||
}
|
}
|
||||||
IndiceCol := cxGridView.GetColumnByFieldName(fld_ContratosCliente_DetallesID_ARTICULO).Index;
|
IndiceCol := cxGridView.GetColumnByFieldName(fld_ContratosCliente_DetallesID_ARTICULO).Index;
|
||||||
if not VarIsNull(AItem.GridView.Items[IndiceCol].EditValue)
|
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;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
@ -468,7 +468,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
IndiceCol := cxGridView.GetColumnByFieldName(fld_ContratosCliente_DetallesID_ARTICULO).Index;
|
IndiceCol := cxGridView.GetColumnByFieldName(fld_ContratosCliente_DetallesID_ARTICULO).Index;
|
||||||
if not VarIsNull(AItem.GridView.Items[IndiceCol].EditValue)
|
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;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
|||||||
@ -371,7 +371,8 @@ begin
|
|||||||
PROVINCIA := FCliente.PROVINCIA;
|
PROVINCIA := FCliente.PROVINCIA;
|
||||||
POBLACION := FCliente.POBLACION;
|
POBLACION := FCliente.POBLACION;
|
||||||
PAIS := FCliente.PAIS;
|
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
|
// 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
|
// if FCliente.ID_FORMA_PAGO > 0 then
|
||||||
// ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
|
// ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
|
||||||
|
|||||||
@ -294,7 +294,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
ShowHourglassCursor;
|
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
|
frViewDetallesFacturaCliente1.BeginUpdate; // Para que no se mueva el foco
|
||||||
try
|
try
|
||||||
bEsNuevo := FFactura.EsNuevo;
|
bEsNuevo := FFactura.EsNuevo;
|
||||||
@ -309,7 +309,7 @@ begin
|
|||||||
|
|
||||||
finally
|
finally
|
||||||
frViewDetallesFacturaCliente1.EndUpdate;
|
frViewDetallesFacturaCliente1.EndUpdate;
|
||||||
//frViewDetallesFacturaCliente1.RestoreGridStatus;
|
frViewDetallesFacturaCliente1.RestoreGridStatus;
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,6 @@ inherited frViewDetallesFacturaCliente: TfrViewDetallesFacturaCliente
|
|||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
inherited cxGridViewID_ARTICULO: TcxGridDBColumn
|
inherited cxGridViewID_ARTICULO: TcxGridDBColumn
|
||||||
Caption = '-'
|
|
||||||
PropertiesClassName = 'TcxImageComboBoxProperties'
|
|
||||||
Properties.Items = <>
|
|
||||||
end
|
end
|
||||||
inherited cxGridViewVALORADO: TcxGridDBColumn [4]
|
inherited cxGridViewVALORADO: TcxGridDBColumn [4]
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1164,6 +1164,8 @@ end;
|
|||||||
function TFacturasProveedorController.Guardar(AFactura: IBizFacturaProveedor): Boolean;
|
function TFacturasProveedorController.Guardar(AFactura: IBizFacturaProveedor): Boolean;
|
||||||
var
|
var
|
||||||
IDNuevo : Integer;
|
IDNuevo : Integer;
|
||||||
|
ABookmark : TBookmark;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -1188,6 +1190,7 @@ begin
|
|||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
finally
|
finally
|
||||||
|
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -210,7 +210,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
inherited memObservaciones: TcxDBMemo
|
inherited memObservaciones: TcxDBMemo
|
||||||
DataBinding.DataSource = frViewFacturaProveedor1.DADataSource
|
DataBinding.DataSource = frViewFacturaProveedor1.DADataSource
|
||||||
ExplicitWidth = 671
|
ExplicitWidth = 671
|
||||||
ExplicitHeight = 228
|
|
||||||
Height = 228
|
Height = 228
|
||||||
Width = 671
|
Width = 671
|
||||||
end
|
end
|
||||||
|
|||||||
@ -248,7 +248,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
ShowHourglassCursor;
|
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
|
frViewDetallesFacturaProveedor1.BeginUpdate; // Para que no se mueva el foco
|
||||||
try
|
try
|
||||||
bEsNuevo := FFactura.EsNuevo;
|
bEsNuevo := FFactura.EsNuevo;
|
||||||
@ -262,7 +262,7 @@ begin
|
|||||||
FController.Guardar(FFactura);
|
FController.Guardar(FFactura);
|
||||||
finally
|
finally
|
||||||
frViewDetallesFacturaProveedor1.EndUpdate;
|
frViewDetallesFacturaProveedor1.EndUpdate;
|
||||||
//frViewDetallesFacturaProveedor1.RestoreGridStatus;
|
frViewDetallesFacturaProveedor1.RestoreGridStatus;
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -798,6 +798,9 @@ end;
|
|||||||
function TPedidosProveedorController.Guardar(APedido: IBizPedidoProveedor): Boolean;
|
function TPedidosProveedorController.Guardar(APedido: IBizPedidoProveedor): Boolean;
|
||||||
var
|
var
|
||||||
IDNuevo : Integer;
|
IDNuevo : Integer;
|
||||||
|
ABookmark : TBookmark;
|
||||||
|
ADetallePosAct : Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -807,6 +810,13 @@ begin
|
|||||||
if not Assigned(FDetallesController) then
|
if not Assigned(FDetallesController) then
|
||||||
raise Exception.Create ('Controller detalles no asignado');
|
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
|
if ValidarPedido(APedido) then
|
||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
@ -816,9 +826,16 @@ begin
|
|||||||
|
|
||||||
try
|
try
|
||||||
APedido.DataTable.ApplyUpdates;
|
APedido.DataTable.ApplyUpdates;
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
finally
|
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;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -555,11 +555,12 @@ object RptPedidosProveedor: TRptPedidosProveedor
|
|||||||
EngineOptions.DoublePass = True
|
EngineOptions.DoublePass = True
|
||||||
IniFile = '\Software\Fast Reports'
|
IniFile = '\Software\Fast Reports'
|
||||||
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
|
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
|
||||||
|
PreviewOptions.OutlineWidth = 180
|
||||||
PreviewOptions.Zoom = 1.000000000000000000
|
PreviewOptions.Zoom = 1.000000000000000000
|
||||||
PrintOptions.Printer = 'Por defecto'
|
PrintOptions.Printer = 'Por defecto'
|
||||||
PrintOptions.PrintOnSheet = 0
|
PrintOptions.PrintOnSheet = 0
|
||||||
ReportOptions.CreateDate = 39065.872423495400000000
|
ReportOptions.CreateDate = 37871.995398692100000000
|
||||||
ReportOptions.LastChange = 44543.822097592600000000
|
ReportOptions.LastChange = 45565.707618252300000000
|
||||||
ScriptLanguage = 'PascalScript'
|
ScriptLanguage = 'PascalScript'
|
||||||
ShowProgress = False
|
ShowProgress = False
|
||||||
StoreInDFM = False
|
StoreInDFM = False
|
||||||
|
|||||||
@ -116,40 +116,40 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
|
|||||||
ExplicitWidth = 60
|
ExplicitWidth = 60
|
||||||
end
|
end
|
||||||
inherited UpDown1: TUpDown
|
inherited UpDown1: TUpDown
|
||||||
Left = 239
|
Left = 257
|
||||||
ExplicitLeft = 239
|
ExplicitLeft = 257
|
||||||
end
|
end
|
||||||
inherited ToolButton13: TToolButton
|
inherited ToolButton13: TToolButton
|
||||||
Left = 256
|
Left = 274
|
||||||
ExplicitLeft = 256
|
ExplicitLeft = 274
|
||||||
end
|
end
|
||||||
inherited ToolButton6: TToolButton
|
inherited ToolButton6: TToolButton
|
||||||
Left = 264
|
Left = 282
|
||||||
ExplicitLeft = 264
|
ExplicitLeft = 282
|
||||||
end
|
end
|
||||||
inherited ToolButton7: TToolButton
|
inherited ToolButton7: TToolButton
|
||||||
Left = 298
|
Left = 316
|
||||||
ExplicitLeft = 298
|
ExplicitLeft = 316
|
||||||
end
|
end
|
||||||
inherited ToolButton8: TToolButton
|
inherited ToolButton8: TToolButton
|
||||||
Left = 332
|
Left = 350
|
||||||
ExplicitLeft = 332
|
ExplicitLeft = 350
|
||||||
end
|
end
|
||||||
inherited ToolButton12: TToolButton
|
inherited ToolButton12: TToolButton
|
||||||
Left = 366
|
Left = 384
|
||||||
ExplicitLeft = 366
|
ExplicitLeft = 384
|
||||||
end
|
end
|
||||||
inherited ToolButton9: TToolButton
|
inherited ToolButton9: TToolButton
|
||||||
Left = 374
|
Left = 392
|
||||||
ExplicitLeft = 374
|
ExplicitLeft = 392
|
||||||
end
|
end
|
||||||
inherited ToolButton10: TToolButton
|
inherited ToolButton10: TToolButton
|
||||||
Left = 408
|
Left = 426
|
||||||
ExplicitLeft = 408
|
ExplicitLeft = 426
|
||||||
end
|
end
|
||||||
inherited ToolButton11: TToolButton
|
inherited ToolButton11: TToolButton
|
||||||
Left = 442
|
Left = 460
|
||||||
ExplicitLeft = 442
|
ExplicitLeft = 460
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
|
|||||||
@ -426,7 +426,7 @@ begin
|
|||||||
ADetalles.DataTable.First;
|
ADetalles.DataTable.First;
|
||||||
while not ADetalles.DataTable.eof do
|
while not ADetalles.DataTable.eof do
|
||||||
begin
|
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
|
begin
|
||||||
AArticulo := (FArticulosController.Buscar(ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger) as IBizArticulo);
|
AArticulo := (FArticulosController.Buscar(ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsInteger) as IBizArticulo);
|
||||||
AArticulo.DataTable.Open;
|
AArticulo.DataTable.Open;
|
||||||
|
|||||||
@ -1196,6 +1196,9 @@ end;
|
|||||||
}
|
}
|
||||||
|
|
||||||
function TPresupuestosClienteController.Guardar(APresupuesto: IBizPresupuestoCliente): Boolean;
|
function TPresupuestosClienteController.Guardar(APresupuesto: IBizPresupuestoCliente): Boolean;
|
||||||
|
var
|
||||||
|
ABookmark : TBookmark;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -1205,6 +1208,11 @@ begin
|
|||||||
if not Assigned(FDetallesController) then
|
if not Assigned(FDetallesController) then
|
||||||
raise Exception.Create ('Controller detalles no asignado');
|
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
|
if ValidarPresupuesto(APresupuesto) then
|
||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
@ -1216,6 +1224,12 @@ begin
|
|||||||
APresupuesto.DataTable.ApplyUpdates;
|
APresupuesto.DataTable.ApplyUpdates;
|
||||||
Result := True;
|
Result := True;
|
||||||
finally
|
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;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -5,7 +5,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
ClientHeight = 950
|
ClientHeight = 950
|
||||||
ClientWidth = 1430
|
ClientWidth = 1430
|
||||||
OnClose = CustomEditorClose
|
OnClose = CustomEditorClose
|
||||||
ExplicitLeft = -277
|
|
||||||
ExplicitWidth = 1438
|
ExplicitWidth = 1438
|
||||||
ExplicitHeight = 988
|
ExplicitHeight = 988
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
@ -179,7 +178,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
inherited pgPaginas: TPageControl
|
inherited pgPaginas: TPageControl
|
||||||
Width = 1424
|
Width = 1424
|
||||||
Height = 588
|
Height = 588
|
||||||
ActivePage = pagContenido
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnChanging = pgPaginasChanging
|
OnChanging = pgPaginasChanging
|
||||||
ExplicitTop = 112
|
ExplicitTop = 112
|
||||||
@ -256,7 +254,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
ExplicitWidth = 320
|
ExplicitWidth = 320
|
||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
Width = 320
|
Width = 320
|
||||||
ExplicitHeight = 250
|
ExplicitWidth = 320
|
||||||
inherited edtlNombre: TcxDBTextEdit
|
inherited edtlNombre: TcxDBTextEdit
|
||||||
ExplicitWidth = 202
|
ExplicitWidth = 202
|
||||||
Width = 202
|
Width = 202
|
||||||
@ -326,6 +324,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
ExplicitWidth = 390
|
ExplicitWidth = 390
|
||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
Width = 390
|
Width = 390
|
||||||
|
ExplicitWidth = 390
|
||||||
inherited cbTienda: TcxComboBox
|
inherited cbTienda: TcxComboBox
|
||||||
ExplicitWidth = 390
|
ExplicitWidth = 390
|
||||||
Width = 390
|
Width = 390
|
||||||
@ -337,6 +336,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
ExplicitWidth = 317
|
ExplicitWidth = 317
|
||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
Width = 317
|
Width = 317
|
||||||
|
ExplicitWidth = 317
|
||||||
inherited edtlNombreAgente: TcxDBTextEdit
|
inherited edtlNombreAgente: TcxDBTextEdit
|
||||||
DataBinding.DataSource = frViewPresupuestoCliente1.DADataSource
|
DataBinding.DataSource = frViewPresupuestoCliente1.DADataSource
|
||||||
ExplicitWidth = 224
|
ExplicitWidth = 224
|
||||||
@ -464,6 +464,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
Top = 50
|
Top = 50
|
||||||
Width = 1416
|
Width = 1416
|
||||||
Height = 510
|
Height = 510
|
||||||
|
ExplicitTop = 50
|
||||||
ExplicitWidth = 1416
|
ExplicitWidth = 1416
|
||||||
ExplicitHeight = 510
|
ExplicitHeight = 510
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
@ -496,16 +497,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
Caption = ' Precio punto '
|
Caption = ' Precio punto '
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited bRecalcularPrecioPunto: TButton
|
inherited bRecalcularDescuentoCapitulo: TButton [2]
|
||||||
Left = 893
|
|
||||||
Top = -1
|
|
||||||
Height = 27
|
|
||||||
Action = actRecalcularPrecioPunto
|
|
||||||
ExplicitLeft = 893
|
|
||||||
ExplicitTop = -1
|
|
||||||
ExplicitHeight = 27
|
|
||||||
end
|
|
||||||
inherited bRecalcularDescuentoCapitulo: TButton [3]
|
|
||||||
Left = 1218
|
Left = 1218
|
||||||
Top = -1
|
Top = -1
|
||||||
Height = 27
|
Height = 27
|
||||||
@ -514,6 +506,15 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
ExplicitTop = -1
|
ExplicitTop = -1
|
||||||
ExplicitHeight = 27
|
ExplicitHeight = 27
|
||||||
end
|
end
|
||||||
|
inherited bRecalcularPrecioPunto: TButton [3]
|
||||||
|
Left = 893
|
||||||
|
Top = -1
|
||||||
|
Height = 27
|
||||||
|
Action = actRecalcularPrecioPunto
|
||||||
|
ExplicitLeft = 893
|
||||||
|
ExplicitTop = -1
|
||||||
|
ExplicitHeight = 27
|
||||||
|
end
|
||||||
inherited edtPrecioPunto: TcxDBCurrencyEdit [4]
|
inherited edtPrecioPunto: TcxDBCurrencyEdit [4]
|
||||||
Left = 839
|
Left = 839
|
||||||
Top = -1
|
Top = -1
|
||||||
|
|||||||
@ -1,88 +1,5 @@
|
|||||||
inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
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
|
inherited cxGrid: TcxGrid
|
||||||
Top = 50
|
|
||||||
Width = 1511
|
|
||||||
Height = 254
|
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
inherited cxGridViewID: TcxGridDBColumn
|
inherited cxGridViewID: TcxGridDBColumn
|
||||||
VisibleForCustomization = False
|
VisibleForCustomization = False
|
||||||
@ -160,11 +77,9 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock1: TTBXDock
|
inherited TBXDock1: TTBXDock
|
||||||
Top = 24
|
|
||||||
Width = 1511
|
|
||||||
inherited TBXToolbar1: TTBXToolbar
|
inherited TBXToolbar1: TTBXToolbar
|
||||||
DockPos = 0
|
DockPos = 0
|
||||||
ExplicitWidth = 839
|
ExplicitWidth = 325
|
||||||
object TBXSubmenuItem1: TTBXSubmenuItem [0]
|
object TBXSubmenuItem1: TTBXSubmenuItem [0]
|
||||||
Caption = 'A'#241'adir cap'#237'tulo'
|
Caption = 'A'#241'adir cap'#237'tulo'
|
||||||
DisplayMode = nbdmImageAndText
|
DisplayMode = nbdmImageAndText
|
||||||
@ -270,7 +185,7 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object TBXToolbar2: TTBXToolbar
|
object TBXToolbar2: TTBXToolbar
|
||||||
Left = 1064
|
Left = 325
|
||||||
Top = 0
|
Top = 0
|
||||||
Align = alRight
|
Align = alRight
|
||||||
Caption = 'TBXToolbar2'
|
Caption = 'TBXToolbar2'
|
||||||
|
|||||||
@ -466,7 +466,7 @@ begin
|
|||||||
|
|
||||||
IndiceCol := cxGridView.GetColumnByFieldName(fld_PresupuestosCliente_DetallesID_ARTICULO).Index;
|
IndiceCol := cxGridView.GetColumnByFieldName(fld_PresupuestosCliente_DetallesID_ARTICULO).Index;
|
||||||
if not VarIsNull(AItem.GridView.Items[IndiceCol].EditValue)
|
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;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
@ -477,7 +477,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
IndiceCol := cxGridView.GetColumnByFieldName(fld_PresupuestosCliente_DetallesID_ARTICULO).Index;
|
IndiceCol := cxGridView.GetColumnByFieldName(fld_PresupuestosCliente_DetallesID_ARTICULO).Index;
|
||||||
if not VarIsNull(AItem.GridView.Items[IndiceCol].EditValue)
|
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;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
|||||||
Binary file not shown.
@ -28,7 +28,7 @@
|
|||||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||||
<Borland.ProjectType/>
|
<Borland.ProjectType/>
|
||||||
<BorlandProject>
|
<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\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\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>
|
<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.
Loading…
Reference in New Issue
Block a user