Se adaptan los informes b para que no salgan datos de la empresa y no pregunte si imprimir con logotipo, se cambia lógica de forma de pago para presupuestos y contratos y que al cambiar de cliente que cambie de forma de pago

git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@81 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
roberto 2013-09-25 17:13:02 +00:00
parent 83dbdcad28
commit f250454cda
42 changed files with 1479 additions and 623 deletions

View File

@ -59,10 +59,6 @@
@ -78,16 +74,16 @@
<DelphiCompile Include="AlbaranesCliente_view.dpk"> <DelphiCompile Include="AlbaranesCliente_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="C:\Documents and Settings\Usuario\AlbaranesCliente_controller.dcp" /> <DCCReference Include="..\..\Formas de pago\AlbaranesCliente_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\AlbaranesCliente_model.dcp" /> <DCCReference Include="..\..\Formas de pago\AlbaranesCliente_model.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\AlbCli_FacCli_relation.dcp" /> <DCCReference Include="..\..\Formas de pago\AlbCli_FacCli_relation.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Almacenes_controller.dcp" /> <DCCReference Include="..\..\Formas de pago\Almacenes_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\ApplicationBase.dcp" /> <DCCReference Include="..\..\Formas de pago\ApplicationBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_view.dcp" /> <DCCReference Include="..\..\Formas de pago\Articulos_view.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" /> <DCCReference Include="..\..\Formas de pago\Base.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" /> <DCCReference Include="..\..\Formas de pago\GUIBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" /> <DCCReference Include="..\..\Formas de pago\rtl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" /> <DCCReference Include="..\..\Formas de pago\vcl.dcp" />
<DCCReference Include="uAlbaranesClienteViewRegister.pas" /> <DCCReference Include="uAlbaranesClienteViewRegister.pas" />
<DCCReference Include="uDialogOpcionesImpresionAlbaranesCliente.pas"> <DCCReference Include="uDialogOpcionesImpresionAlbaranesCliente.pas">
<Form>frDialogOpcionesImpresionAlbaranesCliente</Form> <Form>frDialogOpcionesImpresionAlbaranesCliente</Form>

View File

@ -2,7 +2,6 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
inherited cxGridViewVISIBLE: TcxGridDBColumn [4] inherited cxGridViewVISIBLE: TcxGridDBColumn [4]
Visible = True
end end
inherited cxGridViewVALORADO: TcxGridDBColumn [5] inherited cxGridViewVALORADO: TcxGridDBColumn [5]
Visible = True Visible = True
@ -30,6 +29,16 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
end end
end end
end end
inherited TBXDock1: TTBXDock
inherited TBXToolbar1: TTBXToolbar
DockPos = 0
object BAnadirCapitulo: TTBXSubmenuItem [0]
Caption = 'A'#241'adir Cap'#237'tulo'
object TBXItem14: TTBXItem
end
end
end
end
object cxRichEdit1: TcxRichEdit [3] object cxRichEdit1: TcxRichEdit [3]
Left = 78 Left = 78
Top = 225 Top = 225
@ -48,4 +57,11 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
Height = 25 Height = 25
Width = 145 Width = 145
end end
inherited ActionListContenido: TActionList
object actCapituloVarios: TAction
Category = 'Operaciones'
Caption = 'Cap'#237'tulo de varios'
OnExecute = actCapituloVariosExecute
end
end
end end

View File

@ -25,16 +25,24 @@ type
TfrViewDetallesAlbaranCliente = class(TfrViewDetallesArticulos, IViewDetallesAlbaranCliente) TfrViewDetallesAlbaranCliente = class(TfrViewDetallesArticulos, IViewDetallesAlbaranCliente)
cxRichEdit1: TcxRichEdit; cxRichEdit1: TcxRichEdit;
BAnadirCapitulo: TTBXSubmenuItem;
TBXItem14: TTBXItem;
actCapituloVarios: TAction;
procedure cxGridViewDESCRIPCIONGetPropertiesForEdit( procedure cxGridViewDESCRIPCIONGetPropertiesForEdit(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties); var AProperties: TcxCustomEditProperties);
procedure actCapituloVariosExecute(Sender: TObject);
private
procedure AnadirCapitulo(const Tipo: String;const Descripcion: String; const Descuento:Boolean = false);
protected protected
FAlbaran: IBizAlbaranCliente; FAlbaran: IBizAlbaranCliente;
function GetAlbaran: IBizAlbaranCliente; function GetAlbaran: IBizAlbaranCliente;
procedure SetAlbaran(const Value: IBizAlbaranCliente); procedure SetAlbaran(const Value: IBizAlbaranCliente);
procedure AnadirArticulosInterno; override; procedure AnadirArticulosInterno; override;
procedure RellenarArticulosInterno; override; procedure RellenarArticulosInterno; override;
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override; function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
public public
@ -48,6 +56,13 @@ uses uDetallesAlbaranClienteController, uViewDetallesBase;
{ TfrViewDetallesAlbaranProveedor } { TfrViewDetallesAlbaranProveedor }
procedure TfrViewDetallesAlbaranCliente.actCapituloVariosExecute(
Sender: TObject);
begin
inherited;
// AnadirCapitulo(TIPO_CAPITULO_V, 'VARIOS ');
end;
function TfrViewDetallesAlbaranCliente.AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; function TfrViewDetallesAlbaranCliente.AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean;
begin begin
if (Albaran.TIPO = CTE_TIPO_ALBARAN_DEV) then if (Albaran.TIPO = CTE_TIPO_ALBARAN_DEV) then
@ -64,6 +79,36 @@ begin
(Controller as IDetallesAlbaranClienteController).AnadirArticulos(Detalles, Albaran.Cliente); (Controller as IDetallesAlbaranClienteController).AnadirArticulos(Detalles, Albaran.Cliente);
end; end;
procedure TfrViewDetallesAlbaranCliente.AnadirCapitulo(const Tipo, Descripcion: String; const Descuento: Boolean);
var
bEsMultiSelect : Boolean;
begin
{
// Debo quitar el multiselect porque provoca que se quede seleccionado
// el registro actual y no el nuevo registro que voy a añadir
bEsMultiSelect := _FocusedView.OptionsSelection.MultiSelect;
if bEsMultiSelect then
_FocusedView.OptionsSelection.MultiSelect := False;
ShowHourglassCursor;
_FocusedView.BeginUpdate;
try
if _FocusedView.Controller.EditingController.IsEditing then
_FocusedView.Controller.EditingController.Edit.PostEditValue;
if Assigned(Controller) and Assigned(Detalles) then
(Controller as IDetallesContratoClienteController).AnadirCapitulo(Tipo, Descripcion, Descuento, Detalles)
finally
_FocusedView.EndUpdate;
HideHourglassCursor;
// Dejo la propiedad MultiSelect como estaba
if bEsMultiSelect then
_FocusedView.OptionsSelection.MultiSelect := bEsMultiSelect;
end;
}
end;
procedure TfrViewDetallesAlbaranCliente.cxGridViewDESCRIPCIONGetPropertiesForEdit( procedure TfrViewDetallesAlbaranCliente.cxGridViewDESCRIPCIONGetPropertiesForEdit(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties); var AProperties: TcxCustomEditProperties);

View File

@ -29,6 +29,7 @@ type
property GestorDocumentosController: IGestorDocumentosController read GetGestorDocumentosController write SetGestorDocumentosController; property GestorDocumentosController: IGestorDocumentosController read GetGestorDocumentosController write SetGestorDocumentosController;
procedure RecuperarCliente(AContrato : IBizContratoCliente); procedure RecuperarCliente(AContrato : IBizContratoCliente);
procedure ActualizarFormaDePago(AContrato : IBizContratoCliente; ID_FORMA_PAGO: Integer);
function Buscar(const ID: Integer): IBizContratoCliente; overload; function Buscar(const ID: Integer): IBizContratoCliente; overload;
function Buscar(const ListaID: TIntegerList): IBizContratoCliente; overload; function Buscar(const ListaID: TIntegerList): IBizContratoCliente; overload;
function BuscarTodos: IBizContratoCliente; overload; function BuscarTodos: IBizContratoCliente; overload;
@ -106,6 +107,7 @@ type
function Localizar(AContratos: IBizContratoCliente; const ID : Integer): Boolean; function Localizar(AContratos: IBizContratoCliente; const ID : Integer): Boolean;
procedure RecuperarCliente(AContrato : IBizContratoCliente); procedure RecuperarCliente(AContrato : IBizContratoCliente);
procedure ActualizarFormaDePago(AContrato : IBizContratoCliente; ID_FORMA_PAGO: Integer);
function Eliminar(const ID : Integer): Boolean; overload; function Eliminar(const ID : Integer): Boolean; overload;
function Eliminar(AContrato : IBizContratoCliente; AllItems: Boolean = false): Boolean; overload; function Eliminar(AContrato : IBizContratoCliente; AllItems: Boolean = false): Boolean; overload;
function Guardar(AContrato : IBizContratoCliente): Boolean; function Guardar(AContrato : IBizContratoCliente): Boolean;
@ -159,6 +161,31 @@ uses
{ TContratosClienteController } { TContratosClienteController }
procedure TContratosClienteController.ActualizarFormaDePago(
AContrato: IBizContratoCliente; ID_FORMA_PAGO: Integer);
var
AFormasPago : IBizFormaPago;
AFormasPagoController : IFormasPagoController;
bEnEdicion : Boolean;
begin
AFormasPagoController := TFormasPagoController.Create;
AFormasPago := AFormasPagoController.Buscar(ID_FORMA_PAGO);
AFormasPago.Open;
bEnEdicion := (AContrato.DataTable.State in dsEditModes);
if not bEnEdicion then
AContrato.Edit;
AContrato.ID_FORMA_PAGO := AFormasPago.ID;
AContrato.DataTable.FieldByName(fld_ContratosClienteFORMA_PAGO).AsString := AFormasPago.DESCRIPCION;
if not bEnEdicion then
AContrato.Post;
AFormasPago := NIL;
AFormasPagoController := NIL;
end;
function TContratosClienteController.Anadir(AContrato : IBizContratoCliente; function TContratosClienteController.Anadir(AContrato : IBizContratoCliente;
const ATipo: TEnumTiposContrato = teVarios) : Boolean; const ATipo: TEnumTiposContrato = teVarios) : Boolean;
begin begin

View File

@ -209,51 +209,45 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 831 Width = 831
ExplicitWidth = 831 ExplicitWidth = 831
inherited FontSize: TEdit [5] inherited FontSize: TEdit
Left = 0 Width = 108
Width = 90 ExplicitWidth = 108
ExplicitLeft = 0
ExplicitWidth = 90
end end
inherited UpDown1: TUpDown [6] inherited UpDown1: TUpDown
Left = 90 Left = 253
ExplicitLeft = 90 ExplicitLeft = 253
end
inherited FontName: TJvFontComboBox [7]
Left = 107
ExplicitLeft = 107
end end
inherited ToolButton13: TToolButton inherited ToolButton13: TToolButton
Left = 252 Left = 270
ExplicitLeft = 252 ExplicitLeft = 270
end end
inherited ToolButton6: TToolButton inherited ToolButton6: TToolButton
Left = 260 Left = 278
ExplicitLeft = 260 ExplicitLeft = 278
end end
inherited ToolButton7: TToolButton inherited ToolButton7: TToolButton
Left = 294 Left = 312
ExplicitLeft = 294 ExplicitLeft = 312
end end
inherited ToolButton8: TToolButton inherited ToolButton8: TToolButton
Left = 328 Left = 346
ExplicitLeft = 328 ExplicitLeft = 346
end end
inherited ToolButton12: TToolButton inherited ToolButton12: TToolButton
Left = 362 Left = 380
ExplicitLeft = 362 ExplicitLeft = 380
end end
inherited ToolButton9: TToolButton inherited ToolButton9: TToolButton
Left = 370 Left = 388
ExplicitLeft = 370 ExplicitLeft = 388
end end
inherited ToolButton10: TToolButton inherited ToolButton10: TToolButton
Left = 404 Left = 422
ExplicitLeft = 404 ExplicitLeft = 422
end end
inherited ToolButton11: TToolButton inherited ToolButton11: TToolButton
Left = 438 Left = 456
ExplicitLeft = 438 ExplicitLeft = 456
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid

View File

@ -308,13 +308,26 @@ begin
end; end;
procedure TfEditorContratoCliente.OnClienteChanged(Sender: TObject); procedure TfEditorContratoCliente.OnClienteChanged(Sender: TObject);
var
APrimerCliente : Boolean;
begin begin
if Assigned(FContrato) then if Assigned(FContrato) then
begin begin
APrimerCliente := (FContrato.Cliente.ID = 0);
FContrato.Cliente := ViewContrato.ViewClienteContrato.Cliente; FContrato.Cliente := ViewContrato.ViewClienteContrato.Cliente;
if (FContrato.Detalles.RecordCount > 0) then if (ShowConfirmMessage('Cambio forma de pago', '¿Desea actualizar la forma de pago a la asignada en la ficha del cliente seleccionado?') = IDYES) then
FController.DetallesController.ActualizarDetalles(FContrato.Detalles, FContrato.Cliente); FController.ActualizarFormaDePago(FContrato, FContrato.Cliente.ID_FORMA_PAGO);
if (not APrimerCliente) and (FContrato.Detalles.RecordCount > 0) then begin
if (ShowConfirmMessage('Actualizar los descuentos de las líneas',
'¿Desea actualizar las líneas de detalle con el descuento del cliente?' + #10#13 +
'Sólo se cambiarán las líneas que tengan cantidades.') = IDYES) then
begin
FController.DetallesController.ActualizarDetalles(FContrato.Detalles, FContrato.Cliente);
ShowInfoMessage('Se han actualizado las líneas con el descuento del cliente seleccionado');
end;
end;
end; end;
end; end;

View File

@ -296,10 +296,11 @@ begin
if (AItem.Index in [cxGridViewDESCUENTO.Index]) then if (AItem.Index in [cxGridViewDESCUENTO.Index]) then
begin begin
//Esto es para que solo sea editable la columna dto en las lineas de tipo descuento (para hacer descuento por capitulo), //Esto es para que solo sea editable la columna dto en las lineas de tipo descuento (para hacer descuento por capitulo),
//al comentarlo permitimos que se pueda añadir además descuentos a nivel de lineas //además descuentos a nivel de lineas de detalle
// IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index; IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index;
// if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO) then if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO)
// Result := False and (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_CONCEPTO) then
Result := False
end end
else if (AItem.Index in [cxGridViewPROPIEDAD.Index, cxGridViewTIPO_ARTICULO.Index]) then else if (AItem.Index in [cxGridViewPROPIEDAD.Index, cxGridViewTIPO_ARTICULO.Index]) then
begin begin

View File

@ -49,19 +49,19 @@
<DelphiCompile Include="FacturasCliente_controller.dpk"> <DelphiCompile Include="FacturasCliente_controller.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\..\Contratos de cliente\Views\AlbaranesCliente_controller.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\AlbaranesCliente_model.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\ApplicationBase.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\Articulos_controller.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\Contactos_controller.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\FacturasCliente_data.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\FacturasCliente_model.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\FormasPago_controller.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\RecibosCliente_controller.dcp" />
<DCCReference Include="uArticulosFacturaClienteController.pas" /> <DCCReference Include="uArticulosFacturaClienteController.pas" />
<DCCReference Include="uDetallesFacturaClienteController.pas" /> <DCCReference Include="uDetallesFacturaClienteController.pas" />
<DCCReference Include="uFacturasClienteController.pas" /> <DCCReference Include="uFacturasClienteController.pas" />
<DCCReference Include="uFacturasClienteReportController.pas" /> <DCCReference Include="uFacturasClienteReportController.pas" />
<DCCReference Include="View\AlbaranesCliente_controller.dcp" />
<DCCReference Include="View\AlbaranesCliente_model.dcp" />
<DCCReference Include="View\ApplicationBase.dcp" />
<DCCReference Include="View\Articulos_controller.dcp" />
<DCCReference Include="View\Contactos_controller.dcp" />
<DCCReference Include="View\FacturasCliente_data.dcp" />
<DCCReference Include="View\FacturasCliente_model.dcp" />
<DCCReference Include="View\FormasPago_controller.dcp" />
<DCCReference Include="View\RecibosCliente_controller.dcp" />
<DCCReference Include="View\uIEditorElegirArticulosFacturasCliente.pas" /> <DCCReference Include="View\uIEditorElegirArticulosFacturasCliente.pas" />
<DCCReference Include="View\uIEditorElegirFacturasCliente.pas" /> <DCCReference Include="View\uIEditorElegirFacturasCliente.pas" />
<DCCReference Include="View\uIEditorFacturaCliente.pas" /> <DCCReference Include="View\uIEditorFacturaCliente.pas" />

View File

@ -36,6 +36,7 @@ type
procedure DescartarCambios(AFactura : IBizFacturaCliente); procedure DescartarCambios(AFactura : IBizFacturaCliente);
function Existe(const ID: Integer) : Boolean; function Existe(const ID: Integer) : Boolean;
procedure RecuperarCliente(AFactura : IBizFacturaCliente); procedure RecuperarCliente(AFactura : IBizFacturaCliente);
procedure ActualizarFormaDePago(AFactura : IBizFacturaCliente; ID_FORMA_PAGO: Integer);
function Duplicar(AFactura: IBizFacturaCliente): IBizFacturaCliente; function Duplicar(AFactura: IBizFacturaCliente): IBizFacturaCliente;
function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente; function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente;
@ -101,6 +102,7 @@ type
function Duplicar(AFactura: IBizFacturaCliente): IBizFacturaCliente; function Duplicar(AFactura: IBizFacturaCliente): IBizFacturaCliente;
function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente; function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente;
procedure RecuperarCliente(AFactura : IBizFacturaCliente); procedure RecuperarCliente(AFactura : IBizFacturaCliente);
procedure ActualizarFormaDePago(AFactura : IBizFacturaCliente; ID_FORMA_PAGO: Integer);
procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true);
procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true);
@ -202,6 +204,23 @@ begin
Result := True; Result := True;
end; end;
procedure TFacturasClienteController.ActualizarFormaDePago(
AFactura: IBizFacturaCliente; ID_FORMA_PAGO: Integer);
var
AFormasPago : IBizFormaPago;
AFormasPagoController : IFormasPagoController;
begin
AFormasPagoController := TFormasPagoController.Create;
AFormasPago := AFormasPagoController.Buscar(ID_FORMA_PAGO);
AFormasPago.Open;
AFactura.ID_FORMA_PAGO := AFormasPago.ID;
// AFactura.DataTable.FieldByName(fld_FacturasClienteFORMA_PAGO).AsString := AFormasPago.DESCRIPCION;
AFormasPago := NIL;
AFormasPagoController := NIL;
end;
function TFacturasClienteController.Anadir(AFacturas: IBizFacturaCliente; function TFacturasClienteController.Anadir(AFacturas: IBizFacturaCliente;
AListaAlbaranes: IBizAlbaranCliente): Boolean; AListaAlbaranes: IBizAlbaranCliente): Boolean;
var var

View File

@ -16,11 +16,15 @@
<Projects Include="..\Contactos\Data\Contactos_data.dproj" /> <Projects Include="..\Contactos\Data\Contactos_data.dproj" />
<Projects Include="..\Contactos\Model\Contactos_model.dproj" /> <Projects Include="..\Contactos\Model\Contactos_model.dproj" />
<Projects Include="..\Contactos\Views\Contactos_view.dproj" /> <Projects Include="..\Contactos\Views\Contactos_view.dproj" />
<Projects Include="..\Contratos de cliente\Views\ContratosCliente_view.dproj" />
<Projects Include="..\Gestor de informes\Controller\GestorInformes_controller.dproj" /> <Projects Include="..\Gestor de informes\Controller\GestorInformes_controller.dproj" />
<Projects Include="..\Gestor de informes\Data\GestorInformes_data.dproj" /> <Projects Include="..\Gestor de informes\Data\GestorInformes_data.dproj" />
<Projects Include="..\Gestor de informes\Model\GestorInformes_model.dproj" /> <Projects Include="..\Gestor de informes\Model\GestorInformes_model.dproj" />
<Projects Include="..\Gestor de informes\Plugin\GestorInformes_plugin.dproj" /> <Projects Include="..\Gestor de informes\Plugin\GestorInformes_plugin.dproj" />
<Projects Include="..\Gestor de informes\Views\GestorInformes_view.dproj" /> <Projects Include="..\Gestor de informes\Views\GestorInformes_view.dproj" />
<Projects Include="..\Presupuestos de cliente\Views\PresupuestosCliente_view.dproj" />
<Projects Include="..\Relaciones\Albaranes de cliente - Facturas de cliente\AlbCli_FacCli_relation.dproj" />
<Projects Include="..\Relaciones\Contratos de cliente - Facturas de cliente\ConCli_FacCli_relation.dproj" />
<Projects Include="Controller\FacturasCliente_controller.dproj" /> <Projects Include="Controller\FacturasCliente_controller.dproj" />
<Projects Include="Data\FacturasCliente_data.dproj" /> <Projects Include="Data\FacturasCliente_data.dproj" />
<Projects Include="Model\FacturasCliente_model.dproj" /> <Projects Include="Model\FacturasCliente_model.dproj" />
@ -231,14 +235,50 @@
<Target Name="FactuGES_Server:Make"> <Target Name="FactuGES_Server:Make">
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" /> <MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
</Target> </Target>
<Target Name="ContratosCliente_view">
<MSBuild Projects="..\Contratos de cliente\Views\ContratosCliente_view.dproj" Targets="" />
</Target>
<Target Name="ContratosCliente_view:Clean">
<MSBuild Projects="..\Contratos de cliente\Views\ContratosCliente_view.dproj" Targets="Clean" />
</Target>
<Target Name="ContratosCliente_view:Make">
<MSBuild Projects="..\Contratos de cliente\Views\ContratosCliente_view.dproj" Targets="Make" />
</Target>
<Target Name="PresupuestosCliente_view">
<MSBuild Projects="..\Presupuestos de cliente\Views\PresupuestosCliente_view.dproj" Targets="" />
</Target>
<Target Name="PresupuestosCliente_view:Clean">
<MSBuild Projects="..\Presupuestos de cliente\Views\PresupuestosCliente_view.dproj" Targets="Clean" />
</Target>
<Target Name="PresupuestosCliente_view:Make">
<MSBuild Projects="..\Presupuestos de cliente\Views\PresupuestosCliente_view.dproj" Targets="Make" />
</Target>
<Target Name="AlbCli_FacCli_relation">
<MSBuild Projects="..\Relaciones\Albaranes de cliente - Facturas de cliente\AlbCli_FacCli_relation.dproj" Targets="" />
</Target>
<Target Name="AlbCli_FacCli_relation:Clean">
<MSBuild Projects="..\Relaciones\Albaranes de cliente - Facturas de cliente\AlbCli_FacCli_relation.dproj" Targets="Clean" />
</Target>
<Target Name="AlbCli_FacCli_relation:Make">
<MSBuild Projects="..\Relaciones\Albaranes de cliente - Facturas de cliente\AlbCli_FacCli_relation.dproj" Targets="Make" />
</Target>
<Target Name="ConCli_FacCli_relation">
<MSBuild Projects="..\Relaciones\Contratos de cliente - Facturas de cliente\ConCli_FacCli_relation.dproj" Targets="" />
</Target>
<Target Name="ConCli_FacCli_relation:Clean">
<MSBuild Projects="..\Relaciones\Contratos de cliente - Facturas de cliente\ConCli_FacCli_relation.dproj" Targets="Clean" />
</Target>
<Target Name="ConCli_FacCli_relation:Make">
<MSBuild Projects="..\Relaciones\Contratos de cliente - Facturas de cliente\ConCli_FacCli_relation.dproj" Targets="Make" />
</Target>
<Target Name="Build"> <Target Name="Build">
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_model;Contactos_data;Contactos_controller;Contactos_view;Articulos_controller;Articulos_view;GestorInformes_model;GestorInformes_data;GestorInformes_controller;GestorInformes_view;GestorInformes_plugin;FacturasCliente_model;FacturasCliente_data;FacturasCliente_controller;Contabilidad_view;FacturasCliente_view;FacturasCliente_plugin;FactuGES;FactuGES_Server" /> <CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_model;Contactos_data;Contactos_controller;Contactos_view;Articulos_controller;Articulos_view;GestorInformes_model;GestorInformes_data;GestorInformes_controller;GestorInformes_view;GestorInformes_plugin;FacturasCliente_model;FacturasCliente_data;FacturasCliente_controller;Contabilidad_view;FacturasCliente_view;FacturasCliente_plugin;FactuGES;FactuGES_Server;ContratosCliente_view;PresupuestosCliente_view;AlbCli_FacCli_relation;ConCli_FacCli_relation" />
</Target> </Target>
<Target Name="Clean"> <Target Name="Clean">
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_model:Clean;Contactos_data:Clean;Contactos_controller:Clean;Contactos_view:Clean;Articulos_controller:Clean;Articulos_view:Clean;GestorInformes_model:Clean;GestorInformes_data:Clean;GestorInformes_controller:Clean;GestorInformes_view:Clean;GestorInformes_plugin:Clean;FacturasCliente_model:Clean;FacturasCliente_data:Clean;FacturasCliente_controller:Clean;Contabilidad_view:Clean;FacturasCliente_view:Clean;FacturasCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean" /> <CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_model:Clean;Contactos_data:Clean;Contactos_controller:Clean;Contactos_view:Clean;Articulos_controller:Clean;Articulos_view:Clean;GestorInformes_model:Clean;GestorInformes_data:Clean;GestorInformes_controller:Clean;GestorInformes_view:Clean;GestorInformes_plugin:Clean;FacturasCliente_model:Clean;FacturasCliente_data:Clean;FacturasCliente_controller:Clean;Contabilidad_view:Clean;FacturasCliente_view:Clean;FacturasCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;ContratosCliente_view:Clean;PresupuestosCliente_view:Clean;AlbCli_FacCli_relation:Clean;ConCli_FacCli_relation:Clean" />
</Target> </Target>
<Target Name="Make"> <Target Name="Make">
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_model:Make;Contactos_data:Make;Contactos_controller:Make;Contactos_view:Make;Articulos_controller:Make;Articulos_view:Make;GestorInformes_model:Make;GestorInformes_data:Make;GestorInformes_controller:Make;GestorInformes_view:Make;GestorInformes_plugin:Make;FacturasCliente_model:Make;FacturasCliente_data:Make;FacturasCliente_controller:Make;Contabilidad_view:Make;FacturasCliente_view:Make;FacturasCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make" /> <CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_model:Make;Contactos_data:Make;Contactos_controller:Make;Contactos_view:Make;Articulos_controller:Make;Articulos_view:Make;GestorInformes_model:Make;GestorInformes_data:Make;GestorInformes_controller:Make;GestorInformes_view:Make;GestorInformes_plugin:Make;FacturasCliente_model:Make;FacturasCliente_data:Make;FacturasCliente_controller:Make;Contabilidad_view:Make;FacturasCliente_view:Make;FacturasCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make;ContratosCliente_view:Make;PresupuestosCliente_view:Make;AlbCli_FacCli_relation:Make;ConCli_FacCli_relation:Make" />
</Target> </Target>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" /> <Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project> </Project>

View File

@ -69,9 +69,9 @@ type
procedure DESCUENTOOnChange(Sender: TDACustomField); procedure DESCUENTOOnChange(Sender: TDACustomField);
procedure IVAOnChange(Sender: TDACustomField); procedure IVAOnChange(Sender: TDACustomField);
procedure REOnChange(Sender: TDACustomField); procedure REOnChange(Sender: TDACustomField);
procedure SetID_TIENDAValue(const aValue: Integer); procedure SetID_TIENDAValue(const aValue: Integer);
procedure SetID_SUBCUENTAValue(const aValue: Integer); procedure SetID_SUBCUENTAValue(const aValue: Integer);
procedure OnNewRecord(Sender: TDADataTable); override; procedure OnNewRecord(Sender: TDADataTable); override;
function GetSITUACIONValue: String; override; function GetSITUACIONValue: String; override;
@ -338,8 +338,9 @@ begin
CODIGO_POSTAL := FCliente.CODIGO_POSTAL; CODIGO_POSTAL := FCliente.CODIGO_POSTAL;
PROVINCIA := FCliente.PROVINCIA; PROVINCIA := FCliente.PROVINCIA;
POBLACION := FCliente.POBLACION; POBLACION := FCliente.POBLACION;
if FCliente.ID_FORMA_PAGO > 0 then // 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
ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO; // if FCliente.ID_FORMA_PAGO > 0 then
// ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
if FCliente.ID_TIPO_IVA > 0 then if FCliente.ID_TIPO_IVA > 0 then
ID_TIPO_IVA := FCliente.ID_TIPO_IVA; ID_TIPO_IVA := FCliente.ID_TIPO_IVA;
RECARGO_EQUIVALENCIA := FCliente.RECARGO_EQUIVALENCIA; RECARGO_EQUIVALENCIA := FCliente.RECARGO_EQUIVALENCIA;

View File

@ -1088,11 +1088,11 @@ object RptFacturasCliente: TRptFacturasCliente
Connection = 'IBX' Connection = 'IBX'
TargetTable = 'FACTURAS_CLIENTE_DETALLES' TargetTable = 'FACTURAS_CLIENTE_DETALLES'
SQL = SQL =
'SELECT'#10' ID, ID_FACTURA, POSICION, TIPO_DETALLE, F_RTFTOTEXT(C' + 'SELECT'#10' ID, ID_FACTURA, POSICION, TIPO_DETALLE,'#10' CONCEPTO,' +
'ONCEPTO) AS CONCEPTO,'#10' CONCEPTO AS CONCEPTO_RTF, CANTIDAD,'#10' ' + #10'/*'#10' F_RTFTOTEXT(CONCEPTO) AS CONCEPTO,'#10' CONCEPTO AS CONC' +
' IMPORTE_UNIDAD, DESCUENTO, IMPORTE_TOTAL, VISIBLE, VALORADO'#10'FR' + 'EPTO_RTF,'#10'*/'#10' CANTIDAD,'#10' IMPORTE_UNIDAD, DESCUENTO, IMPORT' +
'OM FACTURAS_CLIENTE_DETALLES'#10'WHERE ID_FACTURA = :ID_FACTURA'#10'ORDE' + 'E_TOTAL, VISIBLE, VALORADO'#10'FROM FACTURAS_CLIENTE_DETALLES'#10'WHERE ' +
'R BY POSICION;'#10 'ID_FACTURA = :ID_FACTURA'#10'ORDER BY POSICION;'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = < ColumnMappings = <
item item
@ -1135,11 +1135,6 @@ object RptFacturasCliente: TRptFacturasCliente
DatasetField = 'DESCUENTO' DatasetField = 'DESCUENTO'
TableField = 'DESCUENTO' TableField = 'DESCUENTO'
end end
item
DatasetField = 'CONCEPTO_RTF'
TableField = 'CONCEPTO'
SQLOrigin = 'CONCEPTO_RTF'
end
item item
DatasetField = 'VALORADO' DatasetField = 'VALORADO'
TableField = 'VALORADO' TableField = 'VALORADO'
@ -1147,10 +1142,6 @@ object RptFacturasCliente: TRptFacturasCliente
end> end>
Name = 'InformeFacturasCliente_Detalles' Name = 'InformeFacturasCliente_Detalles'
Fields = < Fields = <
item
Name = 'VALORADO'
DataType = datSmallInt
end
item item
Name = 'ID' Name = 'ID'
DataType = datAutoInc DataType = datAutoInc
@ -1176,14 +1167,8 @@ object RptFacturasCliente: TRptFacturasCliente
item item
Name = 'CONCEPTO' Name = 'CONCEPTO'
DataType = datString DataType = datString
Size = 32765
DictionaryEntry = 'FacturasCliente_Detalles_CONCEPTO'
end
item
Name = 'CONCEPTO_RTF'
DataType = datString
Size = 2000 Size = 2000
BlobType = dabtMemo DictionaryEntry = 'FacturasCliente_Detalles_CONCEPTO'
end end
item item
Name = 'CANTIDAD' Name = 'CANTIDAD'
@ -1208,6 +1193,10 @@ object RptFacturasCliente: TRptFacturasCliente
Name = 'VISIBLE' Name = 'VISIBLE'
DataType = datSmallInt DataType = datSmallInt
DictionaryEntry = 'FacturasCliente_Detalles_VISIBLE' DictionaryEntry = 'FacturasCliente_Detalles_VISIBLE'
end
item
Name = 'VALORADO'
DataType = datSmallInt
end> end>
end end
item item

View File

@ -49,48 +49,48 @@
<DelphiCompile Include="FacturasCliente_view.dpk"> <DelphiCompile Include="FacturasCliente_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\Controller\View\adortl.dcp" /> <DCCReference Include="..\..\..\Servidor\adortl.dcp" />
<DCCReference Include="..\Controller\View\AlbCli_FacCli_relation.dcp" /> <DCCReference Include="..\..\..\Servidor\AlbCli_FacCli_relation.dcp" />
<DCCReference Include="..\Controller\View\Articulos_view.dcp" /> <DCCReference Include="..\..\..\Servidor\Articulos_view.dcp" />
<DCCReference Include="..\Controller\View\bdertl.dcp" /> <DCCReference Include="..\..\..\Servidor\bdertl.dcp" />
<DCCReference Include="..\Controller\View\Contabilidad_controller.dcp" /> <DCCReference Include="..\..\..\Servidor\Contabilidad_controller.dcp" />
<DCCReference Include="..\Controller\View\Contabilidad_view.dcp" /> <DCCReference Include="..\..\..\Servidor\Contabilidad_view.dcp" />
<DCCReference Include="..\Controller\View\Contactos_view.dcp" /> <DCCReference Include="..\..\..\Servidor\Contactos_view.dcp" />
<DCCReference Include="..\Controller\View\cxDataD11.dcp" /> <DCCReference Include="..\..\..\Servidor\cxDataD11.dcp" />
<DCCReference Include="..\Controller\View\cxEditorsD11.dcp" /> <DCCReference Include="..\..\..\Servidor\cxEditorsD11.dcp" />
<DCCReference Include="..\Controller\View\cxLibraryD11.dcp" /> <DCCReference Include="..\..\..\Servidor\cxLibraryD11.dcp" />
<DCCReference Include="..\Controller\View\DataAbstract_Core_D11.dcp" /> <DCCReference Include="..\..\..\Servidor\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\Controller\View\dbrtl.dcp" /> <DCCReference Include="..\..\..\Servidor\dbrtl.dcp" />
<DCCReference Include="..\Controller\View\dsnap.dcp" /> <DCCReference Include="..\..\..\Servidor\dsnap.dcp" />
<DCCReference Include="..\Controller\View\dxComnD11.dcp" /> <DCCReference Include="..\..\..\Servidor\dxComnD11.dcp" />
<DCCReference Include="..\Controller\View\dxGDIPlusD11.dcp" /> <DCCReference Include="..\..\..\Servidor\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Controller\View\dxLayoutControlD11.dcp" /> <DCCReference Include="..\..\..\Servidor\dxLayoutControlD11.dcp" />
<DCCReference Include="..\Controller\View\dxThemeD11.dcp" /> <DCCReference Include="..\..\..\Servidor\dxThemeD11.dcp" />
<DCCReference Include="..\Controller\View\FacturasCliente_controller.dcp" /> <DCCReference Include="..\..\..\Servidor\FacturasCliente_controller.dcp" />
<DCCReference Include="..\Controller\View\FacturasCliente_model.dcp" /> <DCCReference Include="..\..\..\Servidor\FacturasCliente_model.dcp" />
<DCCReference Include="..\Controller\View\fqb110.dcp" /> <DCCReference Include="..\..\..\Servidor\fqb110.dcp" />
<DCCReference Include="..\Controller\View\frx11.dcp" /> <DCCReference Include="..\..\..\Servidor\frx11.dcp" />
<DCCReference Include="..\Controller\View\frxe11.dcp" /> <DCCReference Include="..\..\..\Servidor\frxe11.dcp" />
<DCCReference Include="..\Controller\View\fs11.dcp" /> <DCCReference Include="..\..\..\Servidor\fs11.dcp" />
<DCCReference Include="..\Controller\View\GestorInformes_controller.dcp" /> <DCCReference Include="..\..\..\Servidor\GestorInformes_controller.dcp" />
<DCCReference Include="..\Controller\View\GUIBase.dcp" /> <DCCReference Include="..\..\..\Servidor\GUIBase.dcp" />
<DCCReference Include="..\Controller\View\Jcl.dcp" /> <DCCReference Include="..\..\..\Servidor\Jcl.dcp" />
<DCCReference Include="..\Controller\View\JclVcl.dcp" /> <DCCReference Include="..\..\..\Servidor\JclVcl.dcp" />
<DCCReference Include="..\Controller\View\JvCoreD11R.dcp" /> <DCCReference Include="..\..\..\Servidor\JvCoreD11R.dcp" />
<DCCReference Include="..\Controller\View\JvPageCompsD11R.dcp" /> <DCCReference Include="..\..\..\Servidor\JvPageCompsD11R.dcp" />
<DCCReference Include="..\Controller\View\JvStdCtrlsD11R.dcp" /> <DCCReference Include="..\..\..\Servidor\JvStdCtrlsD11R.dcp" />
<DCCReference Include="..\Controller\View\JvSystemD11R.dcp" /> <DCCReference Include="..\..\..\Servidor\JvSystemD11R.dcp" />
<DCCReference Include="..\Controller\View\PngComponentsD10.dcp" /> <DCCReference Include="..\..\..\Servidor\PngComponentsD10.dcp" />
<DCCReference Include="..\Controller\View\PNG_D10.dcp" /> <DCCReference Include="..\..\..\Servidor\PNG_D10.dcp" />
<DCCReference Include="..\Controller\View\RemObjects_Core_D11.dcp" /> <DCCReference Include="..\..\..\Servidor\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\Controller\View\rtl.dcp" /> <DCCReference Include="..\..\..\Servidor\rtl.dcp" />
<DCCReference Include="..\Controller\View\tb2k_d10.dcp" /> <DCCReference Include="..\..\..\Servidor\tb2k_d10.dcp" />
<DCCReference Include="..\Controller\View\tbx_d10.dcp" /> <DCCReference Include="..\..\..\Servidor\tbx_d10.dcp" />
<DCCReference Include="..\Controller\View\vcl.dcp" /> <DCCReference Include="..\..\..\Servidor\vcl.dcp" />
<DCCReference Include="..\Controller\View\vclactnband.dcp" /> <DCCReference Include="..\..\..\Servidor\vclactnband.dcp" />
<DCCReference Include="..\Controller\View\vcldb.dcp" /> <DCCReference Include="..\..\..\Servidor\vcldb.dcp" />
<DCCReference Include="..\Controller\View\vcljpg.dcp" /> <DCCReference Include="..\..\..\Servidor\vcljpg.dcp" />
<DCCReference Include="..\Controller\View\vclx.dcp" /> <DCCReference Include="..\..\..\Servidor\vclx.dcp" />
<DCCReference Include="uEditorElegirArticulosFacturaCliente.pas"> <DCCReference Include="uEditorElegirArticulosFacturaCliente.pas">
<Form>fEditorElegirArticulosFacturaCliente</Form> <Form>fEditorElegirArticulosFacturaCliente</Form>
<DesignClass>TForm</DesignClass> <DesignClass>TForm</DesignClass>

View File

@ -246,7 +246,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitHeight = 228 ExplicitHeight = 228
inherited memObservaciones: TcxDBMemo inherited memObservaciones: TcxDBMemo
DataBinding.DataSource = frViewFacturaCliente1.DADataSource DataBinding.DataSource = frViewFacturaCliente1.DADataSource
ExplicitWidth = 783 ExplicitHeight = 228
Height = 228 Height = 228
Width = 521 Width = 521
end end
@ -387,6 +387,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 622 ExplicitWidth = 622
end end
end end
inherited cxRichEdit1: TcxRichEdit
Style.IsFontAssigned = True
end
end end
end end
object pagContabilidad: TTabSheet object pagContabilidad: TTabSheet

View File

@ -310,8 +310,9 @@ var
AVerLogotipo: Boolean; AVerLogotipo: Boolean;
begin begin
inherited; inherited;
AVerLogotipo:= True; AVerLogotipo:= False;
AVerLogotipo := (Application.MessageBox('¿Desea imprimir el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); if(AppFactuGES.EmpresaActiva.IVA > 0) then
AVerLogotipo := (Application.MessageBox('¿Desea imprimir el documento con logotipo?', 'Atención', MB_YESNO) = IDYES);
FController.Print(FFactura, False, aVerLogotipo); FController.Print(FFactura, False, aVerLogotipo);
end; end;
@ -320,6 +321,8 @@ var
// FDetallesController : IDetallesFacturaClienteController; // FDetallesController : IDetallesFacturaClienteController;
AClientesController : IClientesController; AClientesController : IClientesController;
ADireccion : IBizDireccionesContacto; ADireccion : IBizDireccionesContacto;
APrimerCliente : Boolean;
begin begin
FFactura.Cliente := frViewFacturaCliente1.frViewClienteFactura1.Cliente; FFactura.Cliente := frViewFacturaCliente1.frViewClienteFactura1.Cliente;
@ -359,11 +362,23 @@ begin
AClientesController := Nil; AClientesController := Nil;
end; end;
if Assigned(FFactura) then
begin
APrimerCliente := (FFactura.Cliente.ID = 0);
// Si la factura tiene detalles hay que mirar si los descuentos y otros campos if (ShowConfirmMessage('Cambio forma de pago', '¿Desea actualizar la forma de pago a la asignada en la ficha del cliente seleccionado?') = IDYES) then
// para los artículos hay que cambiarlos. FController.ActualizarFormaDePago(FFactura, FFactura.Cliente.ID_FORMA_PAGO);
if (FFactura.Detalles.RecordCount > 0) then
FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Cliente); if (not APrimerCliente) and (FFactura.Detalles.RecordCount > 0) then begin
if (ShowConfirmMessage('Actualizar los descuentos de las líneas',
'¿Desea actualizar las líneas de detalle con el descuento del cliente?' + #10#13 +
'Sólo se cambiarán las líneas que tengan cantidades.') = IDYES) then
begin
FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Cliente);
ShowInfoMessage('Se han actualizado las líneas con el descuento del cliente seleccionado');
end;
end;
end;
end; end;
procedure TfEditorFacturaCliente.pgPaginasChanging(Sender: TObject; procedure TfEditorFacturaCliente.pgPaginasChanging(Sender: TObject;
@ -418,8 +433,9 @@ var
AVerLogotipo: Boolean; AVerLogotipo: Boolean;
begin begin
inherited; inherited;
AverLogotipo:= True; AVerLogotipo:= False;
AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); if(AppFactuGES.EmpresaActiva.IVA > 0) then
AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el documento con logotipo?', 'Atención', MB_YESNO) = IDYES);
FController.Preview(FFactura, False, AVerLogotipo); FController.Preview(FFactura, False, AVerLogotipo);
end; end;

View File

@ -3,7 +3,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
ClientHeight = 666 ClientHeight = 666
ClientWidth = 640 ClientWidth = 640
ExplicitWidth = 648 ExplicitWidth = 648
ExplicitHeight = 700 ExplicitHeight = 704
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
@ -38,7 +38,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
Width = 640 Width = 640
ExplicitWidth = 640 ExplicitWidth = 640
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 632 ExplicitWidth = 640
object TBXSubmenuItem2: TTBXSubmenuItem [0] object TBXSubmenuItem2: TTBXSubmenuItem [0]
Caption = 'Nuevo' Caption = 'Nuevo'
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText
@ -58,7 +58,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
end end
end end
inherited tbxFiltro: TTBXToolbar inherited tbxFiltro: TTBXToolbar
ExplicitWidth = 431 ExplicitWidth = 454
inherited lblAno: TTBXLabelItem inherited lblAno: TTBXLabelItem
Visible = True Visible = True
end end
@ -73,10 +73,10 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
ExplicitWidth = 640 ExplicitWidth = 640
end end
inherited TBXTMain2: TTBXToolbar inherited TBXTMain2: TTBXToolbar
Left = 431 Left = 454
Visible = True Visible = True
ExplicitLeft = 431 ExplicitLeft = 454
ExplicitWidth = 83 ExplicitWidth = 91
object TBXItem40: TTBXItem object TBXItem40: TTBXItem
Action = actInformes Action = actInformes
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText
@ -91,9 +91,9 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
end end
inline frViewFacturasCliente1: TfrViewFacturasCliente [3] inline frViewFacturasCliente1: TfrViewFacturasCliente [3]
Left = 0 Left = 0
Top = 102 Top = 106
Width = 640 Width = 640
Height = 545 Height = 541
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -103,14 +103,14 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
ParentFont = False ParentFont = False
TabOrder = 3 TabOrder = 3
ReadOnly = False ReadOnly = False
ExplicitTop = 102 ExplicitTop = 106
ExplicitWidth = 640 ExplicitWidth = 640
ExplicitHeight = 545 ExplicitHeight = 541
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 640 Width = 640
Height = 417 Height = 413
ExplicitWidth = 640 ExplicitWidth = 640
ExplicitHeight = 417 ExplicitHeight = 413
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = < DataController.Summary.DefaultGroupSummaryItems = <
item item
@ -225,8 +225,8 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
end end
end end
inherited pnlAgrupaciones: TTBXDockablePanel inherited pnlAgrupaciones: TTBXDockablePanel
Top = 519 Top = 515
ExplicitTop = 519 ExplicitTop = 515
ExplicitWidth = 640 ExplicitWidth = 640
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 640 Width = 640

View File

@ -328,7 +328,10 @@ begin
if Assigned(AFacturas) then if Assigned(AFacturas) then
begin begin
AVerLogotipo := (Application.MessageBox('¿Desea imprimir el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); if(AppFactuGES.EmpresaActiva.IVA > 0) then
AVerLogotipo := (Application.MessageBox('¿Desea imprimir el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES)
else
AVerLogotipo := False;
FController.Print(AFacturas, AllItems, AVerLogotipo); FController.Print(AFacturas, AllItems, AVerLogotipo);
end; end;
end; end;
@ -440,7 +443,10 @@ begin
if Assigned(AFacturas) then if Assigned(AFacturas) then
begin begin
AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); if(AppFactuGES.EmpresaActiva.IVA > 0) then
AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES)
else
AVerLogotipo := False;
FController.Preview(AFacturas, AllItems, AVerLogotipo); FController.Preview(AFacturas, AllItems, AVerLogotipo);
end; end;
end; end;

View File

@ -82,10 +82,11 @@ begin
if (AItem.Index in [cxGridViewDESCUENTO.Index]) then if (AItem.Index in [cxGridViewDESCUENTO.Index]) then
begin begin
//Esto es para que solo sea editable la columna dto en las lineas de tipo descuento (para hacer descuento por capitulo), //Esto es para que solo sea editable la columna dto en las lineas de tipo descuento (para hacer descuento por capitulo),
//al comentarlo permitimos que se pueda añadir además descuentos a nivel de lineas //además descuentos a nivel de lineas de detalle
// IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index; IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index;
// if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO) then if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO)
// Result := False and (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_CONCEPTO) then
Result := False
end end
else else
Result := inherited EsTipoEditable(AItem); Result := inherited EsTipoEditable(AItem);

View File

@ -1,6 +1,6 @@
inherited frViewFacturaCliente: TfrViewFacturaCliente inherited frViewFacturaCliente: TfrViewFacturaCliente
Width = 451 Width = 870
Height = 304 Height = 396
Align = alClient Align = alClient
OnCreate = CustomViewCreate OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy OnDestroy = CustomViewDestroy
@ -9,17 +9,19 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
object dxLayoutControl1: TdxLayoutControl object dxLayoutControl1: TdxLayoutControl
Left = 0 Left = 0
Top = 0 Top = 0
Width = 451 Width = 870
Height = 304 Height = 396
Align = alClient Align = alClient
ParentBackground = True ParentBackground = True
TabOrder = 0 TabOrder = 0
TabStop = False TabStop = False
AutoContentSizes = [acsWidth, acsHeight] AutoContentSizes = [acsWidth, acsHeight]
LookAndFeel = dxLayoutOfficeLookAndFeel1 LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 451
ExplicitHeight = 304
DesignSize = ( DesignSize = (
451 870
304) 396)
object eReferencia: TcxDBTextEdit object eReferencia: TcxDBTextEdit
Left = 135 Left = 135
Top = 30 Top = 30
@ -95,7 +97,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Width = 78 Width = 78
end end
object bFormasPago: TButton object bFormasPago: TButton
Left = 241 Left = 301
Top = 135 Top = 135
Width = 132 Width = 132
Height = 23 Height = 23
@ -133,7 +135,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
end end
end end
inline frViewClienteFactura1: TfrViewClienteFactura inline frViewClienteFactura1: TfrViewClienteFactura
Left = 401 Left = 461
Top = 30 Top = 30
Width = 398 Width = 398
Height = 265 Height = 265
@ -145,7 +147,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
ParentFont = False ParentFont = False
TabOrder = 8 TabOrder = 8
ReadOnly = False ReadOnly = False
ExplicitLeft = 401 ExplicitLeft = 461
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 398 ExplicitWidth = 398
ExplicitHeight = 265 ExplicitHeight = 265
@ -175,12 +177,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Width = 276 Width = 276
end end
inherited edtCodigoPostal: TcxDBTextEdit inherited edtCodigoPostal: TcxDBTextEdit
Left = 192 Left = 295
ExplicitLeft = 192 ExplicitLeft = 295
end end
inherited Button3: TBitBtn inherited Button3: TBitBtn
Left = 82 Left = 185
ExplicitLeft = 82 ExplicitLeft = 185
end end
inherited cxDBTextEdit1: TcxDBTextEdit inherited cxDBTextEdit1: TcxDBTextEdit
ExplicitWidth = 283 ExplicitWidth = 283

View File

@ -3,19 +3,31 @@ unit schFormasPagoClient_Intf;
interface interface
uses uses
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; Classes, DB, schBase_Intf, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf;
const const
{ Data table rules ids { Data table rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_FormasPago = '{0AC9176F-E9B6-43BA-B03E-0973D7074140}'; RID_ListaFormasPago = '{776235FF-CAC6-4218-B48B-F7A65098B388}';
RID_FormasPagoPlazos = '{F02E8B61-F06F-48FE-B705-0C42FB672FB5}'; RID_FormasPago = '{E1CB03E0-E72D-4BEE-8D75-1CC2365CD175}';
RID_FormasPagoPlazos = '{1F15DCA8-B016-457C-B9BF-C2FCC23C753E}';
{ Data table names } { Data table names }
nme_ListaFormasPago = 'ListaFormasPago';
nme_FormasPago = 'FormasPago'; nme_FormasPago = 'FormasPago';
nme_FormasPagoPlazos = 'FormasPagoPlazos'; nme_FormasPagoPlazos = 'FormasPagoPlazos';
{ ListaFormasPago fields }
fld_ListaFormasPagoID = 'ID';
fld_ListaFormasPagoREFERENCIA = 'REFERENCIA';
fld_ListaFormasPagoDESCRIPCION = 'DESCRIPCION';
{ ListaFormasPago field indexes }
idx_ListaFormasPagoID = 0;
idx_ListaFormasPagoREFERENCIA = 1;
idx_ListaFormasPagoDESCRIPCION = 2;
{ FormasPago fields } { FormasPago fields }
fld_FormasPagoID = 'ID'; fld_FormasPagoID = 'ID';
fld_FormasPagoREFERENCIA = 'REFERENCIA'; fld_FormasPagoREFERENCIA = 'REFERENCIA';
@ -49,9 +61,68 @@ const
idx_FormasPagoPlazosPORCENTAJE = 3; idx_FormasPagoPlazosPORCENTAJE = 3;
type type
{ IListaFormasPago }
IListaFormasPago = interface(IDAStronglyTypedDataTable)
['{3E5CAFA1-B90A-4306-A6C8-383E34D67F4E}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
function GetIDIsNull: Boolean;
procedure SetIDIsNull(const aValue: Boolean);
function GetREFERENCIAValue: String;
procedure SetREFERENCIAValue(const aValue: String);
function GetREFERENCIAIsNull: Boolean;
procedure SetREFERENCIAIsNull(const aValue: Boolean);
function GetDESCRIPCIONValue: String;
procedure SetDESCRIPCIONValue(const aValue: String);
function GetDESCRIPCIONIsNull: Boolean;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue;
property REFERENCIAIsNull: Boolean read GetREFERENCIAIsNull write SetREFERENCIAIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
end;
{ TListaFormasPagoDataTableRules }
TListaFormasPagoDataTableRules = class(TIntfObjectDADataTableRules, IListaFormasPago)
private
protected
{ Property getters and setters }
function GetIDValue: Integer; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
function GetIDIsNull: Boolean; virtual;
procedure SetIDIsNull(const aValue: Boolean); virtual;
function GetREFERENCIAValue: String; virtual;
procedure SetREFERENCIAValue(const aValue: String); virtual;
function GetREFERENCIAIsNull: Boolean; virtual;
procedure SetREFERENCIAIsNull(const aValue: Boolean); virtual;
function GetDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue;
property REFERENCIAIsNull: Boolean read GetREFERENCIAIsNull write SetREFERENCIAIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ IFormasPago } { IFormasPago }
IFormasPago = interface(IDAStronglyTypedDataTable) IFormasPago = interface(IDAStronglyTypedDataTable)
['{2906012F-51D2-4722-A42A-1A1F0B5F5DA3}'] ['{F6F3FFFE-3ED4-465A-BB14-6C9C1DF460C6}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -170,7 +241,7 @@ type
{ IFormasPagoPlazos } { IFormasPagoPlazos }
IFormasPagoPlazos = interface(IDAStronglyTypedDataTable) IFormasPagoPlazos = interface(IDAStronglyTypedDataTable)
['{6C99169B-3B96-4E95-9886-BFBDAF1C5836}'] ['{B722C361-945E-46B3-B72A-4BACAA99DDF1}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -243,6 +314,81 @@ implementation
uses Variants, uROBinaryHelpers; uses Variants, uROBinaryHelpers;
{ TListaFormasPagoDataTableRules }
constructor TListaFormasPagoDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TListaFormasPagoDataTableRules.Destroy;
begin
inherited;
end;
function TListaFormasPagoDataTableRules.GetIDValue: Integer;
begin
result := DataTable.Fields[idx_ListaFormasPagoID].AsInteger;
end;
procedure TListaFormasPagoDataTableRules.SetIDValue(const aValue: Integer);
begin
DataTable.Fields[idx_ListaFormasPagoID].AsInteger := aValue;
end;
function TListaFormasPagoDataTableRules.GetIDIsNull: boolean;
begin
result := DataTable.Fields[idx_ListaFormasPagoID].IsNull;
end;
procedure TListaFormasPagoDataTableRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ListaFormasPagoID].AsVariant := Null;
end;
function TListaFormasPagoDataTableRules.GetREFERENCIAValue: String;
begin
result := DataTable.Fields[idx_ListaFormasPagoREFERENCIA].AsString;
end;
procedure TListaFormasPagoDataTableRules.SetREFERENCIAValue(const aValue: String);
begin
DataTable.Fields[idx_ListaFormasPagoREFERENCIA].AsString := aValue;
end;
function TListaFormasPagoDataTableRules.GetREFERENCIAIsNull: boolean;
begin
result := DataTable.Fields[idx_ListaFormasPagoREFERENCIA].IsNull;
end;
procedure TListaFormasPagoDataTableRules.SetREFERENCIAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ListaFormasPagoREFERENCIA].AsVariant := Null;
end;
function TListaFormasPagoDataTableRules.GetDESCRIPCIONValue: String;
begin
result := DataTable.Fields[idx_ListaFormasPagoDESCRIPCION].AsString;
end;
procedure TListaFormasPagoDataTableRules.SetDESCRIPCIONValue(const aValue: String);
begin
DataTable.Fields[idx_ListaFormasPagoDESCRIPCION].AsString := aValue;
end;
function TListaFormasPagoDataTableRules.GetDESCRIPCIONIsNull: boolean;
begin
result := DataTable.Fields[idx_ListaFormasPagoDESCRIPCION].IsNull;
end;
procedure TListaFormasPagoDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ListaFormasPagoDESCRIPCION].AsVariant := Null;
end;
{ TFormasPagoDataTableRules } { TFormasPagoDataTableRules }
constructor TFormasPagoDataTableRules.Create(aDataTable: TDADataTable); constructor TFormasPagoDataTableRules.Create(aDataTable: TDADataTable);
begin begin
@ -520,6 +666,7 @@ end;
initialization initialization
RegisterDataTableRules(RID_ListaFormasPago, TListaFormasPagoDataTableRules);
RegisterDataTableRules(RID_FormasPago, TFormasPagoDataTableRules); RegisterDataTableRules(RID_FormasPago, TFormasPagoDataTableRules);
RegisterDataTableRules(RID_FormasPagoPlazos, TFormasPagoPlazosDataTableRules); RegisterDataTableRules(RID_FormasPagoPlazos, TFormasPagoPlazosDataTableRules);

View File

@ -9,13 +9,72 @@ const
{ Delta rules ids { Delta rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_FormasPagoDelta = '{3B5575C3-8103-4890-A2BF-8B93698E666B}'; RID_ListaFormasPagoDelta = '{2D79A54B-D803-456A-B1FB-A117125F8A37}';
RID_FormasPagoPlazosDelta = '{E0326434-91CF-4E0E-B620-9C98B3FF28EA}'; RID_FormasPagoDelta = '{2DDDC640-410D-490A-AA85-63CEC195FA66}';
RID_FormasPagoPlazosDelta = '{41A8A08A-EDF1-4D3E-8657-597F555EFCF5}';
type type
{ IListaFormasPagoDelta }
IListaFormasPagoDelta = interface(IListaFormasPago)
['{2D79A54B-D803-456A-B1FB-A117125F8A37}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldREFERENCIAValue : String;
function GetOldDESCRIPCIONValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
property OldREFERENCIA : String read GetOldREFERENCIAValue;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
end;
{ TListaFormasPagoBusinessProcessorRules }
TListaFormasPagoBusinessProcessorRules = class(TDABusinessProcessorRules, IListaFormasPago, IListaFormasPagoDelta)
private
protected
{ Property getters and setters }
function GetIDValue: Integer; virtual;
function GetIDIsNull: Boolean; virtual;
function GetOldIDValue: Integer; virtual;
function GetOldIDIsNull: Boolean; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
procedure SetIDIsNull(const aValue: Boolean); virtual;
function GetREFERENCIAValue: String; virtual;
function GetREFERENCIAIsNull: Boolean; virtual;
function GetOldREFERENCIAValue: String; virtual;
function GetOldREFERENCIAIsNull: Boolean; virtual;
procedure SetREFERENCIAValue(const aValue: String); virtual;
procedure SetREFERENCIAIsNull(const aValue: Boolean); virtual;
function GetDESCRIPCIONValue: String; virtual;
function GetDESCRIPCIONIsNull: Boolean; virtual;
function GetOldDESCRIPCIONValue: String; virtual;
function GetOldDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull;
property OldID : Integer read GetOldIDValue;
property OldIDIsNull : Boolean read GetOldIDIsNull;
property REFERENCIA : String read GetREFERENCIAValue write SetREFERENCIAValue;
property REFERENCIAIsNull : Boolean read GetREFERENCIAIsNull write SetREFERENCIAIsNull;
property OldREFERENCIA : String read GetOldREFERENCIAValue;
property OldREFERENCIAIsNull : Boolean read GetOldREFERENCIAIsNull;
property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
destructor Destroy; override;
end;
{ IFormasPagoDelta } { IFormasPagoDelta }
IFormasPagoDelta = interface(IFormasPago) IFormasPagoDelta = interface(IFormasPago)
['{3B5575C3-8103-4890-A2BF-8B93698E666B}'] ['{2DDDC640-410D-490A-AA85-63CEC195FA66}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREFERENCIAValue : String; function GetOldREFERENCIAValue : String;
@ -133,7 +192,7 @@ type
{ IFormasPagoPlazosDelta } { IFormasPagoPlazosDelta }
IFormasPagoPlazosDelta = interface(IFormasPagoPlazos) IFormasPagoPlazosDelta = interface(IFormasPagoPlazos)
['{E0326434-91CF-4E0E-B620-9C98B3FF28EA}'] ['{41A8A08A-EDF1-4D3E-8657-597F555EFCF5}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_FORMA_PAGOValue : Integer; function GetOldID_FORMA_PAGOValue : Integer;
@ -206,6 +265,111 @@ implementation
uses uses
Variants, uROBinaryHelpers, uDAInterfaces; Variants, uROBinaryHelpers, uDAInterfaces;
{ TListaFormasPagoBusinessProcessorRules }
constructor TListaFormasPagoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
inherited;
end;
destructor TListaFormasPagoBusinessProcessorRules.Destroy;
begin
inherited;
end;
function TListaFormasPagoBusinessProcessorRules.GetIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoID];
end;
function TListaFormasPagoBusinessProcessorRules.GetIDIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoID]);
end;
function TListaFormasPagoBusinessProcessorRules.GetOldIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaFormasPagoID];
end;
function TListaFormasPagoBusinessProcessorRules.GetOldIDIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ListaFormasPagoID]);
end;
procedure TListaFormasPagoBusinessProcessorRules.SetIDValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoID] := aValue;
end;
procedure TListaFormasPagoBusinessProcessorRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoID] := Null;
end;
function TListaFormasPagoBusinessProcessorRules.GetREFERENCIAValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoREFERENCIA];
end;
function TListaFormasPagoBusinessProcessorRules.GetREFERENCIAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoREFERENCIA]);
end;
function TListaFormasPagoBusinessProcessorRules.GetOldREFERENCIAValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaFormasPagoREFERENCIA];
end;
function TListaFormasPagoBusinessProcessorRules.GetOldREFERENCIAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ListaFormasPagoREFERENCIA]);
end;
procedure TListaFormasPagoBusinessProcessorRules.SetREFERENCIAValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoREFERENCIA] := aValue;
end;
procedure TListaFormasPagoBusinessProcessorRules.SetREFERENCIAIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoREFERENCIA] := Null;
end;
function TListaFormasPagoBusinessProcessorRules.GetDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoDESCRIPCION];
end;
function TListaFormasPagoBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoDESCRIPCION]);
end;
function TListaFormasPagoBusinessProcessorRules.GetOldDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaFormasPagoDESCRIPCION];
end;
function TListaFormasPagoBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ListaFormasPagoDESCRIPCION]);
end;
procedure TListaFormasPagoBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoDESCRIPCION] := aValue;
end;
procedure TListaFormasPagoBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaFormasPagoDESCRIPCION] := Null;
end;
{ TFormasPagoBusinessProcessorRules } { TFormasPagoBusinessProcessorRules }
constructor TFormasPagoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); constructor TFormasPagoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin begin
@ -603,6 +767,7 @@ end;
initialization initialization
RegisterBusinessProcessorRules(RID_ListaFormasPagoDelta, TListaFormasPagoBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_FormasPagoDelta, TFormasPagoBusinessProcessorRules); RegisterBusinessProcessorRules(RID_FormasPagoDelta, TFormasPagoBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_FormasPagoPlazosDelta, TFormasPagoPlazosBusinessProcessorRules); RegisterBusinessProcessorRules(RID_FormasPagoPlazosDelta, TFormasPagoPlazosBusinessProcessorRules);

View File

@ -14,8 +14,8 @@ object srvFormasPago: TsrvFormasPago
DiagramData = DiagramData =
'<Diagrams>'#13#10' <Diagram Name="New Diagram" Left="200" Top="200" W' + '<Diagrams>'#13#10' <Diagram Name="New Diagram" Left="200" Top="200" W' +
'idth="400" Height="300">'#13#10' <Entity Name="FormasPago" Left="0,' + 'idth="400" Height="300">'#13#10' <Entity Name="FormasPago" Left="0,' +
'00" Top="0,00" />'#13#10' <Entity Name="FormasPagoPlazos" Left="393' + '00" Top="0,00" />'#13#10' <Entity Name="FormasPagoPlazos" Left="392' +
',00" Top="97,00" />'#13#10' </Diagram>'#13#10'</Diagrams>'#13#10 ',00" Top="96,00" />'#13#10' </Diagram>'#13#10'</Diagrams>'#13#10
end end
object DataDictionary: TDADataDictionary object DataDictionary: TDADataDictionary
Fields = < Fields = <
@ -108,7 +108,9 @@ object srvFormasPago: TsrvFormasPago
ConnectionType = 'Interbase' ConnectionType = 'Interbase'
Default = True Default = True
Name = 'IBX' Name = 'IBX'
SQL = 'Select ID, DESCRIPCION'#10'from FORMAS_PAGO'#10'order by DESCRIPCION'#10 SQL =
'Select ID, REFERENCIA, DESCRIPCION'#10'from FORMAS_PAGO'#10'order by DES' +
'CRIPCION'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = < ColumnMappings = <
item item
@ -118,6 +120,10 @@ object srvFormasPago: TsrvFormasPago
item item
DatasetField = 'DESCRIPCION' DatasetField = 'DESCRIPCION'
TableField = 'DESCRIPCION' TableField = 'DESCRIPCION'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end> end>
end> end>
Name = 'ListaFormasPago' Name = 'ListaFormasPago'
@ -126,6 +132,11 @@ object srvFormasPago: TsrvFormasPago
Name = 'ID' Name = 'ID'
DataType = datInteger DataType = datInteger
end end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item item
Name = 'DESCRIPCION' Name = 'DESCRIPCION'
DataType = datString DataType = datString

View File

@ -68,6 +68,7 @@ type
property GestorDocumentosController: IGestorDocumentosController read GetGestorDocumentosController write SetGestorDocumentosController; property GestorDocumentosController: IGestorDocumentosController read GetGestorDocumentosController write SetGestorDocumentosController;
procedure RecuperarCliente(APresupuesto : IBizPresupuestoCliente); procedure RecuperarCliente(APresupuesto : IBizPresupuestoCliente);
procedure ActualizarFormaDePago(APresupuesto : IBizPresupuestoCliente; ID_FORMA_PAGO: Integer);
function Buscar(const ID: Integer): IBizPresupuestoCliente; overload; function Buscar(const ID: Integer): IBizPresupuestoCliente; overload;
function Buscar(const ListaID: TIntegerList): IBizPresupuestoCliente; overload; function Buscar(const ListaID: TIntegerList): IBizPresupuestoCliente; overload;
function BuscarTodos: IBizPresupuestoCliente; overload; function BuscarTodos: IBizPresupuestoCliente; overload;
@ -150,6 +151,7 @@ type
function Localizar(APresupuestos: IBizPresupuestoCliente; const ID : Integer): Boolean; function Localizar(APresupuestos: IBizPresupuestoCliente; const ID : Integer): Boolean;
procedure RecuperarCliente(APresupuesto : IBizPresupuestoCliente); procedure RecuperarCliente(APresupuesto : IBizPresupuestoCliente);
procedure ActualizarFormaDePago(APresupuesto : IBizPresupuestoCliente; ID_FORMA_PAGO: Integer);
function Eliminar(const ID : Integer): Boolean; overload; function Eliminar(const ID : Integer): Boolean; overload;
function Eliminar(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false): Boolean; overload; function Eliminar(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false): Boolean; overload;
function Guardar(APresupuesto : IBizPresupuestoCliente): Boolean; function Guardar(APresupuesto : IBizPresupuestoCliente): Boolean;
@ -204,6 +206,22 @@ uses
{ TPresupuestosClienteController } { TPresupuestosClienteController }
procedure TPresupuestosClienteController.ActualizarFormaDePago(APresupuesto: IBizPresupuestoCliente; ID_FORMA_PAGO: Integer);
var
AFormasPago : IBizFormaPago;
AFormasPagoController : IFormasPagoController;
begin
AFormasPagoController := TFormasPagoController.Create;
AFormasPago := AFormasPagoController.Buscar(ID_FORMA_PAGO);
AFormasPago.Open;
APresupuesto.ID_FORMA_PAGO := AFormasPago.ID;
APresupuesto.DataTable.FieldByName(fld_PresupuestosClienteFORMA_PAGO).AsString := AFormasPago.DESCRIPCION;
AFormasPago := NIL;
AFormasPagoController := NIL;
end;
function TPresupuestosClienteController.Anadir(APresupuesto: IBizPresupuestoCliente; const ATipo: TEnumTiposPresupuesto): Boolean; function TPresupuestosClienteController.Anadir(APresupuesto: IBizPresupuestoCliente; const ATipo: TEnumTiposPresupuesto): Boolean;
begin begin
if not Assigned(APresupuesto) then if not Assigned(APresupuesto) then
@ -904,13 +922,13 @@ begin
teCocina: teCocina:
begin begin
APresupuesto.TIPO_PRESUPUESTO := CTE_COCINA; APresupuesto.TIPO_PRESUPUESTO := CTE_COCINA;
APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_COCINA)); APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_COCINA, AppFactuGES.EmpresaActiva.ID));
AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO); AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO);
AFormasPago.Open; AFormasPago.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION); APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_COCINA)); APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_COCINA, AppFactuGES.EmpresaActiva.ID));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_COCINA)); APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_COCINA, AppFactuGES.EmpresaActiva.ID));
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_C, 'MUEBLES DE COCINA ', False, APresupuesto.Detalles); (Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_C, 'MUEBLES DE COCINA ', False, APresupuesto.Detalles);
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'ENCIMERA ', True, APresupuesto.Detalles); (Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'ENCIMERA ', True, APresupuesto.Detalles);
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'ELECTRODOMÉSTICOS ', True, APresupuesto.Detalles); (Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'ELECTRODOMÉSTICOS ', True, APresupuesto.Detalles);
@ -921,51 +939,51 @@ begin
teArmario: teArmario:
begin begin
APresupuesto.TIPO_PRESUPUESTO := CTE_ARMARIO; APresupuesto.TIPO_PRESUPUESTO := CTE_ARMARIO;
APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_ARMARIO)); APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_ARMARIO, AppFactuGES.EmpresaActiva.ID));
AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO); AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO);
AFormasPago.Open; AFormasPago.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION); APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ARMARIO)); APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ARMARIO, AppFactuGES.EmpresaActiva.ID));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_ARMARIO)); APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_ARMARIO, AppFactuGES.EmpresaActiva.ID));
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_AF, 'FRENTE DE ARMARIO Nº ', False, APresupuesto.Detalles); (Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_AF, 'FRENTE DE ARMARIO Nº ', False, APresupuesto.Detalles);
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_AI, 'INTERIOR DE ARMARIO Nº ', False, APresupuesto.Detalles); (Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_AI, 'INTERIOR DE ARMARIO Nº ', False, APresupuesto.Detalles);
end; end;
teBano: teBano:
begin begin
APresupuesto.TIPO_PRESUPUESTO := CTE_BANO; APresupuesto.TIPO_PRESUPUESTO := CTE_BANO;
APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_BANO)); APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_BANO, AppFactuGES.EmpresaActiva.ID));
AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO); AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO);
AFormasPago.Open; AFormasPago.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION); APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_BANO)); APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_BANO, AppFactuGES.EmpresaActiva.ID));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_BANO)); APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_BANO, AppFactuGES.EmpresaActiva.ID));
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_B, 'MUEBLE DE BAÑO Nº ', False, APresupuesto.Detalles); (Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_B, 'MUEBLE DE BAÑO Nº ', False, APresupuesto.Detalles);
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'IMPORTES ', True, APresupuesto.Detalles); (Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'IMPORTES ', True, APresupuesto.Detalles);
end; end;
teElectrodomestico: teElectrodomestico:
begin begin
APresupuesto.TIPO_PRESUPUESTO := CTE_ELECTRODOMESTICO; APresupuesto.TIPO_PRESUPUESTO := CTE_ELECTRODOMESTICO;
APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_ELECTRODOMESTICO)); APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID));
AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO); AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO);
AFormasPago.Open; AFormasPago.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION); APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ELECTRODOMESTICO)); APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_ELECTRODOMESTICO)); APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID));
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_E, 'ELECTRODOMÉSTICOS ', False, APresupuesto.Detalles); (Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_E, 'ELECTRODOMÉSTICOS ', False, APresupuesto.Detalles);
end; end;
teVarios: teVarios:
begin begin
APresupuesto.TIPO_PRESUPUESTO := CTE_VARIOS; APresupuesto.TIPO_PRESUPUESTO := CTE_VARIOS;
APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_VARIOS)); APresupuesto.ID_FORMA_PAGO := StrToInt(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_FORMA_PAGO_VARIOS, AppFactuGES.EmpresaActiva.ID));
AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO); AFormasPago := AFormasPagoController.Buscar(APresupuesto.ID_FORMA_PAGO);
AFormasPago.Open; AFormasPago.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION); APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_VARIOS)); APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_VARIOS, AppFactuGES.EmpresaActiva.ID));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_VARIOS)); APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_VARIOS, AppFactuGES.EmpresaActiva.ID));
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'VARIOS ', False, APresupuesto.Detalles); (Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'VARIOS ', False, APresupuesto.Detalles);
end; end;
end; end;

View File

@ -99,7 +99,7 @@ type
implementation implementation
uses uses
SysUtils, Variants, uDataModuleConfiguracion, uDataModuleUsuarios, Dialogs, uDialogUtils, Windows, SysUtils, Variants, uDataModuleConfiguracion, uDataModuleUsuarios, Dialogs,
uDataTableUtils, DateUtils, uDateUtils, DB, uFactuGES_App, uDataTableUtils, DateUtils, uDateUtils, DB, uFactuGES_App,
uTiposIVAController, uBizTiposIVA, uVendedoresController; uTiposIVAController, uBizTiposIVA, uVendedoresController;
@ -260,7 +260,7 @@ procedure TBizPresupuestoCliente.IniciarValoresPresupuestoNuevo;
begin begin
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
USUARIO := AppFactuGES.UsuarioActivo.UserName; USUARIO := AppFactuGES.UsuarioActivo.UserName;
// ID_FORMA_PAGO := AppFactuGES.EmpresaActiva.ID_FORMA_PAGO; // ID_FORMA_PAGO := AppFactuGES.EmpresaActiva.ID_FORMA_PAGO; //En abeto la forma de pago por defecto la da la configuración de tipo de documento
ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA; ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA;
FECHA_PRESUPUESTO := DateOf(Date); FECHA_PRESUPUESTO := DateOf(Date);
@ -275,9 +275,6 @@ begin
ID_TIENDA := AppFactuGES.TiendaActiva.ID; ID_TIENDA := AppFactuGES.TiendaActiva.ID;
TIENDA := AppFactuGES.TiendaActiva.NOMBRE; TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
Self.DataTable.FieldByName(fld_PresupuestosClienteFORMA_PAGO).AsString := AppFactuGES.FormaPagoDocumentos;
Self.DataTable.FieldByName(fld_PresupuestosClienteOBSERVACIONES).AsString := AppFactuGES.ObservacionesDocumentos;
AsignarVendedor; AsignarVendedor;
end; end;
@ -333,9 +330,10 @@ begin
DataTable.Edit; DataTable.Edit;
ID_CLIENTE := FCliente.ID; ID_CLIENTE := FCliente.ID;
// La forma de pago se establece desde el tipo de documento y aunque cambie de cliente no se cambia la formade pago
// if FCliente.ID_FORMA_PAGO > 0 then // 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
// ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO; // if FCliente.ID_FORMA_PAGO > 0 then
// ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
// Se establece un descuento especial general a petición de angelica // Se establece un descuento especial general a petición de angelica
DESCUENTO := FCliente.DESCUENTO; DESCUENTO := FCliente.DESCUENTO;

View File

@ -19,7 +19,6 @@
<Projects Include="..\Contratos de cliente\Controller\ContratosCliente_controller.dproj" /> <Projects Include="..\Contratos de cliente\Controller\ContratosCliente_controller.dproj" />
<Projects Include="..\Gestion de documentos\Controller\GestorDocumentos_controller.dproj" /> <Projects Include="..\Gestion de documentos\Controller\GestorDocumentos_controller.dproj" />
<Projects Include="..\Gestion de documentos\Data\GestorDocumentos_data.dproj" /> <Projects Include="..\Gestion de documentos\Data\GestorDocumentos_data.dproj" />
<Projects Include="..\Gestor de informes\Controller\GestorInformes_controller.dproj" />
<Projects Include="..\Relaciones\Presupuestos de cliente - Contratos de cliente\PreCli_ConCli_relation.dproj" /> <Projects Include="..\Relaciones\Presupuestos de cliente - Contratos de cliente\PreCli_ConCli_relation.dproj" />
<Projects Include="Controller\PresupuestosCliente_controller.dproj" /> <Projects Include="Controller\PresupuestosCliente_controller.dproj" />
<Projects Include="Data\PresupuestosCliente_data.dproj" /> <Projects Include="Data\PresupuestosCliente_data.dproj" />
@ -222,23 +221,14 @@
<Target Name="FactuGES_Server:Make"> <Target Name="FactuGES_Server:Make">
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" /> <MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
</Target> </Target>
<Target Name="GestorInformes_controller">
<MSBuild Projects="..\Gestor de informes\Controller\GestorInformes_controller.dproj" Targets="" />
</Target>
<Target Name="GestorInformes_controller:Clean">
<MSBuild Projects="..\Gestor de informes\Controller\GestorInformes_controller.dproj" Targets="Clean" />
</Target>
<Target Name="GestorInformes_controller:Make">
<MSBuild Projects="..\Gestor de informes\Controller\GestorInformes_controller.dproj" Targets="Make" />
</Target>
<Target Name="Build"> <Target Name="Build">
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_model;Contactos_data;Contactos_controller;Contactos_view;Articulos_data;Articulos_controller;Articulos_view;PresupuestosCliente_model;PresupuestosCliente_data;GestorDocumentos_data;GestorDocumentos_controller;PresupuestosCliente_controller;ContratosCliente_controller;PreCli_ConCli_relation;PresupuestosCliente_view;PresupuestosCliente_plugin;FactuGES;FactuGES_Server;GestorInformes_controller" /> <CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_model;Contactos_data;Contactos_controller;Contactos_view;Articulos_data;Articulos_controller;Articulos_view;PresupuestosCliente_model;PresupuestosCliente_data;GestorDocumentos_data;GestorDocumentos_controller;PresupuestosCliente_controller;ContratosCliente_controller;PreCli_ConCli_relation;PresupuestosCliente_view;PresupuestosCliente_plugin;FactuGES;FactuGES_Server" />
</Target> </Target>
<Target Name="Clean"> <Target Name="Clean">
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_model:Clean;Contactos_data:Clean;Contactos_controller:Clean;Contactos_view:Clean;Articulos_data:Clean;Articulos_controller:Clean;Articulos_view:Clean;PresupuestosCliente_model:Clean;PresupuestosCliente_data:Clean;GestorDocumentos_data:Clean;GestorDocumentos_controller:Clean;PresupuestosCliente_controller:Clean;ContratosCliente_controller:Clean;PreCli_ConCli_relation:Clean;PresupuestosCliente_view:Clean;PresupuestosCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;GestorInformes_controller:Clean" /> <CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_model:Clean;Contactos_data:Clean;Contactos_controller:Clean;Contactos_view:Clean;Articulos_data:Clean;Articulos_controller:Clean;Articulos_view:Clean;PresupuestosCliente_model:Clean;PresupuestosCliente_data:Clean;GestorDocumentos_data:Clean;GestorDocumentos_controller:Clean;PresupuestosCliente_controller:Clean;ContratosCliente_controller:Clean;PreCli_ConCli_relation:Clean;PresupuestosCliente_view:Clean;PresupuestosCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean" />
</Target> </Target>
<Target Name="Make"> <Target Name="Make">
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_model:Make;Contactos_data:Make;Contactos_controller:Make;Contactos_view:Make;Articulos_data:Make;Articulos_controller:Make;Articulos_view:Make;PresupuestosCliente_model:Make;PresupuestosCliente_data:Make;GestorDocumentos_data:Make;GestorDocumentos_controller:Make;PresupuestosCliente_controller:Make;ContratosCliente_controller:Make;PreCli_ConCli_relation:Make;PresupuestosCliente_view:Make;PresupuestosCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make;GestorInformes_controller:Make" /> <CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_model:Make;Contactos_data:Make;Contactos_controller:Make;Contactos_view:Make;Articulos_data:Make;Articulos_controller:Make;Articulos_view:Make;PresupuestosCliente_model:Make;PresupuestosCliente_data:Make;GestorDocumentos_data:Make;GestorDocumentos_controller:Make;PresupuestosCliente_controller:Make;ContratosCliente_controller:Make;PreCli_ConCli_relation:Make;PresupuestosCliente_view:Make;PresupuestosCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make" />
</Target> </Target>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" /> <Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project> </Project>

View File

@ -49,43 +49,49 @@
<DelphiCompile Include="PresupuestosCliente_view.dpk"> <DelphiCompile Include="PresupuestosCliente_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="adortl.dcp" /> <DCCReference Include="..\..\Formas de pago\adortl.dcp" />
<DCCReference Include="ApplicationBase.dcp" /> <DCCReference Include="..\..\Formas de pago\ApplicationBase.dcp" />
<DCCReference Include="Articulos_view.dcp" /> <DCCReference Include="..\..\Formas de pago\Articulos_view.dcp" />
<DCCReference Include="Base.dcp" /> <DCCReference Include="..\..\Formas de pago\Base.dcp" />
<DCCReference Include="cxDataD11.dcp" /> <DCCReference Include="..\..\Formas de pago\cxDataD11.dcp" />
<DCCReference Include="cxEditorsD11.dcp" /> <DCCReference Include="..\..\Formas de pago\cxEditorsD11.dcp" />
<DCCReference Include="cxExportD11.dcp" /> <DCCReference Include="..\..\Formas de pago\cxExportD11.dcp" />
<DCCReference Include="cxExtEditorsD11.dcp" /> <DCCReference Include="..\..\Formas de pago\cxExtEditorsD11.dcp" />
<DCCReference Include="cxGridD11.dcp" /> <DCCReference Include="..\..\Formas de pago\cxGridD11.dcp" />
<DCCReference Include="cxLibraryD11.dcp" /> <DCCReference Include="..\..\Formas de pago\cxLibraryD11.dcp" />
<DCCReference Include="cxPageControlD11.dcp" /> <DCCReference Include="..\..\Formas de pago\cxPageControlD11.dcp" />
<DCCReference Include="DataAbstract_Core_D11.dcp" /> <DCCReference Include="..\..\Formas de pago\DataAbstract_Core_D11.dcp" />
<DCCReference Include="dbrtl.dcp" /> <DCCReference Include="..\..\Formas de pago\dbrtl.dcp" />
<DCCReference Include="designide.dcp" /> <DCCReference Include="..\..\Formas de pago\designide.dcp" />
<DCCReference Include="dsnap.dcp" /> <DCCReference Include="..\..\Formas de pago\dsnap.dcp" />
<DCCReference Include="dxCoreD11.dcp" /> <DCCReference Include="..\..\Formas de pago\dxCoreD11.dcp" />
<DCCReference Include="dxGDIPlusD11.dcp" /> <DCCReference Include="..\..\Formas de pago\dxGDIPlusD11.dcp" />
<DCCReference Include="dxThemeD11.dcp" /> <DCCReference Include="..\..\Formas de pago\dxThemeD11.dcp" />
<DCCReference Include="GestorInformes_controller.dcp" /> <DCCReference Include="..\..\Formas de pago\GestorInformes_controller.dcp" />
<DCCReference Include="GUIBase.dcp" /> <DCCReference Include="..\..\Formas de pago\GUIBase.dcp" />
<DCCReference Include="GUISDK_D11R.dcp" /> <DCCReference Include="..\..\Formas de pago\GUISDK_D11R.dcp" />
<DCCReference Include="Jcl.dcp" /> <DCCReference Include="..\..\Formas de pago\Jcl.dcp" />
<DCCReference Include="JclVcl.dcp" /> <DCCReference Include="..\..\Formas de pago\JclVcl.dcp" />
<DCCReference Include="JvCoreD11R.dcp" /> <DCCReference Include="..\..\Formas de pago\JvCoreD11R.dcp" />
<DCCReference Include="JvCtrlsD11R.dcp" /> <DCCReference Include="..\..\Formas de pago\JvCtrlsD11R.dcp" />
<DCCReference Include="JvMMD11R.dcp" /> <DCCReference Include="..\..\Formas de pago\JvMMD11R.dcp" />
<DCCReference Include="JvStdCtrlsD11R.dcp" /> <DCCReference Include="..\..\Formas de pago\JvStdCtrlsD11R.dcp" />
<DCCReference Include="JvSystemD11R.dcp" /> <DCCReference Include="..\..\Formas de pago\JvSystemD11R.dcp" />
<DCCReference Include="PngComponentsD10.dcp" /> <DCCReference Include="..\..\Formas de pago\PngComponentsD10.dcp" />
<DCCReference Include="PNG_D10.dcp" /> <DCCReference Include="..\..\Formas de pago\PNG_D10.dcp" />
<DCCReference Include="PreCli_ConCli_relation.dcp" /> <DCCReference Include="..\..\Formas de pago\PreCli_ConCli_relation.dcp" />
<DCCReference Include="PresupuestosCliente_controller.dcp" /> <DCCReference Include="..\..\Formas de pago\PresupuestosCliente_controller.dcp" />
<DCCReference Include="PresupuestosCliente_model.dcp" /> <DCCReference Include="..\..\Formas de pago\PresupuestosCliente_model.dcp" />
<DCCReference Include="RemObjects_Core_D11.dcp" /> <DCCReference Include="..\..\Formas de pago\RemObjects_Core_D11.dcp" />
<DCCReference Include="rtl.dcp" /> <DCCReference Include="..\..\Formas de pago\rtl.dcp" />
<DCCReference Include="tb2k_d10.dcp" /> <DCCReference Include="..\..\Formas de pago\tb2k_d10.dcp" />
<DCCReference Include="tbx_d10.dcp" /> <DCCReference Include="..\..\Formas de pago\tbx_d10.dcp" />
<DCCReference Include="..\..\Formas de pago\vcl.dcp" />
<DCCReference Include="..\..\Formas de pago\vclactnband.dcp" />
<DCCReference Include="..\..\Formas de pago\vcldb.dcp" />
<DCCReference Include="..\..\Formas de pago\vcljpg.dcp" />
<DCCReference Include="..\..\Formas de pago\vclx.dcp" />
<DCCReference Include="..\..\Formas de pago\xmlrtl.dcp" />
<DCCReference Include="uDialogOpcionesImpresionPresupuestosCliente.pas"> <DCCReference Include="uDialogOpcionesImpresionPresupuestosCliente.pas">
<Form>frDialogOpcionesImpresionPresupuestosCliente</Form> <Form>frDialogOpcionesImpresionPresupuestosCliente</Form>
<DesignClass>T</DesignClass> <DesignClass>T</DesignClass>
@ -177,12 +183,6 @@
<Form>frViewTotalesPresupuesto</Form> <Form>frViewTotalesPresupuesto</Form>
<DesignClass>TFrame</DesignClass> <DesignClass>TFrame</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="vcl.dcp" />
<DCCReference Include="vclactnband.dcp" />
<DCCReference Include="vcldb.dcp" />
<DCCReference Include="vcljpg.dcp" />
<DCCReference Include="vclx.dcp" />
<DCCReference Include="xmlrtl.dcp" />
</ItemGroup> </ItemGroup>
</Project> </Project>
<!-- EurekaLog First Line <!-- EurekaLog First Line

View File

@ -178,7 +178,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
inherited pgPaginas: TPageControl inherited pgPaginas: TPageControl
Width = 842 Width = 842
Height = 314 Height = 314
ActivePage = pagContenido
TabOrder = 1 TabOrder = 1
OnChanging = pgPaginasChanging OnChanging = pgPaginasChanging
ExplicitTop = 112 ExplicitTop = 112
@ -189,6 +188,69 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitTop = 24 ExplicitTop = 24
ExplicitWidth = 834 ExplicitWidth = 834
ExplicitHeight = 286 ExplicitHeight = 286
inline frViewPresupuestoCliente1: TfrViewPresupuestoCliente
Left = 0
Top = 0
Width = 834
Height = 286
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitLeft = -61
ExplicitTop = -269
inherited dxLayoutControl1: TdxLayoutControl
Width = 834
Height = 286
inherited memObservaciones: TcxDBMemo
Left = 398
ExplicitLeft = 398
end
inherited bFormasPago: TButton
Left = 236
ExplicitLeft = 236
end
inherited edtFechaDecision: TcxDBDateEdit
Left = 281
ExplicitLeft = 281
end
inherited frViewDatosYSeleccionClientePresupuesto1: TfrViewDatosYSeleccionClientePresupuesto
Left = 398
ExplicitLeft = 398
inherited dxLayoutControl1: TdxLayoutControl
inherited edtNIFCIF: TcxDBTextEdit
Left = 282
ExplicitLeft = 282
end
inherited Button3: TBitBtn
Left = 193
ExplicitLeft = 193
end
inherited Button4: TButton
Left = 362
ExplicitLeft = 362
end
inherited Button5: TButton
Left = 362
ExplicitLeft = 362
end
end
end
inherited memPlazoEntrega: TcxDBMemo
Top = 303
ExplicitTop = 303
end
inherited cbTipoPresupuesto: TcxDBComboBox
Left = 276
ExplicitLeft = 276
end
end
end
end end
object pagContenido: TTabSheet object pagContenido: TTabSheet
Caption = 'Contenido' Caption = 'Contenido'
@ -429,18 +491,16 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
LookAndFeel = dxLayoutOfficeLookAndFeel1 LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 848 ExplicitWidth = 848
inherited Bevel3: TBevel inherited Bevel3: TBevel
Left = 352 Left = 304
Top = 57 Top = 57
Height = 122 ExplicitLeft = 304
ExplicitLeft = 352
ExplicitTop = 57 ExplicitTop = 57
ExplicitHeight = 122
end end
inherited Bevel4: TBevel inherited Bevel4: TBevel
Left = 464 Left = 416
Top = 88 Top = 88
Width = 342 Width = 342
ExplicitLeft = 464 ExplicitLeft = 416
ExplicitTop = 88 ExplicitTop = 88
ExplicitWidth = 342 ExplicitWidth = 342
end end
@ -448,26 +508,20 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Top = 84 Top = 84
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitTop = 84 ExplicitTop = 84
ExplicitWidth = 93
Width = 93
end end
inherited ImporteIVA: TcxDBCurrencyEdit inherited ImporteIVA: TcxDBCurrencyEdit
Left = 535 Left = 487
Top = 108 Top = 108
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 535 ExplicitLeft = 487
ExplicitTop = 108 ExplicitTop = 108
ExplicitWidth = 137
Width = 137
end end
inherited ImporteTotal: TcxDBCurrencyEdit inherited ImporteTotal: TcxDBCurrencyEdit
Left = 465 Left = 417
Top = 189 Top = 189
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 465 ExplicitLeft = 417
ExplicitTop = 189 ExplicitTop = 189
ExplicitWidth = 137
Width = 137
end end
inherited edtDescuento: TcxDBSpinEdit inherited edtDescuento: TcxDBSpinEdit
Top = 84 Top = 84
@ -475,72 +529,60 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitTop = 84 ExplicitTop = 84
end end
inherited edtIVA: TcxDBSpinEdit inherited edtIVA: TcxDBSpinEdit
Left = 464 Left = 416
Top = 108 Top = 108
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 464 ExplicitLeft = 416
ExplicitTop = 108 ExplicitTop = 108
end end
inherited ImporteBase: TcxDBCurrencyEdit inherited ImporteBase: TcxDBCurrencyEdit
Left = 464 Left = 416
Top = 57 Top = 57
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 464 ExplicitLeft = 416
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 92
Width = 92
end end
inherited edtRE: TcxDBSpinEdit inherited edtRE: TcxDBSpinEdit
Left = 464 Left = 416
Top = 162 Top = 162
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 464 ExplicitLeft = 416
ExplicitTop = 162 ExplicitTop = 162
end end
inherited edtIRPF: TcxDBSpinEdit inherited edtIRPF: TcxDBSpinEdit
Left = 464 Left = 416
Top = 135 Top = 135
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 464 ExplicitLeft = 416
ExplicitTop = 135 ExplicitTop = 135
end end
inherited ImporteRE: TcxDBCurrencyEdit inherited ImporteRE: TcxDBCurrencyEdit
Left = 535 Left = 487
Top = 162 Top = 162
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 535 ExplicitLeft = 487
ExplicitTop = 162 ExplicitTop = 162
ExplicitWidth = 56
Width = 56
end end
inherited ImporteIRPF: TcxDBCurrencyEdit inherited ImporteIRPF: TcxDBCurrencyEdit
Left = 535 Left = 487
Top = 135 Top = 135
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 535 ExplicitLeft = 487
ExplicitTop = 135 ExplicitTop = 135
ExplicitWidth = 56
Width = 56
end end
inherited eImporteNeto: TcxDBCurrencyEdit inherited eImporteNeto: TcxDBCurrencyEdit
Top = 57 Top = 57
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 147
Width = 147
end end
inherited ePorte: TcxDBCurrencyEdit inherited ePorte: TcxDBCurrencyEdit
Top = 111 Top = 111
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitTop = 111 ExplicitTop = 111
ExplicitWidth = 147
Width = 147
end end
inherited eIVA: TcxDBLookupComboBox inherited eIVA: TcxDBLookupComboBox
Top = 138 Top = 138
ExplicitTop = 138 ExplicitTop = 138
ExplicitWidth = 81
Width = 81
end end
inherited cbValorado: TcxDBCheckBox inherited cbValorado: TcxDBCheckBox
Left = 11 Left = 11
@ -552,17 +594,15 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Width = 455 Width = 455
end end
inherited bTiposIVA: TButton inherited bTiposIVA: TButton
Left = 204 Left = 156
Top = 138 Top = 138
OnClick = frViewTotales1bTiposIVAClick OnClick = frViewTotales1bTiposIVAClick
ExplicitLeft = 204 ExplicitLeft = 156
ExplicitTop = 138 ExplicitTop = 138
end end
inherited cbRecargoEquivalencia: TcxDBCheckBox inherited cbRecargoEquivalencia: TcxDBCheckBox
Top = 165 Top = 165
ExplicitTop = 165 ExplicitTop = 165
ExplicitWidth = 219
Width = 219
end end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited cxValorado: TdxLayoutItem inherited cxValorado: TdxLayoutItem

View File

@ -39,6 +39,7 @@ type
frViewDocumentosPresupuestoCliente1: TfrViewDocumentosPresupuestoCliente; frViewDocumentosPresupuestoCliente1: TfrViewDocumentosPresupuestoCliente;
frViewDetallesPresupuestoCliente1: TfrViewDetallesPresupuestoCliente; frViewDetallesPresupuestoCliente1: TfrViewDetallesPresupuestoCliente;
frViewTotales1: TfrViewTotalesPresupuesto; frViewTotales1: TfrViewTotalesPresupuesto;
frViewPresupuestoCliente1: TfrViewPresupuestoCliente;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction); procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
@ -85,12 +86,12 @@ type
//Si queremos crear otra vista para el editor heredado solo tendriamos que //Si queremos crear otra vista para el editor heredado solo tendriamos que
//sobreescribir este metodo //sobreescribir este metodo
procedure AsignarVista; virtual; // procedure AsignarVista; virtual;
procedure PonerTitulos(const ATitulo: string = ''); override; procedure PonerTitulos(const ATitulo: string = ''); override;
function GetModified: Boolean; override; function GetModified: Boolean; override;
procedure SetModified(const Value : Boolean); override; procedure SetModified(const Value : Boolean); override;
function PuedoImprimir: Boolean; override; function PuedoImprimir: Boolean; override;
public public
property Controller : IPresupuestosClienteController read GetController write SetController; property Controller : IPresupuestosClienteController read GetController write SetController;
@ -131,28 +132,12 @@ begin
(Sender as TAction).Enabled := HayDatos; (Sender as TAction).Enabled := HayDatos;
end; end;
procedure TfEditorPresupuestoCliente.AsignarVista;
var
AViewPresupuestoCliente: TfrViewPresupuestoCliente;
begin
AViewPresupuestoCliente := TfrViewPresupuestoCliente.create(Self);
with AViewPresupuestoCliente do
begin
Parent := pagGeneral;
Align := alClient;
dxLayoutControl1.LookAndFeel := dxLayoutOfficeLookAndFeel1;
end;
ViewPresupuesto := AViewPresupuestoCliente;
end;
constructor TfEditorPresupuestoCliente.Create(AOwner: TComponent); constructor TfEditorPresupuestoCliente.Create(AOwner: TComponent);
begin begin
inherited; inherited;
pgPaginas.ActivePageIndex := 0; pgPaginas.ActivePageIndex := 0;
AsignarVista; ViewPresupuesto := frViewPresupuestoCliente1;
FTiposIVAController := TTiposIVAController.Create;
FTiposIVAController := TTiposIVAController.Create;
end; end;
procedure TfEditorPresupuestoCliente.CustomEditorClose(Sender: TObject; procedure TfEditorPresupuestoCliente.CustomEditorClose(Sender: TObject;
@ -315,6 +300,9 @@ begin
APrimerCliente := (FPresupuesto.Cliente.ID = 0); APrimerCliente := (FPresupuesto.Cliente.ID = 0);
FPresupuesto.Cliente := ViewPresupuesto.ViewClientePresupuesto.Cliente; FPresupuesto.Cliente := ViewPresupuesto.ViewClientePresupuesto.Cliente;
if (ShowConfirmMessage('Cambio forma de pago', '¿Desea actualizar la forma de pago a la asignada en la ficha del cliente seleccionado?') = IDYES) then
FController.ActualizarFormaDePago(FPresupuesto, FPresupuesto.Cliente.ID_FORMA_PAGO);
if (not APrimerCliente) and (FPresupuesto.Detalles.RecordCount > 0) then begin if (not APrimerCliente) and (FPresupuesto.Detalles.RecordCount > 0) then begin
if (ShowConfirmMessage('Actualizar los descuentos de las líneas', if (ShowConfirmMessage('Actualizar los descuentos de las líneas',
'¿Desea actualizar las líneas de detalle con el descuento del cliente?' + #10#13 + '¿Desea actualizar las líneas de detalle con el descuento del cliente?' + #10#13 +

View File

@ -1,24 +1,24 @@
inherited frViewConfiguracionDocArmario: TfrViewConfiguracionDocArmario inherited frViewConfiguracionDocArmario: TfrViewConfiguracionDocArmario
Width = 762 Width = 854
Height = 683 Height = 610
inherited Panel1: TPanel inherited Panel1: TPanel
Width = 752 Width = 844
TabOrder = 1 TabOrder = 1
inherited Label3: TLabel inherited Label3: TLabel
Width = 740 Width = 832
Visible = False Visible = False
end end
end end
inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel
Width = 762 Width = 854
LabelCaption = 'Configuraci'#243'n de los documentos de armario' LabelCaption = 'Configuraci'#243'n de los documentos de armario de '
TabOrder = 0 TabOrder = 0
end end
object Paginas: TPageControl object Paginas: TPageControl
Left = 0 Left = 0
Top = 68 Top = 68
Width = 762 Width = 854
Height = 615 Height = 542
ActivePage = pagNotas ActivePage = pagNotas
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
@ -34,7 +34,6 @@ inherited frViewConfiguracionDocArmario: TfrViewConfiguracionDocArmario
Width = 76 Width = 76
Height = 13 Height = 13
Caption = 'Forma de pago:' Caption = 'Forma de pago:'
Visible = False
end end
object Label2: TLabel object Label2: TLabel
Left = 11 Left = 11
@ -94,8 +93,8 @@ inherited frViewConfiguracionDocArmario: TfrViewConfiguracionDocArmario
inline frViewConfiguracionCapituloFrente: TfrViewConfiguracionCapitulo inline frViewConfiguracionCapituloFrente: TfrViewConfiguracionCapitulo
Left = 0 Left = 0
Top = 0 Top = 0
Width = 754 Width = 846
Height = 587 Height = 514
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -110,58 +109,104 @@ inherited frViewConfiguracionDocArmario: TfrViewConfiguracionDocArmario
ExplicitWidth = 443 ExplicitWidth = 443
ExplicitHeight = 208 ExplicitHeight = 208
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 754 Width = 846
ExplicitWidth = 754 Height = 24
ExplicitWidth = 846
ExplicitHeight = 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 inherited FontSize: TEdit
Left = 513
Top = 0
Width = 58 Width = 58
ExplicitLeft = 513
ExplicitTop = 0
ExplicitWidth = 58 ExplicitWidth = 58
end end
inherited UpDown1: TUpDown inherited UpDown1: TUpDown
Left = 237 Left = 571
ExplicitLeft = 237 Top = 0
ExplicitLeft = 571
ExplicitTop = 0
end end
inherited ToolButton13: TToolButton inherited ToolButton13: TToolButton
Left = 254 Left = 588
ExplicitLeft = 254 Top = 0
ExplicitLeft = 588
ExplicitTop = 0
end end
inherited ToolButton6: TToolButton inherited ToolButton6: TToolButton
Left = 262 Left = 596
ExplicitLeft = 262 Top = 0
ExplicitLeft = 596
ExplicitTop = 0
end end
inherited ToolButton7: TToolButton inherited ToolButton7: TToolButton
Left = 296 Left = 630
ExplicitLeft = 296 Top = 0
ExplicitLeft = 630
ExplicitTop = 0
end end
inherited ToolButton8: TToolButton inherited ToolButton8: TToolButton
Left = 330 Left = 664
ExplicitLeft = 330 Top = 0
ExplicitLeft = 664
ExplicitTop = 0
end end
inherited ToolButton12: TToolButton inherited ToolButton12: TToolButton
Left = 364 Left = 698
ExplicitLeft = 364 Top = 0
ExplicitLeft = 698
ExplicitTop = 0
end end
inherited ToolButton9: TToolButton inherited ToolButton9: TToolButton
Left = 372 Left = 706
ExplicitLeft = 372 Top = 0
ExplicitLeft = 706
ExplicitTop = 0
end end
inherited ToolButton10: TToolButton inherited ToolButton10: TToolButton
Left = 406 Left = 740
ExplicitLeft = 406 Top = 0
ExplicitLeft = 740
ExplicitTop = 0
end end
inherited ToolButton11: TToolButton inherited ToolButton11: TToolButton
Left = 440 Left = 774
ExplicitLeft = 440 Top = 0
ExplicitLeft = 774
ExplicitTop = 0
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 754 Top = 50
Height = 515 Width = 846
ExplicitWidth = 754 Height = 464
ExplicitHeight = 515 ExplicitTop = 50
ExplicitWidth = 846
ExplicitHeight = 464
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 754 Top = 24
ExplicitWidth = 754 Width = 846
ExplicitTop = 24
ExplicitWidth = 846
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 506
end
end end
inherited cxLookupComboBox: TcxLookupComboBox inherited cxLookupComboBox: TcxLookupComboBox
Style.IsFontAssigned = True Style.IsFontAssigned = True
@ -176,8 +221,8 @@ inherited frViewConfiguracionDocArmario: TfrViewConfiguracionDocArmario
inline frViewConfiguracionCapituloInterior: TfrViewConfiguracionCapitulo inline frViewConfiguracionCapituloInterior: TfrViewConfiguracionCapitulo
Left = 0 Left = 0
Top = 0 Top = 0
Width = 754 Width = 846
Height = 587 Height = 514
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -192,74 +237,104 @@ inherited frViewConfiguracionDocArmario: TfrViewConfiguracionDocArmario
ExplicitWidth = 443 ExplicitWidth = 443
ExplicitHeight = 208 ExplicitHeight = 208
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 754 Width = 846
ExplicitWidth = 754 Height = 24
ExplicitWidth = 846
ExplicitHeight = 24
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Wrap = False Wrap = False
end end
inherited ToolButton14: TToolButton inherited ToolButton14: TToolButton
Left = 334 Left = 334
Top = 0 Top = 0
Wrap = True
ExplicitLeft = 334 ExplicitLeft = 334
ExplicitTop = 0 ExplicitTop = 0
end end
inherited FontName: TJvFontComboBox inherited FontName: TJvFontComboBox
Left = 0 Left = 368
ExplicitLeft = 0 Top = 0
ExplicitLeft = 368
ExplicitTop = 0
end end
inherited FontSize: TEdit inherited FontSize: TEdit
Left = 145 Left = 513
Top = 0
Width = 58 Width = 58
ExplicitLeft = 145 ExplicitLeft = 513
ExplicitTop = 0
ExplicitWidth = 58 ExplicitWidth = 58
end end
inherited UpDown1: TUpDown inherited UpDown1: TUpDown
Left = 219 Left = 589
ExplicitLeft = 219 Top = 0
ExplicitLeft = 589
ExplicitTop = 0
end end
inherited ToolButton13: TToolButton inherited ToolButton13: TToolButton
Left = 236 Left = 606
ExplicitLeft = 236 Top = 0
ExplicitLeft = 606
ExplicitTop = 0
end end
inherited ToolButton6: TToolButton inherited ToolButton6: TToolButton
Left = 244 Left = 614
ExplicitLeft = 244 Top = 0
ExplicitLeft = 614
ExplicitTop = 0
end end
inherited ToolButton7: TToolButton inherited ToolButton7: TToolButton
Left = 278 Left = 648
ExplicitLeft = 278 Top = 0
ExplicitLeft = 648
ExplicitTop = 0
end end
inherited ToolButton8: TToolButton inherited ToolButton8: TToolButton
Left = 312 Left = 682
ExplicitLeft = 312 Top = 0
ExplicitLeft = 682
ExplicitTop = 0
end end
inherited ToolButton12: TToolButton inherited ToolButton12: TToolButton
Left = 346 Left = 716
ExplicitLeft = 346 Top = 0
ExplicitLeft = 716
ExplicitTop = 0
end end
inherited ToolButton9: TToolButton inherited ToolButton9: TToolButton
Left = 354 Left = 724
ExplicitLeft = 354 Top = 0
ExplicitLeft = 724
ExplicitTop = 0
end end
inherited ToolButton10: TToolButton inherited ToolButton10: TToolButton
Left = 388 Left = 758
ExplicitLeft = 388 Top = 0
ExplicitLeft = 758
ExplicitTop = 0
end end
inherited ToolButton11: TToolButton inherited ToolButton11: TToolButton
Left = 422 Left = 792
ExplicitLeft = 422 Top = 0
ExplicitLeft = 792
ExplicitTop = 0
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 754 Top = 50
Height = 515 Width = 846
ExplicitWidth = 754 Height = 464
ExplicitHeight = 515 ExplicitTop = 50
ExplicitWidth = 846
ExplicitHeight = 464
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 754 Top = 24
ExplicitWidth = 754 Width = 846
ExplicitTop = 24
ExplicitWidth = 846
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 506
end
end end
inherited cxLookupComboBox: TcxLookupComboBox inherited cxLookupComboBox: TcxLookupComboBox
Style.IsFontAssigned = True Style.IsFontAssigned = True
@ -279,9 +354,26 @@ inherited frViewConfiguracionDocArmario: TfrViewConfiguracionDocArmario
Lines.Strings = ( Lines.Strings = (
'eCondiciones') 'eCondiciones')
TabOrder = 0 TabOrder = 0
Height = 587 Height = 514
Width = 754 Width = 846
end end
end end
end end
object cbFormaPago: TcxLookupComboBox
Left = 15
Top = 379
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'REFERENCIA'
end>
Properties.ListOptions.ShowHeader = False
Properties.ListSource = dsFormaPago
TabOrder = 3
Width = 529
end
object dsFormaPago: TDADataSource
Left = 552
Top = 376
end
end end

View File

@ -7,7 +7,9 @@ uses
Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo, Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo,
cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls, cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls,
ComCtrls, uCustomView, uViewDetallesBase, uViewDetallesDTO, ComCtrls, uCustomView, uViewDetallesBase, uViewDetallesDTO,
uViewDetallesArticulos, uViewConfiguracionCapitulo; uViewDetallesArticulos, uViewConfiguracionCapitulo, cxGraphics, cxMaskEdit,
cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, DB,
uDAInterfaces, uDADataTable, uFormasPagoController, uBizFormasPago;
type type
TfrViewConfiguracionDocArmario = class(TfrViewConfiguracionBase) TfrViewConfiguracionDocArmario = class(TfrViewConfiguracionBase)
@ -25,6 +27,12 @@ type
frViewConfiguracionCapituloInterior: TfrViewConfiguracionCapitulo; frViewConfiguracionCapituloInterior: TfrViewConfiguracionCapitulo;
pagCondiciones: TTabSheet; pagCondiciones: TTabSheet;
eCondiciones: TcxRichEdit; eCondiciones: TcxRichEdit;
dsFormaPago: TDADataSource;
cbFormaPago: TcxLookupComboBox;
protected
FFormasPago : IBizFormaPago;
FFormasPagoController : IFormasPagoController;
public public
class function GetViewClass : TClass; override; class function GetViewClass : TClass; override;
class function DarEtiqueta : String; override; class function DarEtiqueta : String; override;
@ -45,14 +53,24 @@ uBizDetallesPresupuestoCliente, uDetallesPresupuestoClienteController;
procedure TfrViewConfiguracionDocArmario.CargarValores; procedure TfrViewConfiguracionDocArmario.CargarValores;
begin begin
inherited; inherited;
eFormaPago.Lines.Clear; JvGradientHeaderPanel1.LabelCaption := JvGradientHeaderPanel1.LabelCaption + AppFactuGES.EmpresaActiva.NOMBRE;
eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_ARMARIO);
FFormasPago := Nil;
FFormasPagoController := TFormasPagoController.Create;
FFormasPago := FFormasPagoController.BuscarTodos;
dsFormaPago.DataTable := FFormasPago.DataTable;
dsFormaPago.DataTable.Active := True;
ePlazosEntrega.Lines.Clear; ePlazosEntrega.Lines.Clear;
ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_ARMARIO); ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_ARMARIO, AppFactuGES.EmpresaActiva.ID);
eObservaciones.Lines.Clear; eObservaciones.Lines.Clear;
eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_ARMARIO); eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_ARMARIO, AppFactuGES.EmpresaActiva.ID);
eCondiciones.Lines.Clear; eCondiciones.Lines.Clear;
eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_ARMARIO); eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_ARMARIO, AppFactuGES.EmpresaActiva.ID);
cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_ARMARIO, AppFactuGES.EmpresaActiva.ID);
// eFormaPago.Lines.Clear;
// eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_ARMARIO);
frViewConfiguracionCapituloFrente.Controller := TDetallesPresupuestoClienteController.Create; frViewConfiguracionCapituloFrente.Controller := TDetallesPresupuestoClienteController.Create;
frViewConfiguracionCapituloFrente.Detalles := (frViewConfiguracionCapituloFrente.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_AF); frViewConfiguracionCapituloFrente.Detalles := (frViewConfiguracionCapituloFrente.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_AF);
@ -75,10 +93,11 @@ end;
procedure TfrViewConfiguracionDocArmario.GuardarValores; procedure TfrViewConfiguracionDocArmario.GuardarValores;
begin begin
inherited; inherited;
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_ARMARIO, eFormaPago.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_ARMARIO, eFormaPago.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ARMARIO, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_ARMARIO, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_ARMARIO, eObservaciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ARMARIO, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_ARMARIO, eCondiciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_ARMARIO, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_ARMARIO, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text);
frViewConfiguracionCapituloFrente.Detalles.DataTable.ApplyUpdates; frViewConfiguracionCapituloFrente.Detalles.DataTable.ApplyUpdates;
frViewConfiguracionCapituloInterior.Detalles.DataTable.ApplyUpdates; frViewConfiguracionCapituloInterior.Detalles.DataTable.ApplyUpdates;

View File

@ -1,24 +1,24 @@
inherited frViewConfiguracionDocBANO: TfrViewConfiguracionDocBANO inherited frViewConfiguracionDocBANO: TfrViewConfiguracionDocBANO
Width = 676 Width = 781
Height = 622 Height = 666
inherited Panel1: TPanel inherited Panel1: TPanel
Width = 666 Width = 771
TabOrder = 1 TabOrder = 1
inherited Label3: TLabel inherited Label3: TLabel
Width = 654 Width = 759
Visible = False Visible = False
end end
end end
inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel
Width = 676 Width = 781
LabelCaption = 'Configuraci'#243'n de los documentos de ba'#241'o' LabelCaption = 'Configuraci'#243'n de los documentos de ba'#241'o de '
TabOrder = 0 TabOrder = 0
end end
object paginas: TPageControl object paginas: TPageControl
Left = 0 Left = 0
Top = 68 Top = 68
Width = 676 Width = 781
Height = 554 Height = 598
ActivePage = pagNotas ActivePage = pagNotas
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
@ -34,7 +34,6 @@ inherited frViewConfiguracionDocBANO: TfrViewConfiguracionDocBANO
Width = 76 Width = 76
Height = 13 Height = 13
Caption = 'Forma de pago:' Caption = 'Forma de pago:'
Visible = False
end end
object Label2: TLabel object Label2: TLabel
Left = 11 Left = 11
@ -81,6 +80,19 @@ inherited frViewConfiguracionDocBANO: TfrViewConfiguracionDocBANO
ScrollBars = ssVertical ScrollBars = ssVertical
TabOrder = 2 TabOrder = 2
end end
object cbFormaPago: TcxLookupComboBox
Left = 11
Top = 283
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'REFERENCIA'
end>
Properties.ListOptions.ShowHeader = False
Properties.ListSource = dsFormaPago
TabOrder = 3
Width = 529
end
end end
object pagCapitulo: TTabSheet object pagCapitulo: TTabSheet
Caption = 'Cap'#237'tulo' Caption = 'Cap'#237'tulo'
@ -90,8 +102,8 @@ inherited frViewConfiguracionDocBANO: TfrViewConfiguracionDocBANO
inline frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo inline frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo
Left = 0 Left = 0
Top = 0 Top = 0
Width = 668 Width = 773
Height = 526 Height = 570
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -106,8 +118,8 @@ inherited frViewConfiguracionDocBANO: TfrViewConfiguracionDocBANO
ExplicitWidth = 443 ExplicitWidth = 443
ExplicitHeight = 208 ExplicitHeight = 208
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 668 Width = 773
ExplicitWidth = 668 ExplicitWidth = 773
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Wrap = False Wrap = False
end end
@ -166,14 +178,17 @@ inherited frViewConfiguracionDocBANO: TfrViewConfiguracionDocBANO
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 668 Width = 773
Height = 454 Height = 498
ExplicitWidth = 668 ExplicitWidth = 773
ExplicitHeight = 454 ExplicitHeight = 498
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 668 Width = 773
ExplicitWidth = 668 ExplicitWidth = 773
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 506
end
end end
inherited cxLookupComboBox: TcxLookupComboBox inherited cxLookupComboBox: TcxLookupComboBox
Style.IsFontAssigned = True Style.IsFontAssigned = True
@ -193,9 +208,13 @@ inherited frViewConfiguracionDocBANO: TfrViewConfiguracionDocBANO
Lines.Strings = ( Lines.Strings = (
'eCondiciones') 'eCondiciones')
TabOrder = 0 TabOrder = 0
Height = 526 Height = 570
Width = 668 Width = 773
end end
end end
end end
object dsFormaPago: TDADataSource
Left = 552
Top = 376
end
end end

View File

@ -7,7 +7,9 @@ uses
Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo, Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo,
cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls, cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls,
ComCtrls, uCustomView, uViewDetallesBase, uViewConfiguracionCapitulo, ComCtrls, uCustomView, uViewDetallesBase, uViewConfiguracionCapitulo,
uViewDetallesDTO, uViewDetallesArticulos; uViewDetallesDTO, uViewDetallesArticulos, cxGraphics, DB, uDAInterfaces,
uDADataTable, cxMaskEdit, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit,
cxDBLookupComboBox, uFormasPagoController, uBizFormasPago;
type type
TfrViewConfiguracionDocBANO = class(TfrViewConfiguracionBase) TfrViewConfiguracionDocBANO = class(TfrViewConfiguracionBase)
@ -23,6 +25,12 @@ type
frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo; frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo;
pagCondiciones: TTabSheet; pagCondiciones: TTabSheet;
eCondiciones: TcxRichEdit; eCondiciones: TcxRichEdit;
cbFormaPago: TcxLookupComboBox;
dsFormaPago: TDADataSource;
protected
FFormasPago : IBizFormaPago;
FFormasPagoController : IFormasPagoController;
public public
class function GetViewClass : TClass; override; class function GetViewClass : TClass; override;
class function DarEtiqueta : String; override; class function DarEtiqueta : String; override;
@ -43,14 +51,25 @@ uBizDetallesPresupuestoCliente, uDetallesPresupuestoClienteController;
procedure TfrViewConfiguracionDocBANO.CargarValores; procedure TfrViewConfiguracionDocBANO.CargarValores;
begin begin
inherited; inherited;
eFormaPago.Lines.Clear; JvGradientHeaderPanel1.LabelCaption := JvGradientHeaderPanel1.LabelCaption + AppFactuGES.EmpresaActiva.NOMBRE;
eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_BANO);
FFormasPago := Nil;
FFormasPagoController := TFormasPagoController.Create;
FFormasPago := FFormasPagoController.BuscarTodos;
dsFormaPago.DataTable := FFormasPago.DataTable;
dsFormaPago.DataTable.Active := True;
ePlazosEntrega.Lines.Clear; ePlazosEntrega.Lines.Clear;
ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_BANO); ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_BANO, AppFactuGES.EmpresaActiva.ID);
eObservaciones.Lines.Clear; eObservaciones.Lines.Clear;
eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_BANO); eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_BANO, AppFactuGES.EmpresaActiva.ID);
eCondiciones.Lines.Clear; eCondiciones.Lines.Clear;
eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_BANO); eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_BANO, AppFactuGES.EmpresaActiva.ID);
cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_BANO, AppFactuGES.EmpresaActiva.ID);
// eFormaPago.Lines.Clear;
// eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_BANO);
frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create; frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create;
frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_B); frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_B);
@ -69,10 +88,11 @@ end;
procedure TfrViewConfiguracionDocBANO.GuardarValores; procedure TfrViewConfiguracionDocBANO.GuardarValores;
begin begin
inherited; inherited;
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_BANO, eFormaPago.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_BANO, eFormaPago.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_BANO, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_BANO, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_BANO, eObservaciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_BANO, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_BANO, eCondiciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_BANO, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_BANO, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text);
frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates; frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates;
end; end;

View File

@ -1,24 +1,24 @@
inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina
Width = 666 Width = 640
Height = 607 Height = 635
inherited Panel1: TPanel inherited Panel1: TPanel
Width = 656 Width = 630
TabOrder = 1 TabOrder = 1
inherited Label3: TLabel inherited Label3: TLabel
Width = 644 Width = 618
Visible = False Visible = False
end end
end end
inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel
Width = 666 Width = 640
LabelCaption = 'Configuraci'#243'n de los documentos de cocina' LabelCaption = 'Configuraci'#243'n de los documentos de cocina para '
TabOrder = 0 TabOrder = 0
end end
object Paginas: TPageControl object Paginas: TPageControl
Left = 0 Left = 0
Top = 68 Top = 68
Width = 666 Width = 640
Height = 539 Height = 567
ActivePage = pagNotas ActivePage = pagNotas
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
@ -34,7 +34,6 @@ inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina
Width = 76 Width = 76
Height = 13 Height = 13
Caption = 'Forma de pago:' Caption = 'Forma de pago:'
Visible = False
end end
object Label2: TLabel object Label2: TLabel
Left = 11 Left = 11
@ -43,7 +42,7 @@ inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina
Height = 13 Height = 13
Caption = 'Plazos de entrega:' Caption = 'Plazos de entrega:'
end end
object Label4: TLabel object loo: TLabel
Left = 11 Left = 11
Top = 145 Top = 145
Width = 75 Width = 75
@ -81,6 +80,19 @@ inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina
ScrollBars = ssVertical ScrollBars = ssVertical
TabOrder = 2 TabOrder = 2
end end
object cbFormaPago: TcxLookupComboBox
Left = 11
Top = 283
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'REFERENCIA'
end>
Properties.ListOptions.ShowHeader = False
Properties.ListSource = dsFormaPago
TabOrder = 3
Width = 529
end
end end
object pagCapitulo: TTabSheet object pagCapitulo: TTabSheet
Caption = 'Cap'#237'tulo' Caption = 'Cap'#237'tulo'
@ -90,8 +102,8 @@ inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina
inline frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo inline frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo
Left = 0 Left = 0
Top = 0 Top = 0
Width = 658 Width = 632
Height = 511 Height = 539
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -106,8 +118,8 @@ inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina
ExplicitWidth = 443 ExplicitWidth = 443
ExplicitHeight = 208 ExplicitHeight = 208
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 658 Width = 632
ExplicitWidth = 658 ExplicitWidth = 443
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Wrap = False Wrap = False
end end
@ -128,21 +140,21 @@ inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina
ExplicitLeft = 145 ExplicitLeft = 145
ExplicitWidth = 58 ExplicitWidth = 58
end end
inherited UpDown1: TUpDown inherited ToolButton13: TToolButton [7]
Left = 203 Left = 203
ExplicitLeft = 203 ExplicitLeft = 203
end end
inherited ToolButton13: TToolButton inherited ToolButton6: TToolButton [8]
Left = 220 Left = 211
ExplicitLeft = 220 ExplicitLeft = 211
end end
inherited ToolButton6: TToolButton inherited ToolButton7: TToolButton [9]
Left = 228 Left = 245
ExplicitLeft = 228 ExplicitLeft = 245
end end
inherited ToolButton7: TToolButton inherited UpDown1: TUpDown [10]
Left = 262 Left = 279
ExplicitLeft = 262 ExplicitLeft = 279
end end
inherited ToolButton8: TToolButton inherited ToolButton8: TToolButton
Left = 296 Left = 296
@ -166,14 +178,17 @@ inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 658 Width = 632
Height = 439 Height = 467
ExplicitWidth = 658 ExplicitWidth = 443
ExplicitHeight = 439 ExplicitHeight = 136
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 658 Width = 632
ExplicitWidth = 658 ExplicitWidth = 443
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 506
end
end end
inherited cxLookupComboBox: TcxLookupComboBox inherited cxLookupComboBox: TcxLookupComboBox
Style.IsFontAssigned = True Style.IsFontAssigned = True
@ -193,9 +208,13 @@ inherited frViewConfiguracionDocCocina: TfrViewConfiguracionDocCocina
Lines.Strings = ( Lines.Strings = (
'eCondiciones') 'eCondiciones')
TabOrder = 0 TabOrder = 0
Height = 511 Height = 539
Width = 658 Width = 632
end end
end end
end end
object dsFormaPago: TDADataSource
Left = 552
Top = 376
end
end end

View File

@ -7,7 +7,10 @@ uses
Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo, Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo,
cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls, cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls,
ComCtrls, uCustomView, uViewDetallesBase, uViewDetallesDTO, ComCtrls, uCustomView, uViewDetallesBase, uViewDetallesDTO,
uViewDetallesArticulos, uViewConfiguracionCapitulo; uViewDetallesArticulos, uViewConfiguracionCapitulo,
uFormasPagoController, uBizFormasPago, cxGraphics, DB, uDAInterfaces,
uDADataTable, cxMaskEdit, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit,
cxDBLookupComboBox;
type type
TfrViewConfiguracionDocCocina = class(TfrViewConfiguracionBase) TfrViewConfiguracionDocCocina = class(TfrViewConfiguracionBase)
@ -15,7 +18,7 @@ type
pagNotas: TTabSheet; pagNotas: TTabSheet;
Label1: TLabel; Label1: TLabel;
Label2: TLabel; Label2: TLabel;
Label4: TLabel; loo: TLabel;
ePlazosEntrega: TMemo; ePlazosEntrega: TMemo;
eFormaPago: TMemo; eFormaPago: TMemo;
eObservaciones: TMemo; eObservaciones: TMemo;
@ -23,6 +26,11 @@ type
frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo; frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo;
pagCondiciones: TTabSheet; pagCondiciones: TTabSheet;
eCondiciones: TcxRichEdit; eCondiciones: TcxRichEdit;
cbFormaPago: TcxLookupComboBox;
dsFormaPago: TDADataSource;
protected
FFormasPago : IBizFormaPago;
FFormasPagoController : IFormasPagoController;
public public
class function GetViewClass : TClass; override; class function GetViewClass : TClass; override;
class function DarEtiqueta : String; override; class function DarEtiqueta : String; override;
@ -40,14 +48,24 @@ uBizDetallesPresupuestoCliente, uDetallesPresupuestoClienteController;
procedure TfrViewConfiguracionDocCocina.CargarValores; procedure TfrViewConfiguracionDocCocina.CargarValores;
begin begin
inherited; inherited;
eFormaPago.Lines.Clear; JvGradientHeaderPanel1.LabelCaption := JvGradientHeaderPanel1.LabelCaption + AppFactuGES.EmpresaActiva.NOMBRE;
eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_COCINA);
FFormasPago := Nil;
FFormasPagoController := TFormasPagoController.Create;
FFormasPago := FFormasPagoController.BuscarTodos;
dsFormaPago.DataTable := FFormasPago.DataTable;
dsFormaPago.DataTable.Active := True;
ePlazosEntrega.Lines.Clear; ePlazosEntrega.Lines.Clear;
ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_COCINA); ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_COCINA, AppFactuGES.EmpresaActiva.ID);
eObservaciones.Lines.Clear; eObservaciones.Lines.Clear;
eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_COCINA); eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_COCINA, AppFactuGES.EmpresaActiva.ID);
eCondiciones.Lines.Clear; eCondiciones.Lines.Clear;
eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_COCINA); eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_COCINA, AppFactuGES.EmpresaActiva.ID);
cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_COCINA, AppFactuGES.EmpresaActiva.ID);
// eFormaPago.Lines.Clear;
// eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_COCINA, AppFactuGES.EmpresaActiva.ID);
frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create; frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create;
frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_C); frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_C);
@ -66,12 +84,15 @@ end;
procedure TfrViewConfiguracionDocCocina.GuardarValores; procedure TfrViewConfiguracionDocCocina.GuardarValores;
begin begin
inherited; inherited;
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_COCINA, eFormaPago.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_COCINA, AppFactuGES.EmpresaActiva.ID, eFormaPago.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_COCINA, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_COCINA, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_COCINA, eObservaciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_COCINA, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_COCINA, eCondiciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_COCINA, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_COCINA, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text);
frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates; frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates;
FFormasPago := Nil;
FFormasPagoController := NIL;
end; end;

View File

@ -1,24 +1,24 @@
inherited frViewConfiguracionDocElectrodomestico: TfrViewConfiguracionDocElectrodomestico inherited frViewConfiguracionDocElectrodomestico: TfrViewConfiguracionDocElectrodomestico
Width = 714 Width = 912
Height = 598 Height = 633
inherited Panel1: TPanel inherited Panel1: TPanel
Width = 704 Width = 902
TabOrder = 1 TabOrder = 1
inherited Label3: TLabel inherited Label3: TLabel
Width = 692 Width = 890
Visible = False Visible = False
end end
end end
inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel
Width = 714 Width = 912
LabelCaption = 'Configuraci'#243'n de los documentos de electrodom'#233'sticos' LabelCaption = 'Configuraci'#243'n de los documentos de electrodom'#233'sticos de '
TabOrder = 0 TabOrder = 0
end end
object Paginas: TPageControl object Paginas: TPageControl
Left = 0 Left = 0
Top = 68 Top = 68
Width = 714 Width = 912
Height = 530 Height = 565
ActivePage = pagNotas ActivePage = pagNotas
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
@ -34,7 +34,6 @@ inherited frViewConfiguracionDocElectrodomestico: TfrViewConfiguracionDocElectro
Width = 76 Width = 76
Height = 13 Height = 13
Caption = 'Forma de pago:' Caption = 'Forma de pago:'
Visible = False
end end
object Label2: TLabel object Label2: TLabel
Left = 11 Left = 11
@ -81,6 +80,19 @@ inherited frViewConfiguracionDocElectrodomestico: TfrViewConfiguracionDocElectro
ScrollBars = ssVertical ScrollBars = ssVertical
TabOrder = 2 TabOrder = 2
end end
object cbFormaPago: TcxLookupComboBox
Left = 11
Top = 283
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'REFERENCIA'
end>
Properties.ListOptions.ShowHeader = False
Properties.ListSource = dsFormaPago
TabOrder = 3
Width = 529
end
end end
object pagCapitulo: TTabSheet object pagCapitulo: TTabSheet
Caption = 'Cap'#237'tulo' Caption = 'Cap'#237'tulo'
@ -90,8 +102,8 @@ inherited frViewConfiguracionDocElectrodomestico: TfrViewConfiguracionDocElectro
inline frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo inline frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo
Left = 0 Left = 0
Top = 0 Top = 0
Width = 706 Width = 904
Height = 502 Height = 537
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -106,74 +118,104 @@ inherited frViewConfiguracionDocElectrodomestico: TfrViewConfiguracionDocElectro
ExplicitWidth = 443 ExplicitWidth = 443
ExplicitHeight = 208 ExplicitHeight = 208
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 706 Width = 904
ExplicitWidth = 706 Height = 24
ExplicitWidth = 904
ExplicitHeight = 24
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Wrap = False Wrap = False
end end
inherited ToolButton14: TToolButton inherited ToolButton14: TToolButton
Left = 334 Left = 334
Top = 0 Top = 0
Wrap = True
ExplicitLeft = 334 ExplicitLeft = 334
ExplicitTop = 0 ExplicitTop = 0
end end
inherited FontName: TJvFontComboBox inherited FontName: TJvFontComboBox
Left = 0 Left = 368
ExplicitLeft = 0 Top = 0
ExplicitLeft = 368
ExplicitTop = 0
end end
inherited FontSize: TEdit inherited FontSize: TEdit
Left = 145 Left = 513
Top = 0
Width = 58 Width = 58
ExplicitLeft = 145 ExplicitLeft = 513
ExplicitTop = 0
ExplicitWidth = 58 ExplicitWidth = 58
end end
inherited UpDown1: TUpDown inherited UpDown1: TUpDown
Left = 219 Left = 571
ExplicitLeft = 219 Top = 0
ExplicitLeft = 571
ExplicitTop = 0
end end
inherited ToolButton13: TToolButton inherited ToolButton13: TToolButton
Left = 236 Left = 588
ExplicitLeft = 236 Top = 0
ExplicitLeft = 588
ExplicitTop = 0
end end
inherited ToolButton6: TToolButton inherited ToolButton6: TToolButton
Left = 244 Left = 596
ExplicitLeft = 244 Top = 0
ExplicitLeft = 596
ExplicitTop = 0
end end
inherited ToolButton7: TToolButton inherited ToolButton7: TToolButton
Left = 278 Left = 630
ExplicitLeft = 278 Top = 0
ExplicitLeft = 630
ExplicitTop = 0
end end
inherited ToolButton8: TToolButton inherited ToolButton8: TToolButton
Left = 312 Left = 664
ExplicitLeft = 312 Top = 0
ExplicitLeft = 664
ExplicitTop = 0
end end
inherited ToolButton12: TToolButton inherited ToolButton12: TToolButton
Left = 346 Left = 698
ExplicitLeft = 346 Top = 0
ExplicitLeft = 698
ExplicitTop = 0
end end
inherited ToolButton9: TToolButton inherited ToolButton9: TToolButton
Left = 354 Left = 706
ExplicitLeft = 354 Top = 0
ExplicitLeft = 706
ExplicitTop = 0
end end
inherited ToolButton10: TToolButton inherited ToolButton10: TToolButton
Left = 388 Left = 740
ExplicitLeft = 388 Top = 0
ExplicitLeft = 740
ExplicitTop = 0
end end
inherited ToolButton11: TToolButton inherited ToolButton11: TToolButton
Left = 422 Left = 774
ExplicitLeft = 422 Top = 0
ExplicitLeft = 774
ExplicitTop = 0
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 706 Top = 50
Height = 430 Width = 904
ExplicitWidth = 706 Height = 487
ExplicitHeight = 430 ExplicitTop = 50
ExplicitWidth = 904
ExplicitHeight = 487
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 706 Top = 24
ExplicitWidth = 706 Width = 904
ExplicitTop = 24
ExplicitWidth = 904
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 506
end
end end
inherited cxLookupComboBox: TcxLookupComboBox inherited cxLookupComboBox: TcxLookupComboBox
Style.IsFontAssigned = True Style.IsFontAssigned = True
@ -193,9 +235,13 @@ inherited frViewConfiguracionDocElectrodomestico: TfrViewConfiguracionDocElectro
Lines.Strings = ( Lines.Strings = (
'eCondiciones') 'eCondiciones')
TabOrder = 0 TabOrder = 0
Height = 502 Height = 537
Width = 706 Width = 904
end end
end end
end end
object dsFormaPago: TDADataSource
Left = 552
Top = 376
end
end end

View File

@ -7,7 +7,9 @@ uses
Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo, Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo,
cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls, cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls,
ComCtrls, uCustomView, uViewDetallesBase, uViewDetallesDTO, ComCtrls, uCustomView, uViewDetallesBase, uViewDetallesDTO,
uViewDetallesArticulos, uViewConfiguracionCapitulo; uViewDetallesArticulos, uViewConfiguracionCapitulo, cxGraphics, cxMaskEdit,
cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, DB,
uDAInterfaces, uDADataTable, uFormasPagoController, uBizFormasPago;
type type
TfrViewConfiguracionDocElectrodomestico = class(TfrViewConfiguracionBase) TfrViewConfiguracionDocElectrodomestico = class(TfrViewConfiguracionBase)
@ -23,6 +25,12 @@ type
frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo; frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo;
pagCondiciones: TTabSheet; pagCondiciones: TTabSheet;
eCondiciones: TcxRichEdit; eCondiciones: TcxRichEdit;
dsFormaPago: TDADataSource;
cbFormaPago: TcxLookupComboBox;
protected
FFormasPago : IBizFormaPago;
FFormasPagoController : IFormasPagoController;
public public
class function GetViewClass : TClass; override; class function GetViewClass : TClass; override;
class function DarEtiqueta : String; override; class function DarEtiqueta : String; override;
@ -43,15 +51,25 @@ uBizDetallesPresupuestoCliente, uDetallesPresupuestoClienteController;
procedure TfrViewConfiguracionDocElectrodomestico.CargarValores; procedure TfrViewConfiguracionDocElectrodomestico.CargarValores;
begin begin
inherited; inherited;
eFormaPago.Lines.Clear; JvGradientHeaderPanel1.LabelCaption := JvGradientHeaderPanel1.LabelCaption + AppFactuGES.EmpresaActiva.NOMBRE;
eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_ELECTRODOMESTICO);
ePlazosEntrega.Lines.Clear;
ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_ELECTRODOMESTICO);
eObservaciones.Lines.Clear;
eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_ELECTRODOMESTICO);
eCondiciones.Lines.Clear;
eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_ELECTRODOMESTICO);
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_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID);
eObservaciones.Lines.Clear;
eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID);
eCondiciones.Lines.Clear;
eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID);
cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID);
// eFormaPago.Lines.Clear;
// eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_ELECTRODOMESTICO);
frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create; frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create;
frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_E); frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_E);
end; end;
@ -69,10 +87,11 @@ end;
procedure TfrViewConfiguracionDocElectrodomestico.GuardarValores; procedure TfrViewConfiguracionDocElectrodomestico.GuardarValores;
begin begin
inherited; inherited;
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_ELECTRODOMESTICO, eFormaPago.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_ELECTRODOMESTICO, eFormaPago.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ELECTRODOMESTICO, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_ELECTRODOMESTICO, eObservaciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_ELECTRODOMESTICO, eCondiciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_ELECTRODOMESTICO, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text);
frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates; frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates;
end; end;

View File

@ -1,23 +1,23 @@
inherited frViewConfiguracionDocObra: TfrViewConfiguracionDocObra inherited frViewConfiguracionDocObra: TfrViewConfiguracionDocObra
Width = 719 Width = 788
Height = 538 Height = 645
inherited Panel1: TPanel inherited Panel1: TPanel
Width = 709 Width = 778
TabOrder = 1 TabOrder = 1
inherited Label3: TLabel inherited Label3: TLabel
Width = 697 Width = 766
end end
end end
inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel
Width = 719 Width = 788
LabelCaption = 'Configuraci'#243'n de los documentos de obra' LabelCaption = 'Configuraci'#243'n de los documentos de obra de '
TabOrder = 0 TabOrder = 0
end end
object paginas: TPageControl object paginas: TPageControl
Left = 0 Left = 0
Top = 68 Top = 68
Width = 719 Width = 788
Height = 470 Height = 577
ActivePage = pagNotas ActivePage = pagNotas
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
@ -33,7 +33,6 @@ inherited frViewConfiguracionDocObra: TfrViewConfiguracionDocObra
Width = 76 Width = 76
Height = 13 Height = 13
Caption = 'Forma de pago:' Caption = 'Forma de pago:'
Visible = False
end end
object Label2: TLabel object Label2: TLabel
Left = 11 Left = 11
@ -80,6 +79,19 @@ inherited frViewConfiguracionDocObra: TfrViewConfiguracionDocObra
ScrollBars = ssVertical ScrollBars = ssVertical
TabOrder = 2 TabOrder = 2
end end
object cbFormaPago: TcxLookupComboBox
Left = 11
Top = 285
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'REFERENCIA'
end>
Properties.ListOptions.ShowHeader = False
Properties.ListSource = dsFormaPago
TabOrder = 3
Width = 529
end
end end
object pagCapitulo: TTabSheet object pagCapitulo: TTabSheet
Caption = 'Cap'#237'tulo' Caption = 'Cap'#237'tulo'
@ -89,8 +101,8 @@ inherited frViewConfiguracionDocObra: TfrViewConfiguracionDocObra
inline frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo inline frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo
Left = 0 Left = 0
Top = 0 Top = 0
Width = 711 Width = 780
Height = 442 Height = 549
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -105,8 +117,8 @@ inherited frViewConfiguracionDocObra: TfrViewConfiguracionDocObra
ExplicitWidth = 443 ExplicitWidth = 443
ExplicitHeight = 208 ExplicitHeight = 208
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 711 Width = 780
ExplicitWidth = 711 ExplicitWidth = 780
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Wrap = False Wrap = False
end end
@ -128,51 +140,54 @@ inherited frViewConfiguracionDocObra: TfrViewConfiguracionDocObra
ExplicitWidth = 58 ExplicitWidth = 58
end end
inherited UpDown1: TUpDown inherited UpDown1: TUpDown
Left = 219 Left = 203
ExplicitLeft = 219 ExplicitLeft = 203
end end
inherited ToolButton13: TToolButton inherited ToolButton13: TToolButton
Left = 236 Left = 220
ExplicitLeft = 236 ExplicitLeft = 220
end end
inherited ToolButton6: TToolButton inherited ToolButton6: TToolButton
Left = 244 Left = 228
ExplicitLeft = 244 ExplicitLeft = 228
end end
inherited ToolButton7: TToolButton inherited ToolButton7: TToolButton
Left = 278 Left = 262
ExplicitLeft = 278 ExplicitLeft = 262
end end
inherited ToolButton8: TToolButton inherited ToolButton8: TToolButton
Left = 312 Left = 296
ExplicitLeft = 312 ExplicitLeft = 296
end end
inherited ToolButton12: TToolButton inherited ToolButton12: TToolButton
Left = 346 Left = 330
ExplicitLeft = 346 ExplicitLeft = 330
end end
inherited ToolButton9: TToolButton inherited ToolButton9: TToolButton
Left = 354 Left = 338
ExplicitLeft = 354 ExplicitLeft = 338
end end
inherited ToolButton10: TToolButton inherited ToolButton10: TToolButton
Left = 388 Left = 372
ExplicitLeft = 388 ExplicitLeft = 372
end end
inherited ToolButton11: TToolButton inherited ToolButton11: TToolButton
Left = 422 Left = 406
ExplicitLeft = 422 ExplicitLeft = 406
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 711 Width = 780
Height = 370 Height = 477
ExplicitWidth = 711 ExplicitWidth = 780
ExplicitHeight = 370 ExplicitHeight = 477
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 711 Width = 780
ExplicitWidth = 711 ExplicitWidth = 780
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 506
end
end end
inherited cxLookupComboBox: TcxLookupComboBox inherited cxLookupComboBox: TcxLookupComboBox
Style.IsFontAssigned = True Style.IsFontAssigned = True
@ -192,9 +207,13 @@ inherited frViewConfiguracionDocObra: TfrViewConfiguracionDocObra
Lines.Strings = ( Lines.Strings = (
'eCondiciones') 'eCondiciones')
TabOrder = 0 TabOrder = 0
Height = 442 Height = 549
Width = 711 Width = 780
end end
end end
end end
object dsFormaPago: TDADataSource
Left = 552
Top = 376
end
end end

View File

@ -7,7 +7,9 @@ uses
Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo, Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo,
cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls, cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls,
ComCtrls, uCustomView, uViewDetallesBase, uViewDetallesDTO, ComCtrls, uCustomView, uViewDetallesBase, uViewDetallesDTO,
uViewDetallesArticulos, uViewConfiguracionCapitulo; uViewDetallesArticulos, uViewConfiguracionCapitulo, cxGraphics, cxMaskEdit,
cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, DB,
uDAInterfaces, uDADataTable, uFormasPagoController, uBizFormasPago;
type type
TfrViewConfiguracionDocObra = class(TfrViewConfiguracionBase) TfrViewConfiguracionDocObra = class(TfrViewConfiguracionBase)
@ -23,6 +25,12 @@ type
frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo; frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo;
pagCondiciones: TTabSheet; pagCondiciones: TTabSheet;
eCondiciones: TcxRichEdit; eCondiciones: TcxRichEdit;
dsFormaPago: TDADataSource;
cbFormaPago: TcxLookupComboBox;
protected
FFormasPago : IBizFormaPago;
FFormasPagoController : IFormasPagoController;
public public
class function GetViewClass : TClass; override; class function GetViewClass : TClass; override;
class function DarEtiqueta : String; override; class function DarEtiqueta : String; override;
@ -43,14 +51,24 @@ uBizDetallesPresupuestoCliente, uDetallesPresupuestoClienteController;
procedure TfrViewConfiguracionDocObra.CargarValores; procedure TfrViewConfiguracionDocObra.CargarValores;
begin begin
inherited; inherited;
eFormaPago.Lines.Clear; JvGradientHeaderPanel1.LabelCaption := JvGradientHeaderPanel1.LabelCaption + AppFactuGES.EmpresaActiva.NOMBRE;
eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_OBRA);
FFormasPago := Nil;
FFormasPagoController := TFormasPagoController.Create;
FFormasPago := FFormasPagoController.BuscarTodos;
dsFormaPago.DataTable := FFormasPago.DataTable;
dsFormaPago.DataTable.Active := True;
ePlazosEntrega.Lines.Clear; ePlazosEntrega.Lines.Clear;
ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_OBRA); ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_OBRA, AppFactuGES.EmpresaActiva.ID);
eObservaciones.Lines.Clear; eObservaciones.Lines.Clear;
eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_OBRA); eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_OBRA, AppFactuGES.EmpresaActiva.ID);
eCondiciones.Lines.Clear; eCondiciones.Lines.Clear;
eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_OBRA); eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_OBRA, AppFactuGES.EmpresaActiva.ID);
cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_OBRA, AppFactuGES.EmpresaActiva.ID);
// eFormaPago.Lines.Clear;
// eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_OBRA);
frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create; frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create;
frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_O); frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_O);
@ -69,10 +87,11 @@ end;
procedure TfrViewConfiguracionDocObra.GuardarValores; procedure TfrViewConfiguracionDocObra.GuardarValores;
begin begin
inherited; inherited;
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_OBRA, eFormaPago.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_OBRA, eFormaPago.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_OBRA, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_OBRA, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_OBRA, eObservaciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_OBRA, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_OBRA, eCondiciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_OBRA, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_OBRA, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text);
frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates; frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates;
end; end;

View File

@ -1,30 +1,29 @@
inherited frViewConfiguracionDocVarios: TfrViewConfiguracionDocVarios inherited frViewConfiguracionDocVarios: TfrViewConfiguracionDocVarios
Width = 836 Width = 970
Height = 606 Height = 619
inherited Panel1: TPanel inherited Panel1: TPanel
Width = 826 Width = 960
TabOrder = 1 TabOrder = 1
inherited Label3: TLabel inherited Label3: TLabel
Width = 814 Width = 948
end end
end end
inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel inherited JvGradientHeaderPanel1: TJvGradientHeaderPanel
Width = 836 Width = 970
LabelCaption = 'Configuraci'#243'n de los documentos de varios' LabelCaption = 'Configuraci'#243'n de los documentos de varios de '
TabOrder = 0 TabOrder = 0
end end
object PageControl1: TPageControl object PageControl1: TPageControl
Left = 0 Left = 0
Top = 68 Top = 68
Width = 836 Width = 970
Height = 538 Height = 551
ActivePage = pagNotas ActivePage = pagNotas
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
object pagNotas: TTabSheet object pagNotas: TTabSheet
Caption = 'Notas' Caption = 'Notas'
ExplicitWidth = 443 ExplicitLeft = 3
ExplicitHeight = 208
object Label1: TLabel object Label1: TLabel
Left = 11 Left = 11
Top = 262 Top = 262
@ -78,6 +77,19 @@ inherited frViewConfiguracionDocVarios: TfrViewConfiguracionDocVarios
ScrollBars = ssVertical ScrollBars = ssVertical
TabOrder = 2 TabOrder = 2
end end
object cbFormaPago: TcxLookupComboBox
Left = 11
Top = 283
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'REFERENCIA'
end>
Properties.ListOptions.ShowHeader = False
Properties.ListSource = dsFormaPago
TabOrder = 3
Width = 529
end
end end
object pagCondiciones: TTabSheet object pagCondiciones: TTabSheet
Caption = 'Condiciones' Caption = 'Condiciones'
@ -92,9 +104,13 @@ inherited frViewConfiguracionDocVarios: TfrViewConfiguracionDocVarios
Lines.Strings = ( Lines.Strings = (
'eCondiciones') 'eCondiciones')
TabOrder = 0 TabOrder = 0
Height = 510 Height = 523
Width = 828 Width = 962
end end
end end
end end
object dsFormaPago: TDADataSource
Left = 552
Top = 376
end
end end

View File

@ -6,7 +6,8 @@ uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo, Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo,
cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls, cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls,
ComCtrls; ComCtrls, cxGraphics, DB, uDAInterfaces, uDADataTable, cxMaskEdit,
cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, uFormasPagoController, uBizFormasPago;
type type
TfrViewConfiguracionDocVarios = class(TfrViewConfiguracionBase) TfrViewConfiguracionDocVarios = class(TfrViewConfiguracionBase)
@ -20,6 +21,12 @@ type
eFormaPago: TMemo; eFormaPago: TMemo;
eObservaciones: TMemo; eObservaciones: TMemo;
eCondiciones: TcxRichEdit; eCondiciones: TcxRichEdit;
cbFormaPago: TcxLookupComboBox;
dsFormaPago: TDADataSource;
protected
FFormasPago : IBizFormaPago;
FFormasPagoController : IFormasPagoController;
public public
class function GetViewClass : TClass; override; class function GetViewClass : TClass; override;
class function DarEtiqueta : String; override; class function DarEtiqueta : String; override;
@ -39,14 +46,25 @@ uses uFactuGES_App, uConfiguracionController, uPresupuestosClienteController;
procedure TfrViewConfiguracionDocVarios.CargarValores; procedure TfrViewConfiguracionDocVarios.CargarValores;
begin begin
inherited; inherited;
eFormaPago.Lines.Clear; JvGradientHeaderPanel1.LabelCaption := JvGradientHeaderPanel1.LabelCaption + AppFactuGES.EmpresaActiva.NOMBRE;
eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_VARIOS);
FFormasPago := Nil;
FFormasPagoController := TFormasPagoController.Create;
FFormasPago := FFormasPagoController.BuscarTodos;
dsFormaPago.DataTable := FFormasPago.DataTable;
dsFormaPago.DataTable.Active := True;
ePlazosEntrega.Lines.Clear; ePlazosEntrega.Lines.Clear;
ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_VARIOS); ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_VARIOS, AppFactuGES.EmpresaActiva.ID);
eObservaciones.Lines.Clear; eObservaciones.Lines.Clear;
eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_VARIOS); eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_VARIOS, AppFactuGES.EmpresaActiva.ID);
eCondiciones.Lines.Clear; eCondiciones.Lines.Clear;
eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_VARIOS); eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_VARIOS, AppFactuGES.EmpresaActiva.ID);
cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_VARIOS, AppFactuGES.EmpresaActiva.ID);
// eFormaPago.Lines.Clear;
// eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_VARIOS);
end; end;
class function TfrViewConfiguracionDocVarios.DarEtiqueta: String; class function TfrViewConfiguracionDocVarios.DarEtiqueta: String;
@ -62,10 +80,11 @@ end;
procedure TfrViewConfiguracionDocVarios.GuardarValores; procedure TfrViewConfiguracionDocVarios.GuardarValores;
begin begin
inherited; inherited;
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_VARIOS, eFormaPago.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_VARIOS, eFormaPago.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_VARIOS, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_VARIOS, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_VARIOS, eObservaciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_VARIOS, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_VARIOS, eCondiciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_VARIOS, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text);
AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_VARIOS, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text);
end; end;

View File

@ -307,10 +307,11 @@ begin
if (AItem.Index in [cxGridViewDESCUENTO.Index]) then if (AItem.Index in [cxGridViewDESCUENTO.Index]) then
begin begin
//Esto es para que solo sea editable la columna dto en las lineas de tipo descuento (para hacer descuento por capitulo), //Esto es para que solo sea editable la columna dto en las lineas de tipo descuento (para hacer descuento por capitulo),
//al comentarlo permitimos que se pueda añadir además descuentos a nivel de lineas //además descuentos a nivel de lineas de detalle
// IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index; IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index;
// if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO) then if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO)
// Result := False and (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_CONCEPTO) then
Result := False
end end
else if (AItem.Index in [cxGridViewPROPIEDAD.Index, cxGridViewTIPO_ARTICULO.Index]) then else if (AItem.Index in [cxGridViewPROPIEDAD.Index, cxGridViewTIPO_ARTICULO.Index]) then
begin begin

View File

@ -66,14 +66,14 @@ begin
AFactura.DESCUENTO := AContrato.DESCUENTO; AFactura.DESCUENTO := AContrato.DESCUENTO;
AFactura.IMPORTE_DESCUENTO := AContrato.IMPORTE_DESCUENTO; AFactura.IMPORTE_DESCUENTO := AContrato.IMPORTE_DESCUENTO;
AFactura.BASE_IMPONIBLE := AContrato.BASE_IMPONIBLE; AFactura.BASE_IMPONIBLE := AContrato.BASE_IMPONIBLE;
AFactura.ID_TIPO_IVA := AContrato.ID_TIPO_IVA; // AFactura.ID_TIPO_IVA := AContrato.ID_TIPO_IVA;
AFactura.IVA := AContrato.IVA; // AFactura.IVA := AContrato.IVA;
AFactura.IMPORTE_IVA := AContrato.IMPORTE_IVA; // AFactura.IMPORTE_IVA := AContrato.IMPORTE_IVA;
AFactura.IMPORTE_TOTAL := AContrato.IMPORTE_TOTAL; AFactura.IMPORTE_TOTAL := AContrato.IMPORTE_TOTAL;
// AFactura.ID_VENDEDOR := AContrato.ID_VENDEDOR; // AFactura.ID_VENDEDOR := AContrato.ID_VENDEDOR;
AFactura.RECARGO_EQUIVALENCIA := AContrato.RECARGO_EQUIVALENCIA; // AFactura.RECARGO_EQUIVALENCIA := AContrato.RECARGO_EQUIVALENCIA;
AFactura.RE := AContrato.RE; // AFactura.RE := AContrato.RE;
AFactura.IMPORTE_RE := AContrato.IMPORTE_RE; // AFactura.IMPORTE_RE := AContrato.IMPORTE_RE;
AFactura.ID_CONTRATO := AContrato.ID; AFactura.ID_CONTRATO := AContrato.ID;
AFactura.ID_FORMA_PAGO := AContrato.ID_FORMA_PAGO; AFactura.ID_FORMA_PAGO := AContrato.ID_FORMA_PAGO;
end; end;
@ -199,8 +199,9 @@ begin
AFactura.ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; AFactura.ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
AFactura.ID_TIENDA := AppFactuGES.TiendaActiva.ID; AFactura.ID_TIENDA := AppFactuGES.TiendaActiva.ID;
AFactura.TIENDA := AppFactuGES.TiendaActiva.NOMBRE; AFactura.TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
CopiarContratoAFactura(AContrato, AFactura); CopiarContratoAFactura(AContrato, AFactura);
AFactura.ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA; //SIEMPRE SE ASIGNARÄ EL IVA DE LA EMPRESA ACTIVA
CopiarDetallesAFactura(AContrato, AFactura, AContrato.Detalles); CopiarDetallesAFactura(AContrato, AFactura, AContrato.Detalles);
//Sustituir por if de guardar //Sustituir por if de guardar