unit uViewConfiguracionDocAlbaran; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo, cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls, ComCtrls, uCustomView, uViewDetallesBase, uViewDetallesDTO, uViewDetallesArticulos, uViewConfiguracionCapitulo, cxGraphics, cxMaskEdit, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, DB, uDAInterfaces, uDADataTable, uFormasPagoController, uBizFormasPago; type TfrViewConfiguracionDocAlbaran = class(TfrViewConfiguracionBase) paginas: TPageControl; pagNotas: TTabSheet; Label1: TLabel; Label2: TLabel; Label4: TLabel; ePlazosEntrega: TMemo; eFormaPago: TMemo; eObservaciones: TMemo; pagCapitulo: TTabSheet; frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo; pagCondiciones: TTabSheet; eCondiciones: TcxRichEdit; dsFormaPago: TDADataSource; cbFormaPago: TcxLookupComboBox; protected FFormasPago : IBizFormaPago; FFormasPagoController : IFormasPagoController; public class function GetViewClass : TClass; override; class function DarEtiqueta : String; override; procedure CargarValores; override; procedure GuardarValores; override; end; var frViewConfiguracionDocAlbaran: TfrViewConfiguracionDocAlbaran; implementation {$R *.dfm} { TfrViewConfiguracionDocPresupuesto } uses uFactuGES_App, uTypesConstConfiguration, uPresupuestosClienteController, uBizPresupuestosCliente, uBizDetallesPresupuestoCliente, uDetallesPresupuestoClienteController; procedure TfrViewConfiguracionDocAlbaran.CargarValores; begin inherited; JvGradientHeaderPanel1.LabelCaption := JvGradientHeaderPanel1.LabelCaption + AppFactuGES.EmpresaActiva.NOMBRE; FFormasPago := Nil; FFormasPagoController := TFormasPagoController.Create; FFormasPago := FFormasPagoController.BuscarTodos; dsFormaPago.DataTable := FFormasPago.DataTable; dsFormaPago.DataTable.Active := True; ePlazosEntrega.Lines.Clear; ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_ALBARANES, AppFactuGES.EmpresaActiva.ID); eObservaciones.Lines.Clear; eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_ALBARANES, AppFactuGES.EmpresaActiva.ID); // eCondiciones.Lines.Clear; // eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_ALBARANES, AppFactuGES.EmpresaActiva.ID); // cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_ALBARANES, AppFactuGES.EmpresaActiva.ID); // eFormaPago.Lines.Clear; // eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_ALBARANES); // frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create; // frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_O); end; class function TfrViewConfiguracionDocAlbaran.DarEtiqueta: String; begin Result := 'Documentos de Albarán'; end; class function TfrViewConfiguracionDocAlbaran.GetViewClass: TClass; begin Result := TfrViewConfiguracionDocAlbaran; end; procedure TfrViewConfiguracionDocAlbaran.GuardarValores; begin inherited; // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_ALBARANES, eFormaPago.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_ALBARANES, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ALBARANES, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_ALBARANES, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_ALBARANES, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text); // frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates; end; end.