Subida de lógica (albaranar articulos pendientes de pedidos de cliente), completo, faltaria la parte de proveedores

git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@225 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
roberto 2008-04-21 07:35:55 +00:00
parent afa38c6f6a
commit 5577da31e9
28 changed files with 1568 additions and 285 deletions

View File

@ -574,7 +574,7 @@ source_path
<Property name="MajorVersion" type="Integer">2</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
<Property name="MaxRetryAttempts" type="Cardinal">0</Property>
<Property name="MinorVersion" type="Integer">4</Property>
<Property name="MinorVersion" type="Integer">7</Property>
<Property name="NodeCollapsed" type="Boolean">False</Property>
<Property name="PauseInterval" type="Cardinal">0</Property>
<Property MultiValue="0" name="ProjectFile" type="WideString">%source_path%\Servidor\FactuGES_Server.dpr</Property>
@ -594,15 +594,15 @@ source_path
<Property name="UseVersionFromDOF" type="Boolean">True</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=Rodax Software S.L.
FileDescription=
FileVersion=2.4.0.0
FileVersion=2.7.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=FactuGES Server
ProductVersion=2.3.9.0
ProductVersion=2.7.0.0
Comments=
CompileDate=viernes, 18 de enero de 2008 21:11
CompileDate=martes, 01 de abril de 2008 10:41
]]>
</Property>
<Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
@ -19365,7 +19365,7 @@ Comments=
<Property MultiValue="0" name="ExtraCommandline" type="WideString"></Property>
<Property name="HintsAsError" type="Boolean">False</Property>
<Property MultiValue="0" name="IconFile" type="WideString"></Property>
<Property name="IgnoreFailure" type="WordBool">False</Property>
<Property name="IgnoreFailure" type="WordBool">True</Property>
<Property name="IncludeCompileDate" type="WordBool">False</Property>
<Property name="IncludeManifest" type="Boolean">False</Property>
<Property name="IncludeVerInfo" type="WordBool">True</Property>
@ -20599,7 +20599,7 @@ Comments=
<Property name="MajorVersion" type="Integer">2</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
<Property name="MaxRetryAttempts" type="Cardinal">0</Property>
<Property name="MinorVersion" type="Integer">4</Property>
<Property name="MinorVersion" type="Integer">7</Property>
<Property name="NodeCollapsed" type="Boolean">False</Property>
<Property name="PauseInterval" type="Cardinal">0</Property>
<Property MultiValue="0" name="ProjectFile" type="WideString">%source_path%\Cliente\FactuGES.dpr</Property>
@ -20619,13 +20619,13 @@ Comments=
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=Rodax Software S.L.
FileDescription=
FileVersion=2.4.0.0
FileVersion=2.7.0.0
InternalName=FactuGES
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=2.3.9.0
ProductVersion=2.7.0.0
Comments=
]]>
</Property>

Binary file not shown.

View File

@ -148,7 +148,7 @@
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">2</VersionInfo>
<VersionInfo Name="MinorVer">6</VersionInfo>
<VersionInfo Name="MinorVer">7</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
@ -162,13 +162,13 @@
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">2.6.0.0</VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">2.7.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">2.6.0.0</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">2.7.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys> <Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\Usuario\Mis documentos\Borland Studio Projects\Bpl\EasyListviewD10.bpl">Muststang Peak EasyListview Runtime Package</Excluded_Packages>

View File

@ -1,7 +1,7 @@
MAINICON ICON "c:\Codigo Luis Leon\Source\Iconos\Factuges.ico"
1 VERSIONINFO
FILEVERSION 2,6,0,0
PRODUCTVERSION 2,6,0,0
FILEVERSION 2,7,0,0
PRODUCTVERSION 2,7,0,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
@ -13,9 +13,9 @@ BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0"
VALUE "FileVersion", "2.6.0.0\0"
VALUE "FileVersion", "2.7.0.0\0"
VALUE "InternalName", "FactuGES\0"
VALUE "ProductVersion", "2.6.0.0\0"
VALUE "ProductVersion", "2.7.0.0\0"
END
END
BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -1,7 +1,6 @@
inherited fEditorElegirArticulosAlbaranCliente: TfEditorElegirArticulosAlbaranCliente
Caption = 'fEditorElegirArticulosAlbaranCliente'
ExplicitWidth = 320
ExplicitHeight = 480
ExplicitHeight = 471
PixelsPerInch = 96
TextHeight = 13
end

View File

@ -152,44 +152,46 @@ object srvInfMargenArticulo: TsrvInfMargenArticulo
'ARTICULO IS NOT NULL) AND (FACTURAS_CLIENTE_DETALLES.ID_ARTICULO' +
' > 0)'#10' AND (FACTURAS_CLIENTE_DETALLES.CANTIDAD > 0)'#10' A' +
'ND (FACTURAS_CLIENTE.FECHA_FACTURA BETWEEN :FECHAINI AND :FECHAF' +
'IN)'#10' GROUP BY 1, 2, 3)'#10#10' GROUP BY 1, 2, 3) MARGEN_VENTAS'#10#10#10'LE' +
'FT JOIN'#10#10#10'(SELECT'#10' ID_EMPRESA, ID_ARTICULO, COALESCE(SUM(IMPO' +
'RTE_UNIDAD_ULT_COMP),0) AS IMPORTE_UNIDAD_ULT_COMP, COALESCE(SUM' +
'(IMPORTE_NETO_ULT_COMP),0) AS IMPORTE_NETO_ULT_COMP,'#10' COALESC' +
'E(SUM(IMPORTE_PORTE_ULT_COMP),0) AS IMPORTE_PORTE_ULT_COMP, COAL' +
'ESCE(SUM(IMPORTE_UNIDAD_PRO_COMP),SUM(IMPORTE_UNIDAD_ULT_COMP)) ' +
'AS IMPORTE_UNIDAD_PRO_COMP,'#10' COALESCE(SUM(IMPORTE_NETO_PRO_CO' +
'MP),SUM(IMPORTE_NETO_ULT_COMP)) AS IMPORTE_NETO_PRO_COMP, COALES' +
'CE(SUM(IMPORTE_PORTE_PRO_COMP),SUM(IMPORTE_PORTE_ULT_COMP)) AS I' +
'MPORTE_PORTE_PRO_COMP'#10#10' FROM'#10' (SELECT'#10' ID_EMPRESA, ID_ART' +
'ICULO,'#10' IMPORTE_UNIDAD_COMPRA AS IMPORTE_UNIDAD_ULT_COMP, I' +
'MPORTE_NETO_COMPRA AS IMPORTE_NETO_ULT_COMP, IMPORTE_PORTE_COMPR' +
'A AS IMPORTE_PORTE_ULT_COMP,'#10' NULL AS IMPORTE_UNIDAD_PRO_CO' +
'MP, NULL AS IMPORTE_NETO_PRO_COMP, NULL AS IMPORTE_PORTE_PRO_COM' +
'P'#10#10' FROM V_INF_ULTCOM_PORARTICULO'#10#10' UNION ALL'#10#10' SELECT'#10 +
' FACTURAS_PROVEEDOR.ID_EMPRESA,'#10' FACTURAS_PROVEEDOR_DE' +
'TALLES.ID_ARTICULO,'#10' NULL, NULL, NULL,'#10' AVG(FACTURAS_P' +
'ROVEEDOR_DETALLES.IMPORTE_UNIDAD) AS IMPORTE_UNIDAD_PRO_COMP,'#10' ' +
' AVG(FACTURAS_PROVEEDOR_DETALLES.IMPORTE_UNIDAD - (FACTURAS_P' +
'ROVEEDOR_DETALLES.IMPORTE_UNIDAD * (FACTURAS_PROVEEDOR_DETALLES.' +
'DESCUENTO / 100))) AS IMPORTE_NETO_PRO_COMP,'#10' AVG(FACTURAS_' +
'PROVEEDOR_DETALLES.IMPORTE_PORTE) AS IMPORTE_PORTE_PRO_COMP'#10#10' ' +
' FROM FACTURAS_PROVEEDOR_DETALLES'#10' LEFT OUTER JOIN FACTURAS_P' +
'ROVEEDOR'#10' ON (FACTURAS_PROVEEDOR.ID = FACTURAS_PROVEEDOR_DETA' +
'LLES.ID_FACTURA)'#10#10' WHERE (FACTURAS_PROVEEDOR_DETALLES.ID_ARTI' +
'CULO IS NOT NULL) AND (FACTURAS_PROVEEDOR_DETALLES.ID_ARTICULO >' +
' 0)'#10' AND (FACTURAS_PROVEEDOR_DETALLES.CANTIDAD > 0)'#10' /' +
'*Las compras promedio deben de calcularse desde el principio de ' +
'los tiempos hasta ahora*/'#10' AND (FACTURAS_PROVEEDOR.FECHA_FA' +
'CTURA BETWEEN '#39'12.12.2000'#39' AND current_date)'#10' GROUP BY 1, 2)'#10 +
#10' GROUP BY 1, 2) MARGEN_COMPRAS'#10#10#10'ON (MARGEN_COMPRAS.ID_EMPRESA' +
' = MARGEN_VENTAS.ID_EMPRESA)'#10'AND (MARGEN_COMPRAS.ID_ARTICULO = M' +
'ARGEN_VENTAS.ID_ARTICULO)'#10#10#10'LEFT JOIN ARTICULOS ON (ARTICULOS.ID' +
' = MARGEN_VENTAS.ID_ARTICULO)'#10'LEFT JOIN CONTACTOS CLIENTES ON (C' +
'LIENTES.ID = MARGEN_VENTAS.ID_CLIENTE)'#10'LEFT JOIN CLIENTES_DATOS ' +
'ON (CLIENTES_DATOS.ID_CLIENTE = CLIENTES.ID)'#10'LEFT JOIN CONTACTOS' +
' AGENTES ON (AGENTES.ID = CLIENTES_DATOS.ID_AGENTE)'#10'WHERE ARTICU' +
'LOS.INVENTARIABLE = 1) INF_MARGEN_ARTICULOS'
'IN)'#10' GROUP BY 1, 2, 3)'#10#10' GROUP BY 1, 2, 3'#10' having SUM(IMPORTE' +
'_NETO_PRO_VENT) > 0 /*Solo queremos aquellos articulos que se ha' +
'yan vendido en ese periodo de fechas*/'#10' ) MARGEN_VENTAS'#10#10#10'LEFT ' +
'JOIN'#10#10#10'(SELECT'#10' ID_EMPRESA, ID_ARTICULO, COALESCE(SUM(IMPORTE' +
'_UNIDAD_ULT_COMP),0) AS IMPORTE_UNIDAD_ULT_COMP, COALESCE(SUM(IM' +
'PORTE_NETO_ULT_COMP),0) AS IMPORTE_NETO_ULT_COMP,'#10' COALESCE(S' +
'UM(IMPORTE_PORTE_ULT_COMP),0) AS IMPORTE_PORTE_ULT_COMP, COALESC' +
'E(SUM(IMPORTE_UNIDAD_PRO_COMP),SUM(IMPORTE_UNIDAD_ULT_COMP)) AS ' +
'IMPORTE_UNIDAD_PRO_COMP,'#10' COALESCE(SUM(IMPORTE_NETO_PRO_COMP)' +
',SUM(IMPORTE_NETO_ULT_COMP)) AS IMPORTE_NETO_PRO_COMP, COALESCE(' +
'SUM(IMPORTE_PORTE_PRO_COMP),SUM(IMPORTE_PORTE_ULT_COMP)) AS IMPO' +
'RTE_PORTE_PRO_COMP'#10#10' FROM'#10' (SELECT'#10' ID_EMPRESA, ID_ARTICU' +
'LO,'#10' IMPORTE_UNIDAD_COMPRA AS IMPORTE_UNIDAD_ULT_COMP, IMPO' +
'RTE_NETO_COMPRA AS IMPORTE_NETO_ULT_COMP, IMPORTE_PORTE_COMPRA A' +
'S IMPORTE_PORTE_ULT_COMP,'#10' NULL AS IMPORTE_UNIDAD_PRO_COMP,' +
' NULL AS IMPORTE_NETO_PRO_COMP, NULL AS IMPORTE_PORTE_PRO_COMP'#10#10 +
' FROM V_INF_ULTCOM_PORARTICULO'#10#10' UNION ALL'#10#10' SELECT'#10' ' +
' FACTURAS_PROVEEDOR.ID_EMPRESA,'#10' FACTURAS_PROVEEDOR_DETAL' +
'LES.ID_ARTICULO,'#10' NULL, NULL, NULL,'#10' AVG(FACTURAS_PROV' +
'EEDOR_DETALLES.IMPORTE_UNIDAD) AS IMPORTE_UNIDAD_PRO_COMP,'#10' ' +
' AVG(FACTURAS_PROVEEDOR_DETALLES.IMPORTE_UNIDAD - (FACTURAS_PROV' +
'EEDOR_DETALLES.IMPORTE_UNIDAD * (FACTURAS_PROVEEDOR_DETALLES.DES' +
'CUENTO / 100))) AS IMPORTE_NETO_PRO_COMP,'#10' AVG(FACTURAS_PRO' +
'VEEDOR_DETALLES.IMPORTE_PORTE) AS IMPORTE_PORTE_PRO_COMP'#10#10' FR' +
'OM FACTURAS_PROVEEDOR_DETALLES'#10' LEFT OUTER JOIN FACTURAS_PROV' +
'EEDOR'#10' ON (FACTURAS_PROVEEDOR.ID = FACTURAS_PROVEEDOR_DETALLE' +
'S.ID_FACTURA)'#10#10' WHERE (FACTURAS_PROVEEDOR_DETALLES.ID_ARTICUL' +
'O IS NOT NULL) AND (FACTURAS_PROVEEDOR_DETALLES.ID_ARTICULO > 0)' +
#10' AND (FACTURAS_PROVEEDOR_DETALLES.CANTIDAD > 0)'#10' /*La' +
's compras promedio deben de calcularse desde el principio de los' +
' tiempos hasta ahora*/'#10' AND (FACTURAS_PROVEEDOR.FECHA_FACTU' +
'RA BETWEEN '#39'12.12.2000'#39' AND current_date)'#10' GROUP BY 1, 2)'#10#10' ' +
'GROUP BY 1, 2) MARGEN_COMPRAS'#10#10#10'ON (MARGEN_COMPRAS.ID_EMPRESA = ' +
'MARGEN_VENTAS.ID_EMPRESA)'#10'AND (MARGEN_COMPRAS.ID_ARTICULO = MARG' +
'EN_VENTAS.ID_ARTICULO)'#10#10#10'LEFT JOIN ARTICULOS ON (ARTICULOS.ID = ' +
'MARGEN_VENTAS.ID_ARTICULO)'#10'LEFT JOIN CONTACTOS CLIENTES ON (CLIE' +
'NTES.ID = MARGEN_VENTAS.ID_CLIENTE)'#10'LEFT JOIN CLIENTES_DATOS ON ' +
'(CLIENTES_DATOS.ID_CLIENTE = CLIENTES.ID)'#10'LEFT JOIN CONTACTOS AG' +
'ENTES ON (AGENTES.ID = CLIENTES_DATOS.ID_AGENTE)'#10'WHERE ARTICULOS' +
'.INVENTARIABLE = 1) INF_MARGEN_ARTICULOS'
StatementType = stSQL
ColumnMappings = <
item
@ -915,41 +917,43 @@ object srvInfMargenArticulo: TsrvInfMargenArticulo
'ACTURAS_CLIENTE_DETALLES.ID_ARTICULO > 0)'#10' AND (FACTURAS_CL' +
'IENTE_DETALLES.CANTIDAD > 0)'#10' AND (FACTURAS_CLIENTE.FECHA_F' +
'ACTURA BETWEEN :FECHAINI AND :FECHAFIN)'#10' GROUP BY 1, 2)'#10#10' GRO' +
'UP BY 1, 2) MARGEN_VENTAS'#10#10#10'LEFT JOIN'#10#10#10'(SELECT'#10' ID_EMPRESA, ' +
'ID_ARTICULO, COALESCE(SUM(IMPORTE_UNIDAD_ULT_COMP),0) AS IMPORTE' +
'_UNIDAD_ULT_COMP, COALESCE(SUM(IMPORTE_NETO_ULT_COMP),0) AS IMPO' +
'RTE_NETO_ULT_COMP,'#10' COALESCE(SUM(IMPORTE_PORTE_ULT_COMP),0) A' +
'S IMPORTE_PORTE_ULT_COMP, COALESCE(SUM(IMPORTE_UNIDAD_PRO_COMP),' +
'COALESCE(SUM(IMPORTE_UNIDAD_ULT_COMP),0)) AS IMPORTE_UNIDAD_PRO_' +
'COMP,'#10' COALESCE(SUM(IMPORTE_NETO_PRO_COMP),COALESCE(SUM(IMPOR' +
'TE_NETO_ULT_COMP),0)) AS IMPORTE_NETO_PRO_COMP,'#10' COALESCE(SUM' +
'(IMPORTE_PORTE_PRO_COMP),COALESCE(SUM(IMPORTE_PORTE_ULT_COMP),0)' +
') AS IMPORTE_PORTE_PRO_COMP'#10#10' FROM'#10' (SELECT'#10' ID_EMPRESA, ' +
'ID_ARTICULO,'#10' IMPORTE_UNIDAD_COMPRA AS IMPORTE_UNIDAD_ULT_C' +
'OMP, IMPORTE_NETO_COMPRA AS IMPORTE_NETO_ULT_COMP, IMPORTE_PORTE' +
'_COMPRA AS IMPORTE_PORTE_ULT_COMP,'#10' NULL AS IMPORTE_UNIDAD_' +
'PRO_COMP, NULL AS IMPORTE_NETO_PRO_COMP, NULL AS IMPORTE_PORTE_P' +
'RO_COMP'#10#10' FROM V_INF_ULTCOM_PORARTICULO'#10#10' UNION ALL'#10#10' S' +
'ELECT'#10' FACTURAS_PROVEEDOR.ID_EMPRESA,'#10' FACTURAS_PROVEE' +
'DOR_DETALLES.ID_ARTICULO,'#10' NULL, NULL, NULL,'#10' AVG(FACT' +
'URAS_PROVEEDOR_DETALLES.IMPORTE_UNIDAD) AS IMPORTE_UNIDAD_PRO_CO' +
'MP,'#10' AVG(FACTURAS_PROVEEDOR_DETALLES.IMPORTE_UNIDAD - (FACT' +
'URAS_PROVEEDOR_DETALLES.IMPORTE_UNIDAD * (FACTURAS_PROVEEDOR_DET' +
'ALLES.DESCUENTO / 100))) AS IMPORTE_NETO_PRO_COMP,'#10' AVG(FAC' +
'TURAS_PROVEEDOR_DETALLES.IMPORTE_PORTE) AS IMPORTE_PORTE_PRO_COM' +
'P'#10#10' FROM FACTURAS_PROVEEDOR_DETALLES'#10' LEFT OUTER JOIN FACT' +
'URAS_PROVEEDOR'#10' ON (FACTURAS_PROVEEDOR.ID = FACTURAS_PROVEEDO' +
'R_DETALLES.ID_FACTURA)'#10#10' WHERE (FACTURAS_PROVEEDOR_DETALLES.I' +
'D_ARTICULO IS NOT NULL) AND (FACTURAS_PROVEEDOR_DETALLES.ID_ARTI' +
'CULO > 0)'#10' AND (FACTURAS_PROVEEDOR_DETALLES.CANTIDAD > 0)'#10' ' +
' /*Las compras promedio deben de calcularse desde el princip' +
'io de los tiempos hasta ahora*/'#10' AND (FACTURAS_PROVEEDOR.FE' +
'CHA_FACTURA BETWEEN '#39'12.12.2000'#39' AND current_date)'#10' GROUP BY ' +
'1, 2)'#10#10' GROUP BY 1, 2) MARGEN_COMPRAS'#10#10#10'ON (MARGEN_COMPRAS.ID_E' +
'MPRESA = MARGEN_VENTAS.ID_EMPRESA)'#10'AND (MARGEN_COMPRAS.ID_ARTICU' +
'LO = MARGEN_VENTAS.ID_ARTICULO)'#10#10#10'LEFT JOIN ARTICULOS ON (ARTICU' +
'LOS.ID = MARGEN_VENTAS.ID_ARTICULO)'#10'WHERE ARTICULOS.INVENTARIABL' +
'E = 1) INF_MARGEN_ARTICULOS'
'UP BY 1, 2'#10' having SUM(IMPORTE_NETO_PRO_VENT) > 0 /*Solo queremo' +
's aquellos articulos que se hayan vendido en ese periodo de fech' +
'as*/'#10' ) MARGEN_VENTAS'#10#10#10'LEFT JOIN'#10#10#10'(SELECT'#10' ID_EMPRESA, ID_' +
'ARTICULO, COALESCE(SUM(IMPORTE_UNIDAD_ULT_COMP),0) AS IMPORTE_UN' +
'IDAD_ULT_COMP, COALESCE(SUM(IMPORTE_NETO_ULT_COMP),0) AS IMPORTE' +
'_NETO_ULT_COMP,'#10' COALESCE(SUM(IMPORTE_PORTE_ULT_COMP),0) AS I' +
'MPORTE_PORTE_ULT_COMP, COALESCE(SUM(IMPORTE_UNIDAD_PRO_COMP),COA' +
'LESCE(SUM(IMPORTE_UNIDAD_ULT_COMP),0)) AS IMPORTE_UNIDAD_PRO_COM' +
'P,'#10' COALESCE(SUM(IMPORTE_NETO_PRO_COMP),COALESCE(SUM(IMPORTE_' +
'NETO_ULT_COMP),0)) AS IMPORTE_NETO_PRO_COMP,'#10' COALESCE(SUM(IM' +
'PORTE_PORTE_PRO_COMP),COALESCE(SUM(IMPORTE_PORTE_ULT_COMP),0)) A' +
'S IMPORTE_PORTE_PRO_COMP'#10#10' FROM'#10' (SELECT'#10' ID_EMPRESA, ID_' +
'ARTICULO,'#10' IMPORTE_UNIDAD_COMPRA AS IMPORTE_UNIDAD_ULT_COMP' +
', IMPORTE_NETO_COMPRA AS IMPORTE_NETO_ULT_COMP, IMPORTE_PORTE_CO' +
'MPRA AS IMPORTE_PORTE_ULT_COMP,'#10' NULL AS IMPORTE_UNIDAD_PRO' +
'_COMP, NULL AS IMPORTE_NETO_PRO_COMP, NULL AS IMPORTE_PORTE_PRO_' +
'COMP'#10#10' FROM V_INF_ULTCOM_PORARTICULO'#10#10' UNION ALL'#10#10' SELE' +
'CT'#10' FACTURAS_PROVEEDOR.ID_EMPRESA,'#10' FACTURAS_PROVEEDOR' +
'_DETALLES.ID_ARTICULO,'#10' NULL, NULL, NULL,'#10' AVG(FACTURA' +
'S_PROVEEDOR_DETALLES.IMPORTE_UNIDAD) AS IMPORTE_UNIDAD_PRO_COMP,' +
#10' AVG(FACTURAS_PROVEEDOR_DETALLES.IMPORTE_UNIDAD - (FACTURA' +
'S_PROVEEDOR_DETALLES.IMPORTE_UNIDAD * (FACTURAS_PROVEEDOR_DETALL' +
'ES.DESCUENTO / 100))) AS IMPORTE_NETO_PRO_COMP,'#10' AVG(FACTUR' +
'AS_PROVEEDOR_DETALLES.IMPORTE_PORTE) AS IMPORTE_PORTE_PRO_COMP'#10#10 +
' FROM FACTURAS_PROVEEDOR_DETALLES'#10' LEFT OUTER JOIN FACTURA' +
'S_PROVEEDOR'#10' ON (FACTURAS_PROVEEDOR.ID = FACTURAS_PROVEEDOR_D' +
'ETALLES.ID_FACTURA)'#10#10' WHERE (FACTURAS_PROVEEDOR_DETALLES.ID_A' +
'RTICULO IS NOT NULL) AND (FACTURAS_PROVEEDOR_DETALLES.ID_ARTICUL' +
'O > 0)'#10' AND (FACTURAS_PROVEEDOR_DETALLES.CANTIDAD > 0)'#10' ' +
' /*Las compras promedio deben de calcularse desde el principio ' +
'de los tiempos hasta ahora*/'#10' AND (FACTURAS_PROVEEDOR.FECHA' +
'_FACTURA BETWEEN '#39'12.12.2000'#39' AND current_date)'#10' GROUP BY 1, ' +
'2)'#10#10' GROUP BY 1, 2) MARGEN_COMPRAS'#10#10#10'ON (MARGEN_COMPRAS.ID_EMPR' +
'ESA = MARGEN_VENTAS.ID_EMPRESA)'#10'AND (MARGEN_COMPRAS.ID_ARTICULO ' +
'= MARGEN_VENTAS.ID_ARTICULO)'#10#10#10'LEFT JOIN ARTICULOS ON (ARTICULOS' +
'.ID = MARGEN_VENTAS.ID_ARTICULO)'#10'WHERE ARTICULOS.INVENTARIABLE =' +
' 1) INF_MARGEN_ARTICULOS'
StatementType = stSQL
ColumnMappings = <
item

View File

@ -167,6 +167,8 @@ inherited fEditorInfMargenArticulo: TfEditorInfMargenArticulo
ExplicitWidth = 679
ExplicitHeight = 452
inherited pagGeneral: TTabSheet
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 671
ExplicitHeight = 424
end
@ -203,6 +205,9 @@ inherited fEditorInfMargenArticulo: TfEditorInfMargenArticulo
Height = 71
ExplicitHeight = 71
inherited TabSheet5: TTabSheet
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 31
end
inherited tsColumnas: TTabSheet
@ -277,12 +282,12 @@ inherited fEditorInfMargenArticulo: TfEditorInfMargenArticulo
end
inherited frViewPeriodoFechas1: TfrViewPeriodoFechas
Width = 659
ExplicitWidth = 659
ExplicitWidth = 124
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 659
ExplicitWidth = 124
inherited dxLayoutControl1: TdxLayoutControl
Width = 659
ExplicitWidth = 659
ExplicitWidth = 124
end
end
end
@ -353,6 +358,24 @@ inherited fEditorInfMargenArticulo: TfEditorInfMargenArticulo
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticulo1.frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_VENT_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Position = spFooter
Column = frViewInfMargenArticulo1.frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticulo1.frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticulo1.frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Position = spFooter
Column = frViewInfMargenArticulo1.frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_ULT_COMP
end>
DataController.Summary.FooterSummaryItems = <
item
@ -378,15 +401,33 @@ inherited fEditorInfMargenArticulo: TfEditorInfMargenArticulo
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticulo1.frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_VENT_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticulo1.frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticulo1.frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_ULT_COMP
end>
inherited cxGridViewREFERENCIA: TcxGridDBColumn [9]
end
inherited cxGridViewFAMILIA: TcxGridDBColumn [10]
end
inherited cxGridViewFECHA_FACTURA: TcxGridDBColumn [11]
end
inherited cxGridViewNIF_CIF_AGENTE: TcxGridDBColumn [12]
end
inherited cxGridViewINVENTARIABLE: TcxGridDBColumn [13]
end
inherited cxGridViewCOMISIONABLE: TcxGridDBColumn [14]
end
inherited cxGridViewNOMBRE_AGENTE: TcxGridDBColumn [15]
end
inherited cxGridViewREFERENCIA_PROV: TcxGridDBColumn [16]
end
inherited cxGridViewDESCRIPCION: TcxGridDBColumn [17]
end
end
end
inherited dxPrintStyleManager1: TdxPrintStyleManager

View File

@ -275,11 +275,13 @@ begin
if FInforme.DataTable.State = dsInsert then // Si es nuevo obligamos a meter nombre
actPropiedades.Execute;
{
if not frViewInfMargenArticulo1.frViewInfMargenArticuloGrid1.HayColumnasDePromedio then
begin
frViewInfMargenArticulo1.TBXMultiDock2.Visible := False;
actRefrescar.Execute;
end;
}
end;
procedure TfEditorInfMargenArticulo.actPrevisualizarExecute(

View File

@ -219,6 +219,24 @@ inherited frViewInfMargenArticulo: TfrViewInfMargenArticulo
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_VENT_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Position = spFooter
Column = frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Position = spFooter
Column = frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_COMP
end>
DataController.Summary.FooterSummaryItems = <
item
@ -244,6 +262,14 @@ inherited frViewInfMargenArticulo: TfrViewInfMargenArticulo
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_VENT_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = frViewInfMargenArticuloGrid1.cxGridViewPOR_MARGEN_PRO_COMP
end>
inherited cxGridViewID_EMPRESA: TcxGridDBColumn
Width = 20

View File

@ -74,6 +74,24 @@ inherited frViewInfMargenArticuloGrid: TfrViewInfMargenArticuloGrid
item
Format = ',0.00 %;-,0.00 %'
Column = cxGridViewPOR_MARGEN_PRO_VENT_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Position = spFooter
Column = cxGridViewPOR_MARGEN_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = cxGridViewPOR_MARGEN_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = cxGridViewPOR_MARGEN_PRO_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Position = spFooter
Column = cxGridViewPOR_MARGEN_PRO_COMP
end>
DataController.Summary.FooterSummaryItems = <
item
@ -99,6 +117,14 @@ inherited frViewInfMargenArticuloGrid: TfrViewInfMargenArticuloGrid
item
Format = ',0.00 %;-,0.00 %'
Column = cxGridViewPOR_MARGEN_PRO_VENT_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = cxGridViewPOR_MARGEN_ULT_COMP
end
item
Format = ',0.00 %;-,0.00 %'
Column = cxGridViewPOR_MARGEN_PRO_COMP
end>
DataController.Summary.SummaryGroups = <>
DataController.Summary.OnAfterSummary = cxGridViewDataControllerSummaryAfterSummary
@ -444,8 +470,9 @@ inherited frViewInfMargenArticuloGrid: TfrViewInfMargenArticuloGrid
object cxGridViewPOR_MARGEN_ULT_COMP: TcxGridDBColumn
Caption = '% margen venta - ult. compra'
DataBinding.FieldName = 'POR_MARGEN_ULT_COMP'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
PropertiesClassName = 'TcxSpinEditProperties'
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.EditFormat = ',0.00 %;-,0.00 %'
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
@ -460,8 +487,9 @@ inherited frViewInfMargenArticuloGrid: TfrViewInfMargenArticuloGrid
object cxGridViewPOR_MARGEN_PRO_COMP: TcxGridDBColumn
Caption = '% margen venta - compra pro.'
DataBinding.FieldName = 'POR_MARGEN_PRO_COMP'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
PropertiesClassName = 'TcxSpinEditProperties'
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.EditFormat = ',0.00 %;-,0.00 %'
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end

View File

@ -739,6 +739,20 @@ object DataModuleInventario: TDataModuleInventario
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_EMPRESA'
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REFERENCIA_CLI_PEDIDO'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_REFERENCIA_CLI_PEDIDO'
InPrimaryKey = False
Calculated = False
Lookup = False
@ -810,12 +824,127 @@ object DataModuleInventario: TDataModuleInventario
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 = '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 = 'ID_ARTICULO'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID_ARTICULO'
InPrimaryKey = False
Calculated = False
Lookup = False
@ -941,6 +1070,42 @@ object DataModuleInventario: TDataModuleInventario
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 = 'PRECION_NETO'
DataType = datCurrency
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
Params = <>
MasterMappingMode = mmDataRequest

View File

@ -9,9 +9,9 @@ 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 = '{7FEDC6B5-5119-4AFA-B40D-373CF924641E}';
RID_DETALLE_RESERVAS_INV = '{0F32465D-7A01-43D4-A355-F79937DFA30B}';
RID_DETALLE_SIN_ALBARANAR = '{D945D1DF-8D83-4303-B2B8-D2720003AA88}';
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}';
{ Data table names }
nme_INVENTARIO = 'INVENTARIO';
@ -97,12 +97,22 @@ const
{ DETALLE_SIN_ALBARANAR fields }
fld_DETALLE_SIN_ALBARANARID_PEDIDO = 'ID_PEDIDO';
fld_DETALLE_SIN_ALBARANARID_EMPRESA = 'ID_EMPRESA';
fld_DETALLE_SIN_ALBARANARREFERENCIA_CLI_PEDIDO = 'REFERENCIA_CLI_PEDIDO';
fld_DETALLE_SIN_ALBARANARREFERENCIA_PEDIDO = 'REFERENCIA_PEDIDO';
fld_DETALLE_SIN_ALBARANARFECHA_PEDIDO = 'FECHA_PEDIDO';
fld_DETALLE_SIN_ALBARANARFECHA_PREVISTA_PEDIDO = 'FECHA_PREVISTA_PEDIDO';
fld_DETALLE_SIN_ALBARANARID_CLIENTE = 'ID_CLIENTE';
fld_DETALLE_SIN_ALBARANARCLIENTE = 'CLIENTE';
fld_DETALLE_SIN_ALBARANARCALLE = 'CALLE';
fld_DETALLE_SIN_ALBARANARCODIGO_POSTAL = 'CODIGO_POSTAL';
fld_DETALLE_SIN_ALBARANARPOBLACION = 'POBLACION';
fld_DETALLE_SIN_ALBARANARPROVINCIA = 'PROVINCIA';
fld_DETALLE_SIN_ALBARANARPERSONA_CONTACTO = 'PERSONA_CONTACTO';
fld_DETALLE_SIN_ALBARANARTELEFONO = 'TELEFONO';
fld_DETALLE_SIN_ALBARANARIVA = 'IVA';
fld_DETALLE_SIN_ALBARANARID_FORMA_PAGO = 'ID_FORMA_PAGO';
fld_DETALLE_SIN_ALBARANARID = 'ID';
fld_DETALLE_SIN_ALBARANARID_ARTICULO = 'ID_ARTICULO';
fld_DETALLE_SIN_ALBARANARFAMILIA = 'FAMILIA';
fld_DETALLE_SIN_ALBARANARREFERENCIA = 'REFERENCIA';
fld_DETALLE_SIN_ALBARANARREFERENCIA_PROVEEDOR = 'REFERENCIA_PROVEEDOR';
@ -112,30 +122,46 @@ const
fld_DETALLE_SIN_ALBARANARCANTIDAD_ENVIADA = 'CANTIDAD_ENVIADA';
fld_DETALLE_SIN_ALBARANARCANTIDAD_SERVIDA = 'CANTIDAD_SERVIDA';
fld_DETALLE_SIN_ALBARANARCANTIDAD_PENDIENTE = 'CANTIDAD_PENDIENTE';
fld_DETALLE_SIN_ALBARANARPRECIO_COSTE = 'PRECIO_COSTE';
fld_DETALLE_SIN_ALBARANARDESCUENTO = 'DESCUENTO';
fld_DETALLE_SIN_ALBARANARPRECION_NETO = 'PRECION_NETO';
{ DETALLE_SIN_ALBARANAR field indexes }
idx_DETALLE_SIN_ALBARANARID_PEDIDO = 0;
idx_DETALLE_SIN_ALBARANARID_EMPRESA = 1;
idx_DETALLE_SIN_ALBARANARREFERENCIA_PEDIDO = 2;
idx_DETALLE_SIN_ALBARANARFECHA_PEDIDO = 3;
idx_DETALLE_SIN_ALBARANARFECHA_PREVISTA_PEDIDO = 4;
idx_DETALLE_SIN_ALBARANARID_CLIENTE = 5;
idx_DETALLE_SIN_ALBARANARCLIENTE = 6;
idx_DETALLE_SIN_ALBARANARID = 7;
idx_DETALLE_SIN_ALBARANARFAMILIA = 8;
idx_DETALLE_SIN_ALBARANARREFERENCIA = 9;
idx_DETALLE_SIN_ALBARANARREFERENCIA_PROVEEDOR = 10;
idx_DETALLE_SIN_ALBARANARDESCRIPCION = 11;
idx_DETALLE_SIN_ALBARANARCANTIDAD_PEDIDA = 12;
idx_DETALLE_SIN_ALBARANARCANTIDAD_RESERVADA = 13;
idx_DETALLE_SIN_ALBARANARCANTIDAD_ENVIADA = 14;
idx_DETALLE_SIN_ALBARANARCANTIDAD_SERVIDA = 15;
idx_DETALLE_SIN_ALBARANARCANTIDAD_PENDIENTE = 16;
idx_DETALLE_SIN_ALBARANARREFERENCIA_CLI_PEDIDO = 2;
idx_DETALLE_SIN_ALBARANARREFERENCIA_PEDIDO = 3;
idx_DETALLE_SIN_ALBARANARFECHA_PEDIDO = 4;
idx_DETALLE_SIN_ALBARANARFECHA_PREVISTA_PEDIDO = 5;
idx_DETALLE_SIN_ALBARANARID_CLIENTE = 6;
idx_DETALLE_SIN_ALBARANARCLIENTE = 7;
idx_DETALLE_SIN_ALBARANARCALLE = 8;
idx_DETALLE_SIN_ALBARANARCODIGO_POSTAL = 9;
idx_DETALLE_SIN_ALBARANARPOBLACION = 10;
idx_DETALLE_SIN_ALBARANARPROVINCIA = 11;
idx_DETALLE_SIN_ALBARANARPERSONA_CONTACTO = 12;
idx_DETALLE_SIN_ALBARANARTELEFONO = 13;
idx_DETALLE_SIN_ALBARANARIVA = 14;
idx_DETALLE_SIN_ALBARANARID_FORMA_PAGO = 15;
idx_DETALLE_SIN_ALBARANARID = 16;
idx_DETALLE_SIN_ALBARANARID_ARTICULO = 17;
idx_DETALLE_SIN_ALBARANARFAMILIA = 18;
idx_DETALLE_SIN_ALBARANARREFERENCIA = 19;
idx_DETALLE_SIN_ALBARANARREFERENCIA_PROVEEDOR = 20;
idx_DETALLE_SIN_ALBARANARDESCRIPCION = 21;
idx_DETALLE_SIN_ALBARANARCANTIDAD_PEDIDA = 22;
idx_DETALLE_SIN_ALBARANARCANTIDAD_RESERVADA = 23;
idx_DETALLE_SIN_ALBARANARCANTIDAD_ENVIADA = 24;
idx_DETALLE_SIN_ALBARANARCANTIDAD_SERVIDA = 25;
idx_DETALLE_SIN_ALBARANARCANTIDAD_PENDIENTE = 26;
idx_DETALLE_SIN_ALBARANARPRECIO_COSTE = 27;
idx_DETALLE_SIN_ALBARANARDESCUENTO = 28;
idx_DETALLE_SIN_ALBARANARPRECION_NETO = 29;
type
{ IINVENTARIO }
IINVENTARIO = interface(IDAStronglyTypedDataTable)
['{50F9BCD9-A0E7-48C6-A3BB-5952AC159E3E}']
['{0A3AF7B9-3BF9-4E96-B058-65B1DF87FD8C}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -272,7 +298,7 @@ type
{ IDETALLE_RESERVAS_INV }
IDETALLE_RESERVAS_INV = interface(IDAStronglyTypedDataTable)
['{57FBAB34-DED9-4148-A261-77A2A78B4262}']
['{D3489D20-DFC4-49F4-BBEB-A5D87EBC7CF6}']
{ Property getters and setters }
function GetID_ALBValue: Integer;
procedure SetID_ALBValue(const aValue: Integer);
@ -385,12 +411,14 @@ type
{ IDETALLE_SIN_ALBARANAR }
IDETALLE_SIN_ALBARANAR = interface(IDAStronglyTypedDataTable)
['{9D863A30-2A9F-40D8-9F69-FBCFEEBF9C27}']
['{47DAB2C7-702A-48C9-B704-653CE805A737}']
{ 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_CLI_PEDIDOValue: String;
procedure SetREFERENCIA_CLI_PEDIDOValue(const aValue: String);
function GetREFERENCIA_PEDIDOValue: String;
procedure SetREFERENCIA_PEDIDOValue(const aValue: String);
function GetFECHA_PEDIDOValue: DateTime;
@ -401,8 +429,26 @@ type
procedure SetID_CLIENTEValue(const aValue: Integer);
function GetCLIENTEValue: String;
procedure SetCLIENTEValue(const aValue: String);
function GetCALLEValue: String;
procedure SetCALLEValue(const aValue: String);
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 GetID_ARTICULOValue: Integer;
procedure SetID_ARTICULOValue(const aValue: Integer);
function GetFAMILIAValue: String;
procedure SetFAMILIAValue(const aValue: String);
function GetREFERENCIAValue: String;
@ -421,17 +467,33 @@ type
procedure SetCANTIDAD_SERVIDAValue(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 GetPRECION_NETOValue: Currency;
procedure SetPRECION_NETOValue(const aValue: Currency);
{ Properties }
property ID_PEDIDO: Integer read GetID_PEDIDOValue write SetID_PEDIDOValue;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
property REFERENCIA_CLI_PEDIDO: String read GetREFERENCIA_CLI_PEDIDOValue write SetREFERENCIA_CLI_PEDIDOValue;
property REFERENCIA_PEDIDO: String read GetREFERENCIA_PEDIDOValue write SetREFERENCIA_PEDIDOValue;
property FECHA_PEDIDO: DateTime read GetFECHA_PEDIDOValue write SetFECHA_PEDIDOValue;
property FECHA_PREVISTA_PEDIDO: DateTime read GetFECHA_PREVISTA_PEDIDOValue write SetFECHA_PREVISTA_PEDIDOValue;
property ID_CLIENTE: Integer read GetID_CLIENTEValue write SetID_CLIENTEValue;
property CLIENTE: String read GetCLIENTEValue write SetCLIENTEValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
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 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;
@ -441,6 +503,9 @@ type
property CANTIDAD_ENVIADA: Integer read GetCANTIDAD_ENVIADAValue write SetCANTIDAD_ENVIADAValue;
property CANTIDAD_SERVIDA: Integer read GetCANTIDAD_SERVIDAValue write SetCANTIDAD_SERVIDAValue;
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 PRECION_NETO: Currency read GetPRECION_NETOValue write SetPRECION_NETOValue;
end;
{ TDETALLE_SIN_ALBARANARDataTableRules }
@ -452,6 +517,8 @@ type
procedure SetID_PEDIDOValue(const aValue: Integer); virtual;
function GetID_EMPRESAValue: Integer; virtual;
procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
function GetREFERENCIA_CLI_PEDIDOValue: String; virtual;
procedure SetREFERENCIA_CLI_PEDIDOValue(const aValue: String); virtual;
function GetREFERENCIA_PEDIDOValue: String; virtual;
procedure SetREFERENCIA_PEDIDOValue(const aValue: String); virtual;
function GetFECHA_PEDIDOValue: DateTime; virtual;
@ -462,8 +529,26 @@ type
procedure SetID_CLIENTEValue(const aValue: Integer); virtual;
function GetCLIENTEValue: String; virtual;
procedure SetCLIENTEValue(const aValue: String); virtual;
function GetCALLEValue: String; virtual;
procedure SetCALLEValue(const aValue: String); 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 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;
@ -482,16 +567,32 @@ type
procedure SetCANTIDAD_SERVIDAValue(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 GetPRECION_NETOValue: Currency; virtual;
procedure SetPRECION_NETOValue(const aValue: Currency); virtual;
{ Properties }
property ID_PEDIDO: Integer read GetID_PEDIDOValue write SetID_PEDIDOValue;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
property REFERENCIA_CLI_PEDIDO: String read GetREFERENCIA_CLI_PEDIDOValue write SetREFERENCIA_CLI_PEDIDOValue;
property REFERENCIA_PEDIDO: String read GetREFERENCIA_PEDIDOValue write SetREFERENCIA_PEDIDOValue;
property FECHA_PEDIDO: DateTime read GetFECHA_PEDIDOValue write SetFECHA_PEDIDOValue;
property FECHA_PREVISTA_PEDIDO: DateTime read GetFECHA_PREVISTA_PEDIDOValue write SetFECHA_PREVISTA_PEDIDOValue;
property ID_CLIENTE: Integer read GetID_CLIENTEValue write SetID_CLIENTEValue;
property CLIENTE: String read GetCLIENTEValue write SetCLIENTEValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
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 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;
@ -501,6 +602,9 @@ type
property CANTIDAD_ENVIADA: Integer read GetCANTIDAD_ENVIADAValue write SetCANTIDAD_ENVIADAValue;
property CANTIDAD_SERVIDA: Integer read GetCANTIDAD_SERVIDAValue write SetCANTIDAD_SERVIDAValue;
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 PRECION_NETO: Currency read GetPRECION_NETOValue write SetPRECION_NETOValue;
public
constructor Create(aDataTable: TDADataTable); override;
@ -907,6 +1011,16 @@ begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARID_EMPRESA].AsInteger := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetREFERENCIA_CLI_PEDIDOValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARREFERENCIA_CLI_PEDIDO].AsString;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetREFERENCIA_CLI_PEDIDOValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARREFERENCIA_CLI_PEDIDO].AsString := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetREFERENCIA_PEDIDOValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARREFERENCIA_PEDIDO].AsString;
@ -957,6 +1071,86 @@ begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARCLIENTE].AsString := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetCALLEValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARCALLE].AsString;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetCALLEValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARCALLE].AsString := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetCODIGO_POSTALValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARCODIGO_POSTAL].AsString;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetCODIGO_POSTALValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARCODIGO_POSTAL].AsString := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetPOBLACIONValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARPOBLACION].AsString;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetPOBLACIONValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARPOBLACION].AsString := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetPROVINCIAValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARPROVINCIA].AsString;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetPROVINCIAValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARPROVINCIA].AsString := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetPERSONA_CONTACTOValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARPERSONA_CONTACTO].AsString;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetPERSONA_CONTACTOValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARPERSONA_CONTACTO].AsString := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetTELEFONOValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARTELEFONO].AsString;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetTELEFONOValue(const aValue: String);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARTELEFONO].AsString := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetIVAValue: Float;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARIVA].AsFloat;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetIVAValue(const aValue: Float);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARIVA].AsFloat := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetID_FORMA_PAGOValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARID_FORMA_PAGO].AsInteger;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetID_FORMA_PAGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARID_FORMA_PAGO].AsInteger := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetIDValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARID].AsInteger;
@ -967,6 +1161,16 @@ begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARID].AsInteger := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetID_ARTICULOValue: Integer;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARID_ARTICULO].AsInteger;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetID_ARTICULOValue(const aValue: Integer);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARID_ARTICULO].AsInteger := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetFAMILIAValue: String;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARFAMILIA].AsString;
@ -1057,6 +1261,36 @@ begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARCANTIDAD_PENDIENTE].AsInteger := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetPRECIO_COSTEValue: Currency;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARPRECIO_COSTE].AsCurrency;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetPRECIO_COSTEValue(const aValue: Currency);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARPRECIO_COSTE].AsCurrency := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetDESCUENTOValue: Float;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARDESCUENTO].AsFloat;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetDESCUENTOValue(const aValue: Float);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARDESCUENTO].AsFloat := aValue;
end;
function TDETALLE_SIN_ALBARANARDataTableRules.GetPRECION_NETOValue: Currency;
begin
result := DataTable.Fields[idx_DETALLE_SIN_ALBARANARPRECION_NETO].AsCurrency;
end;
procedure TDETALLE_SIN_ALBARANARDataTableRules.SetPRECION_NETOValue(const aValue: Currency);
begin
DataTable.Fields[idx_DETALLE_SIN_ALBARANARPRECION_NETO].AsCurrency := aValue;
end;
initialization
RegisterDataTableRules(RID_INVENTARIO, TINVENTARIODataTableRules);

View File

@ -9,14 +9,14 @@ 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 = '{22495FD1-6517-49C7-A28A-3C9D52AE3043}';
RID_DETALLE_RESERVAS_INVDelta = '{1AC04437-589D-4538-867A-DBD8FF9AE253}';
RID_DETALLE_SIN_ALBARANARDelta = '{5EE94FBF-7C32-4B77-BCF5-BCA57949E7C2}';
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}';
type
{ IINVENTARIODelta }
IINVENTARIODelta = interface(IINVENTARIO)
['{22495FD1-6517-49C7-A28A-3C9D52AE3043}']
['{91529C30-88B1-4997-9CE2-B6EA97BBF34C}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_ALMACENValue : Integer;
@ -171,7 +171,7 @@ type
{ IDETALLE_RESERVAS_INVDelta }
IDETALLE_RESERVAS_INVDelta = interface(IDETALLE_RESERVAS_INV)
['{1AC04437-589D-4538-867A-DBD8FF9AE253}']
['{76458D59-CFD6-42D2-A928-02DB3016BF2B}']
{ Property getters and setters }
function GetOldID_ALBValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -298,16 +298,26 @@ type
{ IDETALLE_SIN_ALBARANARDelta }
IDETALLE_SIN_ALBARANARDelta = interface(IDETALLE_SIN_ALBARANAR)
['{5EE94FBF-7C32-4B77-BCF5-BCA57949E7C2}']
['{412177E2-C890-4C0D-A295-CF12A4F22380}']
{ Property getters and setters }
function GetOldID_PEDIDOValue : Integer;
function GetOldID_EMPRESAValue : Integer;
function GetOldREFERENCIA_CLI_PEDIDOValue : String;
function GetOldREFERENCIA_PEDIDOValue : String;
function GetOldFECHA_PEDIDOValue : DateTime;
function GetOldFECHA_PREVISTA_PEDIDOValue : DateTime;
function GetOldID_CLIENTEValue : Integer;
function GetOldCLIENTEValue : String;
function GetOldCALLEValue : String;
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 GetOldID_ARTICULOValue : Integer;
function GetOldFAMILIAValue : String;
function GetOldREFERENCIAValue : String;
function GetOldREFERENCIA_PROVEEDORValue : String;
@ -317,16 +327,29 @@ type
function GetOldCANTIDAD_ENVIADAValue : Integer;
function GetOldCANTIDAD_SERVIDAValue : Integer;
function GetOldCANTIDAD_PENDIENTEValue : Integer;
function GetOldPRECIO_COSTEValue : Currency;
function GetOldDESCUENTOValue : Float;
function GetOldPRECION_NETOValue : Currency;
{ Properties }
property OldID_PEDIDO : Integer read GetOldID_PEDIDOValue;
property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
property OldREFERENCIA_CLI_PEDIDO : String read GetOldREFERENCIA_CLI_PEDIDOValue;
property OldREFERENCIA_PEDIDO : String read GetOldREFERENCIA_PEDIDOValue;
property OldFECHA_PEDIDO : DateTime read GetOldFECHA_PEDIDOValue;
property OldFECHA_PREVISTA_PEDIDO : DateTime read GetOldFECHA_PREVISTA_PEDIDOValue;
property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue;
property OldCLIENTE : String read GetOldCLIENTEValue;
property OldCALLE : String read GetOldCALLEValue;
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 OldID_ARTICULO : Integer read GetOldID_ARTICULOValue;
property OldFAMILIA : String read GetOldFAMILIAValue;
property OldREFERENCIA : String read GetOldREFERENCIAValue;
property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
@ -336,6 +359,9 @@ type
property OldCANTIDAD_ENVIADA : Integer read GetOldCANTIDAD_ENVIADAValue;
property OldCANTIDAD_SERVIDA : Integer read GetOldCANTIDAD_SERVIDAValue;
property OldCANTIDAD_PENDIENTE : Integer read GetOldCANTIDAD_PENDIENTEValue;
property OldPRECIO_COSTE : Currency read GetOldPRECIO_COSTEValue;
property OldDESCUENTO : Float read GetOldDESCUENTOValue;
property OldPRECION_NETO : Currency read GetOldPRECION_NETOValue;
end;
{ TDETALLE_SIN_ALBARANARBusinessProcessorRules }
@ -349,6 +375,9 @@ type
function GetID_EMPRESAValue: Integer; virtual;
function GetOldID_EMPRESAValue: Integer; virtual;
procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
function GetREFERENCIA_CLI_PEDIDOValue: String; virtual;
function GetOldREFERENCIA_CLI_PEDIDOValue: String; virtual;
procedure SetREFERENCIA_CLI_PEDIDOValue(const aValue: String); virtual;
function GetREFERENCIA_PEDIDOValue: String; virtual;
function GetOldREFERENCIA_PEDIDOValue: String; virtual;
procedure SetREFERENCIA_PEDIDOValue(const aValue: String); virtual;
@ -364,9 +393,36 @@ type
function GetCLIENTEValue: String; virtual;
function GetOldCLIENTEValue: String; virtual;
procedure SetCLIENTEValue(const aValue: String); virtual;
function GetCALLEValue: String; virtual;
function GetOldCALLEValue: String; virtual;
procedure SetCALLEValue(const aValue: String); 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 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;
@ -394,12 +450,23 @@ type
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 GetPRECION_NETOValue: Currency; virtual;
function GetOldPRECION_NETOValue: Currency; virtual;
procedure SetPRECION_NETOValue(const aValue: Currency); 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_CLI_PEDIDO : String read GetREFERENCIA_CLI_PEDIDOValue write SetREFERENCIA_CLI_PEDIDOValue;
property OldREFERENCIA_CLI_PEDIDO : String read GetOldREFERENCIA_CLI_PEDIDOValue;
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;
@ -410,8 +477,26 @@ type
property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue;
property CLIENTE : String read GetCLIENTEValue write SetCLIENTEValue;
property OldCLIENTE : String read GetOldCLIENTEValue;
property CALLE : String read GetCALLEValue write SetCALLEValue;
property OldCALLE : String read GetOldCALLEValue;
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 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;
@ -430,6 +515,12 @@ type
property OldCANTIDAD_SERVIDA : Integer read GetOldCANTIDAD_SERVIDAValue;
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 PRECION_NETO : Currency read GetPRECION_NETOValue write SetPRECION_NETOValue;
property OldPRECION_NETO : Currency read GetOldPRECION_NETOValue;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -1017,6 +1108,21 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARID_EMPRESA] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetREFERENCIA_CLI_PEDIDOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARREFERENCIA_CLI_PEDIDO];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldREFERENCIA_CLI_PEDIDOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARREFERENCIA_CLI_PEDIDO];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetREFERENCIA_CLI_PEDIDOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARREFERENCIA_CLI_PEDIDO] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetREFERENCIA_PEDIDOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARREFERENCIA_PEDIDO];
@ -1092,6 +1198,126 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARCLIENTE] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetCALLEValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARCALLE];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldCALLEValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARCALLE];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetCALLEValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARCALLE] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetCODIGO_POSTALValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARCODIGO_POSTAL];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldCODIGO_POSTALValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARCODIGO_POSTAL];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetCODIGO_POSTALValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARCODIGO_POSTAL] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetPOBLACIONValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPOBLACION];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldPOBLACIONValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARPOBLACION];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetPOBLACIONValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPOBLACION] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetPROVINCIAValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPROVINCIA];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldPROVINCIAValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARPROVINCIA];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetPROVINCIAValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPROVINCIA] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetPERSONA_CONTACTOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPERSONA_CONTACTO];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldPERSONA_CONTACTOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARPERSONA_CONTACTO];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetPERSONA_CONTACTOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPERSONA_CONTACTO] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetTELEFONOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARTELEFONO];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldTELEFONOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARTELEFONO];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetTELEFONOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARTELEFONO] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetIVAValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARIVA];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldIVAValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARIVA];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetIVAValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARIVA] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetID_FORMA_PAGOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARID_FORMA_PAGO];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldID_FORMA_PAGOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARID_FORMA_PAGO];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetID_FORMA_PAGOValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARID_FORMA_PAGO] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARID];
@ -1107,6 +1333,21 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARID] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetID_ARTICULOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARID_ARTICULO];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldID_ARTICULOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARID_ARTICULO];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetID_ARTICULOValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARID_ARTICULO] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetFAMILIAValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARFAMILIA];
@ -1242,6 +1483,51 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARCANTIDAD_PENDIENTE] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetPRECIO_COSTEValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPRECIO_COSTE];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldPRECIO_COSTEValue: Currency;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARPRECIO_COSTE];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetPRECIO_COSTEValue(const aValue: Currency);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPRECIO_COSTE] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetDESCUENTOValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARDESCUENTO];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldDESCUENTOValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARDESCUENTO];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetDESCUENTOValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARDESCUENTO] := aValue;
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetPRECION_NETOValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPRECION_NETO];
end;
function TDETALLE_SIN_ALBARANARBusinessProcessorRules.GetOldPRECION_NETOValue: Currency;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_SIN_ALBARANARPRECION_NETO];
end;
procedure TDETALLE_SIN_ALBARANARBusinessProcessorRules.SetPRECION_NETOValue(const aValue: Currency);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_SIN_ALBARANARPRECION_NETO] := aValue;
end;
initialization
RegisterBusinessProcessorRules(RID_INVENTARIODelta, TINVENTARIOBusinessProcessorRules);

View File

@ -553,13 +553,16 @@ object srvInventario: TsrvInventario
Connection = 'IBX'
TargetTable = 'V_PED_CLI_ART_SIN_ALBARAN'
SQL =
'SELECT'#10' ID_PEDIDO,'#10' ID_EMPRESA,'#10' REFERENCIA_PEDIDO,'#10' ' +
' FECHA_PEDIDO,'#10' FECHA_PREVISTA_PEDIDO,'#10' ID_CLIENTE,'#10' CL' +
'IENTE,'#10' ID,'#10' FAMILIA,'#10' REFERENCIA,'#10' REFERENCIA_PROVE' +
'EDOR,'#10' DESCRIPCION,'#10' CANTIDAD_PEDIDA,'#10' CANTIDAD_RESERVA' +
'DA,'#10' CANTIDAD_ENVIADA,'#10' CANTIDAD_SERVIDA,'#10' CANTIDAD_PEN' +
'DIENTE'#10' '#10'FROM V_PED_CLI_ART_SIN_ALBARAN'#10'ORDER BY REFERENCIA_PED' +
'IDO'
'SELECT'#10' ID,'#10' ID_PEDIDO,'#10' ID_EMPRESA,'#10' REFERENCIA_CLI' +
'_PEDIDO,'#10' REFERENCIA_PEDIDO,'#10' FECHA_PEDIDO,'#10' FECHA_PREV' +
'ISTA_PEDIDO,'#10' ID_CLIENTE,'#10' CALLE,'#10' CODIGO_POSTAL,'#10' P' +
'OBLACION,'#10' PROVINCIA,'#10' PERSONA_CONTACTO,'#10' TELEFONO,'#10' ' +
' IVA,'#10' ID_FORMA_PAGO,'#10' CLIENTE,'#10' ID_ARTICULO,'#10' FAMIL' +
'IA,'#10' REFERENCIA,'#10' REFERENCIA_PROVEEDOR,'#10' DESCRIPCION,'#10' ' +
' CANTIDAD_PEDIDA,'#10' CANTIDAD_RESERVADA,'#10' CANTIDAD_ENVIADA' +
','#10' CANTIDAD_SERVIDA,'#10' CANTIDAD_PENDIENTE,'#10' PRECIO_COSTE' +
','#10' DESCUENTO,'#10' PRECION_NETO'#10' '#10'FROM V_PED_CLI_ART_SIN_ALBA' +
'RAN'#10'ORDER BY REFERENCIA_PEDIDO'
StatementType = stSQL
ColumnMappings = <
item
@ -629,6 +632,58 @@ object srvInventario: TsrvInventario
item
DatasetField = 'CANTIDAD_PENDIENTE'
TableField = 'CANTIDAD_PENDIENTE'
end
item
DatasetField = 'REFERENCIA_CLI_PEDIDO'
TableField = 'REFERENCIA_CLI_PEDIDO'
end
item
DatasetField = 'ID_ARTICULO'
TableField = 'ID_ARTICULO'
end
item
DatasetField = 'CALLE'
TableField = 'CALLE'
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 = 'PRECIO_COSTE'
TableField = 'PRECIO_COSTE'
end
item
DatasetField = 'DESCUENTO'
TableField = 'DESCUENTO'
end
item
DatasetField = 'PRECION_NETO'
TableField = 'PRECION_NETO'
end>
end>
Name = 'DETALLE_SIN_ALBARANAR'
@ -647,8 +702,18 @@ object srvInventario: TsrvInventario
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_CLI_PEDIDO'
DataType = datString
Size = 255
BlobType = dabtUnknown
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_REFERENCIA_CLI_PEDIDO'
InPrimaryKey = False
Calculated = False
Lookup = False
@ -706,12 +771,107 @@ object srvInventario: TsrvInventario
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 = '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
DisplayWidth = 0
Alignment = taLeftJustify
DictionaryEntry = 'DETALLE_SIN_ALBARANAR_ID'
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
@ -810,6 +970,37 @@ object srvInventario: TsrvInventario
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 = 'PRECION_NETO'
DataType = datCurrency
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
@ -1443,6 +1634,123 @@ object srvInventario: TsrvInventario
DisplayWidth = 0
DisplayLabel = 'Cant. pendiente'
Alignment = taRightJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_ID_EMPRESA'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'ID_EMPRESA'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_REFERENCIA_CLI_PEDIDO'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'REFERENCIA_CLI_PEDIDO'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_ID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'ID'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_CALLE'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'CALLE'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_CODIGO_POSTAL'
DataType = datString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'CODIGO_POSTAL'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_POBLACION'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'POBLACION'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_PROVINCIA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'PROVINCIA'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_PERSONA_CONTACTO'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'PERSONA_CONTACTO'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_TELEFONO'
DataType = datString
Size = 25
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'TELEFONO'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_IVA'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'IVA'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_ID_FORMA_PAGO'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'ID_FORMA_PAGO'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_PRECIO_COSTE'
DataType = datCurrency
BlobType = dabtUnknown
DisplayWidth = 0
DisplayLabel = 'PRECIO_COSTE'
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_DESCUENTO'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
end
item
Name = 'DETALLE_SIN_ALBARANAR_PRECION_NETO'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
end>
Left = 126
Top = 14

View File

@ -82,7 +82,9 @@ requires
PedProv_AlbProv_relation,
cxIntlPrintSys3D10,
JvCtrlsD10R,
JSDialog100;
JSDialog100,
AlbaranesCliente_model,
PedCli_AlbCli_relation;
contains
uViewInventario in 'uViewInventario.pas' {frViewInventario: TFrame},

View File

@ -88,10 +88,9 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
DockPos = 264
Visible = True
ExplicitLeft = 269
ExplicitWidth = 112
object TBXItem38: TTBXItem
Caption = 'dsfsdfsdf'
ImageIndex = 0
OnClick = TBXItem38Click
Action = actAlbaranar
end
end
end
@ -190,15 +189,9 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 413
ExplicitLeft = 413
ExplicitWidth = 121
Width = 121
Left = 412
ExplicitLeft = 412
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
@ -286,6 +279,11 @@ inherited fEditorDetallesSinAlbaran: TfEditorDetallesSinAlbaran
Caption = 'Contraer'
Visible = False
end
object actAlbaranar: TAction
Category = 'Logistica'
Caption = 'Generar albaranes'
OnExecute = actAlbaranarExecute
end
end
inherited SmallImages: TPngImageList [5]
PngImages = <

View File

@ -21,9 +21,10 @@ type
actContraer: TAction;
frViewDetallesSinAlbaran1: TfrViewDetallesSinAlbaran;
TBXItem38: TTBXItem;
actAlbaranar: TAction;
procedure FormShow(Sender: TObject);
procedure TBXItem38Click(Sender: TObject);
procedure actAlbaranarExecute(Sender: TObject);
private
// function SeleccionarAlmacen(Descripcion: String): Integer;
@ -69,7 +70,7 @@ uses
cxControls, uGridUtils, uDataModuleInventario, uDataModuleUsuarios,
uEditorBase, uDBSelectionListUtils, cxGridDBTableView, cxGridCustomTableView,
uAlmacenesController, uBizAlmacenes, uGenerarAlbaranesProvUtils,
schInventarioClient_Intf;
schInventarioClient_Intf, uDialogUtils, uBizAlbaranesCliente, uGenerarAlbaranesCliUtils;
{, uDBSelectionList, uDataModulePedidosProveedor,
uBizPedidosProveedor, uBizMontajes, uDataModuleMontajes;
@ -81,6 +82,28 @@ uBizPedidosProveedor, uBizMontajes, uDataModuleMontajes;
{
***************************** TfEditorDetallesSinAlbaran *****************************
}
procedure TfEditorDetallesSinAlbaran.actAlbaranarExecute(Sender: TObject);
var
ArticulosSeleccionados: IBizDetalleSinAlbaran;
AlbaranesCliente: IBizAlbaranCliente;
begin
inherited;
try
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (DetallesSinAlbaran as ISeleccionable).SelectedRecords);
// En SelectedRecords tengo los ID de las filas seleccionadas del grid
ArticulosSeleccionados := (Controller as IInventarioController).ExtraerSeleccionados(DetallesSinAlbaran) as IBizDetalleSinAlbaran;
if (ArticulosSeleccionados.DataTable.RecordCount > 0) then
GenerarAlbaranesCli(ArticulosSeleccionados, AlbaranesCliente)
else
ShowWarningMessage('Debe seleccionar los artículos que desea albaranar');
finally
ArticulosSeleccionados:= Nil;
AlbaranesCliente:= Nil;
end;
end;
constructor TfEditorDetallesSinAlbaran.Create(AOwner: TComponent);
begin
inherited;
@ -240,17 +263,6 @@ begin
if Assigned(ViewGrid) then
(ViewGrid as IViewDetalleSinAlbaran).Detalles := FDetalles;
end;
procedure TfEditorDetallesSinAlbaran.TBXItem38Click(Sender: TObject);
var
aaaa: IBizDetalleSinAlbaran;
begin
inherited;
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (DetallesSinAlbaran as ISeleccionable).SelectedRecords);
// En SelectedRecords tengo los ID de las filas seleccionadas del grid
aaaa := (Controller as IInventarioController).ExtraerSeleccionados(DetallesSinAlbaran) as IBizDetalleSinAlbaran;
showmessage(inttostr(aaaa.DataTable.RecordCount));
end;
{
procedure TfEditorDetallesSinAlbaran.SetMultiSelect(AValue: Boolean);

View File

@ -299,6 +299,7 @@ inherited fEditorInventario: TfEditorInventario
OnExecute = actContraerExecute
end
object actReservados: TAction
Category = 'Logistica'
Caption = 'Ver reservados'
ImageIndex = 25
OnExecute = actReservadosExecute

View File

@ -85,7 +85,7 @@ inherited frViewDetallesSinAlbaran: TfrViewDetallesSinAlbaran
DataBinding.FieldName = 'CLIENTE'
end
object cxGridViewID_ARTICULO: TcxGridDBColumn
DataBinding.FieldName = 'ID_ARTICULO'
DataBinding.FieldName = 'ID'
end
object cxGridViewFAMILIA: TcxGridDBColumn
DataBinding.FieldName = 'FAMILIA'
@ -144,14 +144,13 @@ inherited frViewDetallesSinAlbaran: TfrViewDetallesSinAlbaran
inherited edtFechaFinFiltro: TcxDateEdit
Left = 283
ExplicitLeft = 283
ExplicitWidth = 200
Width = 200
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Visible = True
ExplicitWidth = 554
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
inherited TBXToolbar1: TTBXToolbar
object TBXSeparatorItem1: TTBXSeparatorItem

View File

@ -204,7 +204,7 @@
<Excluded_Packages Name="c:\archivos de programa\borland\delphi10\Bin\dclie100.bpl">Internet Explorer Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<!-- EurekaLog First Line
<!-- EurekaLog First Line
[Exception Log]
EurekaLog Version=519
Activate=0

View File

@ -33,7 +33,8 @@ requires
PedidosCliente_model,
PedidosCliente_controller,
AlbaranesCliente_model,
AlbaranesCliente_controller;
AlbaranesCliente_controller,
Inventario_model;
contains
uGenerarAlbaranesCliUtils in 'uGenerarAlbaranesCliUtils.pas';

View File

@ -3,8 +3,8 @@ unit uGenerarAlbaranesCliUtils;
interface
uses
Windows, SysUtils, Classes, pngimage, JSDialog,
uBizPedidosCliente, uBizAlbaranesCliente;
Windows, SysUtils, Classes, pngimage, JSDialog, uBizContactos,
uBizPedidosCliente, uBizAlbaranesCliente, uBizInventario;
type
TdmGenerarAlbaranesCli = class(TDataModule)
@ -15,16 +15,20 @@ type
function GenerarAlbaranCli(APedido : IBizPedidoCliente; var AAlbaran: IBizAlbaranCliente) : Boolean; overload;
function ElegirPedidoYGenerarAlbaranCli(var IDAlbaran: Integer) : Boolean;
//Metodos para albaranar articulos pendientes
function GenerarAlbaranesCli(AArticulos : IBizDetalleSinAlbaran; var AAlbaranes: IBizAlbaranCliente) : Boolean; overload;
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranCliente; ACliente: IBizCliente; AArticulos: IBizDetalleSinAlbaran);
implementation
{$R *.dfm}
uses
uDialogUtils, uBizDetallesPedidoCliente, uBizDetallesAlbaranCliente,
cxControls, uDialogUtils, uBizDetallesPedidoCliente, uBizDetallesAlbaranCliente,
uPedidosClienteController, uAlbaranesClienteController, uClientesController,
uDetallesAlbaranClienteController, uControllerDetallesBase,
uBizContactos, schPedidosClienteClient_Intf,
schAlbaranesClienteClient_Intf;
schPedidosClienteClient_Intf, uDADataTable,
schAlbaranesClienteClient_Intf, schInventarioClient_Intf;
var
dmGenerarAlbaranesCli: TdmGenerarAlbaranesCli;
@ -125,6 +129,7 @@ begin
end;
end;
procedure Inicializar;
begin
dmGenerarAlbaranesCli := TdmGenerarAlbaranesCli.Create(nil);
@ -152,7 +157,7 @@ var
begin
Result := False;
IDAlbaran := -1;
try
if not Assigned(APedidosClienteController) then
Inicializar;
@ -264,4 +269,175 @@ begin
end;
end;
function GenerarAlbaranesCli(AArticulos : IBizDetalleSinAlbaran; var AAlbaranes: IBizAlbaranCliente) : Boolean; overload;
var
ARespuesta : Integer;
ACliente: IBizCliente;
RefPedCliAux: String;
I: Integer;
begin
Result := False;
if not Assigned(AArticulos) then
raise Exception.Create('AArticulos no asignado (GenerarAlbaranesCli)');
if not Assigned(APedidosClienteController) 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 cliente y pedido
AArticulos.DataTable.Sort([fld_AlbaranesClienteID_CLIENTE, fld_AlbaranesClienteID_PEDIDO], [uDADataTable.sdAscending, uDADataTable.sdAscending]);
AArticulos.DataTable.First;
//Inicializamos albaran
ACliente := (AClientesController.Buscar(AArticulos.ID_CLIENTE) as IBizCliente);
ACliente.DataTable.Active := True;
AAlbaranes := AAlbaranesClienteController.Nuevo;
InicializarAlbaran(AAlbaranes, ACliente, AArticulos);
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
ADetallesAlbaranesCliController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
with AAlbaranes.Detalles do
begin
Edit;
RefPedCliAux := AArticulos.REFERENCIA_PEDIDO;
CONCEPTO := 'Pedido ' + AArticulos.REFERENCIA_PEDIDO + ' (Ref.Cliente: ' + AArticulos.REFERENCIA_CLI_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
ADetallesAlbaranesCliController.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
ADetallesAlbaranesCliController.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 cliente volvemos a crear la cabecera del nuevo pedido
if (ACliente.ID = AArticulos.ID_CLIENTE) then
begin
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
ADetallesAlbaranesCliController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
with AAlbaranes.Detalles do
begin
Edit;
RefPedCliAux := AArticulos.REFERENCIA_PEDIDO;
CONCEPTO := 'Pedido ' + AArticulos.REFERENCIA_PEDIDO + ' (Ref.Cliente: ' + AArticulos.REFERENCIA_CLI_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 (ACliente.ID <> AArticulos.ID_CLIENTE) then
begin
AAlbaranesClienteController.RecalcularImportes(AAlbaranes);
AAlbaranesClienteController.Guardar(AAlbaranes);
dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Content.Add(Format('%s: %s' + #10#13, [AAlbaranes.REFERENCIA, ACliente.NOMBRE]));
//Inicializamos albaran
ACliente := (AClientesController.Buscar(AArticulos.ID_CLIENTE) as IBizCliente);
ACliente.DataTable.Active := True;
AAlbaranesClienteController.Anadir(AAlbaranes);
InicializarAlbaran(AAlbaranes, ACliente, AArticulos);
// Añado el título del pedido ya que siempre tendremos al menos un concepto de pedido
ADetallesAlbaranesCliController.Add(AAlbaranes.Detalles, TIPO_DETALLE_TITULO);
with AAlbaranes.Detalles do
begin
Edit;
RefPedCliAux := AArticulos.REFERENCIA_PEDIDO;
CONCEPTO := 'Pedido ' + AArticulos.REFERENCIA_PEDIDO + ' (Ref.Cliente: ' + AArticulos.REFERENCIA_CLI_PEDIDO + ') del ' + DateToStr(AArticulos.FECHA_PEDIDO);
Post;
end;
end;
//Rellenamos el detalle del albarán
ADetallesAlbaranesCliController.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
ADetallesAlbaranesCliController.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
ADetallesAlbaranesCliController.Add(AAlbaranes.Detalles, TIPO_DETALLE_CONCEPTO);
with AAlbaranes.Detalles do
begin
Edit;
CONCEPTO := '';
Post;
end;
AAlbaranesClienteController.RecalcularImportes(AAlbaranes);
AAlbaranesClienteController.Guardar(AAlbaranes);
dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Content.Add(Format('%s: %s' + #10#13, [AAlbaranes.REFERENCIA, ACliente.NOMBRE]));
finally
HideHourglassCursor;
//Visualizamos los albaranes generados
dmGenerarAlbaranesCli.JsListaAlbaranesGenerados.Execute;
if Assigned(APedidosClienteController) then
Finalizar;
end;
end;
procedure InicializarAlbaran(var AAlbaranes: IBizAlbaranCliente; ACliente: IBizCliente; AArticulos: IBizDetalleSinAlbaran);
begin
//El albaran debe venir abierto y posicionado para la copia.
AAlbaranes.Cliente := (ACliente as IBizCliente);
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.

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
@ -153,7 +153,7 @@
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">2</VersionInfo>
<VersionInfo Name="MinorVer">6</VersionInfo>
<VersionInfo Name="MinorVer">7</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
@ -167,18 +167,19 @@
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">2.6.0.0</VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">2.7.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName">FactuGES Server</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">2.6.0.0</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">2.7.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
<VersionInfoKeys Name="CompileDate">viernes, 28 de marzo de 2008 14:25</VersionInfoKeys></VersionInfoKeys> <Excluded_Packages>
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<VersionInfoKeys Name="CompileDate">martes, 01 de abril de 2008 10:41</VersionInfoKeys></VersionInfoKeys>
<Excluded_Packages>
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<ModelSupport>False</ModelSupport>
<!-- EurekaLog First Line
[Exception Log]

View File

@ -122,8 +122,6 @@ uses
uRptEtiquetasContactos_Server in '..\Modulos\Contactos\Reports\uRptEtiquetasContactos_Server.pas' {RptEtiquetasContactos: TDataModule},
schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas',
schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas',
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas',
schAlbaranesClienteClient_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteClient_Intf.pas',
schAlbaranesClienteServer_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteServer_Intf.pas',
schAlbaranesProveedorClient_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorClient_Intf.pas',
@ -131,7 +129,9 @@ uses
schInformesClient_Intf in '..\Modulos\Informes base\Model\schInformesClient_Intf.pas',
schInformesServer_Intf in '..\Modulos\Informes base\Model\schInformesServer_Intf.pas',
schInfMargenArticuloClient_Intf in '..\Modulos\Informe margen por articulo\Model\schInfMargenArticuloClient_Intf.pas',
schInfMargenArticuloServer_Intf in '..\Modulos\Informe margen por articulo\Model\schInfMargenArticuloServer_Intf.pas';
schInfMargenArticuloServer_Intf in '..\Modulos\Informe margen por articulo\Model\schInfMargenArticuloServer_Intf.pas',
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas';
{$R *.res}
{$R ..\Servicios\RODLFile.res}

View File

@ -908,9 +908,9 @@
#define IdResourceStrings_RSStatusConnecting 65181
#define IdResourceStrings_RSStatusConnected 65182
#define IdResourceStrings_RSStatusDisconnecting 65183
#define ComConst_SNoMethod 65184
#define ComConst_SVarNotObject 65185
#define ComConst_STooManyParams 65186
#define uRODECConst_sFMT_XX 65184
#define uRODECConst_sInvalidKeySize 65185
#define uRODECConst_sNotInitialized 65186
#define IdResourceStrings_RSCannotAllocateSocket 65187
#define IdResourceStrings_RSConnectionClosedGracefully 65188
#define IdResourceStrings_RSCouldNotBindSocket 65189
@ -924,70 +924,70 @@
#define IdResourceStrings_RSNotConnected 65197
#define IdResourceStrings_RSObjectTypeNotSupported 65198
#define IdResourceStrings_RSTerminateThreadTimeout 65199
#define uRORes_err_InvalidHeader 65200
#define uRORes_err_UnknownClassInStream 65201
#define uRORes_err_UnexpectedClassInStream 65202
#define uRORes_err_SessionNotFound 65203
#define uRORes_err_ChannelDoesntSupportIROMetadataReader 65204
#define uRORes_err_TooManySessions 65205
#define uRORes_err_DOMElementIsNIL 65206
#define uRORes_err_CannotLoadXMLDocument 65207
#define uRORes_err_ErrorCreatingMsXmlDoc 65208
#define uRORes_err_NoXMLParsersAvailable 65209
#define uRORes_err_IDispatchMarshalingNotSupported 65210
#define uRORes_err_UnsupportedVariantType 65211
#define uRORes_err_VariantIsNotArray 65212
#define uRORes_err_InvalidVarArrayDimCount 65213
#define uRORes_err_MessageNotAssigned 65214
#define ComConst_SOleError 65215
#define uRORes_err_NILMessage 65216
#define uRORes_err_UnspecifiedInterface 65217
#define uRORes_err_UnspecifiedMessage 65218
#define uRORes_err_UnknownMethod 65219
#define uRORes_err_ClassFactoryDidNotReturnInstance 65220
#define uRORes_err_TypeNotSupported 65221
#define uRORes_err_ClassFactoryNotFound 65222
#define uRORes_err_IROMessageNotSupported 65223
#define uRORes_err_ClassAlreadyRegistered 65224
#define uRORes_err_UnknownProxyInterface 65225
#define uRORes_err_DispatcherAlreadyAssigned 65226
#define uRORes_err_CannotFindMessageDispatcher 65227
#define uRORes_err_ServerOnlySupportsOneDispatcher 65228
#define uRORes_err_UnhandledException 65229
#define uRORes_err_ChannelBusy 65230
#define uRORes_err_ArrayIndexOutOfBounds 65231
#define uRORes_err_InvalidStringLength 65232
#define uRORes_str_InvalidClassTypeInStream 65233
#define uRORes_err_UnexpectedEndOfStream 65234
#define uRORes_err_RodlDuplicateName 65235
#define uRORes_err_RodlNoDataTypeSpecified 65236
#define uRORes_err_RodlNoEnumValues 65237
#define uRORes_err_RodlNoStructElementsDefined 65238
#define uRORes_err_RodlNoOperationsDefined 65239
#define uRORes_err_RodlUsedFileDoesNotExist 65240
#define uRORes_err_RodlInvalidDataType 65241
#define uRORes_err_RodlStructCannotBeNested 65242
#define uRORes_err_RodlInvalidAncestorType 65243
#define uRORes_str_ExceptionOnServer 65244
#define uRORes_str_ExceptionReraisedFromServer 65245
#define uRORes_err_AssignError 65246
#define uRORes_err_InvalidRequestStream 65247
#define uRODECConst_sProtectionCircular 65248
#define uRODECConst_sStringFormatExists 65249
#define uRODECConst_sInvalidStringFormat 65250
#define uRODECConst_sInvalidFormatString 65251
#define uRODECConst_sFMT_COPY 65252
#define uRODECConst_sFMT_HEX 65253
#define uRODECConst_sFMT_HEXL 65254
#define uRODECConst_sFMT_MIME64 65255
#define uRODECConst_sFMT_UU 65256
#define uRODECConst_sFMT_XX 65257
#define uRODECConst_sInvalidKeySize 65258
#define uRODECConst_sNotInitialized 65259
#define uRORes_err_InvalidIndex 65260
#define uRORes_err_InvalidType 65261
#define uRORes_err_InvalidStream 65262
#define uRORes_err_InvalidParamFlag 65263
#define uRORes_err_VariantIsNotArray 65200
#define uRORes_err_InvalidVarArrayDimCount 65201
#define uRORes_err_MessageNotAssigned 65202
#define ComConst_SOleError 65203
#define ComConst_SNoMethod 65204
#define ComConst_SVarNotObject 65205
#define ComConst_STooManyParams 65206
#define uRODECConst_sProtectionCircular 65207
#define uRODECConst_sStringFormatExists 65208
#define uRODECConst_sInvalidStringFormat 65209
#define uRODECConst_sInvalidFormatString 65210
#define uRODECConst_sFMT_COPY 65211
#define uRODECConst_sFMT_HEX 65212
#define uRODECConst_sFMT_HEXL 65213
#define uRODECConst_sFMT_MIME64 65214
#define uRODECConst_sFMT_UU 65215
#define uRORes_err_ServerOnlySupportsOneDispatcher 65216
#define uRORes_err_UnhandledException 65217
#define uRORes_err_ChannelBusy 65218
#define uRORes_err_ArrayIndexOutOfBounds 65219
#define uRORes_err_InvalidHeader 65220
#define uRORes_err_UnknownClassInStream 65221
#define uRORes_err_UnexpectedClassInStream 65222
#define uRORes_err_SessionNotFound 65223
#define uRORes_err_ChannelDoesntSupportIROMetadataReader 65224
#define uRORes_err_TooManySessions 65225
#define uRORes_err_DOMElementIsNIL 65226
#define uRORes_err_CannotLoadXMLDocument 65227
#define uRORes_err_ErrorCreatingMsXmlDoc 65228
#define uRORes_err_NoXMLParsersAvailable 65229
#define uRORes_err_IDispatchMarshalingNotSupported 65230
#define uRORes_err_UnsupportedVariantType 65231
#define uRORes_str_ExceptionOnServer 65232
#define uRORes_str_ExceptionReraisedFromServer 65233
#define uRORes_err_AssignError 65234
#define uRORes_err_InvalidRequestStream 65235
#define uRORes_err_NILMessage 65236
#define uRORes_err_UnspecifiedInterface 65237
#define uRORes_err_UnspecifiedMessage 65238
#define uRORes_err_UnknownMethod 65239
#define uRORes_err_ClassFactoryDidNotReturnInstance 65240
#define uRORes_err_TypeNotSupported 65241
#define uRORes_err_ClassFactoryNotFound 65242
#define uRORes_err_IROMessageNotSupported 65243
#define uRORes_err_ClassAlreadyRegistered 65244
#define uRORes_err_UnknownProxyInterface 65245
#define uRORes_err_DispatcherAlreadyAssigned 65246
#define uRORes_err_CannotFindMessageDispatcher 65247
#define uRORes_err_InvalidIndex 65248
#define uRORes_err_InvalidType 65249
#define uRORes_err_InvalidStream 65250
#define uRORes_err_InvalidParamFlag 65251
#define uRORes_err_InvalidStringLength 65252
#define uRORes_str_InvalidClassTypeInStream 65253
#define uRORes_err_UnexpectedEndOfStream 65254
#define uRORes_err_RodlDuplicateName 65255
#define uRORes_err_RodlNoDataTypeSpecified 65256
#define uRORes_err_RodlNoEnumValues 65257
#define uRORes_err_RodlNoStructElementsDefined 65258
#define uRORes_err_RodlNoOperationsDefined 65259
#define uRORes_err_RodlUsedFileDoesNotExist 65260
#define uRORes_err_RodlInvalidDataType 65261
#define uRORes_err_RodlStructCannotBeNested 65262
#define uRORes_err_RodlInvalidAncestorType 65263
#define Consts_SDockedCtlNeedsName 65264
#define Consts_SDockTreeRemoveError 65265
#define Consts_SDockZoneNotFound 65266
@ -2162,9 +2162,9 @@ BEGIN
IdResourceStrings_RSStatusConnecting, "Connecting to %s."
IdResourceStrings_RSStatusConnected, "Connected."
IdResourceStrings_RSStatusDisconnecting, "Disconnecting."
ComConst_SNoMethod, "Method '%s' not supported by automation object"
ComConst_SVarNotObject, "Variant does not reference an automation object"
ComConst_STooManyParams, "Dispatch methods do not support more than 64 parameters"
uRODECConst_sFMT_XX, "XX Coding"
uRODECConst_sInvalidKeySize, "Length from Encryptionkey is invalid.\r\nKeysize for %s must be to %d-%d bytes"
uRODECConst_sNotInitialized, "%s is not initialized call Init() or InitKey() before."
IdResourceStrings_RSCannotAllocateSocket, "Cannot allocate socket."
IdResourceStrings_RSConnectionClosedGracefully, "Connection Closed Gracefully."
IdResourceStrings_RSCouldNotBindSocket, "Could not bind socket. Address and port are already in use."
@ -2178,6 +2178,26 @@ BEGIN
IdResourceStrings_RSNotConnected, "Not Connected"
IdResourceStrings_RSObjectTypeNotSupported, "Object type not supported."
IdResourceStrings_RSTerminateThreadTimeout, "Terminate Thread Timeout"
uRORes_err_VariantIsNotArray, "Variant must be Array, but is %d"
uRORes_err_InvalidVarArrayDimCount, "Variant Array DimCount must be 1 but is %d"
uRORes_err_MessageNotAssigned, "Message is NIL"
ComConst_SOleError, "OLE error %.8x"
ComConst_SNoMethod, "Method '%s' not supported by automation object"
ComConst_SVarNotObject, "Variant does not reference an automation object"
ComConst_STooManyParams, "Dispatch methods do not support more than 64 parameters"
uRODECConst_sProtectionCircular, "Circular Protection detected, Protection Object is invalid."
uRODECConst_sStringFormatExists, "String Format \"%d\" not exists."
uRODECConst_sInvalidStringFormat, "Input is not an valid %s Format."
uRODECConst_sInvalidFormatString, "Input can not be convert to %s Format."
uRODECConst_sFMT_COPY, "copy Input to Output"
uRODECConst_sFMT_HEX, "Hexadecimal"
uRODECConst_sFMT_HEXL, "Hexadecimal lowercase"
uRODECConst_sFMT_MIME64, "MIME Base 64"
uRODECConst_sFMT_UU, "UU Coding"
uRORes_err_ServerOnlySupportsOneDispatcher, "%s servers only support one dispatcher"
uRORes_err_UnhandledException, "Unhandled exception"
uRORes_err_ChannelBusy, "Channel is busy. Try again later."
uRORes_err_ArrayIndexOutOfBounds, "Array index out of bounds (%d)."
uRORes_err_InvalidHeader, "Invalid binary header. Either incompatible or not a binary message."
uRORes_err_UnknownClassInStream, "Unknown class \"%s\" found in stream."
uRORes_err_UnexpectedClassInStream, "Unexpected class found in stream; class \"%s\" does not descend from \"%s\"."
@ -2190,10 +2210,10 @@ BEGIN
uRORes_err_NoXMLParsersAvailable, "MSXML is not installed"
uRORes_err_IDispatchMarshalingNotSupported, "Marshaling of IDispatch (%d) type variants is not supported."
uRORes_err_UnsupportedVariantType, "Unsupported variant type \"%d\""
uRORes_err_VariantIsNotArray, "Variant must be Array, but is %d"
uRORes_err_InvalidVarArrayDimCount, "Variant Array DimCount must be 1 but is %d"
uRORes_err_MessageNotAssigned, "Message is NIL"
ComConst_SOleError, "OLE error %.8x"
uRORes_str_ExceptionOnServer, "An exception of type %s was raised on the server: %s"
uRORes_str_ExceptionReraisedFromServer, "An exception was raised on the server: %s"
uRORes_err_AssignError, "Cannot assign a \"%s\" to a \"%s\"."
uRORes_err_InvalidRequestStream, "Invalid request stream (%d bytes)"
uRORes_err_NILMessage, "Message is NIL"
uRORes_err_UnspecifiedInterface, "The message does not have an interface name"
uRORes_err_UnspecifiedMessage, "The message does not have a name"
@ -2206,10 +2226,10 @@ BEGIN
uRORes_err_UnknownProxyInterface, "Unknown proxy interface \"%s\""
uRORes_err_DispatcherAlreadyAssigned, "Dispatcher for %s already assigned"
uRORes_err_CannotFindMessageDispatcher, "Cannot find message dispatcher. Maybe there is no message component configured for for the requested path?"
uRORes_err_ServerOnlySupportsOneDispatcher, "%s servers only support one dispatcher"
uRORes_err_UnhandledException, "Unhandled exception"
uRORes_err_ChannelBusy, "Channel is busy. Try again later."
uRORes_err_ArrayIndexOutOfBounds, "Array index out of bounds (%d)."
uRORes_err_InvalidIndex, "Invalid index %d"
uRORes_err_InvalidType, "Invalid type \"%s. Expected \"%s\"\""
uRORes_err_InvalidStream, "Invalid stream"
uRORes_err_InvalidParamFlag, "Invalid Parameter Flag \"%s\""
uRORes_err_InvalidStringLength, "Stream read error: Invalid string length \"%d\""
uRORes_str_InvalidClassTypeInStream, "Stream read error: Invalid class type encountered: \"%s\""
uRORes_err_UnexpectedEndOfStream, "Unexpected end of stream."
@ -2222,26 +2242,6 @@ BEGIN
uRORes_err_RodlInvalidDataType, "Invalid or undefined data type \"%s\"."
uRORes_err_RodlStructCannotBeNested, "Structs cannot recursively contain themselves."
uRORes_err_RodlInvalidAncestorType, "Invalid or undefined ancestor type \"%s\"."
uRORes_str_ExceptionOnServer, "An exception of type %s was raised on the server: %s"
uRORes_str_ExceptionReraisedFromServer, "An exception was raised on the server: %s"
uRORes_err_AssignError, "Cannot assign a \"%s\" to a \"%s\"."
uRORes_err_InvalidRequestStream, "Invalid request stream (%d bytes)"
uRODECConst_sProtectionCircular, "Circular Protection detected, Protection Object is invalid."
uRODECConst_sStringFormatExists, "String Format \"%d\" not exists."
uRODECConst_sInvalidStringFormat, "Input is not an valid %s Format."
uRODECConst_sInvalidFormatString, "Input can not be convert to %s Format."
uRODECConst_sFMT_COPY, "copy Input to Output"
uRODECConst_sFMT_HEX, "Hexadecimal"
uRODECConst_sFMT_HEXL, "Hexadecimal lowercase"
uRODECConst_sFMT_MIME64, "MIME Base 64"
uRODECConst_sFMT_UU, "UU Coding"
uRODECConst_sFMT_XX, "XX Coding"
uRODECConst_sInvalidKeySize, "Length from Encryptionkey is invalid.\r\nKeysize for %s must be to %d-%d bytes"
uRODECConst_sNotInitialized, "%s is not initialized call Init() or InitKey() before."
uRORes_err_InvalidIndex, "Invalid index %d"
uRORes_err_InvalidType, "Invalid type \"%s. Expected \"%s\"\""
uRORes_err_InvalidStream, "Invalid stream"
uRORes_err_InvalidParamFlag, "Invalid Parameter Flag \"%s\""
Consts_SDockedCtlNeedsName, "Docked control must have a name"
Consts_SDockTreeRemoveError, "Error removing control from dock tree"
Consts_SDockZoneNotFound, " - Dock zone not found"

View File

@ -1,7 +1,7 @@
MAINICON ICON "c:\Codigo Luis Leon\Source\Iconos\Servidor.ico"
1 VERSIONINFO
FILEVERSION 2,6,0,0
PRODUCTVERSION 2,6,0,0
FILEVERSION 2,7,0,0
PRODUCTVERSION 2,7,0,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
@ -13,10 +13,10 @@ BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0"
VALUE "FileVersion", "2.6.0.0\0"
VALUE "FileVersion", "2.7.0.0\0"
VALUE "ProductName", "FactuGES Server\0"
VALUE "ProductVersion", "2.6.0.0\0"
VALUE "CompileDate", "martes, 01 de abril de 2008 10:41\0"
VALUE "ProductVersion", "2.7.0.0\0"
VALUE "CompileDate", "sábado, 19 de abril de 2008 19:15\0"
END
END
BLOCK "VarFileInfo"

Binary file not shown.