Se agrega funcionalidad para poder recibir articulos de pedidos diferentes.

git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@232 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
roberto 2008-05-28 17:19:09 +00:00
parent 8fb8bf219f
commit c88a39f2d6
21 changed files with 5136 additions and 29 deletions

View File

@ -53,6 +53,7 @@ contains
uIEditorElegirArticulosAlmacen in 'View\uIEditorElegirArticulosAlmacen.pas',
uInventarioUtils in '..\Utiles\uInventarioUtils.pas' {dmInventarioUtils: TDataModule},
uIEditorDetalleReservas in 'View\uIEditorDetalleReservas.pas',
uIEditorDetallesSinAlbaran in 'View\uIEditorDetallesSinAlbaran.pas';
uIEditorDetallesSinAlbaran in 'View\uIEditorDetallesSinAlbaran.pas',
uIEditorDetallesSinRecibir in 'View\uIEditorDetallesSinRecibir.pas';
end.

View File

@ -0,0 +1,23 @@
unit uIEditorDetallesSinRecibir;
interface
uses
uEditorGridBase, uBizInventario, uInventarioController;
type
IEditorDetallesSinRecibir = interface(IEditorGridBase)
['{EE301C2F-98DC-49CD-B7EA-D29D0B9326D8}']
function GetDetalles: IBizDetalleSinRecibir;
procedure SetDetalles(const Value: IBizDetalleSinRecibir);
property Detalles: IBizDetalleSinRecibir read GetDetalles write SetDetalles;
function GetController : IInventarioController;
procedure SetController (const Value : IInventarioController);
property Controller : IInventarioController read GetController write SetController;
end;
implementation
end.

View File

@ -25,14 +25,17 @@ type
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
procedure VerTodos(AInventario: IBizInventario);
procedure VerReservas(AArticulo: IBizInventario);
procedure VerSinAlbaran; //(AArticulo: IBizInventario);
procedure VerSinAlbaran;
procedure VerSinRecibir;
function BuscarTodos: IBizInventario;
function Buscar(const ID_ALMACEN: Integer): IBizInventario;
function BuscarDetalleReservas: IBizDetalleReservas;
function BuscarDetallesSinAlbaran: IBizDetalleSinAlbaran;
function BuscarDetallesSinRecibir: IBizDetalleSinRecibir;
function ExtraerSeleccionados(AArticulos: IBizInventario) : IBizInventario; overload;
function ExtraerSeleccionados(AArticulos: IBizDetalleSinAlbaran) : IBizDetalleSinAlbaran; overload;
function ExtraerSeleccionados(AArticulos: IBizDetalleSinRecibir) : IBizDetalleSinRecibir; overload;
procedure Anadir(AArticulos, AInventario : IBizInventario);
function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean;
@ -83,6 +86,7 @@ type
procedure FiltrarEmpresa(AInventario: IBizInventario); overload;
procedure FiltrarEmpresa(ADetalleReservas: IBizDetalleReservas); overload;
procedure FiltrarEmpresa(ADetalleSinAlbaran: IBizDetalleSinAlbaran); overload;
procedure FiltrarEmpresa(ADetalleSinRecibir: IBizDetalleSinRecibir); overload;
procedure DeshabilitarOnCalcFields(Sender: TDADataTable);
function ValidarCantidades(AArticulos: IBizInventario): Boolean;
function Validar(AArticulos: IBizInventario): Boolean;
@ -110,9 +114,11 @@ type
function BuscarTodos: IBizInventario;
function BuscarDetalleReservas: IBizDetalleReservas;
function BuscarDetallesSinAlbaran: IBizDetalleSinAlbaran;
function BuscarDetallesSinRecibir: IBizDetalleSinRecibir;
function ElegirArticulos(AArticulos : IBizInventario; AMensaje: String; AMultiSelect: Boolean): IBizInventario;
function ExtraerSeleccionados(AArticulos: IBizInventario) : IBizInventario; overload;
function ExtraerSeleccionados(AArticulos: IBizDetalleSinAlbaran) : IBizDetalleSinAlbaran; overload;
function ExtraerSeleccionados(AArticulos: IBizDetalleSinRecibir) : IBizDetalleSinRecibir; overload;
procedure Anadir(AArticulos, AInventario : IBizInventario);
function Eliminar(AInventario : IBizInventario; Todos: Boolean; ApplyUpdates: Boolean): Boolean;
@ -128,6 +134,7 @@ type
procedure VerReservas(AArticulo: IBizInventario);
procedure VerSinAlbaran;
procedure VerSinRecibir;
function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean;
@ -146,7 +153,7 @@ uses
uControllerDetallesBase, uDialogUtils,
uIEditorEntradaSalidaArticulos, schArticulosClient_Intf,
uIEditorElegirArticulosAlmacen, uInventarioUtils,
uIEditorDetalleReservas, uIEditorDetallesSinAlbaran;
uIEditorDetalleReservas, uIEditorDetallesSinAlbaran, uIEditorDetallesSinRecibir;
{ TInventarioController }
@ -202,6 +209,12 @@ begin
FiltrarEmpresa(Result);
end;
function TInventarioController.BuscarDetallesSinRecibir: IBizDetalleSinRecibir;
begin
Result := FDataModule.GetDetalleSinRecibir;
FiltrarEmpresa(Result);
end;
function TInventarioController.BuscarTodos: IBizInventario;
begin
Result := FDataModule.GetItems;
@ -538,6 +551,33 @@ begin
end;
end;
procedure TInventarioController.VerSinRecibir;
var
AEditor : IEditorDetallesSinRecibir;
begin
AEditor := NIL;
ShowHourglassCursor;
try
CreateEditor('EditorDetallesSinRecibir', IEditorDetallesSinRecibir, AEditor);
with AEditor do
begin
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Detalles := BuscarDetallesSinRecibir;
MultiSelect := True;
end;
finally
HideHourglassCursor;
end;
if Assigned(AEditor) then
try
AEditor.ShowModal;
AEditor.Release;
finally
AEditor := NIL;
end;
end;
procedure TInventarioController.VerTodos(AInventario: IBizInventario);
var
AEditor : IEditorInventario;
@ -628,6 +668,15 @@ begin
Result := ASeleccionados;
end;
function TInventarioController.ExtraerSeleccionados(AArticulos: IBizDetalleSinRecibir): IBizDetalleSinRecibir;
var
ASeleccionados : IBizDetalleSinRecibir;
begin
ASeleccionados := (FDataModule as IDataModuleInventario).GetDetalleSinRecibirVacio;
CopyDataTable(AArticulos.DataTable, ASeleccionados.DataTable, True);
Result := ASeleccionados;
end;
{procedure TInventarioController.RecibirArticulos(const APedido: IBizPedidoProveedor; const CodigoAlmacenDes: Integer);
{var
AArticulos: IBizInventario;
@ -1216,4 +1265,21 @@ begin
end;
end;
procedure TInventarioController.FiltrarEmpresa(ADetalleSinRecibir: IBizDetalleSinRecibir);
begin
if ADetalleSinRecibir.DataTable.Active then
ADetalleSinRecibir.DataTable.Active := False;
// Filtrar los inventario actuales por empresa
with ADetalleSinRecibir.DataTable.Where do
begin
if NotEmpty then
AddOperator(opAND);
OpenBraket;
AddText(fld_DETALLE_SIN_RECIBIRID_EMPRESA + ' = ' + IntToStr(dmUsuarios.IDEmpresaActual));
CloseBraket;
end;
end;
end.

View File

@ -1201,4 +1201,459 @@ object DataModuleInventario: TDataModuleInventario
Left = 408
Top = 232
end
object tbl_DETALLE_SIN_RECIBIR: TDACDSDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID_PEDIDO'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_PEDIDO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_EMPRESA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REFERENCIA_PEDIDO'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Ref. pedido'
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_REFERENCIA_PEDIDO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FECHA_PEDIDO'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Fecha'
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_FECHA_PEDIDO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CALLE'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_CALLE'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FECHA_CONFIRMACION'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_RECIBIR_FECHA_CONFIRMACION'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_RECIBIR_ID_PROVEEDOR'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CODIGO_POSTAL'
DataType = datString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_CODIGO_POSTAL'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'POBLACION'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_POBLACION'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PROVINCIA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_PROVINCIA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PERSONA_CONTACTO'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_PERSONA_CONTACTO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'TELEFONO'
DataType = datString
Size = 25
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_TELEFONO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'IVA'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_IVA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_FORMA_PAGO'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_FORMA_PAGO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PROVEEDOR'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_RECIBIR_PROVEEDOR'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_ARTICULO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FAMILIA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Familia'
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_FAMILIA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Referencia'
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_REFERENCIA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Ref. proveedor'
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_REFERENCIA_PROVEEDOR'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Descripci'#243'n'
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_DESCRIPCION'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CANTIDAD_PEDIDA'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Cant. pedida'
Alignment = taRightJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_CANTIDAD_PEDIDA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CANTIDAD_RECIBIDA'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Cant. Recibida'
Alignment = taRightJustify
DictionaryEntry = 'DETALLE_SIN_RECIBIR_CANTIDAD_RECIBIDA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CANTIDAD_PENDIENTE'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Cant. pendiente'
Alignment = taRightJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_CANTIDAD_PENDIENTE'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PRECIO_COSTE'
DataType = datCurrency
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_PRECIO_COSTE'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'DESCUENTO'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'DETALLE_SIN_ALBARANAR_DESCUENTO'
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_DESCUENTO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PRECIO_NETO'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_RECIBIR_PRECIO_NETO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PRECIO_PORTE'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_RECIBIR_PRECIO_PORTE'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
Params = <>
MasterMappingMode = mmDataRequest
StreamingOptions = [soDisableEventsWhileStreaming]
SchemaCall.MethodName = 'GetDatasetSchema'
SchemaCall.Params = <
item
Name = 'Result'
ParamType = fResult
DataType = rtBinary
end
item
Name = 'aDatasetName'
ParamType = fIn
DataType = rtString
Value = 'DETALLE_SIN_RECIBIR'
end>
DataRequestCall.MethodName = 'GetDatasetDataEx'
DataRequestCall.Params = <
item
Name = 'Result'
ParamType = fResult
DataType = rtBinary
end
item
Name = 'DatasetName'
ParamType = fIn
DataType = rtString
Value = 'DETALLE_SIN_RECIBIR'
end
item
Name = 'Params'
ParamType = fIn
DataType = rtUserDefined
UserClassName = 'TDADatasetParamArray'
end
item
Name = 'UserFilter'
ParamType = fIn
DataType = rtString
Value = ''
end
item
Name = 'IncludeSchema'
ParamType = fIn
DataType = rtBoolean
Value = False
end
item
Name = 'MaxRecords'
ParamType = fIn
DataType = rtInteger
Value = -1
end>
DataUpdateCall.MethodName = 'UpdateData'
DataUpdateCall.Params = <
item
Name = 'Result'
ParamType = fResult
DataType = rtBinary
end
item
Name = 'Delta'
ParamType = fIn
DataType = rtBinary
end>
ScriptCall.MethodName = 'GetDatasetScripts'
ScriptCall.Params = <
item
Name = 'Result'
ParamType = fResult
DataType = rtString
Value = ''
end
item
Name = 'DatasetNames'
ParamType = fIn
DataType = rtString
Value = 'DETALLE_SIN_RECIBIR'
end>
ReadOnly = False
RemoteService = RORemoteService
Adapter = DABinAdapter
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'DETALLE_SIN_RECIBIR'
IndexDefs = <>
Left = 240
Top = 296
end
object ds_DETALLE_SIN_RECIBIR: TDADataSource
DataTable = tbl_DETALLE_SIN_RECIBIR
Left = 240
Top = 232
end
end

View File

@ -23,6 +23,8 @@ type
dsDetalleReservas: TDADataSource;
tbl_DETALLE_SIN_ALBARANAR: TDACDSDataTable;
ds_DETALLE_SIN_ALBARANAR: TDADataSource;
tbl_DETALLE_SIN_RECIBIR: TDACDSDataTable;
ds_DETALLE_SIN_RECIBIR: TDADataSource;
procedure DAClientDataModuleCreate(Sender: TObject);
protected
@ -35,6 +37,9 @@ type
function GetDetalleReservas: IBizDetalleReservas;
function GetDetalleSinAlbaran: IBizDetalleSinAlbaran;
function GetDetalleSinAlbaranVacio: IBizDetalleSinAlbaran;
function GetDetalleSinRecibir: IBizDetalleSinRecibir;
function GetDetalleSinRecibirVacio: IBizDetalleSinRecibir;
end;
implementation
@ -126,6 +131,39 @@ begin
end;
end;
function TDataModuleInventario.GetDetalleSinRecibir: IBizDetalleSinRecibir;
var
ADetalleSinRecibir : TDACDSDataTable;
begin
ShowHourglassCursor;
try
ADetalleSinRecibir := _CloneDataTable(tbl_Detalle_sin_recibir);
ADetalleSinRecibir.BusinessRulesID := BIZ_CLIENT_DETALLE_SINRECIBIR;
Result := (ADetalleSinRecibir as IBizDetalleSinRecibir);
finally
HideHourglassCursor;
end;
end;
function TDataModuleInventario.GetDetalleSinRecibirVacio: IBizDetalleSinRecibir;
begin
ShowHourglassCursor;
try
Result := Self.GetDetalleSinRecibir;
with Result.DataTable.Where do
begin
if NotEmpty then
AddOperator(opAND);
OpenBraket;
AddText(fld_DETALLE_SIN_RECIBIRID_PEDIDO + ' = ' + IntToStr(ID_NULO));
CloseBraket;
end;
finally
HideHourglassCursor;
end;
end;
function TDataModuleInventario.GetItems(const ID_ALMACEN: Integer): IBizInventario;
begin
ShowHourglassCursor;

View File

@ -23,7 +23,9 @@
<Projects Name="FactuGES_Server.exe">..\..\Servidor\FactuGES_Server.bdsproj</Projects>
<Projects Name="AlbaranesCliente_view.bpl">..\Albaranes de cliente\Views\AlbaranesCliente_view.bdsproj</Projects>
<Projects Name="FactuGES.exe">..\..\Cliente\FactuGES.bdsproj</Projects>
<Projects Name="Targets">DataAbstract_D10.bpl Base.bpl ControllerBase.bpl GUIBase.bpl Contactos_view.bpl Articulos_view.bpl Inventario_model.bpl Inventario_data.bpl Inventario_controller.bpl Inventario_view.bpl Inventario_plugin.bpl FactuGES_Server.exe AlbaranesCliente_view.bpl FactuGES.exe</Projects>
<Projects Name="PedProv_AlbProv_relation.bpl">..\Relaciones\Pedidos de proveedor - Albaranes de proveedor\PedProv_AlbProv_relation.bdsproj</Projects>
<Projects Name="PedCli_AlbCli_relation.bpl">..\Relaciones\Pedidos de cliente - Albaranes de cliente\PedCli_AlbCli_relation.bdsproj</Projects>
<Projects Name="Targets">DataAbstract_D10.bpl Base.bpl ControllerBase.bpl GUIBase.bpl Contactos_view.bpl Articulos_view.bpl Inventario_model.bpl Inventario_data.bpl Inventario_controller.bpl Inventario_view.bpl Inventario_plugin.bpl FactuGES_Server.exe AlbaranesCliente_view.bpl FactuGES.exe PedProv_AlbProv_relation.bpl PedCli_AlbCli_relation.bpl</Projects>
</Projects>
<Dependencies/>
</Default.Personality>

View File

@ -13,7 +13,9 @@ type
function GetNextID(const DataSetName : String) : Integer;
function GetDetalleReservas: IBizDetalleReservas;
function GetDetalleSinAlbaran: IBizDetalleSinAlbaran;
function GetDetalleSinAlbaranVacio: IBizDetalleSinAlbaran;
function GetDetalleSinAlbaranVacio: IBizDetalleSinAlbaran;
function GetDetalleSinRecibir: IBizDetalleSinRecibir;
function GetDetalleSinRecibirVacio: IBizDetalleSinRecibir;
end;
implementation

View File

@ -9,14 +9,16 @@ 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_INVENTARIO = '{1C5C9AF8-6616-4659-8E6C-66807F7EFFAE}';
RID_DETALLE_RESERVAS_INV = '{7DB6D0CA-3D63-401A-A440-22BAE79E56BA}';
RID_DETALLE_SIN_ALBARANAR = '{5572E191-662F-40C7-8EAF-784411283B87}';
RID_INVENTARIO = '{EEDDC06C-8E96-434B-9DA3-1F49EA694DFA}';
RID_DETALLE_RESERVAS_INV = '{C1CF7438-A7CF-4434-8E77-06B019ACFADC}';
RID_DETALLE_SIN_ALBARANAR = '{FB4FBF7C-5C73-4A6D-8669-E9C2821F2386}';
RID_DETALLE_SIN_RECIBIR = '{90278CE5-05F6-425B-985B-C1F560010326}';
{ Data table names }
nme_INVENTARIO = 'INVENTARIO';
nme_DETALLE_RESERVAS_INV = 'DETALLE_RESERVAS_INV';
nme_DETALLE_SIN_ALBARANAR = 'DETALLE_SIN_ALBARANAR';
nme_DETALLE_SIN_RECIBIR = 'DETALLE_SIN_RECIBIR';
{ INVENTARIO fields }
fld_INVENTARIOID = 'ID';
@ -158,10 +160,70 @@ const
idx_DETALLE_SIN_ALBARANARDESCUENTO = 28;
idx_DETALLE_SIN_ALBARANARPRECION_NETO = 29;
{ DETALLE_SIN_RECIBIR fields }
fld_DETALLE_SIN_RECIBIRID_PEDIDO = 'ID_PEDIDO';
fld_DETALLE_SIN_RECIBIRID_EMPRESA = 'ID_EMPRESA';
fld_DETALLE_SIN_RECIBIRREFERENCIA_PEDIDO = 'REFERENCIA_PEDIDO';
fld_DETALLE_SIN_RECIBIRFECHA_PEDIDO = 'FECHA_PEDIDO';
fld_DETALLE_SIN_RECIBIRCALLE = 'CALLE';
fld_DETALLE_SIN_RECIBIRFECHA_CONFIRMACION = 'FECHA_CONFIRMACION';
fld_DETALLE_SIN_RECIBIRID_PROVEEDOR = 'ID_PROVEEDOR';
fld_DETALLE_SIN_RECIBIRCODIGO_POSTAL = 'CODIGO_POSTAL';
fld_DETALLE_SIN_RECIBIRPOBLACION = 'POBLACION';
fld_DETALLE_SIN_RECIBIRPROVINCIA = 'PROVINCIA';
fld_DETALLE_SIN_RECIBIRPERSONA_CONTACTO = 'PERSONA_CONTACTO';
fld_DETALLE_SIN_RECIBIRTELEFONO = 'TELEFONO';
fld_DETALLE_SIN_RECIBIRIVA = 'IVA';
fld_DETALLE_SIN_RECIBIRID_FORMA_PAGO = 'ID_FORMA_PAGO';
fld_DETALLE_SIN_RECIBIRID = 'ID';
fld_DETALLE_SIN_RECIBIRPROVEEDOR = 'PROVEEDOR';
fld_DETALLE_SIN_RECIBIRID_ARTICULO = 'ID_ARTICULO';
fld_DETALLE_SIN_RECIBIRFAMILIA = 'FAMILIA';
fld_DETALLE_SIN_RECIBIRREFERENCIA = 'REFERENCIA';
fld_DETALLE_SIN_RECIBIRREFERENCIA_PROVEEDOR = 'REFERENCIA_PROVEEDOR';
fld_DETALLE_SIN_RECIBIRDESCRIPCION = 'DESCRIPCION';
fld_DETALLE_SIN_RECIBIRCANTIDAD_PEDIDA = 'CANTIDAD_PEDIDA';
fld_DETALLE_SIN_RECIBIRCANTIDAD_RECIBIDA = 'CANTIDAD_RECIBIDA';
fld_DETALLE_SIN_RECIBIRCANTIDAD_PENDIENTE = 'CANTIDAD_PENDIENTE';
fld_DETALLE_SIN_RECIBIRPRECIO_COSTE = 'PRECIO_COSTE';
fld_DETALLE_SIN_RECIBIRDESCUENTO = 'DESCUENTO';
fld_DETALLE_SIN_RECIBIRPRECIO_NETO = 'PRECIO_NETO';
fld_DETALLE_SIN_RECIBIRPRECIO_PORTE = 'PRECIO_PORTE';
{ DETALLE_SIN_RECIBIR field indexes }
idx_DETALLE_SIN_RECIBIRID_PEDIDO = 0;
idx_DETALLE_SIN_RECIBIRID_EMPRESA = 1;
idx_DETALLE_SIN_RECIBIRREFERENCIA_PEDIDO = 2;
idx_DETALLE_SIN_RECIBIRFECHA_PEDIDO = 3;
idx_DETALLE_SIN_RECIBIRCALLE = 4;
idx_DETALLE_SIN_RECIBIRFECHA_CONFIRMACION = 5;
idx_DETALLE_SIN_RECIBIRID_PROVEEDOR = 6;
idx_DETALLE_SIN_RECIBIRCODIGO_POSTAL = 7;
idx_DETALLE_SIN_RECIBIRPOBLACION = 8;
idx_DETALLE_SIN_RECIBIRPROVINCIA = 9;
idx_DETALLE_SIN_RECIBIRPERSONA_CONTACTO = 10;
idx_DETALLE_SIN_RECIBIRTELEFONO = 11;
idx_DETALLE_SIN_RECIBIRIVA = 12;
idx_DETALLE_SIN_RECIBIRID_FORMA_PAGO = 13;
idx_DETALLE_SIN_RECIBIRID = 14;
idx_DETALLE_SIN_RECIBIRPROVEEDOR = 15;
idx_DETALLE_SIN_RECIBIRID_ARTICULO = 16;
idx_DETALLE_SIN_RECIBIRFAMILIA = 17;
idx_DETALLE_SIN_RECIBIRREFERENCIA = 18;
idx_DETALLE_SIN_RECIBIRREFERENCIA_PROVEEDOR = 19;
idx_DETALLE_SIN_RECIBIRDESCRIPCION = 20;
idx_DETALLE_SIN_RECIBIRCANTIDAD_PEDIDA = 21;
idx_DETALLE_SIN_RECIBIRCANTIDAD_RECIBIDA = 22;
idx_DETALLE_SIN_RECIBIRCANTIDAD_PENDIENTE = 23;
idx_DETALLE_SIN_RECIBIRPRECIO_COSTE = 24;
idx_DETALLE_SIN_RECIBIRDESCUENTO = 25;
idx_DETALLE_SIN_RECIBIRPRECIO_NETO = 26;
idx_DETALLE_SIN_RECIBIRPRECIO_PORTE = 27;
type
{ IINVENTARIO }
IINVENTARIO = interface(IDAStronglyTypedDataTable)
['{0A3AF7B9-3BF9-4E96-B058-65B1DF87FD8C}']
['{2DE936D7-2F07-4408-B26A-6453B08FC9FF}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -298,7 +360,7 @@ type
{ IDETALLE_RESERVAS_INV }
IDETALLE_RESERVAS_INV = interface(IDAStronglyTypedDataTable)
['{D3489D20-DFC4-49F4-BBEB-A5D87EBC7CF6}']
['{8530D65C-47B4-47CB-B05B-95DAC2A8A44E}']
{ Property getters and setters }
function GetID_ALBValue: Integer;
procedure SetID_ALBValue(const aValue: Integer);
@ -411,7 +473,7 @@ type
{ IDETALLE_SIN_ALBARANAR }
IDETALLE_SIN_ALBARANAR = interface(IDAStronglyTypedDataTable)
['{47DAB2C7-702A-48C9-B704-653CE805A737}']
['{2E09F69C-DDF7-4D84-9020-83B92CE2F7AC}']
{ Property getters and setters }
function GetID_PEDIDOValue: Integer;
procedure SetID_PEDIDOValue(const aValue: Integer);
@ -612,6 +674,197 @@ type
end;
{ IDETALLE_SIN_RECIBIR }
IDETALLE_SIN_RECIBIR = interface(IDAStronglyTypedDataTable)
['{8656D160-7755-4684-BA51-6C5B88AB8ADD}']
{ Property getters and setters }
function GetID_PEDIDOValue: Integer;
procedure SetID_PEDIDOValue(const aValue: Integer);
function GetID_EMPRESAValue: Integer;
procedure SetID_EMPRESAValue(const aValue: Integer);
function GetREFERENCIA_PEDIDOValue: String;
procedure SetREFERENCIA_PEDIDOValue(const aValue: String);
function GetFECHA_PEDIDOValue: DateTime;
procedure SetFECHA_PEDIDOValue(const aValue: DateTime);
function GetCALLEValue: String;
procedure SetCALLEValue(const aValue: String);
function GetFECHA_CONFIRMACIONValue: DateTime;
procedure SetFECHA_CONFIRMACIONValue(const aValue: DateTime);
function GetID_PROVEEDORValue: Integer;
procedure SetID_PROVEEDORValue(const aValue: Integer);
function GetCODIGO_POSTALValue: String;
procedure SetCODIGO_POSTALValue(const aValue: String);
function GetPOBLACIONValue: String;
procedure SetPOBLACIONValue(const aValue: String);
function GetPROVINCIAValue: String;
procedure SetPROVINCIAValue(const aValue: String);
function GetPERSONA_CONTACTOValue: String;
procedure SetPERSONA_CONTACTOValue(const aValue: String);
function GetTELEFONOValue: String;
procedure SetTELEFONOValue(const aValue: String);
function GetIVAValue: Float;
procedure SetIVAValue(const aValue: Float);
function GetID_FORMA_PAGOValue: Integer;
procedure SetID_FORMA_PAGOValue(const aValue: Integer);
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
function GetPROVEEDORValue: String;
procedure SetPROVEEDORValue(const aValue: String);
function GetID_ARTICULOValue: Integer;
procedure SetID_ARTICULOValue(const aValue: Integer);
function GetFAMILIAValue: String;
procedure SetFAMILIAValue(const aValue: String);
function GetREFERENCIAValue: String;
procedure SetREFERENCIAValue(const aValue: String);
function GetREFERENCIA_PROVEEDORValue: String;
procedure SetREFERENCIA_PROVEEDORValue(const aValue: String);
function GetDESCRIPCIONValue: String;
procedure SetDESCRIPCIONValue(const aValue: String);
function GetCANTIDAD_PEDIDAValue: Integer;
procedure SetCANTIDAD_PEDIDAValue(const aValue: Integer);
function GetCANTIDAD_RECIBIDAValue: Integer;
procedure SetCANTIDAD_RECIBIDAValue(const aValue: Integer);
function GetCANTIDAD_PENDIENTEValue: Integer;
procedure SetCANTIDAD_PENDIENTEValue(const aValue: Integer);
function GetPRECIO_COSTEValue: Currency;
procedure SetPRECIO_COSTEValue(const aValue: Currency);
function GetDESCUENTOValue: Float;
procedure SetDESCUENTOValue(const aValue: Float);
function GetPRECIO_NETOValue: Float;
procedure SetPRECIO_NETOValue(const aValue: Float);
function GetPRECIO_PORTEValue: Float;
procedure SetPRECIO_PORTEValue(const aValue: Float);
{ Properties }
property ID_PEDIDO: Integer read GetID_PEDIDOValue write SetID_PEDIDOValue;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
property REFERENCIA_PEDIDO: String read GetREFERENCIA_PEDIDOValue write SetREFERENCIA_PEDIDOValue;
property FECHA_PEDIDO: DateTime read GetFECHA_PEDIDOValue write SetFECHA_PEDIDOValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
property FECHA_CONFIRMACION: DateTime read GetFECHA_CONFIRMACIONValue write SetFECHA_CONFIRMACIONValue;
property ID_PROVEEDOR: Integer read GetID_PROVEEDORValue write SetID_PROVEEDORValue;
property CODIGO_POSTAL: String read GetCODIGO_POSTALValue write SetCODIGO_POSTALValue;
property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue;
property PROVINCIA: String read GetPROVINCIAValue write SetPROVINCIAValue;
property PERSONA_CONTACTO: String read GetPERSONA_CONTACTOValue write SetPERSONA_CONTACTOValue;
property TELEFONO: String read GetTELEFONOValue write SetTELEFONOValue;
property IVA: Float read GetIVAValue write SetIVAValue;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property ID: Integer read GetIDValue write SetIDValue;
property PROVEEDOR: String read GetPROVEEDORValue write SetPROVEEDORValue;
property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
property FAMILIA: String read GetFAMILIAValue write SetFAMILIAValue;
property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue;
property REFERENCIA_PROVEEDOR: String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property CANTIDAD_PEDIDA: Integer read GetCANTIDAD_PEDIDAValue write SetCANTIDAD_PEDIDAValue;
property CANTIDAD_RECIBIDA: Integer read GetCANTIDAD_RECIBIDAValue write SetCANTIDAD_RECIBIDAValue;
property CANTIDAD_PENDIENTE: Integer read GetCANTIDAD_PENDIENTEValue write SetCANTIDAD_PENDIENTEValue;
property PRECIO_COSTE: Currency read GetPRECIO_COSTEValue write SetPRECIO_COSTEValue;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property PRECIO_NETO: Float read GetPRECIO_NETOValue write SetPRECIO_NETOValue;
property PRECIO_PORTE: Float read GetPRECIO_PORTEValue write SetPRECIO_PORTEValue;
end;
{ TDETALLE_SIN_RECIBIRDataTableRules }
TDETALLE_SIN_RECIBIRDataTableRules = class(TDADataTableRules, IDETALLE_SIN_RECIBIR)
private
protected
{ Property getters and setters }
function GetID_PEDIDOValue: Integer; virtual;
procedure SetID_PEDIDOValue(const aValue: Integer); virtual;
function GetID_EMPRESAValue: Integer; virtual;
procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
function GetREFERENCIA_PEDIDOValue: String; virtual;
procedure SetREFERENCIA_PEDIDOValue(const aValue: String); virtual;
function GetFECHA_PEDIDOValue: DateTime; virtual;
procedure SetFECHA_PEDIDOValue(const aValue: DateTime); virtual;
function GetCALLEValue: String; virtual;
procedure SetCALLEValue(const aValue: String); virtual;
function GetFECHA_CONFIRMACIONValue: DateTime; virtual;
procedure SetFECHA_CONFIRMACIONValue(const aValue: DateTime); virtual;
function GetID_PROVEEDORValue: Integer; virtual;
procedure SetID_PROVEEDORValue(const aValue: Integer); virtual;
function GetCODIGO_POSTALValue: String; virtual;
procedure SetCODIGO_POSTALValue(const aValue: String); virtual;
function GetPOBLACIONValue: String; virtual;
procedure SetPOBLACIONValue(const aValue: String); virtual;
function GetPROVINCIAValue: String; virtual;
procedure SetPROVINCIAValue(const aValue: String); virtual;
function GetPERSONA_CONTACTOValue: String; virtual;
procedure SetPERSONA_CONTACTOValue(const aValue: String); virtual;
function GetTELEFONOValue: String; virtual;
procedure SetTELEFONOValue(const aValue: String); virtual;
function GetIVAValue: Float; virtual;
procedure SetIVAValue(const aValue: Float); virtual;
function GetID_FORMA_PAGOValue: Integer; virtual;
procedure SetID_FORMA_PAGOValue(const aValue: Integer); virtual;
function GetIDValue: Integer; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
function GetPROVEEDORValue: String; virtual;
procedure SetPROVEEDORValue(const aValue: String); virtual;
function GetID_ARTICULOValue: Integer; virtual;
procedure SetID_ARTICULOValue(const aValue: Integer); virtual;
function GetFAMILIAValue: String; virtual;
procedure SetFAMILIAValue(const aValue: String); virtual;
function GetREFERENCIAValue: String; virtual;
procedure SetREFERENCIAValue(const aValue: String); virtual;
function GetREFERENCIA_PROVEEDORValue: String; virtual;
procedure SetREFERENCIA_PROVEEDORValue(const aValue: String); virtual;
function GetDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetCANTIDAD_PEDIDAValue: Integer; virtual;
procedure SetCANTIDAD_PEDIDAValue(const aValue: Integer); virtual;
function GetCANTIDAD_RECIBIDAValue: Integer; virtual;
procedure SetCANTIDAD_RECIBIDAValue(const aValue: Integer); virtual;
function GetCANTIDAD_PENDIENTEValue: Integer; virtual;
procedure SetCANTIDAD_PENDIENTEValue(const aValue: Integer); virtual;
function GetPRECIO_COSTEValue: Currency; virtual;
procedure SetPRECIO_COSTEValue(const aValue: Currency); virtual;
function GetDESCUENTOValue: Float; virtual;
procedure SetDESCUENTOValue(const aValue: Float); virtual;
function GetPRECIO_NETOValue: Float; virtual;
procedure SetPRECIO_NETOValue(const aValue: Float); virtual;
function GetPRECIO_PORTEValue: Float; virtual;
procedure SetPRECIO_PORTEValue(const aValue: Float); virtual;
{ Properties }
property ID_PEDIDO: Integer read GetID_PEDIDOValue write SetID_PEDIDOValue;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
property REFERENCIA_PEDIDO: String read GetREFERENCIA_PEDIDOValue write SetREFERENCIA_PEDIDOValue;
property FECHA_PEDIDO: DateTime read GetFECHA_PEDIDOValue write SetFECHA_PEDIDOValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
property FECHA_CONFIRMACION: DateTime read GetFECHA_CONFIRMACIONValue write SetFECHA_CONFIRMACIONValue;
property ID_PROVEEDOR: Integer read GetID_PROVEEDORValue write SetID_PROVEEDORValue;
property CODIGO_POSTAL: String read GetCODIGO_POSTALValue write SetCODIGO_POSTALValue;
property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue;
property PROVINCIA: String read GetPROVINCIAValue write SetPROVINCIAValue;
property PERSONA_CONTACTO: String read GetPERSONA_CONTACTOValue write SetPERSONA_CONTACTOValue;
property TELEFONO: String read GetTELEFONOValue write SetTELEFONOValue;
property IVA: Float read GetIVAValue write SetIVAValue;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property ID: Integer read GetIDValue write SetIDValue;
property PROVEEDOR: String read GetPROVEEDORValue write SetPROVEEDORValue;
property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
property FAMILIA: String read GetFAMILIAValue write SetFAMILIAValue;
property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue;
property REFERENCIA_PROVEEDOR: String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property CANTIDAD_PEDIDA: Integer read GetCANTIDAD_PEDIDAValue write SetCANTIDAD_PEDIDAValue;
property CANTIDAD_RECIBIDA: Integer read GetCANTIDAD_RECIBIDAValue write SetCANTIDAD_RECIBIDAValue;
property CANTIDAD_PENDIENTE: Integer read GetCANTIDAD_PENDIENTEValue write SetCANTIDAD_PENDIENTEValue;
property PRECIO_COSTE: Currency read GetPRECIO_COSTEValue write SetPRECIO_COSTEValue;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property PRECIO_NETO: Float read GetPRECIO_NETOValue write SetPRECIO_NETOValue;
property PRECIO_PORTE: Float read GetPRECIO_PORTEValue write SetPRECIO_PORTEValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
uses Variants;
@ -1292,9 +1545,302 @@ begin
end;
{ TDETALLE_SIN_RECIBIRDataTableRules }
constructor TDETALLE_SIN_RECIBIRDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TDETALLE_SIN_RECIBIRDataTableRules.Destroy;
begin
inherited;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetID_PEDIDOValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_PEDIDO].AsInteger;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetID_PEDIDOValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_PEDIDO].AsInteger := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetID_EMPRESAValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_EMPRESA].AsInteger;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetID_EMPRESAValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_EMPRESA].AsInteger := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetREFERENCIA_PEDIDOValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRREFERENCIA_PEDIDO].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetREFERENCIA_PEDIDOValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRREFERENCIA_PEDIDO].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetFECHA_PEDIDOValue: DateTime;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRFECHA_PEDIDO].AsDateTime;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetFECHA_PEDIDOValue(const aValue: DateTime);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRFECHA_PEDIDO].AsDateTime := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetCALLEValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRCALLE].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetCALLEValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRCALLE].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetFECHA_CONFIRMACIONValue: DateTime;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRFECHA_CONFIRMACION].AsDateTime;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetFECHA_CONFIRMACIONValue(const aValue: DateTime);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRFECHA_CONFIRMACION].AsDateTime := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetID_PROVEEDORValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_PROVEEDOR].AsInteger;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetID_PROVEEDORValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_PROVEEDOR].AsInteger := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetCODIGO_POSTALValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRCODIGO_POSTAL].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetCODIGO_POSTALValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRCODIGO_POSTAL].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetPOBLACIONValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRPOBLACION].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetPOBLACIONValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRPOBLACION].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetPROVINCIAValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRPROVINCIA].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetPROVINCIAValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRPROVINCIA].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetPERSONA_CONTACTOValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRPERSONA_CONTACTO].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetPERSONA_CONTACTOValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRPERSONA_CONTACTO].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetTELEFONOValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRTELEFONO].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetTELEFONOValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRTELEFONO].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetIVAValue: Float;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRIVA].AsFloat;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetIVAValue(const aValue: Float);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRIVA].AsFloat := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetID_FORMA_PAGOValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_FORMA_PAGO].AsInteger;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetID_FORMA_PAGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_FORMA_PAGO].AsInteger := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetIDValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRID].AsInteger;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetIDValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRID].AsInteger := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetPROVEEDORValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRPROVEEDOR].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetPROVEEDORValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRPROVEEDOR].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetID_ARTICULOValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_ARTICULO].AsInteger;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetID_ARTICULOValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRID_ARTICULO].AsInteger := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetFAMILIAValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRFAMILIA].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetFAMILIAValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRFAMILIA].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetREFERENCIAValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRREFERENCIA].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetREFERENCIAValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRREFERENCIA].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetREFERENCIA_PROVEEDORValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRREFERENCIA_PROVEEDOR].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetREFERENCIA_PROVEEDORValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRREFERENCIA_PROVEEDOR].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetDESCRIPCIONValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRDESCRIPCION].AsString;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetDESCRIPCIONValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRDESCRIPCION].AsString := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetCANTIDAD_PEDIDAValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRCANTIDAD_PEDIDA].AsInteger;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetCANTIDAD_PEDIDAValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRCANTIDAD_PEDIDA].AsInteger := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetCANTIDAD_RECIBIDAValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRCANTIDAD_RECIBIDA].AsInteger;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetCANTIDAD_RECIBIDAValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRCANTIDAD_RECIBIDA].AsInteger := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetCANTIDAD_PENDIENTEValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRCANTIDAD_PENDIENTE].AsInteger;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetCANTIDAD_PENDIENTEValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRCANTIDAD_PENDIENTE].AsInteger := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetPRECIO_COSTEValue: Currency;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRPRECIO_COSTE].AsCurrency;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetPRECIO_COSTEValue(const aValue: Currency);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRPRECIO_COSTE].AsCurrency := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetDESCUENTOValue: Float;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRDESCUENTO].AsFloat;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetDESCUENTOValue(const aValue: Float);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRDESCUENTO].AsFloat := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetPRECIO_NETOValue: Float;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRPRECIO_NETO].AsFloat;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetPRECIO_NETOValue(const aValue: Float);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRPRECIO_NETO].AsFloat := aValue;
end;
function TDETALLE_SIN_RECIBIRDataTableRules.GetPRECIO_PORTEValue: Float;
begin
result := DataTable.Fields[idx_DETALLE_SIN_RECIBIRPRECIO_PORTE].AsFloat;
end;
procedure TDETALLE_SIN_RECIBIRDataTableRules.SetPRECIO_PORTEValue(const aValue: Float);
begin
DataTable.Fields[idx_DETALLE_SIN_RECIBIRPRECIO_PORTE].AsFloat := aValue;
end;
initialization
RegisterDataTableRules(RID_INVENTARIO, TINVENTARIODataTableRules);
RegisterDataTableRules(RID_DETALLE_RESERVAS_INV, TDETALLE_RESERVAS_INVDataTableRules);
RegisterDataTableRules(RID_DETALLE_SIN_ALBARANAR, TDETALLE_SIN_ALBARANARDataTableRules);
RegisterDataTableRules(RID_DETALLE_SIN_RECIBIR, TDETALLE_SIN_RECIBIRDataTableRules);
end.

View File

@ -9,14 +9,15 @@ 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_INVENTARIODelta = '{91529C30-88B1-4997-9CE2-B6EA97BBF34C}';
RID_DETALLE_RESERVAS_INVDelta = '{76458D59-CFD6-42D2-A928-02DB3016BF2B}';
RID_DETALLE_SIN_ALBARANARDelta = '{412177E2-C890-4C0D-A295-CF12A4F22380}';
RID_INVENTARIODelta = '{97FA1504-6963-4774-997E-9EE5D41EE625}';
RID_DETALLE_RESERVAS_INVDelta = '{3B8E4F9D-3FD5-4E97-AAC3-1F06084FD65B}';
RID_DETALLE_SIN_ALBARANARDelta = '{0A0EAAC2-6C4C-4EFB-8A5E-4F2F6CBA910C}';
RID_DETALLE_SIN_RECIBIRDelta = '{BDDDC4FE-7BB0-4809-B2DF-2C780571351F}';
type
{ IINVENTARIODelta }
IINVENTARIODelta = interface(IINVENTARIO)
['{91529C30-88B1-4997-9CE2-B6EA97BBF34C}']
['{97FA1504-6963-4774-997E-9EE5D41EE625}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_ALMACENValue : Integer;
@ -171,7 +172,7 @@ type
{ IDETALLE_RESERVAS_INVDelta }
IDETALLE_RESERVAS_INVDelta = interface(IDETALLE_RESERVAS_INV)
['{76458D59-CFD6-42D2-A928-02DB3016BF2B}']
['{3B8E4F9D-3FD5-4E97-AAC3-1F06084FD65B}']
{ Property getters and setters }
function GetOldID_ALBValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -298,7 +299,7 @@ type
{ IDETALLE_SIN_ALBARANARDelta }
IDETALLE_SIN_ALBARANARDelta = interface(IDETALLE_SIN_ALBARANAR)
['{412177E2-C890-4C0D-A295-CF12A4F22380}']
['{0A0EAAC2-6C4C-4EFB-8A5E-4F2F6CBA910C}']
{ Property getters and setters }
function GetOldID_PEDIDOValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -528,6 +529,224 @@ type
end;
{ IDETALLE_SIN_RECIBIRDelta }
IDETALLE_SIN_RECIBIRDelta = interface(IDETALLE_SIN_RECIBIR)
['{BDDDC4FE-7BB0-4809-B2DF-2C780571351F}']
{ Property getters and setters }
function GetOldID_PEDIDOValue : Integer;
function GetOldID_EMPRESAValue : Integer;
function GetOldREFERENCIA_PEDIDOValue : String;
function GetOldFECHA_PEDIDOValue : DateTime;
function GetOldCALLEValue : String;
function GetOldFECHA_CONFIRMACIONValue : DateTime;
function GetOldID_PROVEEDORValue : Integer;
function GetOldCODIGO_POSTALValue : String;
function GetOldPOBLACIONValue : String;
function GetOldPROVINCIAValue : String;
function GetOldPERSONA_CONTACTOValue : String;
function GetOldTELEFONOValue : String;
function GetOldIVAValue : Float;
function GetOldID_FORMA_PAGOValue : Integer;
function GetOldIDValue : Integer;
function GetOldPROVEEDORValue : String;
function GetOldID_ARTICULOValue : Integer;
function GetOldFAMILIAValue : String;
function GetOldREFERENCIAValue : String;
function GetOldREFERENCIA_PROVEEDORValue : String;
function GetOldDESCRIPCIONValue : String;
function GetOldCANTIDAD_PEDIDAValue : Integer;
function GetOldCANTIDAD_RECIBIDAValue : Integer;
function GetOldCANTIDAD_PENDIENTEValue : Integer;
function GetOldPRECIO_COSTEValue : Currency;
function GetOldDESCUENTOValue : Float;
function GetOldPRECIO_NETOValue : Float;
function GetOldPRECIO_PORTEValue : Float;
{ Properties }
property OldID_PEDIDO : Integer read GetOldID_PEDIDOValue;
property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
property OldREFERENCIA_PEDIDO : String read GetOldREFERENCIA_PEDIDOValue;
property OldFECHA_PEDIDO : DateTime read GetOldFECHA_PEDIDOValue;
property OldCALLE : String read GetOldCALLEValue;
property OldFECHA_CONFIRMACION : DateTime read GetOldFECHA_CONFIRMACIONValue;
property OldID_PROVEEDOR : Integer read GetOldID_PROVEEDORValue;
property OldCODIGO_POSTAL : String read GetOldCODIGO_POSTALValue;
property OldPOBLACION : String read GetOldPOBLACIONValue;
property OldPROVINCIA : String read GetOldPROVINCIAValue;
property OldPERSONA_CONTACTO : String read GetOldPERSONA_CONTACTOValue;
property OldTELEFONO : String read GetOldTELEFONOValue;
property OldIVA : Float read GetOldIVAValue;
property OldID_FORMA_PAGO : Integer read GetOldID_FORMA_PAGOValue;
property OldID : Integer read GetOldIDValue;
property OldPROVEEDOR : String read GetOldPROVEEDORValue;
property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue;
property OldFAMILIA : String read GetOldFAMILIAValue;
property OldREFERENCIA : String read GetOldREFERENCIAValue;
property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
property OldCANTIDAD_PEDIDA : Integer read GetOldCANTIDAD_PEDIDAValue;
property OldCANTIDAD_RECIBIDA : Integer read GetOldCANTIDAD_RECIBIDAValue;
property OldCANTIDAD_PENDIENTE : Integer read GetOldCANTIDAD_PENDIENTEValue;
property OldPRECIO_COSTE : Currency read GetOldPRECIO_COSTEValue;
property OldDESCUENTO : Float read GetOldDESCUENTOValue;
property OldPRECIO_NETO : Float read GetOldPRECIO_NETOValue;
property OldPRECIO_PORTE : Float read GetOldPRECIO_PORTEValue;
end;
{ TDETALLE_SIN_RECIBIRBusinessProcessorRules }
TDETALLE_SIN_RECIBIRBusinessProcessorRules = class(TDABusinessProcessorRules, IDETALLE_SIN_RECIBIR, IDETALLE_SIN_RECIBIRDelta)
private
protected
{ Property getters and setters }
function GetID_PEDIDOValue: Integer; virtual;
function GetOldID_PEDIDOValue: Integer; virtual;
procedure SetID_PEDIDOValue(const aValue: Integer); virtual;
function GetID_EMPRESAValue: Integer; virtual;
function GetOldID_EMPRESAValue: Integer; virtual;
procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
function GetREFERENCIA_PEDIDOValue: String; virtual;
function GetOldREFERENCIA_PEDIDOValue: String; virtual;
procedure SetREFERENCIA_PEDIDOValue(const aValue: String); virtual;
function GetFECHA_PEDIDOValue: DateTime; virtual;
function GetOldFECHA_PEDIDOValue: DateTime; virtual;
procedure SetFECHA_PEDIDOValue(const aValue: DateTime); virtual;
function GetCALLEValue: String; virtual;
function GetOldCALLEValue: String; virtual;
procedure SetCALLEValue(const aValue: String); virtual;
function GetFECHA_CONFIRMACIONValue: DateTime; virtual;
function GetOldFECHA_CONFIRMACIONValue: DateTime; virtual;
procedure SetFECHA_CONFIRMACIONValue(const aValue: DateTime); virtual;
function GetID_PROVEEDORValue: Integer; virtual;
function GetOldID_PROVEEDORValue: Integer; virtual;
procedure SetID_PROVEEDORValue(const aValue: Integer); virtual;
function GetCODIGO_POSTALValue: String; virtual;
function GetOldCODIGO_POSTALValue: String; virtual;
procedure SetCODIGO_POSTALValue(const aValue: String); virtual;
function GetPOBLACIONValue: String; virtual;
function GetOldPOBLACIONValue: String; virtual;
procedure SetPOBLACIONValue(const aValue: String); virtual;
function GetPROVINCIAValue: String; virtual;
function GetOldPROVINCIAValue: String; virtual;
procedure SetPROVINCIAValue(const aValue: String); virtual;
function GetPERSONA_CONTACTOValue: String; virtual;
function GetOldPERSONA_CONTACTOValue: String; virtual;
procedure SetPERSONA_CONTACTOValue(const aValue: String); virtual;
function GetTELEFONOValue: String; virtual;
function GetOldTELEFONOValue: String; virtual;
procedure SetTELEFONOValue(const aValue: String); virtual;
function GetIVAValue: Float; virtual;
function GetOldIVAValue: Float; virtual;
procedure SetIVAValue(const aValue: Float); virtual;
function GetID_FORMA_PAGOValue: Integer; virtual;
function GetOldID_FORMA_PAGOValue: Integer; virtual;
procedure SetID_FORMA_PAGOValue(const aValue: Integer); virtual;
function GetIDValue: Integer; virtual;
function GetOldIDValue: Integer; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
function GetPROVEEDORValue: String; virtual;
function GetOldPROVEEDORValue: String; virtual;
procedure SetPROVEEDORValue(const aValue: String); virtual;
function GetID_ARTICULOValue: Integer; virtual;
function GetOldID_ARTICULOValue: Integer; virtual;
procedure SetID_ARTICULOValue(const aValue: Integer); virtual;
function GetFAMILIAValue: String; virtual;
function GetOldFAMILIAValue: String; virtual;
procedure SetFAMILIAValue(const aValue: String); virtual;
function GetREFERENCIAValue: String; virtual;
function GetOldREFERENCIAValue: String; virtual;
procedure SetREFERENCIAValue(const aValue: String); virtual;
function GetREFERENCIA_PROVEEDORValue: String; virtual;
function GetOldREFERENCIA_PROVEEDORValue: String; virtual;
procedure SetREFERENCIA_PROVEEDORValue(const aValue: String); virtual;
function GetDESCRIPCIONValue: String; virtual;
function GetOldDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetCANTIDAD_PEDIDAValue: Integer; virtual;
function GetOldCANTIDAD_PEDIDAValue: Integer; virtual;
procedure SetCANTIDAD_PEDIDAValue(const aValue: Integer); virtual;
function GetCANTIDAD_RECIBIDAValue: Integer; virtual;
function GetOldCANTIDAD_RECIBIDAValue: Integer; virtual;
procedure SetCANTIDAD_RECIBIDAValue(const aValue: Integer); virtual;
function GetCANTIDAD_PENDIENTEValue: Integer; virtual;
function GetOldCANTIDAD_PENDIENTEValue: Integer; virtual;
procedure SetCANTIDAD_PENDIENTEValue(const aValue: Integer); virtual;
function GetPRECIO_COSTEValue: Currency; virtual;
function GetOldPRECIO_COSTEValue: Currency; virtual;
procedure SetPRECIO_COSTEValue(const aValue: Currency); virtual;
function GetDESCUENTOValue: Float; virtual;
function GetOldDESCUENTOValue: Float; virtual;
procedure SetDESCUENTOValue(const aValue: Float); virtual;
function GetPRECIO_NETOValue: Float; virtual;
function GetOldPRECIO_NETOValue: Float; virtual;
procedure SetPRECIO_NETOValue(const aValue: Float); virtual;
function GetPRECIO_PORTEValue: Float; virtual;
function GetOldPRECIO_PORTEValue: Float; virtual;
procedure SetPRECIO_PORTEValue(const aValue: Float); virtual;
{ Properties }
property ID_PEDIDO : Integer read GetID_PEDIDOValue write SetID_PEDIDOValue;
property OldID_PEDIDO : Integer read GetOldID_PEDIDOValue;
property ID_EMPRESA : Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
property REFERENCIA_PEDIDO : String read GetREFERENCIA_PEDIDOValue write SetREFERENCIA_PEDIDOValue;
property OldREFERENCIA_PEDIDO : String read GetOldREFERENCIA_PEDIDOValue;
property FECHA_PEDIDO : DateTime read GetFECHA_PEDIDOValue write SetFECHA_PEDIDOValue;
property OldFECHA_PEDIDO : DateTime read GetOldFECHA_PEDIDOValue;
property CALLE : String read GetCALLEValue write SetCALLEValue;
property OldCALLE : String read GetOldCALLEValue;
property FECHA_CONFIRMACION : DateTime read GetFECHA_CONFIRMACIONValue write SetFECHA_CONFIRMACIONValue;
property OldFECHA_CONFIRMACION : DateTime read GetOldFECHA_CONFIRMACIONValue;
property ID_PROVEEDOR : Integer read GetID_PROVEEDORValue write SetID_PROVEEDORValue;
property OldID_PROVEEDOR : Integer read GetOldID_PROVEEDORValue;
property CODIGO_POSTAL : String read GetCODIGO_POSTALValue write SetCODIGO_POSTALValue;
property OldCODIGO_POSTAL : String read GetOldCODIGO_POSTALValue;
property POBLACION : String read GetPOBLACIONValue write SetPOBLACIONValue;
property OldPOBLACION : String read GetOldPOBLACIONValue;
property PROVINCIA : String read GetPROVINCIAValue write SetPROVINCIAValue;
property OldPROVINCIA : String read GetOldPROVINCIAValue;
property PERSONA_CONTACTO : String read GetPERSONA_CONTACTOValue write SetPERSONA_CONTACTOValue;
property OldPERSONA_CONTACTO : String read GetOldPERSONA_CONTACTOValue;
property TELEFONO : String read GetTELEFONOValue write SetTELEFONOValue;
property OldTELEFONO : String read GetOldTELEFONOValue;
property IVA : Float read GetIVAValue write SetIVAValue;
property OldIVA : Float read GetOldIVAValue;
property ID_FORMA_PAGO : Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property OldID_FORMA_PAGO : Integer read GetOldID_FORMA_PAGOValue;
property ID : Integer read GetIDValue write SetIDValue;
property OldID : Integer read GetOldIDValue;
property PROVEEDOR : String read GetPROVEEDORValue write SetPROVEEDORValue;
property OldPROVEEDOR : String read GetOldPROVEEDORValue;
property ID_ARTICULO : Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue;
property FAMILIA : String read GetFAMILIAValue write SetFAMILIAValue;
property OldFAMILIA : String read GetOldFAMILIAValue;
property REFERENCIA : String read GetREFERENCIAValue write SetREFERENCIAValue;
property OldREFERENCIA : String read GetOldREFERENCIAValue;
property REFERENCIA_PROVEEDOR : String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue;
property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
property CANTIDAD_PEDIDA : Integer read GetCANTIDAD_PEDIDAValue write SetCANTIDAD_PEDIDAValue;
property OldCANTIDAD_PEDIDA : Integer read GetOldCANTIDAD_PEDIDAValue;
property CANTIDAD_RECIBIDA : Integer read GetCANTIDAD_RECIBIDAValue write SetCANTIDAD_RECIBIDAValue;
property OldCANTIDAD_RECIBIDA : Integer read GetOldCANTIDAD_RECIBIDAValue;
property CANTIDAD_PENDIENTE : Integer read GetCANTIDAD_PENDIENTEValue write SetCANTIDAD_PENDIENTEValue;
property OldCANTIDAD_PENDIENTE : Integer read GetOldCANTIDAD_PENDIENTEValue;
property PRECIO_COSTE : Currency read GetPRECIO_COSTEValue write SetPRECIO_COSTEValue;
property OldPRECIO_COSTE : Currency read GetOldPRECIO_COSTEValue;
property DESCUENTO : Float read GetDESCUENTOValue write SetDESCUENTOValue;
property OldDESCUENTO : Float read GetOldDESCUENTOValue;
property PRECIO_NETO : Float read GetPRECIO_NETOValue write SetPRECIO_NETOValue;
property OldPRECIO_NETO : Float read GetOldPRECIO_NETOValue;
property PRECIO_PORTE : Float read GetPRECIO_PORTEValue write SetPRECIO_PORTEValue;
property OldPRECIO_PORTE : Float read GetOldPRECIO_PORTEValue;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
destructor Destroy; override;
end;
implementation
uses
@ -1529,9 +1748,442 @@ begin
end;
{ TDETALLE_SIN_RECIBIRBusinessProcessorRules }
constructor TDETALLE_SIN_RECIBIRBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
inherited;
end;
destructor TDETALLE_SIN_RECIBIRBusinessProcessorRules.Destroy;
begin
inherited;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetID_PEDIDOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_PEDIDO];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldID_PEDIDOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRID_PEDIDO];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetID_PEDIDOValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_PEDIDO] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetID_EMPRESAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_EMPRESA];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldID_EMPRESAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRID_EMPRESA];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetID_EMPRESAValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_EMPRESA] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetREFERENCIA_PEDIDOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRREFERENCIA_PEDIDO];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldREFERENCIA_PEDIDOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRREFERENCIA_PEDIDO];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetREFERENCIA_PEDIDOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRREFERENCIA_PEDIDO] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetFECHA_PEDIDOValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRFECHA_PEDIDO];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldFECHA_PEDIDOValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRFECHA_PEDIDO];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetFECHA_PEDIDOValue(const aValue: DateTime);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRFECHA_PEDIDO] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetCALLEValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCALLE];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldCALLEValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRCALLE];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetCALLEValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCALLE] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetFECHA_CONFIRMACIONValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRFECHA_CONFIRMACION];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldFECHA_CONFIRMACIONValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRFECHA_CONFIRMACION];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetFECHA_CONFIRMACIONValue(const aValue: DateTime);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRFECHA_CONFIRMACION] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetID_PROVEEDORValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_PROVEEDOR];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldID_PROVEEDORValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRID_PROVEEDOR];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetID_PROVEEDORValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_PROVEEDOR] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetCODIGO_POSTALValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCODIGO_POSTAL];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldCODIGO_POSTALValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRCODIGO_POSTAL];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetCODIGO_POSTALValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCODIGO_POSTAL] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetPOBLACIONValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPOBLACION];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldPOBLACIONValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRPOBLACION];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetPOBLACIONValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPOBLACION] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetPROVINCIAValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPROVINCIA];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldPROVINCIAValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRPROVINCIA];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetPROVINCIAValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPROVINCIA] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetPERSONA_CONTACTOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPERSONA_CONTACTO];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldPERSONA_CONTACTOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRPERSONA_CONTACTO];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetPERSONA_CONTACTOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPERSONA_CONTACTO] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetTELEFONOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRTELEFONO];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldTELEFONOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRTELEFONO];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetTELEFONOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRTELEFONO] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetIVAValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRIVA];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldIVAValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRIVA];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetIVAValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRIVA] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetID_FORMA_PAGOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_FORMA_PAGO];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldID_FORMA_PAGOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRID_FORMA_PAGO];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetID_FORMA_PAGOValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_FORMA_PAGO] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRID];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetIDValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetPROVEEDORValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPROVEEDOR];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldPROVEEDORValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRPROVEEDOR];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetPROVEEDORValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPROVEEDOR] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetID_ARTICULOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_ARTICULO];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldID_ARTICULOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRID_ARTICULO];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetID_ARTICULOValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRID_ARTICULO] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetFAMILIAValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRFAMILIA];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldFAMILIAValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRFAMILIA];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetFAMILIAValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRFAMILIA] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetREFERENCIAValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRREFERENCIA];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldREFERENCIAValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRREFERENCIA];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetREFERENCIAValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRREFERENCIA] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetREFERENCIA_PROVEEDORValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRREFERENCIA_PROVEEDOR];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldREFERENCIA_PROVEEDORValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRREFERENCIA_PROVEEDOR];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetREFERENCIA_PROVEEDORValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRREFERENCIA_PROVEEDOR] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRDESCRIPCION];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRDESCRIPCION];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRDESCRIPCION] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetCANTIDAD_PEDIDAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCANTIDAD_PEDIDA];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldCANTIDAD_PEDIDAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRCANTIDAD_PEDIDA];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetCANTIDAD_PEDIDAValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCANTIDAD_PEDIDA] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetCANTIDAD_RECIBIDAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCANTIDAD_RECIBIDA];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldCANTIDAD_RECIBIDAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRCANTIDAD_RECIBIDA];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetCANTIDAD_RECIBIDAValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCANTIDAD_RECIBIDA] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetCANTIDAD_PENDIENTEValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCANTIDAD_PENDIENTE];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldCANTIDAD_PENDIENTEValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRCANTIDAD_PENDIENTE];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetCANTIDAD_PENDIENTEValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRCANTIDAD_PENDIENTE] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetPRECIO_COSTEValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPRECIO_COSTE];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldPRECIO_COSTEValue: Currency;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRPRECIO_COSTE];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetPRECIO_COSTEValue(const aValue: Currency);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPRECIO_COSTE] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetDESCUENTOValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRDESCUENTO];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldDESCUENTOValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRDESCUENTO];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetDESCUENTOValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRDESCUENTO] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetPRECIO_NETOValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPRECIO_NETO];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldPRECIO_NETOValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRPRECIO_NETO];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetPRECIO_NETOValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPRECIO_NETO] := aValue;
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetPRECIO_PORTEValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPRECIO_PORTE];
end;
function TDETALLE_SIN_RECIBIRBusinessProcessorRules.GetOldPRECIO_PORTEValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_RECIBIRPRECIO_PORTE];
end;
procedure TDETALLE_SIN_RECIBIRBusinessProcessorRules.SetPRECIO_PORTEValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_RECIBIRPRECIO_PORTE] := aValue;
end;
initialization
RegisterBusinessProcessorRules(RID_INVENTARIODelta, TINVENTARIOBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_DETALLE_RESERVAS_INVDelta, TDETALLE_RESERVAS_INVBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_DETALLE_SIN_ALBARANARDelta, TDETALLE_SIN_ALBARANARBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_DETALLE_SIN_RECIBIRDelta, TDETALLE_SIN_RECIBIRBusinessProcessorRules);
end.

View File

@ -9,7 +9,8 @@ uses
const
BIZ_CLIENT_INVENTARIO = 'Client.Inventario';
BIZ_CLIENT_DETALLE_RESERVAS_INV = 'Client.DetallesReservasInv';
BIZ_CLIENT_DETALLE_SINALBARAN = 'Client.DetallesSinAlbaran';
BIZ_CLIENT_DETALLE_SINALBARAN = 'Client.DetallesSinAlbaran';
BIZ_CLIENT_DETALLE_SINRECIBIR = 'Client.DetallesRecibir';
CTE_TIPO_ENTRADA = 'E';
CTE_TIPO_SALIDA = 'S';
@ -29,6 +30,10 @@ type
['{FB982CC5-1CE6-4362-9D93-DCAC508D06AA}']
end;
IBizDetalleSinRecibir = interface(IDetalle_sin_Recibir)
['{5C4E0F5E-03BF-4C26-A7E0-775CF508AB0E}']
end;
IBizInventario = interface(IInventario)
['{12051CDB-9BB1-43C5-AC89-181A27A35513}']
function GetIDAlmacenOrigen: Integer;
@ -57,6 +62,16 @@ type
destructor Destroy; override;
end;
TBizDetalleSinRecibir = class(TDETALLE_SIN_RECIBIRDataTableRules, IBizDetalleSinRecibir, ISeleccionable)
protected
FSeleccionableInterface : ISeleccionable;
public
property SeleccionableInterface : ISeleccionable read FSeleccionableInterface write FSeleccionableInterface implements ISeleccionable;
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
TBizInventario = class(TInventarioDataTableRules, IBizInventario, ISeleccionable)
private
FIDAlmacenOrigen : Integer;
@ -171,9 +186,24 @@ begin
inherited;
end;
{ TBizDetalleSinRecibir }
constructor TBizDetalleSinRecibir.Create(aDataTable: TDADataTable);
begin
inherited;
FSeleccionableInterface := TSeleccionable.Create(aDataTable);
end;
destructor TBizDetalleSinRecibir.Destroy;
begin
FSeleccionableInterface := NIL;
inherited;
end;
initialization
RegisterDataTableRules(BIZ_CLIENT_INVENTARIO, TBizInventario);
RegisterDataTableRules(BIZ_CLIENT_DETALLE_RESERVAS_INV, TBizDetalleReservas);
RegisterDataTableRules(BIZ_CLIENT_DETALLE_SINALBARAN, TBizDetalleSinAlbaran);
RegisterDataTableRules(BIZ_CLIENT_DETALLE_SINRECIBIR, TBizDetalleSinRecibir);
end.

View File

@ -1004,6 +1004,434 @@ object srvInventario: TsrvInventario
end>
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
end
item
Params = <>
Statements = <
item
Connection = 'IBX'
TargetTable = 'V_PED_PROV_ART_SIN_ALBARAN'
SQL =
'SELECT'#10' ID,'#10' ID_PEDIDO,'#10' ID_EMPRESA,'#10' REFERENCIA_PED' +
'IDO,'#10' FECHA_PEDIDO,'#10' FECHA_CONFIRMACION,'#10' ID_PROVEEDOR,' +
#10' CALLE,'#10' CODIGO_POSTAL,'#10' POBLACION,'#10' PROVINCIA,'#10' ' +
' PERSONA_CONTACTO,'#10' TELEFONO,'#10' IVA,'#10' ID_FORMA_PAGO,'#10' ' +
' PROVEEDOR,'#10' ID_ARTICULO,'#10' FAMILIA,'#10' REFERENCIA,'#10' RE' +
'FERENCIA_PROVEEDOR,'#10' DESCRIPCION,'#10' CANTIDAD_PEDIDA,'#10' CA' +
'NTIDAD_RECIBIDA,'#10' CANTIDAD_PENDIENTE,'#10' PRECIO_COSTE,'#10' D' +
'ESCUENTO,'#10' PRECIO_NETO,'#10' PRECIO_PORTE'#10#10'FROM V_PED_PROV_ART' +
'_SIN_ALBARAN'#10'ORDER BY REFERENCIA_PEDIDO'
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID_PEDIDO'
TableField = 'ID_PEDIDO'
end
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'REFERENCIA_PEDIDO'
TableField = 'REFERENCIA_PEDIDO'
end
item
DatasetField = 'FECHA_PEDIDO'
TableField = 'FECHA_PEDIDO'
end
item
DatasetField = 'CALLE'
TableField = 'CALLE'
end
item
DatasetField = 'FECHA_CONFIRMACION'
TableField = 'FECHA_CONFIRMACION'
end
item
DatasetField = 'ID_PROVEEDOR'
TableField = 'ID_PROVEEDOR'
end
item
DatasetField = 'CODIGO_POSTAL'
TableField = 'CODIGO_POSTAL'
end
item
DatasetField = 'POBLACION'
TableField = 'POBLACION'
end
item
DatasetField = 'PROVINCIA'
TableField = 'PROVINCIA'
end
item
DatasetField = 'PERSONA_CONTACTO'
TableField = 'PERSONA_CONTACTO'
end
item
DatasetField = 'TELEFONO'
TableField = 'TELEFONO'
end
item
DatasetField = 'IVA'
TableField = 'IVA'
end
item
DatasetField = 'ID_FORMA_PAGO'
TableField = 'ID_FORMA_PAGO'
end
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'PROVEEDOR'
TableField = 'PROVEEDOR'
end
item
DatasetField = 'ID_ARTICULO'
TableField = 'ID_ARTICULO'
end
item
DatasetField = 'FAMILIA'
TableField = 'FAMILIA'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'REFERENCIA_PROVEEDOR'
TableField = 'REFERENCIA_PROVEEDOR'
end
item
DatasetField = 'DESCRIPCION'
TableField = 'DESCRIPCION'
end
item
DatasetField = 'CANTIDAD_PEDIDA'
TableField = 'CANTIDAD_PEDIDA'
end
item
DatasetField = 'CANTIDAD_RECIBIDA'
TableField = 'CANTIDAD_RECIBIDA'
end
item
DatasetField = 'CANTIDAD_PENDIENTE'
TableField = 'CANTIDAD_PENDIENTE'
end
item
DatasetField = 'PRECIO_COSTE'
TableField = 'PRECIO_COSTE'
end
item
DatasetField = 'DESCUENTO'
TableField = 'DESCUENTO'
end
item
DatasetField = 'PRECIO_NETO'
TableField = 'PRECIO_NETO'
end
item
DatasetField = 'PRECIO_PORTE'
TableField = 'PRECIO_PORTE'
end>
end>
Name = 'DETALLE_SIN_RECIBIR'
Fields = <
item
Name = 'ID_PEDIDO'
DataType = datInteger
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_PEDIDO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_EMPRESA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REFERENCIA_PEDIDO'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_REFERENCIA_PEDIDO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FECHA_PEDIDO'
DataType = datDateTime
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_FECHA_PEDIDO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CALLE'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_CALLE'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FECHA_CONFIRMACION'
DataType = datDateTime
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_RECIBIR_FECHA_CONFIRMACION'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_RECIBIR_ID_PROVEEDOR'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CODIGO_POSTAL'
DataType = datString
Size = 10
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_CODIGO_POSTAL'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'POBLACION'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_POBLACION'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PROVINCIA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_PROVINCIA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PERSONA_CONTACTO'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_PERSONA_CONTACTO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'TELEFONO'
DataType = datString
Size = 25
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_TELEFONO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'IVA'
DataType = datFloat
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_IVA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_FORMA_PAGO'
DataType = datInteger
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_FORMA_PAGO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID'
DataType = datInteger
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PROVEEDOR'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_RECIBIR_PROVEEDOR'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_ARTICULO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FAMILIA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_FAMILIA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_REFERENCIA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_REFERENCIA_PROVEEDOR'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_DESCRIPCION'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CANTIDAD_PEDIDA'
DataType = datInteger
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_CANTIDAD_PEDIDA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CANTIDAD_RECIBIDA'
DataType = datInteger
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_RECIBIR_CANTIDAD_RECIBIDA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CANTIDAD_PENDIENTE'
DataType = datInteger
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_CANTIDAD_PENDIENTE'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PRECIO_COSTE'
DataType = datCurrency
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_PRECIO_COSTE'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'DESCUENTO'
DataType = datFloat
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_DESCUENTO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PRECIO_NETO'
DataType = datFloat
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_RECIBIR_PRECIO_NETO'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PRECIO_PORTE'
DataType = datFloat
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_RECIBIR_PRECIO_PORTE'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
end>
Commands = <
item
@ -1751,6 +2179,55 @@ object srvInventario: TsrvInventario
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_RECIBIR_FECHA_CONFIRMACION'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'FECHA_CONFIRMACION'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_RECIBIR_ID_PROVEEDOR'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'ID_PROVEEDOR'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_RECIBIR_PROVEEDOR'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'PROVEEDOR'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_RECIBIR_CANTIDAD_RECIBIDA'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'Cant. Recibida'
Alignment = taRightJustify
end
item
Name = 'DETALLE_SIN_RECIBIR_PRECIO_NETO'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'PRECIO_NETO'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_RECIBIR_PRECIO_PORTE'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'PRECIO_PORTE'
Alignment = taLeftJustify
end>
Left = 126
Top = 14

View File

@ -84,7 +84,8 @@ requires
JvCtrlsD10R,
JSDialog100,
AlbaranesCliente_model,
PedCli_AlbCli_relation;
PedCli_AlbCli_relation,
AlbaranesProveedor_model;
contains
uViewInventario in 'uViewInventario.pas' {frViewInventario: TFrame},
@ -98,6 +99,8 @@ contains
uViewDetalleReservas in 'uViewDetalleReservas.pas' {frViewDetalleReservas: TFrame},
uEditorDetalleReservas in 'uEditorDetalleReservas.pas' {fEditorDetalleReservas: TfEditorDetalleReservas},
uViewDetallesSinAlbaran in 'uViewDetallesSinAlbaran.pas' {frViewDetallesSinAlbaran: TFrame},
uEditorDetallesSinAlbaran in 'uEditorDetallesSinAlbaran.pas' {fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran};
uEditorDetallesSinAlbaran in 'uEditorDetallesSinAlbaran.pas' {fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran},
uViewDetallesSinRecibir in 'uViewDetallesSinRecibir.pas' {frViewDetallesSinRecibir: TFrame},
uEditorDetallesSinRecibir in 'uEditorDetallesSinRecibir.pas' {fEditorDetallesSinRecibir: TfEditorDetallesSinRecibir};
end.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,275 @@
unit uEditorDetallesSinRecibir;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
uCustomEditor, ImgList, PngImageList, StdActns, ActnList, TB2ExtItems, TBXExtItems, TBX, TB2Item,
TB2Dock, TB2Toolbar, JvExControls, JvComponent, JvNavigationPane,
uViewDetallesSinRecibir, Menus, DB, uDADataTable, ComCtrls, uViewGrid,
uDAScriptingProvider, uDACDSDataTable, JvAppStorage,
JvAppRegistryStorage, JvFormPlacement, pngimage, ExtCtrls, uCustomView,
uViewBase, uViewBarraSeleccion, JvComponentBase, uEditorGridBase,
uIEditorDetallesSinRecibir, uBizInventario, uViewGridBase,
JvExComCtrls, JvStatusBar, uViewGrid2Niveles, JSDialog, uInventarioController;
type
TfEditorDetallesSinRecibir = class(TfEditorGridBase, IEditorDetallesSinRecibir)
TBXSeparatorItem17: TTBXSeparatorItem;
actExpandir: TAction;
actContraer: TAction;
frViewDetallesSinRecibir1: TfrViewDetallesSinRecibir;
TBXItem38: TTBXItem;
actRecibir: TAction;
procedure FormShow(Sender: TObject);
procedure actRecibirExecute(Sender: TObject);
private
// function SeleccionarAlmacen(Descripcion: String): Integer;
// function DarIDAlmacenSeleccionado(Descripcion: String): Integer;
protected
// FArticulo: IBizInventario;
FDetalles: IBizDetalleSinRecibir;
FController : IInventarioController;
// function GetArticulo: IBizInventario;
// procedure SetArticulo(const Value: IBizInventario);
function GetDetalles: IBizDetalleSinRecibir;
procedure SetDetalles(const Value: IBizDetalleSinRecibir);
{ procedure SetMultiSelect (AValue : Boolean);
function GetMultiSelect : Boolean;
function GetArticulosSeleccionados: IBizDetallesSinRecibir;
}
function GetController : IInventarioController;
procedure SetController (const Value : IInventarioController);
procedure ImprimirInterno; override;
procedure PrevisualizarInterno; override;
public
// property Articulo: IBizInventario read GetArticulo write SetArticulo;
property DetallesSinRecibir: IBizDetalleSinRecibir read GetDetalles write SetDetalles;
property Controller : IInventarioController read GetController write SetController;
// property ArticulosSeleccionados: IBizDetallesSinRecibir read GetArticulosSeleccionados;
// property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure PonerTitulos(const ATitulo: string = ''); override;
end;
implementation
{$R *.DFM}
uses
cxControls, uGridUtils, uDataModuleInventario, uDataModuleUsuarios,
uEditorBase, uDBSelectionListUtils, cxGridDBTableView, cxGridCustomTableView,
uAlmacenesController, uBizAlmacenes, uGenerarAlbaranesProvUtils,
schInventarioClient_Intf, uDialogUtils, uBizAlbaranesProveedor;
{, uDBSelectionList, uDataModulePedidosProveedor,
uBizPedidosProveedor, uBizMontajes, uDataModuleMontajes;
}
{ TfEditorDetallesSinRecibir }
{
***************************** TfEditorDetallesSinRecibir *****************************
}
procedure TfEditorDetallesSinRecibir.actRecibirExecute(Sender: TObject);
var
ArticulosSeleccionados: IBizDetalleSinRecibir;
AlbaranesProveedor: IBizAlbaranProveedor;
begin
inherited;
try
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (DetallesSinRecibir as ISeleccionable).SelectedRecords);
// En SelectedRecords tengo los ID de las filas seleccionadas del grid
ArticulosSeleccionados := (Controller as IInventarioController).ExtraerSeleccionados(DetallesSinRecibir) as IBizDetalleSinRecibir;
if (ArticulosSeleccionados.DataTable.RecordCount > 0) then
GenerarAlbaranesProv(ArticulosSeleccionados, AlbaranesProveedor)
else
ShowWarningMessage('Debe seleccionar los artículos que desea recibir');
finally
ArticulosSeleccionados:= Nil;
AlbaranesProveedor:= Nil;
end;
end;
constructor TfEditorDetallesSinRecibir.Create(AOwner: TComponent);
begin
inherited;
ViewGrid := frViewDetallesSinRecibir1;
end;
{
function TfEditorDetallesSinRecibir.DarIDAlmacenSeleccionado(Descripcion: String): Integer;
var
AAlmacenes : IBizAlmacen;
AAlmacenesController : IAlmacenesController;
Respuesta : integer;
begin
if (ViewGrid._Grid.ActiveLevel.Tag = -1) then
Result := SeleccionarAlmacen(Descripcion)
else
Result := ViewGrid._Grid.ActiveLevel.Tag;
end;
}
destructor TfEditorDetallesSinRecibir.Destroy;
begin
FDetalles := NIL;
inherited;
end;
procedure TfEditorDetallesSinRecibir.FormShow(Sender: TObject);
begin
inherited;
if not Assigned(ViewGrid) then
raise Exception.Create('No hay ninguna vista asignada');
if not Assigned(DetallesSinRecibir) then
raise Exception.Create('No hay ningún DetallesSinRecibir asignado');
DetallesSinRecibir.DataTable.Active := True;
ViewGrid.GotoFirst;
end;
{
function TfEditorDetallesSinRecibir.GetArticulosSeleccionados: IBizDetallesSinRecibir;
begin
SeleccionarFilasDesdeGrid((ViewGrid as IViewDetallesSinRecibir)._FocusedView, (DetallesSinRecibir as ISeleccionable).SelectedRecords);
// En Presupuestos.SelectedRecords tengo los ID de las filas seleccionadas del grid
Result := Controller.ExtraerSeleccionados(DetallesSinRecibir);
end;
function TfEditorDetallesSinRecibir.GetController: IDetallesSinRecibirController;
begin
Result := FController;
end;
}
{
function TfEditorDetallesSinRecibir.GetArticulo: IBizInventario;
begin
Result := FArticulo;
end;
}
function TfEditorDetallesSinRecibir.GetController: IInventarioController;
begin
Result := FController;
end;
function TfEditorDetallesSinRecibir.GetDetalles: IBizDetalleSinRecibir;
begin
Result := FDetalles;
end;
{
function TfEditorDetallesSinRecibir.GetMultiSelect: Boolean;
begin
Result := ViewGrid.MultiSelect;
end;
}
procedure TfEditorDetallesSinRecibir.ImprimirInterno;
begin
inherited;
end;
procedure TfEditorDetallesSinRecibir.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
FTitulo := 'Detalle de artículos sin recibir - ' + dmUsuarios.EmpresaActual.NOMBRE;
inherited PonerTitulos(FTitulo);
end;
procedure TfEditorDetallesSinRecibir.PrevisualizarInterno;
begin
inherited;
end;
{
function TfEditorDetallesSinRecibir.SeleccionarAlmacen(Descripcion: String): Integer;
var
AAlmacenes : IBizAlmacen;
Respuesta : integer;
begin
Result := -1;
{
JsElegirAlmacenDialog.Instruction.Text := Descripcion;
with JsElegirAlmacenDialog.RadioButtons do
begin
Clear;
AAlmacenes := (ViewGrid as IViewDetallesSinRecibir).Almacenes;
AAlmacenes.First;
while not AAlmacenes.EOF do
begin
with Add do
begin
Caption := AAlmacenes.NOMBRE;
Value := 1000 + AAlmacenes.ID;
end;
//Asi sabemos que solo va a intentar chequear el primero si hemos añadido al menos un item
Items[0].Checked := True;
AAlmacenes.Next;
end;
end;
//Sacar la pantalla de selección y devolver el almacén seleccionado.
Respuesta := JsElegirAlmacenDialog.Execute;
if Respuesta <> IDCANCEL then
Result := JsElegirAlmacenDialog.RadioResult - 1000;
end;
}
{
procedure TfEditorDetallesSinRecibir.SetController(const Value: IDetallesSinRecibirController);
begin
FController := Value;
if Assigned(FController) then
begin
if Assigned(ViewGrid) then
(ViewGrid as IViewDetallesSinRecibir).Almacenes := FController.AlmacenesController.BuscarTodos;
end;
end;
}
{
procedure TfEditorDetallesSinRecibir.SetArticulo(const Value: IBizInventario);
begin
FArticulo := Value;
if Assigned(FArticulo) then
begin
tbxEditFiltro.Text := FArticulo.REFERENCIA;
end;
end;
}
procedure TfEditorDetallesSinRecibir.SetController(const Value: IInventarioController);
begin
FController := Value;
end;
procedure TfEditorDetallesSinRecibir.SetDetalles(const Value: IBizDetalleSinRecibir);
begin
FDetalles := Value;
dsDataTable.DataTable := FDetalles.DataTable;
if Assigned(ViewGrid) then
(ViewGrid as IViewDetalleSinRecibir).Detalles := FDetalles;
end;
{
procedure TfEditorDetallesSinRecibir.SetMultiSelect(AValue: Boolean);
begin
ViewGrid.MultiSelect := AValue;
end;
}
end.

View File

@ -79,7 +79,7 @@ inherited fEditorInventario: TfEditorInventario
DockPos = 264
Visible = True
ExplicitLeft = 269
ExplicitWidth = 240
ExplicitWidth = 350
object TBXItem38: TTBXItem
Action = actReservados
DisplayMode = nbdmImageAndText
@ -87,6 +87,9 @@ inherited fEditorInventario: TfEditorInventario
object TBXItem39: TTBXItem
Action = actAlbaranar
end
object TBXItem40: TTBXItem
Action = actRecibir
end
end
end
inherited StatusBar: TJvStatusBar
@ -310,6 +313,11 @@ inherited fEditorInventario: TfEditorInventario
Caption = 'Pendientes de albaranar'
OnExecute = actAlbaranarExecute
end
object actRecibir: TAction
Category = 'Logistica'
Caption = 'Pendientes de recibir'
OnExecute = actRecibirExecute
end
end
inherited SmallImages: TPngImageList [5]
PngImages = <

View File

@ -32,6 +32,8 @@ type
TBXItem38: TTBXItem;
actAlbaranar: TAction;
TBXItem39: TTBXItem;
actRecibir: TAction;
TBXItem40: TTBXItem;
procedure actModificarExecute(Sender: TObject);
procedure actRecibirPedidoExecute(Sender: TObject);
procedure actTrasladarExecute(Sender: TObject);
@ -47,6 +49,7 @@ type
procedure actReservadosUpdate(Sender: TObject);
procedure actReservadosExecute(Sender: TObject);
procedure actAlbaranarExecute(Sender: TObject);
procedure actRecibirExecute(Sender: TObject);
private
function SeleccionarAlmacen(Descripcion: String): Integer;
@ -291,6 +294,12 @@ begin
ViewGrid.MultiSelect := AValue;
end;
procedure TfEditorInventario.actRecibirExecute(Sender: TObject);
begin
inherited;
FController.VerSinRecibir;
end;
procedure TfEditorInventario.actRecibirPedidoExecute(Sender: TObject);
begin
inherited;

View File

@ -10,7 +10,7 @@ implementation
uses
uEditorRegistryUtils, uEditorInventario, uEditorEntradaSalidaArticulos,
uEditorElegirArticulosCatalogo, uEditorElegirArticulosAlmacen,
uEditorDetalleReservas, uEditorDetallesSinAlbaran;
uEditorDetalleReservas, uEditorDetallesSinAlbaran, uEditorDetallesSinRecibir;
procedure RegisterViews;
begin
@ -20,6 +20,7 @@ begin
EditorRegistry.RegisterClass(TfEditorElegirArticulosAlmacen, 'EditorElegirArticulosAlmacen');
EditorRegistry.RegisterClass(TfEditorDetalleReservas, 'EditorDetalleReservas');
EditorRegistry.RegisterClass(TfEditorDetallesSinAlbaran, 'EditorDetallesSinAlbaran');
EditorRegistry.RegisterClass(TfEditorDetallesSinRecibir, 'EditorDetallesSinRecibir');
end;
procedure UnregisterViews;
@ -29,7 +30,8 @@ begin
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosCatalogo);
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosAlmacen);
EditorRegistry.UnRegisterClass(TfEditorDetalleReservas);
EditorRegistry.UnRegisterClass(TfEditorDetallesSinAlbaran);
EditorRegistry.UnRegisterClass(TfEditorDetallesSinAlbaran);
EditorRegistry.UnRegisterClass(TfEditorDetallesSinRecibir);
end;
end.

View File

@ -86,6 +86,7 @@ inherited frViewDetallesSinAlbaran: TfrViewDetallesSinAlbaran
end
object cxGridViewID_ARTICULO: TcxGridDBColumn
DataBinding.FieldName = 'ID'
Visible = False
end
object cxGridViewFAMILIA: TcxGridDBColumn
DataBinding.FieldName = 'FAMILIA'
@ -142,8 +143,10 @@ inherited frViewDetallesSinAlbaran: TfrViewDetallesSinAlbaran
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 283
ExplicitLeft = 283
Left = 344
ExplicitLeft = 344
ExplicitWidth = 121
Width = 121
end
end
end

View File

@ -0,0 +1,244 @@
inherited frViewDetallesSinRecibir: TfrViewDetallesSinRecibir
inherited cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'RecID'
DataController.Options = [dcoAnsiSort, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoSortByDisplayText, dcoGroupsAlwaysExpanded]
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Position = spFooter
end
item
Format = '0 Pedidos'
Kind = skSum
Position = spFooter
Column = cxGridViewCANTIDAD_PEDIDA
end
item
Format = '0 Pendientes'
Kind = skSum
Position = spFooter
Column = cxGridViewCANTIDAD_PENDIENTE
end>
DataController.Summary.FooterSummaryItems = <
item
Format = '0 art'#237'culos'
Kind = skCount
end
item
Format = '0 art'#237'culos'
Kind = skCount
end
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
end
item
Format = '0'
Kind = skSum
end
item
Format = '0'
Kind = skSum
end
item
Format = '0'
Kind = skSum
end
item
Format = '0'
Kind = skSum
end
item
Format = '0 Pedidos'
Kind = skSum
Column = cxGridViewCANTIDAD_PEDIDA
end
item
Format = '0 Pendientes'
Kind = skSum
Column = cxGridViewCANTIDAD_PENDIENTE
end>
OptionsCustomize.ColumnHidingOnGrouping = False
OptionsCustomize.GroupBySorting = True
OptionsView.GroupFooters = gfAlwaysVisible
object cxGridViewRecID: TcxGridDBColumn
DataBinding.FieldName = 'RecID'
Visible = False
end
object cxGridViewREFERENCIA_PEDIDO: TcxGridDBColumn
DataBinding.FieldName = 'REFERENCIA_PEDIDO'
end
object cxGridViewFECHA_PEDIDO: TcxGridDBColumn
Caption = 'Fecha pedido'
DataBinding.FieldName = 'FECHA_PEDIDO'
end
object cxGridViewFECHA_CONFIRMACION: TcxGridDBColumn
Caption = 'Fecha confirmaci'#243'n'
DataBinding.FieldName = 'FECHA_CONFIRMACION'
Visible = False
end
object cxGridViewID_PROVEEDOR: TcxGridDBColumn
DataBinding.FieldName = 'ID_PROVEEDOR'
Visible = False
end
object cxGridViewPROVEEDOR: TcxGridDBColumn
DataBinding.FieldName = 'PROVEEDOR'
end
object cxGridViewID_ARTICULO: TcxGridDBColumn
DataBinding.FieldName = 'ID'
Visible = False
end
object cxGridViewFAMILIA: TcxGridDBColumn
DataBinding.FieldName = 'FAMILIA'
end
object cxGridViewREFERENCIA: TcxGridDBColumn
DataBinding.FieldName = 'REFERENCIA'
end
object cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn
DataBinding.FieldName = 'REFERENCIA_PROVEEDOR'
end
object cxGridViewDESCRIPCION: TcxGridDBColumn
DataBinding.FieldName = 'DESCRIPCION'
end
object cxGridViewCANTIDAD_PEDIDA: TcxGridDBColumn
DataBinding.FieldName = 'CANTIDAD_PEDIDA'
PropertiesClassName = 'TcxSpinEditProperties'
Properties.Alignment.Horz = taRightJustify
FooterAlignmentHorz = taRightJustify
end
object cxGridViewCANTIDAD_RECIBIDA: TcxGridDBColumn
DataBinding.FieldName = 'CANTIDAD_RECIBIDA'
end
object cxGridViewCANTIDAD_PENDIENTE: TcxGridDBColumn
DataBinding.FieldName = 'CANTIDAD_PENDIENTE'
end
end
object cxGridDBTableView1: TcxGridDBTableView [1]
NavigatorButtons.ConfirmDelete = False
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsView.NewItemRowInfoText = 'Click here to add a new row'
end
inherited cxGridLevel: TcxGridLevel
Tag = -1
Caption = 'Todos los almacenes'
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 468
Width = 468
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Visible = True
ExplicitWidth = 554
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
inherited TBXToolbar1: TTBXToolbar
object TBXSeparatorItem1: TTBXSeparatorItem
end
object TBXItem3: TTBXItem
Action = actProveedores
end
object TBXSeparatorItem2: TTBXSeparatorItem
end
object TBXItem2: TTBXItem
Action = actPedidos
end
end
end
end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 38673.741107951390000000
BuiltInReportLink = True
end
end
inherited cxStyleRepository1: TcxStyleRepository
inherited cxStyleEven: TcxStyle
AssignedValues = [svFont]
end
inherited cxStyleOdd: TcxStyle
AssignedValues = [svColor, svFont]
end
inherited cxStyleSelection: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
end
object cxStyleArticuloSinStock: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
TextColor = clRed
end
end
inherited ActionList1: TActionList
object actProveedores: TAction
Caption = 'Proveedores'
OnExecute = actProveedoresExecute
OnUpdate = actProveedoresUpdate
end
object actPedidos: TAction
Caption = 'Pedidos'
OnExecute = actPedidosExecute
OnUpdate = actPedidosUpdate
end
end
inherited dxPrintStyleManager1: TdxPrintStyleManager
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
BuiltInStyle = True
end
end
object PngImageList: TPngImageList
PngImages = <
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
610000000970485973000017120000171201679FD252000001004944415478DA
63BC5C22F99F8148A0D3FD8C115D8C1164806A4B0D84F7FD3B03C3FD3B0CB3DB
3732A42EC614CB5985CF00A8C2E9177D1858B6A5420C4013C36D4075315821C3
F5AB0CD37F95430C98852986DB80287FB02D300036A012530CA701071E121788
F8C3002DC072573F67FCFF9F7004E10C449001403967A09A3D78F4BBE00C44A8
0160C3D9D9B33074FEFC398D61766C0BEE408419004C3C60C5700072E98FEF0C
D3771882D5E10C44AC0680347F7807A6A79F748618802FA0AE944A210C80697E
0FC43F7E324CBF194C82011F7A119A3F7C80B8E0552A09063CA8466806BBE03B
3CB0091A008A85E9CBE5B1CA13638033308071A6030779061700E6FAF742387F
63F70000000049454E44AE426082}
Name = 'PngImage1'
Background = clWindow
end
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
610000000970485973000017120000171201679FD252000001A94944415478DA
8D925D28836114C7FF4FBEE246B9734BBB61B990C89512492925F9B6BB5D0817
98968FF21186250AADB69285D2848DB2A5AC854D44CBB7D096C495A4D078278F
BDCF986C5EAF53E7E2391FBF739E7F871C2AE229FE6952F52D098E111E20E969
F7BF3C1EC07D099DCA04F95468ACCEF017E0B350B35F80F015B91F10141306B4
35B1429C1E43C329FD00AD3F962493E22156E2AB04C2C280A8FB0B5C1FD4929F
808A4236E5CB18A0A51059CD524CE86B7E4C54CD7A611C69C5E3F51009006C57
A1822D726D181DAF816DDF0B854CC936A03E2F560EB0BC75BA0337CE7E2228A2
FA7912666D0E4A4B1A71681FF95E396D8B5695A7C2BED00597BD8F088A38F834
098B2E0795D58D705A4301DBCBDD38B7F5124111EB5DF3A277417733C9AF2236
8CC5E1D894210A48CE1FFE5D447E3A0F303ADEC0BD51B87737E1DAE944427A27
A21333F1F24AA19F3900380708A5A197CCFF930718D6BDE0BC141BBADC402EB1
C8020FF70EC3DC9138607A8D631BF0EE9CCA0B34BFF87CC974220ED0995F59F3
ED9E1177671A44C457213AA98C01ACAB677F034415E44D08C0202943A290C8C8
98EC0F53DC14659A0322CE0000000049454E44AE426082}
Name = 'PngImage0'
Background = clWindow
end>
Left = 56
Top = 48
Bitmap = {}
end
end

View File

@ -0,0 +1,239 @@
unit uViewDetallesSinRecibir;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, frxClass, frxPreview, cxStyles,
cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB,
cxDBData, ActnList, uDADataTable, cxGridLevel, cxClasses, cxControls,
cxGridCustomView, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxGrid, StdCtrls, ExtCtrls, cxLabel, dxPSGlbl, dxPSUtl,
dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore, dxPScxCommon, dxPScxGridLnk, cxImage,
cxImageComboBox, ImgList, PngImageList, cxTextEdit, Grids, DBGrids, cxDBLookupComboBox,
cxButtonEdit, cxGridCustomPopupMenu, cxGridPopupMenu, uViewGrid,
uBizInventario, uBizAlmacenes, cxSpinEdit, uViewFiltroBase, TB2Item, TBX,
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, cxCurrencyEdit, uAlmacenesController;
type
IViewDetalleSinRecibir = interface(IViewGrid)
['{AC8507FF-B6FB-48D3-9FEA-2380FE2F7699}']
function GetDetalles: IBizDetalleSinRecibir;
procedure SetDetalles(const Value: IBizDetalleSinRecibir);
property Detalles: IBizDetalleSinRecibir read GetDetalles write SetDetalles;
// function GetAlmacenes: IBizAlmacen;
// procedure SetAlmacenes(const Value: IBizAlmacen);
// property Almacenes: IBizAlmacen read GetAlmacenes write SetAlmacenes;
end;
TfrViewDetallesSinRecibir = class(TfrViewGrid, IViewDetalleSinRecibir)
cxGridDBTableView1: TcxGridDBTableView;
PngImageList: TPngImageList;
cxStyleArticuloSinStock: TcxStyle;
cxGridViewRecID: TcxGridDBColumn;
cxGridViewREFERENCIA_PEDIDO: TcxGridDBColumn;
cxGridViewFECHA_PEDIDO: TcxGridDBColumn;
cxGridViewFECHA_CONFIRMACION: TcxGridDBColumn;
cxGridViewID_PROVEEDOR: TcxGridDBColumn;
cxGridViewPROVEEDOR: TcxGridDBColumn;
cxGridViewID_ARTICULO: TcxGridDBColumn;
cxGridViewFAMILIA: TcxGridDBColumn;
cxGridViewREFERENCIA: TcxGridDBColumn;
cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn;
cxGridViewDESCRIPCION: TcxGridDBColumn;
cxGridViewCANTIDAD_PEDIDA: TcxGridDBColumn;
cxGridViewCANTIDAD_RECIBIDA: TcxGridDBColumn;
cxGridViewCANTIDAD_PENDIENTE: TcxGridDBColumn;
TBXItem2: TTBXItem;
TBXItem3: TTBXItem;
actProveedores: TAction;
actPedidos: TAction;
TBXSeparatorItem1: TTBXSeparatorItem;
TBXSeparatorItem2: TTBXSeparatorItem;
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out
AStyle: TcxStyle);
procedure actProveedoresExecute(Sender: TObject);
procedure actProveedoresUpdate(Sender: TObject);
procedure actPedidosExecute(Sender: TObject);
procedure actPedidosUpdate(Sender: TObject);
private
// FAlmacenesController: IAlmacenesController;
// FAlmacenes: IBizAlmacen;
// function GetAlmacenes: IBizAlmacen;
// procedure SetAlmacenes(const Value: IBizAlmacen);
//Filtros relativos a la vista
// procedure AnadirFiltroAlmacenes;
protected
FDetalles: IBizDetalleSinRecibir;
function GetDetalles: IBizDetalleSinRecibir;
procedure SetDetalles(const Value: IBizDetalleSinRecibir);
procedure AnadirOtrosFiltros; override;
public
// property Almacenes: IBizAlmacen read GetAlmacenes write SetAlmacenes;
// property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
{$R *.dfm}
uses uDataModuleInventario, schInventarioClient_Intf;
{
procedure TfrViewDetallesSinRecibir.AnadirFiltroAlmacenes;
var
FFiltro : TcxFilterCriteriaItemList;
CodigoAlmacen: String;
begin
FFiltro := AddFilterGrid(fboAnd);
CodigoAlmacen := IntToStr(cxGrid.Levels.Items[cxGrid.ActiveLevel.Index].Tag);
if CodigoAlmacen <> '-1' then
begin
FFiltro.AddItem(cxGridViewID_ALMACEN_ALB, foEqual, CodigoAlmacen, CodigoAlmacen);
cxGridViewALMACEN_ALB.Visible := False;
end
else
cxGridViewALMACEN_ALB.Visible := True;
end;
}
procedure TfrViewDetallesSinRecibir.actProveedoresExecute(Sender: TObject);
begin
if (cxGridViewPROVEEDOR.GroupIndex < 0) then
begin
cxGridViewPROVEEDOR.GroupIndex := cxGridView.GroupedColumnCount;
cxGridViewPROVEEDOR.Visible := False;
end
else
begin
cxGridViewPROVEEDOR.GroupIndex := -1;
cxGridViewPROVEEDOR.Visible := True;
end;
end;
procedure TfrViewDetallesSinRecibir.actProveedoresUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Checked := not (cxGridViewPROVEEDOR.GroupIndex < 0);
end;
procedure TfrViewDetallesSinRecibir.actPedidosExecute(Sender: TObject);
begin
if (cxGridViewREFERENCIA_PEDIDO.GroupIndex < 0) then
begin
cxGridViewREFERENCIA_PEDIDO.GroupIndex := cxGridView.GroupedColumnCount;
cxGridViewREFERENCIA_PEDIDO.Visible := False;
end
else
begin
cxGridViewREFERENCIA_PEDIDO.GroupIndex := -1;
cxGridViewREFERENCIA_PEDIDO.Visible := True;
end;
end;
procedure TfrViewDetallesSinRecibir.actPedidosUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Checked := not (cxGridViewREFERENCIA_PEDIDO.GroupIndex < 0);
end;
procedure TfrViewDetallesSinRecibir.AnadirOtrosFiltros;
begin
inherited;
// AnadirFiltroAlmacenes;
//Finalmente activamos el filtro si tenemos algo
if cxGridView.DataController.Filter.IsEmpty
then cxGridView.DataController.Filter.Active := False
else cxGridView.DataController.Filter.Active := True;
cxGrid.ActiveLevel.GridView := cxGridView;
end;
constructor TfrViewDetallesSinRecibir.Create(AOwner: TComponent);
begin
inherited;
// FAlmacenesController := TAlmacenesController.Create;
// Almacenes := FAlmacenesController.BuscarTodos;
end;
procedure TfrViewDetallesSinRecibir.cxGridViewStylesGetContentStyle(Sender:
TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem:
TcxCustomGridTableItem; out AStyle: TcxStyle);
var
IndiceCol: Integer;
AStock: Variant;
begin
inherited;
{
if Assigned(ARecord) then
begin
IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_DetalleReservasSTOCK).Index;
AStock := ARecord.DisplayTexts[IndiceCol];
if (AStock < 0) then
AStyle := cxStyleArticuloSinStock;
end;
}
end;
destructor TfrViewDetallesSinRecibir.Destroy;
begin
// FAlmacenesController := Nil;
// FAlmacenes := Nil;
FDetalles := Nil;
inherited;
end;
{function TfrViewDetallesSinRecibir.GetAlmacenes: IBizAlmacen;
begin
Result := FAlmacenes;
end;
}
function TfrViewDetallesSinRecibir.GetDetalles: IBizDetalleSinRecibir;
begin
Result := FDetalles;
end;
{
procedure TfrViewDetallesSinRecibir.SetAlmacenes(const Value: IBizAlmacen);
var
Nivel: TcxGridLevel;
begin
FAlmacenes := Value;
if Assigned(FAlmacenes) then
begin
if not FAlmacenes.DataTable.Active then
FAlmacenes.DataTable.Active := True;
FAlmacenes.First;
while not FAlmacenes.EOF do
begin
Nivel := cxGrid.Levels.Add;
Nivel.Caption := FAlmacenes.NOMBRE;
Nivel.Tag := FAlmacenes.ID;
FAlmacenes.Next;
end;
end;
end;
}
procedure TfrViewDetallesSinRecibir.SetDetalles(const Value: IBizDetalleSinRecibir);
begin
FDetalles := Value;
if Assigned(FDetalles) then
dsDataSource.DataTable := FDetalles.DataTable
else
dsDataSource.DataTable := Nil;
end;
end.

View File

@ -3,7 +3,8 @@ unit uGenerarAlbaranesProvUtils;
interface
uses
Windows, SysUtils, Classes, uBizPedidosProveedor, pngimage, JSDialog;
Windows, SysUtils, Classes, uBizPedidosProveedor, pngimage, JSDialog,
uBizAlbaranesProveedor, uBizInventario, uBizContactos;
type
TdmGenerarAlbaranesProv = class(TDataModule)
@ -16,17 +17,22 @@ type
function RecibirPedidoProv(APedido: IBizPedidoProveedor): Boolean; overload;
function RecibirPedidoProv: Boolean; overload;
//Metodos para recibir articulos pendientes
function GenerarAlbaranesProv(AArticulos : IBizDetalleSinRecibir; var AAlbaranes: IBizAlbaranProveedor) : Boolean; overload;
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranProveedor; AProveedor: IBizProveedor; AArticulos: IBizDetalleSinRecibir);
implementation
{$R *.dfm}
uses
Dialogs, uDialogUtils, uBizDetallesPedidoProveedor, uBizDetallesAlbaranProveedor,
cxControls, Dialogs, uDialogUtils, uBizDetallesPedidoProveedor, uBizDetallesAlbaranProveedor,
uPedidosProveedorController, uDetallesPedidoProveedorController,
uAlbaranesProveedorController, uProveedoresController,
uDetallesAlbaranProveedorController, uControllerDetallesBase,
uBizAlbaranesProveedor, uBizContactos, schPedidosProveedorClient_Intf,
schAlbaranesProveedorClient_Intf, uInventarioController, uBizInventario;
schPedidosProveedorClient_Intf, schAlbaranesProveedorClient_Intf, uInventarioController,
uDADataTable, schInventarioClient_Intf;
var
dmGenerarAlbaranesCli: TdmGenerarAlbaranesProv;
@ -350,4 +356,178 @@ begin
end;
end;
function GenerarAlbaranesProv(AArticulos : IBizDetalleSinRecibir; var AAlbaranes: IBizAlbaranProveedor) : Boolean; overload;
var
ARespuesta : Integer;
AProveedor: IBizProveedor;
RefPedCliAux: String;
I: Integer;
begin
Result := False;
if not Assigned(AArticulos) then
raise Exception.Create('AArticulos no asignado (GenerarAlbaranesProv)');
if not Assigned(APedidosProveedorController) then
Inicializar;
ShowHourglassCursor;
try
//Preparamos el componente donde almacenaremos las referencias de los albaranes generados
dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.CustomButtons.Clear;
dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Content.Clear;
dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Instruction.Text := 'Se han generado los albaranes';
// Ordenar por proveedor y pedido
AArticulos.DataTable.Sort([fld_AlbaranesProveedorID_PROVEEDOR, fld_AlbaranesProveedorID_PEDIDO], [uDADataTable.sdAscending, uDADataTable.sdAscending]);
AArticulos.DataTable.First;
//Inicializamos albaran
AProveedor := (AProveedoresController.Buscar(AArticulos.ID_PROVEEDOR) as IBizProveedor);
AProveedor.DataTable.Active := True;
AAlbaranes := AAlbaranesProveedorController.Nuevo;
InicializarAlbaran(AAlbaranes, AProveedor, AArticulos);
//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
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
with AAlbaranes.Detalles do
begin
Edit;
RefPedCliAux := AArticulos.REFERENCIA_PEDIDO;
CONCEPTO := 'Pedido ' + AArticulos.REFERENCIA_PEDIDO + ' del ' + DateToStr(AArticulos.FECHA_PEDIDO);
Post;
end;
for I := 0 to AArticulos.DataTable.RecordCount - 1 do
begin
//En el caso que se cambie de pedido, cerramos detalles del pedido
if (RefPedCliAux <> AArticulos.REFERENCIA_PEDIDO) then
begin
// Añado el resumen del pedido
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_SUBTOTAL);
with AAlbaranes.Detalles do
begin
Edit;
CONCEPTO := 'Total del pedido ' + RefPedCliAux;
Post;
end;
// Añado una línea en blanco
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_CONCEPTO);
with AAlbaranes.Detalles do
begin
Edit;
CONCEPTO := '';
Post;
end;
//En el caso que cambie de pedido pero no de proveedor volvemos a crear la cabecera del nuevo pedido
if (AProveedor.ID = AArticulos.ID_PROVEEDOR) then
begin
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
with AAlbaranes.Detalles do
begin
Edit;
RefPedCliAux := AArticulos.REFERENCIA_PEDIDO;
CONCEPTO := 'Pedido ' + AArticulos.REFERENCIA_PEDIDO + ' del ' + DateToStr(AArticulos.FECHA_PEDIDO);
Post;
end;
end;
end;
//En el caso que cambie el cliente se guarda el albaran actual y se crea uno nuevo
if (AProveedor.ID <> AArticulos.ID_PROVEEDOR) then
begin
AAlbaranesProveedorController.RecalcularImportes(AAlbaranes);
AAlbaranesProveedorController.Guardar(AAlbaranes);
dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Content.Add(Format('%s: %s' + #10#13, [AAlbaranes.REFERENCIA, AProveedor.NOMBRE]));
//Inicializamos albaran
AProveedor := (AProveedoresController.Buscar(AArticulos.ID_PROVEEDOR) as IBizProveedor);
AProveedor.DataTable.Active := True;
AAlbaranesProveedorController.Anadir(AAlbaranes);
InicializarAlbaran(AAlbaranes, AProveedor, AArticulos);
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
with AAlbaranes.Detalles do
begin
Edit;
RefPedCliAux := AArticulos.REFERENCIA_PEDIDO;
CONCEPTO := 'Pedido ' + AArticulos.REFERENCIA_PEDIDO + ' del ' + DateToStr(AArticulos.FECHA_PEDIDO);
Post;
end;
end;
//Rellenamos el detalle del albarán
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_CONCEPTO);
AAlbaranes.Detalles.Edit;
AAlbaranes.Detalles.ID_PEDIDO := AArticulos.ID_PEDIDO;
AAlbaranes.Detalles.REFERENCIA := AArticulos.REFERENCIA;
AAlbaranes.Detalles.REFERENCIA_PROVEEDOR := AArticulos.REFERENCIA_PROVEEDOR;
AAlbaranes.Detalles.ID_ARTICULO := AArticulos.ID_ARTICULO;
AAlbaranes.Detalles.CONCEPTO := AArticulos.DESCRIPCION;
AAlbaranes.Detalles.CANTIDAD := AArticulos.CANTIDAD_PENDIENTE;
AAlbaranes.Detalles.IMPORTE_UNIDAD := AArticulos.PRECIO_COSTE;
AAlbaranes.Detalles.DESCUENTO := AArticulos.DESCUENTO;
AAlbaranes.Detalles.Post;
//Pasamos al siguiente articulo
AArticulos.DataTable.Next;
end;
//Finalmente cerraremos el último pedido del último albarán
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_SUBTOTAL);
with AAlbaranes.Detalles do
begin
Edit;
CONCEPTO := 'Total del pedido ' + RefPedCliAux;
Post;
end;
// Añado una línea en blanco
ADetallesAlbaranesController.Add(AAlbaranes.Detalles, TIPO_DETALLE_CONCEPTO);
with AAlbaranes.Detalles do
begin
Edit;
CONCEPTO := '';
Post;
end;
AAlbaranesProveedorController.RecalcularImportes(AAlbaranes);
AAlbaranesProveedorController.Guardar(AAlbaranes);
dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Content.Add(Format('%s: %s' + #10#13, [AAlbaranes.REFERENCIA, AProveedor.NOMBRE]));
finally
HideHourglassCursor;
//Visualizamos los albaranes generados
dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Execute;
if Assigned(APedidosProveedorController) then
Finalizar;
end;
end;
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranProveedor; AProveedor: IBizProveedor; AArticulos: IBizDetalleSinRecibir);
begin
//El albaran debe venir abierto y posicionado para la copia.
AAlbaranes.Proveedor := (AProveedor as IBizProveedor);
AAlbaranes.TIPO := CTE_TIPO_ALBARAN;
// AAlbaranes.REFERENCIA_CLIENTE := AArticulos.REFERENCIA_CLI_PEDIDO;
// AAlbaranes.FECHA_PREVISTA_ENVIO := AArticulos.FECHA_PREVISTA_PEDIDO;
AAlbaranes.CALLE := AArticulos.CALLE;
AAlbaranes.CODIGO_POSTAL := AArticulos.CODIGO_POSTAL;
AAlbaranes.POBLACION := AArticulos.POBLACION;
AAlbaranes.PROVINCIA := AArticulos.PROVINCIA;
AAlbaranes.PERSONA_CONTACTO := AArticulos.PERSONA_CONTACTO;
AAlbaranes.TELEFONO := AArticulos.TELEFONO;
AAlbaranes.IVA := AArticulos.IVA;
AAlbaranes.ID_FORMA_PAGO := AArticulos.ID_FORMA_PAGO;
end;
end.