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">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="C:\Documents and Settings\Usuario\AlbaranesCliente_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\AlbaranesCliente_model.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\AlbCli_FacCli_relation.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Almacenes_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\ApplicationBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_view.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
<DCCReference Include="..\..\Formas de pago\AlbaranesCliente_controller.dcp" />
<DCCReference Include="..\..\Formas de pago\AlbaranesCliente_model.dcp" />
<DCCReference Include="..\..\Formas de pago\AlbCli_FacCli_relation.dcp" />
<DCCReference Include="..\..\Formas de pago\Almacenes_controller.dcp" />
<DCCReference Include="..\..\Formas de pago\ApplicationBase.dcp" />
<DCCReference Include="..\..\Formas de pago\Articulos_view.dcp" />
<DCCReference Include="..\..\Formas de pago\Base.dcp" />
<DCCReference Include="..\..\Formas de pago\GUIBase.dcp" />
<DCCReference Include="..\..\Formas de pago\rtl.dcp" />
<DCCReference Include="..\..\Formas de pago\vcl.dcp" />
<DCCReference Include="uAlbaranesClienteViewRegister.pas" />
<DCCReference Include="uDialogOpcionesImpresionAlbaranesCliente.pas">
<Form>frDialogOpcionesImpresionAlbaranesCliente</Form>

View File

@ -2,7 +2,6 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
inherited cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewVISIBLE: TcxGridDBColumn [4]
Visible = True
end
inherited cxGridViewVALORADO: TcxGridDBColumn [5]
Visible = True
@ -30,6 +29,16 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
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]
Left = 78
Top = 225
@ -48,4 +57,11 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
Height = 25
Width = 145
end
inherited ActionListContenido: TActionList
object actCapituloVarios: TAction
Category = 'Operaciones'
Caption = 'Cap'#237'tulo de varios'
OnExecute = actCapituloVariosExecute
end
end
end

View File

@ -25,16 +25,24 @@ type
TfrViewDetallesAlbaranCliente = class(TfrViewDetallesArticulos, IViewDetallesAlbaranCliente)
cxRichEdit1: TcxRichEdit;
BAnadirCapitulo: TTBXSubmenuItem;
TBXItem14: TTBXItem;
actCapituloVarios: TAction;
procedure cxGridViewDESCRIPCIONGetPropertiesForEdit(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
procedure actCapituloVariosExecute(Sender: TObject);
private
procedure AnadirCapitulo(const Tipo: String;const Descripcion: String; const Descuento:Boolean = false);
protected
FAlbaran: IBizAlbaranCliente;
function GetAlbaran: IBizAlbaranCliente;
procedure SetAlbaran(const Value: IBizAlbaranCliente);
procedure AnadirArticulosInterno; override;
procedure RellenarArticulosInterno; override;
procedure RellenarArticulosInterno; override;
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
public
@ -48,6 +56,13 @@ uses uDetallesAlbaranClienteController, uViewDetallesBase;
{ TfrViewDetallesAlbaranProveedor }
procedure TfrViewDetallesAlbaranCliente.actCapituloVariosExecute(
Sender: TObject);
begin
inherited;
// AnadirCapitulo(TIPO_CAPITULO_V, 'VARIOS ');
end;
function TfrViewDetallesAlbaranCliente.AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean;
begin
if (Albaran.TIPO = CTE_TIPO_ALBARAN_DEV) then
@ -64,6 +79,36 @@ begin
(Controller as IDetallesAlbaranClienteController).AnadirArticulos(Detalles, Albaran.Cliente);
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(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);

View File

@ -29,6 +29,7 @@ type
property GestorDocumentosController: IGestorDocumentosController read GetGestorDocumentosController write SetGestorDocumentosController;
procedure RecuperarCliente(AContrato : IBizContratoCliente);
procedure ActualizarFormaDePago(AContrato : IBizContratoCliente; ID_FORMA_PAGO: Integer);
function Buscar(const ID: Integer): IBizContratoCliente; overload;
function Buscar(const ListaID: TIntegerList): IBizContratoCliente; overload;
function BuscarTodos: IBizContratoCliente; overload;
@ -106,6 +107,7 @@ type
function Localizar(AContratos: IBizContratoCliente; const ID : Integer): Boolean;
procedure RecuperarCliente(AContrato : IBizContratoCliente);
procedure ActualizarFormaDePago(AContrato : IBizContratoCliente; ID_FORMA_PAGO: Integer);
function Eliminar(const ID : Integer): Boolean; overload;
function Eliminar(AContrato : IBizContratoCliente; AllItems: Boolean = false): Boolean; overload;
function Guardar(AContrato : IBizContratoCliente): Boolean;
@ -159,6 +161,31 @@ uses
{ 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;
const ATipo: TEnumTiposContrato = teVarios) : Boolean;
begin

View File

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

View File

@ -308,13 +308,26 @@ begin
end;
procedure TfEditorContratoCliente.OnClienteChanged(Sender: TObject);
var
APrimerCliente : Boolean;
begin
if Assigned(FContrato) then
begin
APrimerCliente := (FContrato.Cliente.ID = 0);
FContrato.Cliente := ViewContrato.ViewClienteContrato.Cliente;
if (FContrato.Detalles.RecordCount > 0) then
FController.DetallesController.ActualizarDetalles(FContrato.Detalles, FContrato.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(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;

View File

@ -296,10 +296,11 @@ begin
if (AItem.Index in [cxGridViewDESCUENTO.Index]) then
begin
//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
// IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index;
// if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO) then
// Result := False
//además descuentos a nivel de lineas de detalle
IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index;
if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO)
and (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_CONCEPTO) then
Result := False
end
else if (AItem.Index in [cxGridViewPROPIEDAD.Index, cxGridViewTIPO_ARTICULO.Index]) then
begin

View File

@ -49,19 +49,19 @@
<DelphiCompile Include="FacturasCliente_controller.dpk">
<MainSource>MainSource</MainSource>
</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="uDetallesFacturaClienteController.pas" />
<DCCReference Include="uFacturasClienteController.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\uIEditorElegirFacturasCliente.pas" />
<DCCReference Include="View\uIEditorFacturaCliente.pas" />

View File

@ -36,6 +36,7 @@ type
procedure DescartarCambios(AFactura : IBizFacturaCliente);
function Existe(const ID: Integer) : Boolean;
procedure RecuperarCliente(AFactura : IBizFacturaCliente);
procedure ActualizarFormaDePago(AFactura : IBizFacturaCliente; ID_FORMA_PAGO: Integer);
function Duplicar(AFactura: IBizFacturaCliente): IBizFacturaCliente;
function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente;
@ -101,6 +102,7 @@ type
function Duplicar(AFactura: IBizFacturaCliente): IBizFacturaCliente;
function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente;
procedure RecuperarCliente(AFactura : IBizFacturaCliente);
procedure ActualizarFormaDePago(AFactura : IBizFacturaCliente; ID_FORMA_PAGO: Integer);
procedure Preview(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;
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;
AListaAlbaranes: IBizAlbaranCliente): Boolean;
var

View File

@ -16,11 +16,15 @@
<Projects Include="..\Contactos\Data\Contactos_data.dproj" />
<Projects Include="..\Contactos\Model\Contactos_model.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\Data\GestorInformes_data.dproj" />
<Projects Include="..\Gestor de informes\Model\GestorInformes_model.dproj" />
<Projects Include="..\Gestor de informes\Plugin\GestorInformes_plugin.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="Data\FacturasCliente_data.dproj" />
<Projects Include="Model\FacturasCliente_model.dproj" />
@ -231,14 +235,50 @@
<Target Name="FactuGES_Server:Make">
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
</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">
<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 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 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>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project>

View File

@ -69,9 +69,9 @@ type
procedure DESCUENTOOnChange(Sender: TDACustomField);
procedure IVAOnChange(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 OnNewRecord(Sender: TDADataTable); override;
function GetSITUACIONValue: String; override;
@ -338,8 +338,9 @@ begin
CODIGO_POSTAL := FCliente.CODIGO_POSTAL;
PROVINCIA := FCliente.PROVINCIA;
POBLACION := FCliente.POBLACION;
if FCliente.ID_FORMA_PAGO > 0 then
ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
// La forma de pago se establece desde el tipo de documento y aunque cambie de cliente no se cambia la formade pago ya que desde la vista se pregunta y se cambia si el usuario lo desea
// if FCliente.ID_FORMA_PAGO > 0 then
// ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
if FCliente.ID_TIPO_IVA > 0 then
ID_TIPO_IVA := FCliente.ID_TIPO_IVA;
RECARGO_EQUIVALENCIA := FCliente.RECARGO_EQUIVALENCIA;

View File

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

View File

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

View File

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

View File

@ -310,8 +310,9 @@ var
AVerLogotipo: Boolean;
begin
inherited;
AVerLogotipo:= True;
AVerLogotipo := (Application.MessageBox('¿Desea imprimir el documento con logotipo?', 'Atención', MB_YESNO) = IDYES);
AVerLogotipo:= False;
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);
end;
@ -320,6 +321,8 @@ var
// FDetallesController : IDetallesFacturaClienteController;
AClientesController : IClientesController;
ADireccion : IBizDireccionesContacto;
APrimerCliente : Boolean;
begin
FFactura.Cliente := frViewFacturaCliente1.frViewClienteFactura1.Cliente;
@ -359,11 +362,23 @@ begin
AClientesController := Nil;
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
// para los artículos hay que cambiarlos.
if (FFactura.Detalles.RecordCount > 0) then
FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.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(FFactura, FFactura.Cliente.ID_FORMA_PAGO);
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;
procedure TfEditorFacturaCliente.pgPaginasChanging(Sender: TObject;
@ -418,8 +433,9 @@ var
AVerLogotipo: Boolean;
begin
inherited;
AverLogotipo:= True;
AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el documento con logotipo?', 'Atención', MB_YESNO) = IDYES);
AVerLogotipo:= False;
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);
end;

View File

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

View File

@ -328,7 +328,10 @@ begin
if Assigned(AFacturas) then
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);
end;
end;
@ -440,7 +443,10 @@ begin
if Assigned(AFacturas) then
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);
end;
end;

View File

@ -82,10 +82,11 @@ begin
if (AItem.Index in [cxGridViewDESCUENTO.Index]) then
begin
//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
// IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index;
// if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO) then
// Result := False
//además descuentos a nivel de lineas de detalle
IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index;
if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO)
and (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_CONCEPTO) then
Result := False
end
else
Result := inherited EsTipoEditable(AItem);

View File

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

View File

@ -3,19 +3,31 @@ unit schFormasPagoClient_Intf;
interface
uses
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf;
const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_FormasPago = '{0AC9176F-E9B6-43BA-B03E-0973D7074140}';
RID_FormasPagoPlazos = '{F02E8B61-F06F-48FE-B705-0C42FB672FB5}';
RID_ListaFormasPago = '{776235FF-CAC6-4218-B48B-F7A65098B388}';
RID_FormasPago = '{E1CB03E0-E72D-4BEE-8D75-1CC2365CD175}';
RID_FormasPagoPlazos = '{1F15DCA8-B016-457C-B9BF-C2FCC23C753E}';
{ Data table names }
nme_ListaFormasPago = 'ListaFormasPago';
nme_FormasPago = 'FormasPago';
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 }
fld_FormasPagoID = 'ID';
fld_FormasPagoREFERENCIA = 'REFERENCIA';
@ -49,9 +61,68 @@ const
idx_FormasPagoPlazosPORCENTAJE = 3;
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 = interface(IDAStronglyTypedDataTable)
['{2906012F-51D2-4722-A42A-1A1F0B5F5DA3}']
['{F6F3FFFE-3ED4-465A-BB14-6C9C1DF460C6}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -170,7 +241,7 @@ type
{ IFormasPagoPlazos }
IFormasPagoPlazos = interface(IDAStronglyTypedDataTable)
['{6C99169B-3B96-4E95-9886-BFBDAF1C5836}']
['{B722C361-945E-46B3-B72A-4BACAA99DDF1}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -243,6 +314,81 @@ implementation
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 }
constructor TFormasPagoDataTableRules.Create(aDataTable: TDADataTable);
begin
@ -520,6 +666,7 @@ end;
initialization
RegisterDataTableRules(RID_ListaFormasPago, TListaFormasPagoDataTableRules);
RegisterDataTableRules(RID_FormasPago, TFormasPagoDataTableRules);
RegisterDataTableRules(RID_FormasPagoPlazos, TFormasPagoPlazosDataTableRules);

View File

@ -9,13 +9,72 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_FormasPagoDelta = '{3B5575C3-8103-4890-A2BF-8B93698E666B}';
RID_FormasPagoPlazosDelta = '{E0326434-91CF-4E0E-B620-9C98B3FF28EA}';
RID_ListaFormasPagoDelta = '{2D79A54B-D803-456A-B1FB-A117125F8A37}';
RID_FormasPagoDelta = '{2DDDC640-410D-490A-AA85-63CEC195FA66}';
RID_FormasPagoPlazosDelta = '{41A8A08A-EDF1-4D3E-8657-597F555EFCF5}';
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 = interface(IFormasPago)
['{3B5575C3-8103-4890-A2BF-8B93698E666B}']
['{2DDDC640-410D-490A-AA85-63CEC195FA66}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldREFERENCIAValue : String;
@ -133,7 +192,7 @@ type
{ IFormasPagoPlazosDelta }
IFormasPagoPlazosDelta = interface(IFormasPagoPlazos)
['{E0326434-91CF-4E0E-B620-9C98B3FF28EA}']
['{41A8A08A-EDF1-4D3E-8657-597F555EFCF5}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FORMA_PAGOValue : Integer;
@ -206,6 +265,111 @@ implementation
uses
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 }
constructor TFormasPagoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
@ -603,6 +767,7 @@ end;
initialization
RegisterBusinessProcessorRules(RID_ListaFormasPagoDelta, TListaFormasPagoBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_FormasPagoDelta, TFormasPagoBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_FormasPagoPlazosDelta, TFormasPagoPlazosBusinessProcessorRules);

View File

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

View File

@ -68,6 +68,7 @@ type
property GestorDocumentosController: IGestorDocumentosController read GetGestorDocumentosController write SetGestorDocumentosController;
procedure RecuperarCliente(APresupuesto : IBizPresupuestoCliente);
procedure ActualizarFormaDePago(APresupuesto : IBizPresupuestoCliente; ID_FORMA_PAGO: Integer);
function Buscar(const ID: Integer): IBizPresupuestoCliente; overload;
function Buscar(const ListaID: TIntegerList): IBizPresupuestoCliente; overload;
function BuscarTodos: IBizPresupuestoCliente; overload;
@ -150,6 +151,7 @@ type
function Localizar(APresupuestos: IBizPresupuestoCliente; const ID : Integer): Boolean;
procedure RecuperarCliente(APresupuesto : IBizPresupuestoCliente);
procedure ActualizarFormaDePago(APresupuesto : IBizPresupuestoCliente; ID_FORMA_PAGO: Integer);
function Eliminar(const ID : Integer): Boolean; overload;
function Eliminar(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false): Boolean; overload;
function Guardar(APresupuesto : IBizPresupuestoCliente): Boolean;
@ -204,6 +206,22 @@ uses
{ 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;
begin
if not Assigned(APresupuesto) then
@ -904,13 +922,13 @@ begin
teCocina:
begin
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.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_COCINA));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_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, AppFactuGES.EmpresaActiva.ID));
(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, 'ELECTRODOMÉSTICOS ', True, APresupuesto.Detalles);
@ -921,51 +939,51 @@ begin
teArmario:
begin
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.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ARMARIO));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_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, 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_AI, 'INTERIOR DE ARMARIO Nº ', False, APresupuesto.Detalles);
end;
teBano:
begin
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.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_BANO));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_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, 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_V, 'IMPORTES ', True, APresupuesto.Detalles);
end;
teElectrodomestico:
begin
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.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_ELECTRODOMESTICO));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_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, AppFactuGES.EmpresaActiva.ID));
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_E, 'ELECTRODOMÉSTICOS ', False, APresupuesto.Detalles);
end;
teVarios:
begin
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.Open;
APresupuesto.FORMA_PAGO.Add(AFormasPago.DESCRIPCION);
APresupuesto.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_VARIOS));
APresupuesto.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_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, AppFactuGES.EmpresaActiva.ID));
(Self.DetallesController as IDetallesPresupuestoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'VARIOS ', False, APresupuesto.Detalles);
end;
end;

View File

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

View File

@ -19,7 +19,6 @@
<Projects Include="..\Contratos de cliente\Controller\ContratosCliente_controller.dproj" />
<Projects Include="..\Gestion de documentos\Controller\GestorDocumentos_controller.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="Controller\PresupuestosCliente_controller.dproj" />
<Projects Include="Data\PresupuestosCliente_data.dproj" />
@ -222,23 +221,14 @@
<Target Name="FactuGES_Server:Make">
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
</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">
<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 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 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>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project>

View File

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

View File

@ -178,7 +178,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
inherited pgPaginas: TPageControl
Width = 842
Height = 314
ActivePage = pagContenido
TabOrder = 1
OnChanging = pgPaginasChanging
ExplicitTop = 112
@ -189,6 +188,69 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitTop = 24
ExplicitWidth = 834
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
object pagContenido: TTabSheet
Caption = 'Contenido'
@ -429,18 +491,16 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 848
inherited Bevel3: TBevel
Left = 352
Left = 304
Top = 57
Height = 122
ExplicitLeft = 352
ExplicitLeft = 304
ExplicitTop = 57
ExplicitHeight = 122
end
inherited Bevel4: TBevel
Left = 464
Left = 416
Top = 88
Width = 342
ExplicitLeft = 464
ExplicitLeft = 416
ExplicitTop = 88
ExplicitWidth = 342
end
@ -448,26 +508,20 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Top = 84
Style.IsFontAssigned = True
ExplicitTop = 84
ExplicitWidth = 93
Width = 93
end
inherited ImporteIVA: TcxDBCurrencyEdit
Left = 535
Left = 487
Top = 108
Style.IsFontAssigned = True
ExplicitLeft = 535
ExplicitLeft = 487
ExplicitTop = 108
ExplicitWidth = 137
Width = 137
end
inherited ImporteTotal: TcxDBCurrencyEdit
Left = 465
Left = 417
Top = 189
Style.IsFontAssigned = True
ExplicitLeft = 465
ExplicitLeft = 417
ExplicitTop = 189
ExplicitWidth = 137
Width = 137
end
inherited edtDescuento: TcxDBSpinEdit
Top = 84
@ -475,72 +529,60 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitTop = 84
end
inherited edtIVA: TcxDBSpinEdit
Left = 464
Left = 416
Top = 108
Style.IsFontAssigned = True
ExplicitLeft = 464
ExplicitLeft = 416
ExplicitTop = 108
end
inherited ImporteBase: TcxDBCurrencyEdit
Left = 464
Left = 416
Top = 57
Style.IsFontAssigned = True
ExplicitLeft = 464
ExplicitLeft = 416
ExplicitTop = 57
ExplicitWidth = 92
Width = 92
end
inherited edtRE: TcxDBSpinEdit
Left = 464
Left = 416
Top = 162
Style.IsFontAssigned = True
ExplicitLeft = 464
ExplicitLeft = 416
ExplicitTop = 162
end
inherited edtIRPF: TcxDBSpinEdit
Left = 464
Left = 416
Top = 135
Style.IsFontAssigned = True
ExplicitLeft = 464
ExplicitLeft = 416
ExplicitTop = 135
end
inherited ImporteRE: TcxDBCurrencyEdit
Left = 535
Left = 487
Top = 162
Style.IsFontAssigned = True
ExplicitLeft = 535
ExplicitLeft = 487
ExplicitTop = 162
ExplicitWidth = 56
Width = 56
end
inherited ImporteIRPF: TcxDBCurrencyEdit
Left = 535
Left = 487
Top = 135
Style.IsFontAssigned = True
ExplicitLeft = 535
ExplicitLeft = 487
ExplicitTop = 135
ExplicitWidth = 56
Width = 56
end
inherited eImporteNeto: TcxDBCurrencyEdit
Top = 57
Style.IsFontAssigned = True
ExplicitTop = 57
ExplicitWidth = 147
Width = 147
end
inherited ePorte: TcxDBCurrencyEdit
Top = 111
Style.IsFontAssigned = True
ExplicitTop = 111
ExplicitWidth = 147
Width = 147
end
inherited eIVA: TcxDBLookupComboBox
Top = 138
ExplicitTop = 138
ExplicitWidth = 81
Width = 81
end
inherited cbValorado: TcxDBCheckBox
Left = 11
@ -552,17 +594,15 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Width = 455
end
inherited bTiposIVA: TButton
Left = 204
Left = 156
Top = 138
OnClick = frViewTotales1bTiposIVAClick
ExplicitLeft = 204
ExplicitLeft = 156
ExplicitTop = 138
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
Top = 165
ExplicitTop = 165
ExplicitWidth = 219
Width = 219
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited cxValorado: TdxLayoutItem

View File

@ -39,6 +39,7 @@ type
frViewDocumentosPresupuestoCliente1: TfrViewDocumentosPresupuestoCliente;
frViewDetallesPresupuestoCliente1: TfrViewDetallesPresupuestoCliente;
frViewTotales1: TfrViewTotalesPresupuesto;
frViewPresupuestoCliente1: TfrViewPresupuestoCliente;
procedure FormShow(Sender: TObject);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
@ -85,12 +86,12 @@ type
//Si queremos crear otra vista para el editor heredado solo tendriamos que
//sobreescribir este metodo
procedure AsignarVista; virtual;
// procedure AsignarVista; virtual;
procedure PonerTitulos(const ATitulo: string = ''); override;
function GetModified: Boolean; override;
procedure SetModified(const Value : Boolean); override;
function PuedoImprimir: Boolean; override;
function PuedoImprimir: Boolean; override;
public
property Controller : IPresupuestosClienteController read GetController write SetController;
@ -131,28 +132,12 @@ begin
(Sender as TAction).Enabled := HayDatos;
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);
begin
inherited;
pgPaginas.ActivePageIndex := 0;
AsignarVista;
FTiposIVAController := TTiposIVAController.Create;
ViewPresupuesto := frViewPresupuestoCliente1;
FTiposIVAController := TTiposIVAController.Create;
end;
procedure TfEditorPresupuestoCliente.CustomEditorClose(Sender: TObject;
@ -315,6 +300,9 @@ begin
APrimerCliente := (FPresupuesto.Cliente.ID = 0);
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 (ShowConfirmMessage('Actualizar los descuentos de las líneas',
'¿Desea actualizar las líneas de detalle con el descuento del cliente?' + #10#13 +

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -307,10 +307,11 @@ begin
if (AItem.Index in [cxGridViewDESCUENTO.Index]) then
begin
//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
// IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index;
// if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO) then
// Result := False
//además descuentos a nivel de lineas de detalle
IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index;
if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO)
and (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_CONCEPTO) then
Result := False
end
else if (AItem.Index in [cxGridViewPROPIEDAD.Index, cxGridViewTIPO_ARTICULO.Index]) then
begin

View File

@ -66,14 +66,14 @@ begin
AFactura.DESCUENTO := AContrato.DESCUENTO;
AFactura.IMPORTE_DESCUENTO := AContrato.IMPORTE_DESCUENTO;
AFactura.BASE_IMPONIBLE := AContrato.BASE_IMPONIBLE;
AFactura.ID_TIPO_IVA := AContrato.ID_TIPO_IVA;
AFactura.IVA := AContrato.IVA;
AFactura.IMPORTE_IVA := AContrato.IMPORTE_IVA;
// AFactura.ID_TIPO_IVA := AContrato.ID_TIPO_IVA;
// AFactura.IVA := AContrato.IVA;
// AFactura.IMPORTE_IVA := AContrato.IMPORTE_IVA;
AFactura.IMPORTE_TOTAL := AContrato.IMPORTE_TOTAL;
// AFactura.ID_VENDEDOR := AContrato.ID_VENDEDOR;
AFactura.RECARGO_EQUIVALENCIA := AContrato.RECARGO_EQUIVALENCIA;
AFactura.RE := AContrato.RE;
AFactura.IMPORTE_RE := AContrato.IMPORTE_RE;
// AFactura.RECARGO_EQUIVALENCIA := AContrato.RECARGO_EQUIVALENCIA;
// AFactura.RE := AContrato.RE;
// AFactura.IMPORTE_RE := AContrato.IMPORTE_RE;
AFactura.ID_CONTRATO := AContrato.ID;
AFactura.ID_FORMA_PAGO := AContrato.ID_FORMA_PAGO;
end;
@ -199,8 +199,9 @@ begin
AFactura.ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
AFactura.ID_TIENDA := AppFactuGES.TiendaActiva.ID;
AFactura.TIENDA := AppFactuGES.TiendaActiva.NOMBRE;
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);
//Sustituir por if de guardar