Repaso de recepcion de articulos y envio de articulos desde inventario
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@236 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
798dab2347
commit
05bc30f293
@ -1265,14 +1265,24 @@ inner join v_ped_cli_con_albaranes on (v_ped_cli_con_albaranes.ID_PEDIDO = v_ped
|
|||||||
;
|
;
|
||||||
|
|
||||||
CREATE VIEW V_PED_CLI_ART_SIN_ALBARAN(
|
CREATE VIEW V_PED_CLI_ART_SIN_ALBARAN(
|
||||||
|
ID,
|
||||||
ID_PEDIDO,
|
ID_PEDIDO,
|
||||||
ID_EMPRESA,
|
ID_EMPRESA,
|
||||||
REFERENCIA_PEDIDO,
|
REFERENCIA_PEDIDO,
|
||||||
|
REFERENCIA_CLI_PEDIDO,
|
||||||
FECHA_PEDIDO,
|
FECHA_PEDIDO,
|
||||||
FECHA_PREVISTA_PEDIDO,
|
FECHA_PREVISTA_PEDIDO,
|
||||||
ID_CLIENTE,
|
ID_CLIENTE,
|
||||||
|
CALLE,
|
||||||
|
CODIGO_POSTAL,
|
||||||
|
POBLACION,
|
||||||
|
PROVINCIA,
|
||||||
|
PERSONA_CONTACTO,
|
||||||
|
TELEFONO,
|
||||||
|
IVA,
|
||||||
|
ID_FORMA_PAGO,
|
||||||
CLIENTE,
|
CLIENTE,
|
||||||
ID,
|
ID_ARTICULO,
|
||||||
FAMILIA,
|
FAMILIA,
|
||||||
REFERENCIA,
|
REFERENCIA,
|
||||||
REFERENCIA_PROVEEDOR,
|
REFERENCIA_PROVEEDOR,
|
||||||
@ -1281,15 +1291,28 @@ CREATE VIEW V_PED_CLI_ART_SIN_ALBARAN(
|
|||||||
CANTIDAD_RESERVADA,
|
CANTIDAD_RESERVADA,
|
||||||
CANTIDAD_ENVIADA,
|
CANTIDAD_ENVIADA,
|
||||||
CANTIDAD_SERVIDA,
|
CANTIDAD_SERVIDA,
|
||||||
CANTIDAD_PENDIENTE)
|
CANTIDAD_PENDIENTE,
|
||||||
|
PRECIO_COSTE,
|
||||||
|
DESCUENTO,
|
||||||
|
PRECION_NETO)
|
||||||
AS
|
AS
|
||||||
SELECT
|
SELECT
|
||||||
|
V_PED_CLI_ARTICULOS.ID_PEDIDO || V_PED_CLI_ARTICULOS.ID_ARTICULO as ID, /*Para tener un ID unico sobre el que poder consultar en la sentencia de selección del grid*/
|
||||||
V_PED_CLI_ARTICULOS.ID_PEDIDO,
|
V_PED_CLI_ARTICULOS.ID_PEDIDO,
|
||||||
PEDIDOS_CLIENTE.ID_EMPRESA,
|
PEDIDOS_CLIENTE.ID_EMPRESA,
|
||||||
PEDIDOS_CLIENTE.referencia,
|
PEDIDOS_CLIENTE.referencia,
|
||||||
|
PEDIDOS_CLIENTE.referencia_cliente,
|
||||||
PEDIDOS_CLIENTE.fecha_pedido,
|
PEDIDOS_CLIENTE.fecha_pedido,
|
||||||
PEDIDOS_CLIENTE.fecha_prevista_envio,
|
PEDIDOS_CLIENTE.fecha_prevista_envio,
|
||||||
PEDIDOS_CLIENTE.id_cliente,
|
PEDIDOS_CLIENTE.id_cliente,
|
||||||
|
PEDIDOS_CLIENTE.CALLE,
|
||||||
|
PEDIDOS_CLIENTE.CODIGO_POSTAL,
|
||||||
|
PEDIDOS_CLIENTE.POBLACION,
|
||||||
|
PEDIDOS_CLIENTE.PROVINCIA,
|
||||||
|
PEDIDOS_CLIENTE.PERSONA_CONTACTO,
|
||||||
|
PEDIDOS_CLIENTE.TELEFONO,
|
||||||
|
PEDIDOS_CLIENTE.IVA,
|
||||||
|
PEDIDOS_CLIENTE.ID_FORMA_PAGO,
|
||||||
CONTACTOS.nombre,
|
CONTACTOS.nombre,
|
||||||
V_PED_CLI_ARTICULOS.ID_ARTICULO,
|
V_PED_CLI_ARTICULOS.ID_ARTICULO,
|
||||||
articulos.familia,
|
articulos.familia,
|
||||||
@ -1300,11 +1323,22 @@ SELECT
|
|||||||
V_PED_CLI_ARTICULOS.CANTIDAD_RESERVADA,
|
V_PED_CLI_ARTICULOS.CANTIDAD_RESERVADA,
|
||||||
V_PED_CLI_ARTICULOS.CANTIDAD_ENVIADA,
|
V_PED_CLI_ARTICULOS.CANTIDAD_ENVIADA,
|
||||||
V_PED_CLI_ARTICULOS.CANTIDAD_SERVIDA,
|
V_PED_CLI_ARTICULOS.CANTIDAD_SERVIDA,
|
||||||
V_PED_CLI_ARTICULOS.CANTIDAD_PENDIENTE
|
V_PED_CLI_ARTICULOS.CANTIDAD_PENDIENTE,
|
||||||
|
|
||||||
|
|
||||||
|
ARTICULOS.PRECIO_COSTE,
|
||||||
|
CLIENTES_DTOS_PROVEEDORES.DESCUENTO,
|
||||||
|
(ARTICULOS.PRECIO_COSTE * CLIENTES_DTOS_PROVEEDORES.DESCUENTO)/100 as PRECIO_NETO
|
||||||
|
|
||||||
from V_PED_CLI_ARTICULOS
|
from V_PED_CLI_ARTICULOS
|
||||||
left join PEDIDOS_CLIENTE on (PEDIDOS_CLIENTE.id = V_PED_CLI_ARTICULOS.id_pedido)
|
left join PEDIDOS_CLIENTE on (PEDIDOS_CLIENTE.id = V_PED_CLI_ARTICULOS.id_pedido)
|
||||||
left join CONTACTOS on (contactos.id = PEDIDOS_CLIENTE.id_cliente)
|
left join CONTACTOS on (contactos.id = PEDIDOS_CLIENTE.id_cliente)
|
||||||
left join articulos on (articulos.id = V_PED_CLI_ARTICULOS.ID_ARTICULO)
|
left join articulos on (articulos.id = V_PED_CLI_ARTICULOS.ID_ARTICULO)
|
||||||
|
|
||||||
|
LEFT OUTER JOIN CLIENTES_DTOS_PROVEEDORES
|
||||||
|
ON ((CLIENTES_DTOS_PROVEEDORES.ID_PROVEEDOR = ARTICULOS.ID_PROVEEDOR)
|
||||||
|
AND (CLIENTES_DTOS_PROVEEDORES.ID_CLIENTE = contactos.id))
|
||||||
|
|
||||||
where cantidad_pendiente > 0;
|
where cantidad_pendiente > 0;
|
||||||
|
|
||||||
/*Aqui tendremos la situacion de todos los pedidos, por lógica de grupos*/
|
/*Aqui tendremos la situacion de todos los pedidos, por lógica de grupos*/
|
||||||
|
|||||||
@ -15,6 +15,10 @@ type
|
|||||||
function GetController : IInventarioController;
|
function GetController : IInventarioController;
|
||||||
procedure SetController (const Value : IInventarioController);
|
procedure SetController (const Value : IInventarioController);
|
||||||
property Controller : IInventarioController read GetController write SetController;
|
property Controller : IInventarioController read GetController write SetController;
|
||||||
|
|
||||||
|
procedure SetAlmacen(const Value: Integer);
|
||||||
|
function GetAlmacen: Integer;
|
||||||
|
property Almacen: Integer write SetAlmacen;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,10 @@ type
|
|||||||
function GetController : IInventarioController;
|
function GetController : IInventarioController;
|
||||||
procedure SetController (const Value : IInventarioController);
|
procedure SetController (const Value : IInventarioController);
|
||||||
property Controller : IInventarioController read GetController write SetController;
|
property Controller : IInventarioController read GetController write SetController;
|
||||||
|
|
||||||
|
procedure SetAlmacen(const Value: Integer);
|
||||||
|
function GetAlmacen: Integer;
|
||||||
|
property Almacen: Integer write SetAlmacen;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,8 +25,8 @@ type
|
|||||||
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
||||||
procedure VerTodos(AInventario: IBizInventario);
|
procedure VerTodos(AInventario: IBizInventario);
|
||||||
procedure VerReservas(AArticulo: IBizInventario);
|
procedure VerReservas(AArticulo: IBizInventario);
|
||||||
procedure VerSinAlbaran;
|
procedure VerSinAlbaran(const IDAlmacenOrigen: Integer);
|
||||||
procedure VerSinRecibir;
|
procedure VerSinRecibir(const IDAlmacenDestino: Integer);
|
||||||
|
|
||||||
function BuscarTodos: IBizInventario;
|
function BuscarTodos: IBizInventario;
|
||||||
function Buscar(const ID_ALMACEN: Integer): IBizInventario;
|
function Buscar(const ID_ALMACEN: Integer): IBizInventario;
|
||||||
@ -133,8 +133,8 @@ type
|
|||||||
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
||||||
|
|
||||||
procedure VerReservas(AArticulo: IBizInventario);
|
procedure VerReservas(AArticulo: IBizInventario);
|
||||||
procedure VerSinAlbaran;
|
procedure VerSinAlbaran(const IDAlmacenOrigen: Integer);
|
||||||
procedure VerSinRecibir;
|
procedure VerSinRecibir(const IDAlmacenDestino: Integer);
|
||||||
|
|
||||||
function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean;
|
function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean;
|
||||||
|
|
||||||
@ -524,7 +524,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TInventarioController.VerSinAlbaran;
|
procedure TInventarioController.VerSinAlbaran(const IDAlmacenOrigen: Integer);
|
||||||
var
|
var
|
||||||
AEditor : IEditorDetallesSinAlbaran;
|
AEditor : IEditorDetallesSinAlbaran;
|
||||||
begin
|
begin
|
||||||
@ -535,6 +535,7 @@ begin
|
|||||||
with AEditor do
|
with AEditor do
|
||||||
begin
|
begin
|
||||||
Controller := Self; //OJO ORDEN MUY IMPORTANTE
|
Controller := Self; //OJO ORDEN MUY IMPORTANTE
|
||||||
|
Almacen := IDAlmacenOrigen;
|
||||||
Detalles := BuscarDetallesSinAlbaran;
|
Detalles := BuscarDetallesSinAlbaran;
|
||||||
MultiSelect := True;
|
MultiSelect := True;
|
||||||
end;
|
end;
|
||||||
@ -551,7 +552,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TInventarioController.VerSinRecibir;
|
procedure TInventarioController.VerSinRecibir(const IDAlmacenDestino: Integer);
|
||||||
var
|
var
|
||||||
AEditor : IEditorDetallesSinRecibir;
|
AEditor : IEditorDetallesSinRecibir;
|
||||||
begin
|
begin
|
||||||
@ -562,6 +563,7 @@ begin
|
|||||||
with AEditor do
|
with AEditor do
|
||||||
begin
|
begin
|
||||||
Controller := Self; //OJO ORDEN MUY IMPORTANTE
|
Controller := Self; //OJO ORDEN MUY IMPORTANTE
|
||||||
|
Almacen := IDAlmacenDestino;
|
||||||
Detalles := BuscarDetallesSinRecibir;
|
Detalles := BuscarDetallesSinRecibir;
|
||||||
MultiSelect := True;
|
MultiSelect := True;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -10,10 +10,14 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
Width = 669
|
Width = 669
|
||||||
|
Height = 25
|
||||||
Caption = 'Detalle de art'#237'culos sin albaranar'
|
Caption = 'Detalle de art'#237'culos sin albaranar'
|
||||||
|
WordWrap = True
|
||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
|
ExplicitHeight = 25
|
||||||
inherited Image1: TImage
|
inherited Image1: TImage
|
||||||
Left = 642
|
Left = 642
|
||||||
|
Height = 25
|
||||||
Picture.Data = {
|
Picture.Data = {
|
||||||
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
|
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
|
||||||
0000180806000000E0773DF80000000970485973000017120000171201679FD2
|
0000180806000000E0773DF80000000970485973000017120000171201679FD2
|
||||||
@ -36,10 +40,13 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
5494DB7086380DA45A00B644AF97680DA0CC06004618670C84C9DA7D00000000
|
5494DB7086380DA45A00B644AF97680DA0CC06004618670C84C9DA7D00000000
|
||||||
49454E44AE426082}
|
49454E44AE426082}
|
||||||
ExplicitLeft = 603
|
ExplicitLeft = 603
|
||||||
|
ExplicitHeight = 49
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
|
Top = 50
|
||||||
Width = 669
|
Width = 669
|
||||||
|
ExplicitTop = 49
|
||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
ExplicitWidth = 358
|
ExplicitWidth = 358
|
||||||
@ -102,9 +109,9 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
end
|
end
|
||||||
inline frViewDetallesSinAlbaran1: TfrViewDetallesSinAlbaran [3]
|
inline frViewDetallesSinAlbaran1: TfrViewDetallesSinAlbaran [3]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 102
|
Top = 125
|
||||||
Width = 669
|
Width = 669
|
||||||
Height = 419
|
Height = 396
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -114,14 +121,14 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
ReadOnly = False
|
ReadOnly = False
|
||||||
ExplicitTop = 102
|
ExplicitTop = 124
|
||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
ExplicitHeight = 419
|
ExplicitHeight = 397
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Width = 669
|
Width = 669
|
||||||
Height = 291
|
Height = 268
|
||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
ExplicitHeight = 291
|
ExplicitHeight = 269
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
item
|
item
|
||||||
@ -184,15 +191,9 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
ExplicitWidth = 273
|
ExplicitWidth = 273
|
||||||
Width = 273
|
Width = 273
|
||||||
end
|
end
|
||||||
inherited edtFechaIniFiltro: TcxDateEdit
|
|
||||||
ExplicitWidth = 121
|
|
||||||
Width = 121
|
|
||||||
end
|
|
||||||
inherited edtFechaFinFiltro: TcxDateEdit
|
inherited edtFechaFinFiltro: TcxDateEdit
|
||||||
Left = 413
|
Left = 412
|
||||||
ExplicitLeft = 413
|
ExplicitLeft = 412
|
||||||
ExplicitWidth = 121
|
|
||||||
Width = 121
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
@ -206,8 +207,8 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||||
Top = 393
|
Top = 370
|
||||||
ExplicitTop = 393
|
ExplicitTop = 371
|
||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
Width = 669
|
Width = 669
|
||||||
@ -238,7 +239,27 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited EditorActionList: TActionList [4]
|
object JvNavPanelHeader1: TJvNavPanelHeader [4]
|
||||||
|
Left = 0
|
||||||
|
Top = 25
|
||||||
|
Width = 669
|
||||||
|
Height = 25
|
||||||
|
Align = alTop
|
||||||
|
Caption = 'Almac'#233'n de salida: '
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = 13553407
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
WordWrap = True
|
||||||
|
ColorFrom = 8684164
|
||||||
|
ColorTo = 8684164
|
||||||
|
ImageIndex = 0
|
||||||
|
ParentStyleManager = False
|
||||||
|
ExplicitTop = 8
|
||||||
|
end
|
||||||
|
inherited EditorActionList: TActionList [5]
|
||||||
Left = 96
|
Left = 96
|
||||||
Top = 112
|
Top = 112
|
||||||
inherited actNuevo: TAction
|
inherited actNuevo: TAction
|
||||||
@ -286,7 +307,7 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
OnExecute = actAlbaranarExecute
|
OnExecute = actAlbaranarExecute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited SmallImages: TPngImageList [5]
|
inherited SmallImages: TPngImageList [6]
|
||||||
PngImages = <
|
PngImages = <
|
||||||
item
|
item
|
||||||
PngImage.Data = {
|
PngImage.Data = {
|
||||||
@ -903,7 +924,7 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
Top = 160
|
Top = 160
|
||||||
Bitmap = {}
|
Bitmap = {}
|
||||||
end
|
end
|
||||||
inherited LargeImages: TPngImageList [6]
|
inherited LargeImages: TPngImageList [7]
|
||||||
PngImages = <
|
PngImages = <
|
||||||
item
|
item
|
||||||
PngImage.Data = {
|
PngImage.Data = {
|
||||||
@ -1836,12 +1857,12 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
|
|||||||
Top = 160
|
Top = 160
|
||||||
Bitmap = {}
|
Bitmap = {}
|
||||||
end
|
end
|
||||||
inherited JvFormStorage: TJvFormStorage [7]
|
inherited JvFormStorage: TJvFormStorage [8]
|
||||||
end
|
end
|
||||||
inherited dsDataTable: TDADataSource [9]
|
inherited dsDataTable: TDADataSource [10]
|
||||||
Left = 8
|
Left = 8
|
||||||
end
|
end
|
||||||
inherited StatusBarImages: TPngImageList [10]
|
inherited StatusBarImages: TPngImageList [11]
|
||||||
end
|
end
|
||||||
inherited GridPopupMenu: TPopupMenu
|
inherited GridPopupMenu: TPopupMenu
|
||||||
inherited Nuevo1: TMenuItem [3]
|
inherited Nuevo1: TMenuItem [3]
|
||||||
|
|||||||
@ -11,7 +11,8 @@ uses
|
|||||||
JvAppRegistryStorage, JvFormPlacement, pngimage, ExtCtrls, uCustomView,
|
JvAppRegistryStorage, JvFormPlacement, pngimage, ExtCtrls, uCustomView,
|
||||||
uViewBase, uViewBarraSeleccion, JvComponentBase, uEditorGridBase,
|
uViewBase, uViewBarraSeleccion, JvComponentBase, uEditorGridBase,
|
||||||
uIEditorDetallesSinAlbaran, uBizInventario, uViewGridBase,
|
uIEditorDetallesSinAlbaran, uBizInventario, uViewGridBase,
|
||||||
JvExComCtrls, JvStatusBar, uViewGrid2Niveles, JSDialog, uInventarioController;
|
JvExComCtrls, JvStatusBar, uViewGrid2Niveles, JSDialog, uInventarioController,
|
||||||
|
uBizAlmacenes;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -22,16 +23,17 @@ type
|
|||||||
frViewDetallesSinAlbaran1: TfrViewDetallesSinAlbaran;
|
frViewDetallesSinAlbaran1: TfrViewDetallesSinAlbaran;
|
||||||
TBXItem38: TTBXItem;
|
TBXItem38: TTBXItem;
|
||||||
actAlbaranar: TAction;
|
actAlbaranar: TAction;
|
||||||
|
JvNavPanelHeader1: TJvNavPanelHeader;
|
||||||
|
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure actAlbaranarExecute(Sender: TObject);
|
procedure actAlbaranarExecute(Sender: TObject);
|
||||||
|
|
||||||
private
|
private
|
||||||
// function SeleccionarAlmacen(Descripcion: String): Integer;
|
FAlmacen: IBizAlmacen;
|
||||||
// function DarIDAlmacenSeleccionado(Descripcion: String): Integer;
|
function GetAlmacen: Integer;
|
||||||
|
procedure SetAlmacen(const Value: Integer);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
// FArticulo: IBizInventario;
|
|
||||||
FDetalles: IBizDetalleSinAlbaran;
|
FDetalles: IBizDetalleSinAlbaran;
|
||||||
FController : IInventarioController;
|
FController : IInventarioController;
|
||||||
|
|
||||||
@ -51,7 +53,7 @@ type
|
|||||||
procedure PrevisualizarInterno; override;
|
procedure PrevisualizarInterno; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
// property Articulo: IBizInventario read GetArticulo write SetArticulo;
|
property Almacen: Integer read GetAlmacen write SetAlmacen;
|
||||||
property DetallesSinAlbaran: IBizDetalleSinAlbaran read GetDetalles write SetDetalles;
|
property DetallesSinAlbaran: IBizDetalleSinAlbaran read GetDetalles write SetDetalles;
|
||||||
property Controller : IInventarioController read GetController write SetController;
|
property Controller : IInventarioController read GetController write SetController;
|
||||||
|
|
||||||
@ -69,7 +71,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
cxControls, uGridUtils, uDataModuleInventario, uDataModuleUsuarios,
|
cxControls, uGridUtils, uDataModuleInventario, uDataModuleUsuarios,
|
||||||
uEditorBase, uDBSelectionListUtils, cxGridDBTableView, cxGridCustomTableView,
|
uEditorBase, uDBSelectionListUtils, cxGridDBTableView, cxGridCustomTableView,
|
||||||
uAlmacenesController, uBizAlmacenes, uGenerarAlbaranesProvUtils,
|
uAlmacenesController, uGenerarAlbaranesProvUtils,
|
||||||
schInventarioClient_Intf, uDialogUtils, uBizAlbaranesCliente, uGenerarAlbaranesCliUtils;
|
schInventarioClient_Intf, uDialogUtils, uBizAlbaranesCliente, uGenerarAlbaranesCliUtils;
|
||||||
|
|
||||||
{, uDBSelectionList, uDataModulePedidosProveedor,
|
{, uDBSelectionList, uDataModulePedidosProveedor,
|
||||||
@ -95,7 +97,10 @@ begin
|
|||||||
ArticulosSeleccionados := (Controller as IInventarioController).ExtraerSeleccionados(DetallesSinAlbaran) as IBizDetalleSinAlbaran;
|
ArticulosSeleccionados := (Controller as IInventarioController).ExtraerSeleccionados(DetallesSinAlbaran) as IBizDetalleSinAlbaran;
|
||||||
|
|
||||||
if (ArticulosSeleccionados.DataTable.RecordCount > 0) then
|
if (ArticulosSeleccionados.DataTable.RecordCount > 0) then
|
||||||
GenerarAlbaranesCli(ArticulosSeleccionados, AlbaranesCliente)
|
begin
|
||||||
|
GenerarAlbaranesCli(ArticulosSeleccionados, AlbaranesCliente, Almacen);
|
||||||
|
RefrescarInterno;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
ShowWarningMessage('Debe seleccionar los artículos que desea albaranar');
|
ShowWarningMessage('Debe seleccionar los artículos que desea albaranar');
|
||||||
finally
|
finally
|
||||||
@ -107,6 +112,7 @@ end;
|
|||||||
constructor TfEditorDetallesSinAlbaran.Create(AOwner: TComponent);
|
constructor TfEditorDetallesSinAlbaran.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
FAlmacen := Nil;
|
||||||
ViewGrid := frViewDetallesSinAlbaran1;
|
ViewGrid := frViewDetallesSinAlbaran1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -127,6 +133,7 @@ end;
|
|||||||
destructor TfEditorDetallesSinAlbaran.Destroy;
|
destructor TfEditorDetallesSinAlbaran.Destroy;
|
||||||
begin
|
begin
|
||||||
FDetalles := NIL;
|
FDetalles := NIL;
|
||||||
|
FAlmacen := NIL;
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -163,6 +170,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function TfEditorDetallesSinAlbaran.GetAlmacen: Integer;
|
||||||
|
begin
|
||||||
|
if Assigned(FAlmacen) then
|
||||||
|
Result := FAlmacen.ID
|
||||||
|
else
|
||||||
|
Result := -1;
|
||||||
|
end;
|
||||||
|
|
||||||
function TfEditorDetallesSinAlbaran.GetController: IInventarioController;
|
function TfEditorDetallesSinAlbaran.GetController: IInventarioController;
|
||||||
begin
|
begin
|
||||||
Result := FController;
|
Result := FController;
|
||||||
@ -189,6 +204,7 @@ var
|
|||||||
begin
|
begin
|
||||||
FTitulo := 'Detalle de artículos sin albaranar - ' + dmUsuarios.EmpresaActual.NOMBRE;
|
FTitulo := 'Detalle de artículos sin albaranar - ' + dmUsuarios.EmpresaActual.NOMBRE;
|
||||||
inherited PonerTitulos(FTitulo);
|
inherited PonerTitulos(FTitulo);
|
||||||
|
JvNavPanelHeader1.Caption := 'Almacén de salida: ' + FAlmacen.NOMBRE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorDetallesSinAlbaran.PrevisualizarInterno;
|
procedure TfEditorDetallesSinAlbaran.PrevisualizarInterno;
|
||||||
@ -250,6 +266,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
procedure TfEditorDetallesSinAlbaran.SetAlmacen(const Value: Integer);
|
||||||
|
var
|
||||||
|
AAlmacenesController : IAlmacenesController;
|
||||||
|
begin
|
||||||
|
AAlmacenesController := TAlmacenesController.Create;
|
||||||
|
try
|
||||||
|
FAlmacen := AAlmacenesController.Buscar(Value);
|
||||||
|
FAlmacen.DataTable.Active := True;
|
||||||
|
finally
|
||||||
|
AAlmacenesController := NIL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorDetallesSinAlbaran.SetController(const Value: IInventarioController);
|
procedure TfEditorDetallesSinAlbaran.SetController(const Value: IInventarioController);
|
||||||
begin
|
begin
|
||||||
FController := Value;
|
FController := Value;
|
||||||
@ -272,3 +301,4 @@ end;
|
|||||||
}
|
}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
Width = 669
|
Width = 669
|
||||||
Caption = 'Detalle de art'#237'culos sin recibir'
|
Caption = 'Detalle de art'#237'culos sin recibir'
|
||||||
|
ExplicitTop = -6
|
||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
inherited Image1: TImage
|
inherited Image1: TImage
|
||||||
Left = 642
|
Left = 642
|
||||||
@ -39,6 +40,7 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
|
Top = 52
|
||||||
Width = 669
|
Width = 669
|
||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
@ -102,9 +104,9 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
end
|
end
|
||||||
inline frViewDetallesSinRecibir1: TfrViewDetallesSinRecibir [3]
|
inline frViewDetallesSinRecibir1: TfrViewDetallesSinRecibir [3]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 102
|
Top = 127
|
||||||
Width = 669
|
Width = 669
|
||||||
Height = 419
|
Height = 394
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -119,7 +121,7 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
ExplicitHeight = 419
|
ExplicitHeight = 419
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Width = 669
|
Width = 669
|
||||||
Height = 291
|
Height = 266
|
||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
ExplicitHeight = 291
|
ExplicitHeight = 291
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
@ -205,7 +207,7 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||||
Top = 393
|
Top = 368
|
||||||
ExplicitTop = 393
|
ExplicitTop = 393
|
||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
@ -213,7 +215,6 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
ExplicitWidth = 669
|
ExplicitWidth = 669
|
||||||
inherited TBXToolbar1: TTBXToolbar
|
inherited TBXToolbar1: TTBXToolbar
|
||||||
Width = 659
|
Width = 659
|
||||||
ExplicitLeft = 10
|
|
||||||
ExplicitWidth = 659
|
ExplicitWidth = 659
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -238,7 +239,27 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited EditorActionList: TActionList [4]
|
object JvNavPanelHeader1: TJvNavPanelHeader [4]
|
||||||
|
Left = 0
|
||||||
|
Top = 27
|
||||||
|
Width = 669
|
||||||
|
Height = 25
|
||||||
|
Align = alTop
|
||||||
|
Caption = 'Almac'#233'n de entrada: '
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = 13553407
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
WordWrap = True
|
||||||
|
ColorFrom = 8684164
|
||||||
|
ColorTo = 8684164
|
||||||
|
ImageIndex = 0
|
||||||
|
ParentStyleManager = False
|
||||||
|
ExplicitTop = 21
|
||||||
|
end
|
||||||
|
inherited EditorActionList: TActionList [5]
|
||||||
Left = 96
|
Left = 96
|
||||||
Top = 112
|
Top = 112
|
||||||
inherited actNuevo: TAction
|
inherited actNuevo: TAction
|
||||||
@ -286,7 +307,7 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
OnExecute = actRecibirExecute
|
OnExecute = actRecibirExecute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited SmallImages: TPngImageList [5]
|
inherited SmallImages: TPngImageList [6]
|
||||||
PngImages = <
|
PngImages = <
|
||||||
item
|
item
|
||||||
PngImage.Data = {
|
PngImage.Data = {
|
||||||
@ -903,7 +924,7 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
Top = 160
|
Top = 160
|
||||||
Bitmap = {}
|
Bitmap = {}
|
||||||
end
|
end
|
||||||
inherited LargeImages: TPngImageList [6]
|
inherited LargeImages: TPngImageList [7]
|
||||||
PngImages = <
|
PngImages = <
|
||||||
item
|
item
|
||||||
PngImage.Data = {
|
PngImage.Data = {
|
||||||
@ -1836,12 +1857,12 @@ inherited fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir
|
|||||||
Top = 160
|
Top = 160
|
||||||
Bitmap = {}
|
Bitmap = {}
|
||||||
end
|
end
|
||||||
inherited JvFormStorage: TJvFormStorage [7]
|
inherited JvFormStorage: TJvFormStorage [8]
|
||||||
end
|
end
|
||||||
inherited dsDataTable: TDADataSource [9]
|
inherited dsDataTable: TDADataSource [10]
|
||||||
Left = 8
|
Left = 8
|
||||||
end
|
end
|
||||||
inherited StatusBarImages: TPngImageList [10]
|
inherited StatusBarImages: TPngImageList [11]
|
||||||
end
|
end
|
||||||
inherited GridPopupMenu: TPopupMenu
|
inherited GridPopupMenu: TPopupMenu
|
||||||
inherited Nuevo1: TMenuItem [3]
|
inherited Nuevo1: TMenuItem [3]
|
||||||
|
|||||||
@ -11,7 +11,8 @@ uses
|
|||||||
JvAppRegistryStorage, JvFormPlacement, pngimage, ExtCtrls, uCustomView,
|
JvAppRegistryStorage, JvFormPlacement, pngimage, ExtCtrls, uCustomView,
|
||||||
uViewBase, uViewBarraSeleccion, JvComponentBase, uEditorGridBase,
|
uViewBase, uViewBarraSeleccion, JvComponentBase, uEditorGridBase,
|
||||||
uIEditorDetallesSinRecibir, uBizInventario, uViewGridBase,
|
uIEditorDetallesSinRecibir, uBizInventario, uViewGridBase,
|
||||||
JvExComCtrls, JvStatusBar, uViewGrid2Niveles, JSDialog, uInventarioController;
|
JvExComCtrls, JvStatusBar, uViewGrid2Niveles, JSDialog, uInventarioController,
|
||||||
|
uBizAlmacenes;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -22,13 +23,15 @@ type
|
|||||||
frViewDetallesSinRecibir1: TfrViewDetallesSinRecibir;
|
frViewDetallesSinRecibir1: TfrViewDetallesSinRecibir;
|
||||||
TBXItem38: TTBXItem;
|
TBXItem38: TTBXItem;
|
||||||
actRecibir: TAction;
|
actRecibir: TAction;
|
||||||
|
JvNavPanelHeader1: TJvNavPanelHeader;
|
||||||
|
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure actRecibirExecute(Sender: TObject);
|
procedure actRecibirExecute(Sender: TObject);
|
||||||
|
|
||||||
private
|
private
|
||||||
// function SeleccionarAlmacen(Descripcion: String): Integer;
|
FAlmacen: IBizAlmacen;
|
||||||
// function DarIDAlmacenSeleccionado(Descripcion: String): Integer;
|
function GetAlmacen: Integer;
|
||||||
|
procedure SetAlmacen(const Value: Integer);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
// FArticulo: IBizInventario;
|
// FArticulo: IBizInventario;
|
||||||
@ -51,7 +54,7 @@ type
|
|||||||
procedure PrevisualizarInterno; override;
|
procedure PrevisualizarInterno; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
// property Articulo: IBizInventario read GetArticulo write SetArticulo;
|
property Almacen: Integer read GetAlmacen write SetAlmacen;
|
||||||
property DetallesSinRecibir: IBizDetalleSinRecibir read GetDetalles write SetDetalles;
|
property DetallesSinRecibir: IBizDetalleSinRecibir read GetDetalles write SetDetalles;
|
||||||
property Controller : IInventarioController read GetController write SetController;
|
property Controller : IInventarioController read GetController write SetController;
|
||||||
|
|
||||||
@ -69,7 +72,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
cxControls, uGridUtils, uDataModuleInventario, uDataModuleUsuarios,
|
cxControls, uGridUtils, uDataModuleInventario, uDataModuleUsuarios,
|
||||||
uEditorBase, uDBSelectionListUtils, cxGridDBTableView, cxGridCustomTableView,
|
uEditorBase, uDBSelectionListUtils, cxGridDBTableView, cxGridCustomTableView,
|
||||||
uAlmacenesController, uBizAlmacenes, uGenerarAlbaranesProvUtils,
|
uAlmacenesController, uGenerarAlbaranesProvUtils,
|
||||||
schInventarioClient_Intf, uDialogUtils, uBizAlbaranesProveedor;
|
schInventarioClient_Intf, uDialogUtils, uBizAlbaranesProveedor;
|
||||||
|
|
||||||
{, uDBSelectionList, uDataModulePedidosProveedor,
|
{, uDBSelectionList, uDataModulePedidosProveedor,
|
||||||
@ -95,7 +98,10 @@ begin
|
|||||||
ArticulosSeleccionados := (Controller as IInventarioController).ExtraerSeleccionados(DetallesSinRecibir) as IBizDetalleSinRecibir;
|
ArticulosSeleccionados := (Controller as IInventarioController).ExtraerSeleccionados(DetallesSinRecibir) as IBizDetalleSinRecibir;
|
||||||
|
|
||||||
if (ArticulosSeleccionados.DataTable.RecordCount > 0) then
|
if (ArticulosSeleccionados.DataTable.RecordCount > 0) then
|
||||||
GenerarAlbaranesProv(ArticulosSeleccionados, AlbaranesProveedor)
|
begin
|
||||||
|
GenerarAlbaranesProv(ArticulosSeleccionados, AlbaranesProveedor, Almacen);
|
||||||
|
RefrescarInterno;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
ShowWarningMessage('Debe seleccionar los artículos que desea recibir');
|
ShowWarningMessage('Debe seleccionar los artículos que desea recibir');
|
||||||
|
|
||||||
@ -108,6 +114,7 @@ end;
|
|||||||
constructor TfEditorDetallesSinRecibir.Create(AOwner: TComponent);
|
constructor TfEditorDetallesSinRecibir.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
FAlmacen := Nil;
|
||||||
ViewGrid := frViewDetallesSinRecibir1;
|
ViewGrid := frViewDetallesSinRecibir1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -128,6 +135,7 @@ end;
|
|||||||
destructor TfEditorDetallesSinRecibir.Destroy;
|
destructor TfEditorDetallesSinRecibir.Destroy;
|
||||||
begin
|
begin
|
||||||
FDetalles := NIL;
|
FDetalles := NIL;
|
||||||
|
FAlmacen := NIL;
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -164,6 +172,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function TfEditorDetallesSinRecibir.GetAlmacen: Integer;
|
||||||
|
begin
|
||||||
|
if Assigned(FAlmacen) then
|
||||||
|
Result := FAlmacen.ID
|
||||||
|
else
|
||||||
|
Result := -1;
|
||||||
|
end;
|
||||||
|
|
||||||
function TfEditorDetallesSinRecibir.GetController: IInventarioController;
|
function TfEditorDetallesSinRecibir.GetController: IInventarioController;
|
||||||
begin
|
begin
|
||||||
Result := FController;
|
Result := FController;
|
||||||
@ -190,6 +206,7 @@ var
|
|||||||
begin
|
begin
|
||||||
FTitulo := 'Detalle de artículos sin recibir - ' + dmUsuarios.EmpresaActual.NOMBRE;
|
FTitulo := 'Detalle de artículos sin recibir - ' + dmUsuarios.EmpresaActual.NOMBRE;
|
||||||
inherited PonerTitulos(FTitulo);
|
inherited PonerTitulos(FTitulo);
|
||||||
|
JvNavPanelHeader1.Caption := 'Almacén de entrada: ' + FAlmacen.NOMBRE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorDetallesSinRecibir.PrevisualizarInterno;
|
procedure TfEditorDetallesSinRecibir.PrevisualizarInterno;
|
||||||
@ -251,6 +268,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
procedure TfEditorDetallesSinRecibir.SetAlmacen(const Value: Integer);
|
||||||
|
var
|
||||||
|
AAlmacenesController : IAlmacenesController;
|
||||||
|
begin
|
||||||
|
AAlmacenesController := TAlmacenesController.Create;
|
||||||
|
try
|
||||||
|
FAlmacen := AAlmacenesController.Buscar(Value);
|
||||||
|
FAlmacen.DataTable.Active := True;
|
||||||
|
finally
|
||||||
|
AAlmacenesController := NIL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorDetallesSinRecibir.SetController(const Value: IInventarioController);
|
procedure TfEditorDetallesSinRecibir.SetController(const Value: IInventarioController);
|
||||||
begin
|
begin
|
||||||
FController := Value;
|
FController := Value;
|
||||||
|
|||||||
@ -295,9 +295,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorInventario.actRecibirExecute(Sender: TObject);
|
procedure TfEditorInventario.actRecibirExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
IDAlmacenDestino: Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
FController.VerSinRecibir;
|
IDAlmacenDestino := DarIDAlmacenSeleccionado('Elija el almacén de destino (donde entran los artículos)');
|
||||||
|
FController.VerSinRecibir(IDAlmacenDestino);
|
||||||
|
RefrescarInterno;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorInventario.actRecibirPedidoExecute(Sender: TObject);
|
procedure TfEditorInventario.actRecibirPedidoExecute(Sender: TObject);
|
||||||
@ -330,9 +335,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorInventario.actAlbaranarExecute(Sender: TObject);
|
procedure TfEditorInventario.actAlbaranarExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
IDAlmacenOrigen: Integer;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
FController.VerSinAlbaran; //(Inventario);
|
IDAlmacenOrigen := DarIDAlmacenSeleccionado('Elija el almacén de origen (de donde salen los artículos)');
|
||||||
|
FController.VerSinAlbaran(IDAlmacenOrigen);
|
||||||
|
RefrescarInterno;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorInventario.actContraerExecute(Sender: TObject);
|
procedure TfEditorInventario.actContraerExecute(Sender: TObject);
|
||||||
|
|||||||
@ -16,8 +16,8 @@ type
|
|||||||
function ElegirPedidoYGenerarAlbaranCli(var IDAlbaran: Integer) : Boolean;
|
function ElegirPedidoYGenerarAlbaranCli(var IDAlbaran: Integer) : Boolean;
|
||||||
|
|
||||||
//Metodos para albaranar articulos pendientes
|
//Metodos para albaranar articulos pendientes
|
||||||
function GenerarAlbaranesCli(AArticulos : IBizDetalleSinAlbaran; var AAlbaranes: IBizAlbaranCliente) : Boolean; overload;
|
function GenerarAlbaranesCli(AArticulos : IBizDetalleSinAlbaran; var AAlbaranes: IBizAlbaranCliente; const IDAlmacen:Integer) : Boolean; overload;
|
||||||
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranCliente; ACliente: IBizCliente; AArticulos: IBizDetalleSinAlbaran);
|
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranCliente; ACliente: IBizCliente; const IDAlmacen:Integer; AArticulos: IBizDetalleSinAlbaran);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -275,7 +275,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GenerarAlbaranesCli(AArticulos : IBizDetalleSinAlbaran; var AAlbaranes: IBizAlbaranCliente) : Boolean; overload;
|
function GenerarAlbaranesCli(AArticulos : IBizDetalleSinAlbaran; var AAlbaranes: IBizAlbaranCliente; const IDAlmacen:Integer) : Boolean; overload;
|
||||||
var
|
var
|
||||||
ARespuesta : Integer;
|
ARespuesta : Integer;
|
||||||
ACliente: IBizCliente;
|
ACliente: IBizCliente;
|
||||||
@ -306,7 +306,7 @@ begin
|
|||||||
ACliente := (AClientesController.Buscar(AArticulos.ID_CLIENTE) as IBizCliente);
|
ACliente := (AClientesController.Buscar(AArticulos.ID_CLIENTE) as IBizCliente);
|
||||||
ACliente.DataTable.Active := True;
|
ACliente.DataTable.Active := True;
|
||||||
AAlbaranes := AAlbaranesClienteController.Nuevo;
|
AAlbaranes := AAlbaranesClienteController.Nuevo;
|
||||||
InicializarAlbaran(AAlbaranes, ACliente, AArticulos);
|
InicializarAlbaran(AAlbaranes, ACliente, IDAlmacen, AArticulos);
|
||||||
|
|
||||||
//Aqui no es necesario BeginUpdate y EndUpdate de los detalles porque siempre añadimos una linea al final.
|
//Aqui no es necesario BeginUpdate y EndUpdate de los detalles porque siempre añadimos una linea al final.
|
||||||
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
|
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
|
||||||
@ -368,7 +368,7 @@ begin
|
|||||||
ACliente := (AClientesController.Buscar(AArticulos.ID_CLIENTE) as IBizCliente);
|
ACliente := (AClientesController.Buscar(AArticulos.ID_CLIENTE) as IBizCliente);
|
||||||
ACliente.DataTable.Active := True;
|
ACliente.DataTable.Active := True;
|
||||||
AAlbaranesClienteController.Anadir(AAlbaranes);
|
AAlbaranesClienteController.Anadir(AAlbaranes);
|
||||||
InicializarAlbaran(AAlbaranes, ACliente, AArticulos);
|
InicializarAlbaran(AAlbaranes, ACliente, IDAlmacen, AArticulos);
|
||||||
|
|
||||||
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
|
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
|
||||||
ADetallesAlbaranesCliController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
|
ADetallesAlbaranesCliController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
|
||||||
@ -430,11 +430,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranCliente; ACliente: IBizCliente; AArticulos: IBizDetalleSinAlbaran);
|
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranCliente; ACliente: IBizCliente; const IDAlmacen:Integer; AArticulos: IBizDetalleSinAlbaran);
|
||||||
begin
|
begin
|
||||||
//El albaran debe venir abierto y posicionado para la copia.
|
//El albaran debe venir abierto y posicionado para la copia.
|
||||||
AAlbaranes.Cliente := (ACliente as IBizCliente);
|
AAlbaranes.Cliente := (ACliente as IBizCliente);
|
||||||
AAlbaranes.TIPO := CTE_TIPO_ALBARAN;
|
AAlbaranes.TIPO := CTE_TIPO_ALBARAN;
|
||||||
|
AAlbaranes.ID_ALMACEN := IDAlmacen;
|
||||||
AAlbaranes.REFERENCIA_CLIENTE := AArticulos.REFERENCIA_CLI_PEDIDO;
|
AAlbaranes.REFERENCIA_CLIENTE := AArticulos.REFERENCIA_CLI_PEDIDO;
|
||||||
AAlbaranes.FECHA_PREVISTA_ENVIO := AArticulos.FECHA_PREVISTA_PEDIDO;
|
AAlbaranes.FECHA_PREVISTA_ENVIO := AArticulos.FECHA_PREVISTA_PEDIDO;
|
||||||
AAlbaranes.CALLE := AArticulos.CALLE;
|
AAlbaranes.CALLE := AArticulos.CALLE;
|
||||||
|
|||||||
@ -69,7 +69,7 @@ object dmGenerarAlbaranesProv: TdmGenerarAlbaranesProv
|
|||||||
Value = 200
|
Value = 200
|
||||||
Cancel = True
|
Cancel = True
|
||||||
end>
|
end>
|
||||||
ButtonBar.Buttons = []
|
ButtonBar.Buttons = [cbOK]
|
||||||
ButtonBar.Cancel = cbOK
|
ButtonBar.Cancel = cbOK
|
||||||
ButtonBar.UseCancel = False
|
ButtonBar.UseCancel = False
|
||||||
MainIcon = tdiCustom
|
MainIcon = tdiCustom
|
||||||
|
|||||||
@ -18,8 +18,8 @@ type
|
|||||||
function RecibirPedidoProv: Boolean; overload;
|
function RecibirPedidoProv: Boolean; overload;
|
||||||
|
|
||||||
//Metodos para recibir articulos pendientes
|
//Metodos para recibir articulos pendientes
|
||||||
function GenerarAlbaranesProv(AArticulos : IBizDetalleSinRecibir; var AAlbaranes: IBizAlbaranProveedor) : Boolean; overload;
|
function GenerarAlbaranesProv(AArticulos : IBizDetalleSinRecibir; var AAlbaranes: IBizAlbaranProveedor; const IDAlmacen:Integer) : Boolean; overload;
|
||||||
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranProveedor; AProveedor: IBizProveedor; AArticulos: IBizDetalleSinRecibir);
|
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranProveedor; AProveedor: IBizProveedor; const IDAlmacen:Integer; AArticulos: IBizDetalleSinRecibir);
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -356,7 +356,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GenerarAlbaranesProv(AArticulos : IBizDetalleSinRecibir; var AAlbaranes: IBizAlbaranProveedor) : Boolean; overload;
|
function GenerarAlbaranesProv(AArticulos : IBizDetalleSinRecibir; var AAlbaranes: IBizAlbaranProveedor; const IDAlmacen:Integer) : Boolean; overload;
|
||||||
var
|
var
|
||||||
ARespuesta : Integer;
|
ARespuesta : Integer;
|
||||||
AProveedor: IBizProveedor;
|
AProveedor: IBizProveedor;
|
||||||
@ -387,7 +387,7 @@ begin
|
|||||||
AProveedor := (AProveedoresController.Buscar(AArticulos.ID_PROVEEDOR) as IBizProveedor);
|
AProveedor := (AProveedoresController.Buscar(AArticulos.ID_PROVEEDOR) as IBizProveedor);
|
||||||
AProveedor.DataTable.Active := True;
|
AProveedor.DataTable.Active := True;
|
||||||
AAlbaranes := AAlbaranesProveedorController.Nuevo;
|
AAlbaranes := AAlbaranesProveedorController.Nuevo;
|
||||||
InicializarAlbaran(AAlbaranes, AProveedor, AArticulos);
|
InicializarAlbaran(AAlbaranes, AProveedor, IDAlmacen, AArticulos);
|
||||||
|
|
||||||
//Aqui no es necesario BeginUpdate y EndUpdate de los detalles porque siempre añadimos una linea al final.
|
//Aqui no es necesario BeginUpdate y EndUpdate de los detalles porque siempre añadimos una linea al final.
|
||||||
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
|
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
|
||||||
@ -449,7 +449,7 @@ begin
|
|||||||
AProveedor := (AProveedoresController.Buscar(AArticulos.ID_PROVEEDOR) as IBizProveedor);
|
AProveedor := (AProveedoresController.Buscar(AArticulos.ID_PROVEEDOR) as IBizProveedor);
|
||||||
AProveedor.DataTable.Active := True;
|
AProveedor.DataTable.Active := True;
|
||||||
AAlbaranesProveedorController.Anadir(AAlbaranes);
|
AAlbaranesProveedorController.Anadir(AAlbaranes);
|
||||||
InicializarAlbaran(AAlbaranes, AProveedor, AArticulos);
|
InicializarAlbaran(AAlbaranes, AProveedor, IDAlmacen, AArticulos);
|
||||||
|
|
||||||
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
|
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
|
||||||
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
|
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
|
||||||
@ -512,13 +512,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranProveedor; AProveedor: IBizProveedor; AArticulos: IBizDetalleSinRecibir);
|
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranProveedor; AProveedor: IBizProveedor; const IDAlmacen:Integer; AArticulos: IBizDetalleSinRecibir);
|
||||||
begin
|
begin
|
||||||
//El albaran debe venir abierto y posicionado para la copia.
|
//El albaran debe venir abierto y posicionado para la copia.
|
||||||
AAlbaranes.Proveedor := (AProveedor as IBizProveedor);
|
AAlbaranes.Proveedor := (AProveedor as IBizProveedor);
|
||||||
AAlbaranes.TIPO := CTE_TIPO_ALBARAN;
|
AAlbaranes.TIPO := CTE_TIPO_ALBARAN;
|
||||||
// AAlbaranes.REFERENCIA_CLIENTE := AArticulos.REFERENCIA_CLI_PEDIDO;
|
AAlbaranes.ID_ALMACEN := IDAlmacen;
|
||||||
// AAlbaranes.FECHA_PREVISTA_ENVIO := AArticulos.FECHA_PREVISTA_PEDIDO;
|
|
||||||
AAlbaranes.CALLE := AArticulos.CALLE;
|
AAlbaranes.CALLE := AArticulos.CALLE;
|
||||||
AAlbaranes.CODIGO_POSTAL := AArticulos.CODIGO_POSTAL;
|
AAlbaranes.CODIGO_POSTAL := AArticulos.CODIGO_POSTAL;
|
||||||
AAlbaranes.POBLACION := AArticulos.POBLACION;
|
AAlbaranes.POBLACION := AArticulos.POBLACION;
|
||||||
|
|||||||
@ -16,7 +16,7 @@ BEGIN
|
|||||||
VALUE "FileVersion", "2.9.0.0\0"
|
VALUE "FileVersion", "2.9.0.0\0"
|
||||||
VALUE "ProductName", "FactuGES Server\0"
|
VALUE "ProductName", "FactuGES Server\0"
|
||||||
VALUE "ProductVersion", "2.9.0.0\0"
|
VALUE "ProductVersion", "2.9.0.0\0"
|
||||||
VALUE "CompileDate", "miércoles, 28 de mayo de 2008 19:02\0"
|
VALUE "CompileDate", "miércoles, 28 de mayo de 2008 19:25\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user