Mascara libra
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES2/trunk@233 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2
This commit is contained in:
parent
f7a4bb7567
commit
8da845aa82
File diff suppressed because one or more lines are too long
@ -185,6 +185,10 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente
|
|||||||
DataBinding.FieldName = 'REFERENCIA_COMISION'
|
DataBinding.FieldName = 'REFERENCIA_COMISION'
|
||||||
Width = 54
|
Width = 54
|
||||||
end
|
end
|
||||||
|
object cxGridViewPAIS: TcxGridDBColumn
|
||||||
|
Caption = 'Pa'#237's'
|
||||||
|
DataBinding.FieldName = 'PAIS'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited cxGridLevel: TcxGridLevel
|
inherited cxGridLevel: TcxGridLevel
|
||||||
Caption = 'Todas'
|
Caption = 'Todas'
|
||||||
@ -273,7 +277,7 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente
|
|||||||
object TBXSeparatorItem1: TTBXSeparatorItem
|
object TBXSeparatorItem1: TTBXSeparatorItem
|
||||||
end
|
end
|
||||||
object TBXItem2: TTBXItem
|
object TBXItem2: TTBXItem
|
||||||
Action = actProvincia
|
Action = actPais
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -303,15 +307,17 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited ActionList1: TActionList
|
inherited ActionList1: TActionList
|
||||||
|
Left = 192
|
||||||
|
Top = 368
|
||||||
object actCliente: TAction
|
object actCliente: TAction
|
||||||
Caption = 'Cliente'
|
Caption = 'Cliente'
|
||||||
OnExecute = actClienteExecute
|
OnExecute = actClienteExecute
|
||||||
OnUpdate = actClienteUpdate
|
OnUpdate = actClienteUpdate
|
||||||
end
|
end
|
||||||
object actProvincia: TAction
|
object actPais: TAction
|
||||||
Caption = 'Provincia'
|
Caption = 'Pa'#237's'
|
||||||
OnExecute = actProvinciaExecute
|
OnExecute = actPaisExecute
|
||||||
OnUpdate = actProvinciaUpdate
|
OnUpdate = actPaisUpdate
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited GridPNGImageList: TPngImageList
|
inherited GridPNGImageList: TPngImageList
|
||||||
|
|||||||
@ -50,7 +50,7 @@ type
|
|||||||
cxStylePendientes: TcxStyle;
|
cxStylePendientes: TcxStyle;
|
||||||
cxStyleParciales: TcxStyle;
|
cxStyleParciales: TcxStyle;
|
||||||
actCliente: TAction;
|
actCliente: TAction;
|
||||||
actProvincia: TAction;
|
actPais: TAction;
|
||||||
TBXItem2: TTBXItem;
|
TBXItem2: TTBXItem;
|
||||||
TBXSeparatorItem1: TTBXSeparatorItem;
|
TBXSeparatorItem1: TTBXSeparatorItem;
|
||||||
TBXItem3: TTBXItem;
|
TBXItem3: TTBXItem;
|
||||||
@ -60,13 +60,14 @@ type
|
|||||||
cxGridViewIMPORTE_RETENCION: TcxGridDBColumn;
|
cxGridViewIMPORTE_RETENCION: TcxGridDBColumn;
|
||||||
cxGridViewRE: TcxGridDBColumn;
|
cxGridViewRE: TcxGridDBColumn;
|
||||||
cxGridViewIMPORTE_RE: TcxGridDBColumn;
|
cxGridViewIMPORTE_RE: TcxGridDBColumn;
|
||||||
|
cxGridViewPAIS: TcxGridDBColumn;
|
||||||
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
|
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
|
||||||
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
|
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
|
||||||
out AStyle: TcxStyle);
|
out AStyle: TcxStyle);
|
||||||
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
|
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
|
||||||
procedure actClienteExecute(Sender: TObject);
|
procedure actClienteExecute(Sender: TObject);
|
||||||
procedure actProvinciaExecute(Sender: TObject);
|
procedure actPaisExecute(Sender: TObject);
|
||||||
procedure actProvinciaUpdate(Sender: TObject);
|
procedure actPaisUpdate(Sender: TObject);
|
||||||
procedure actClienteUpdate(Sender: TObject);
|
procedure actClienteUpdate(Sender: TObject);
|
||||||
procedure cxGridViewDataControllerCompare(
|
procedure cxGridViewDataControllerCompare(
|
||||||
ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2,
|
ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2,
|
||||||
@ -124,24 +125,24 @@ begin
|
|||||||
(Sender as TAction).Checked := not (cxGridViewNOMBRE.GroupIndex < 0);
|
(Sender as TAction).Checked := not (cxGridViewNOMBRE.GroupIndex < 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewFacturasCliente.actProvinciaExecute(Sender: TObject);
|
procedure TfrViewFacturasCliente.actPaisExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if (cxGridViewPROVINCIA.GroupIndex < 0) then
|
if (cxGridViewPAIS.GroupIndex < 0) then
|
||||||
begin
|
begin
|
||||||
cxGridViewPROVINCIA.GroupIndex := cxGridView.GroupedColumnCount;
|
cxGridViewPAIS.GroupIndex := cxGridView.GroupedColumnCount;
|
||||||
cxGridViewPROVINCIA.Visible := False;
|
cxGridViewPAIS.Visible := False;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
cxGridViewPROVINCIA.GroupIndex := -1;
|
cxGridViewPAIS.GroupIndex := -1;
|
||||||
cxGridViewPROVINCIA.Visible := True;
|
cxGridViewPAIS.Visible := True;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewFacturasCliente.actProvinciaUpdate(Sender: TObject);
|
procedure TfrViewFacturasCliente.actPaisUpdate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
(Sender as TAction).Checked := not (cxGridViewPROVINCIA.GroupIndex < 0);
|
(Sender as TAction).Checked := not (cxGridViewPAIS.GroupIndex < 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewFacturasCliente.AnadirFiltroFechas;
|
procedure TfrViewFacturasCliente.AnadirFiltroFechas;
|
||||||
|
|||||||
@ -157,7 +157,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
dmGenerarFacturasProPre.JsListaFacturasGeneradas.Execute;
|
dmGenerarFacturasProPre.JsListaFacturasGeneradas.Execute;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ object dmGenerarPedidosCli: TdmGenerarPedidosCli
|
|||||||
FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312
|
FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312
|
||||||
82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA
|
82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA
|
||||||
1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082}
|
1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082}
|
||||||
Instruction.Text = 'Se ha generado el albar'#225'n de cliente'
|
Instruction.Text = 'Se ha generado el pedido de cliente'
|
||||||
Instruction.Glyph.Data = {
|
Instruction.Glyph.Data = {
|
||||||
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
|
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
|
||||||
00001C0806000000720DDF940000000970485973000017120000171201679FD2
|
00001C0806000000720DDF940000000970485973000017120000171201679FD2
|
||||||
@ -66,10 +66,10 @@ object dmGenerarPedidosCli: TdmGenerarPedidosCli
|
|||||||
Instruction.Icon = tdiCustom
|
Instruction.Icon = tdiCustom
|
||||||
CustomButtons = <
|
CustomButtons = <
|
||||||
item
|
item
|
||||||
Caption = 'Ver el albar'#225'n'
|
Caption = 'Ver el pedido'
|
||||||
Value = 100
|
Value = 100
|
||||||
Info.Strings = (
|
Info.Strings = (
|
||||||
'Mostrar el albar'#225'n que se ha creado')
|
'Mostrar el pedido que se ha creado')
|
||||||
end>
|
end>
|
||||||
ButtonBar.Buttons = [cbOK]
|
ButtonBar.Buttons = [cbOK]
|
||||||
ButtonBar.Cancel = cbOK
|
ButtonBar.Cancel = cbOK
|
||||||
|
|||||||
@ -73,7 +73,6 @@ begin
|
|||||||
APedido.PAIS := APedido.Cliente.Direcciones.PAIS;
|
APedido.PAIS := APedido.Cliente.Direcciones.PAIS;
|
||||||
APedido.PERSONA_CONTACTO := APedido.Cliente.Direcciones.PERSONA_CONTACTO;
|
APedido.PERSONA_CONTACTO := APedido.Cliente.Direcciones.PERSONA_CONTACTO;
|
||||||
APedido.TELEFONO := APedido.Cliente.Direcciones.TELEFONO;
|
APedido.TELEFONO := APedido.Cliente.Direcciones.TELEFONO;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure CopiarArticulosPresupuesto(AOrigen: IBizDetallesPresupuestoCliente;
|
procedure CopiarArticulosPresupuesto(AOrigen: IBizDetallesPresupuestoCliente;
|
||||||
@ -173,7 +172,7 @@ end;
|
|||||||
|
|
||||||
function GenerarPedidoCliPre(APresupuesto : IBizPresupuestoCliente) : Boolean; overload;
|
function GenerarPedidoCliPre(APresupuesto : IBizPresupuestoCliente) : Boolean; overload;
|
||||||
var
|
var
|
||||||
i: Integer;
|
ARespuesta : Integer;
|
||||||
PedidosNuevos: IBizPedidoCliente;
|
PedidosNuevos: IBizPedidoCliente;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -195,11 +194,33 @@ begin
|
|||||||
CopiarPresupuestoAPedido(APresupuesto, PedidosNuevos);
|
CopiarPresupuestoAPedido(APresupuesto, PedidosNuevos);
|
||||||
CopiarArticulosPresupuesto(APresupuesto.Detalles, PedidosNuevos.Detalles);
|
CopiarArticulosPresupuesto(APresupuesto.Detalles, PedidosNuevos.Detalles);
|
||||||
// PedidosNuevos.CalcularImporteTotal;
|
// PedidosNuevos.CalcularImporteTotal;
|
||||||
APedidosClienteController.Guardar(PedidosNuevos);
|
// APedidosClienteController.Guardar(PedidosNuevos);
|
||||||
|
|
||||||
|
//Sustituir por if de guardar
|
||||||
|
if APedidosClienteController.Guardar(PedidosNuevos) then
|
||||||
|
begin
|
||||||
|
with dmGenerarPedidosCli.JsListaPedidosGenerados do
|
||||||
|
begin
|
||||||
|
Instruction.Text := 'Se ha generado el pedido';
|
||||||
|
Content.Clear;
|
||||||
|
Content.Add(Format('Se ha generado correctamente el pedido %s a partir del presupuesto de cliente' + #10#13, [PedidosNuevos.REFERENCIA]));
|
||||||
|
Execute;
|
||||||
|
|
||||||
|
ARespuesta := CustomButtonResult;
|
||||||
|
case ARespuesta of
|
||||||
|
100 : begin
|
||||||
|
// Ver el albarán
|
||||||
|
APedidosClienteController.Ver(PedidosNuevos);
|
||||||
|
end;
|
||||||
|
200 : // Continuar;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{
|
||||||
if PedidosNuevos.DataTable.RecordCount = 1 then
|
if PedidosNuevos.DataTable.RecordCount = 1 then
|
||||||
ShowInfoMessage('El pedido se ha dado de alta con el código ' + PedidosNuevos.REFERENCIA);
|
ShowInfoMessage('El pedido se ha dado de alta con el código ' + PedidosNuevos.REFERENCIA);
|
||||||
{
|
|
||||||
else begin
|
else begin
|
||||||
with dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Content do
|
with dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Content do
|
||||||
begin
|
begin
|
||||||
@ -218,8 +239,9 @@ begin
|
|||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
|
||||||
finally
|
finally
|
||||||
PedidosNuevos := NIL;
|
// PedidosNuevos := NIL;
|
||||||
if Assigned(APresupuestosClienteController) then
|
if Assigned(APresupuestosClienteController) then
|
||||||
Finalizar;
|
Finalizar;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileVersion", "4.4.1.0\0"
|
VALUE "FileVersion", "4.4.1.0\0"
|
||||||
VALUE "ProductVersion", "4.4.1.0\0"
|
VALUE "ProductVersion", "4.4.1.0\0"
|
||||||
VALUE "CompileDate", "viernes, 03 de octubre de 2014 16:38\0"
|
VALUE "CompileDate", "viernes, 03 de octubre de 2014 17:38\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Reference in New Issue
Block a user