src-db/database/sourcedata/AD_TABLE.xml
changeset 25671 33b8eec9e03f
parent 25668 6f9cc94e865d
parent 25462 059f88b82a8b
child 26214 3f0e8886a349
child 26617 1c222c822fc5
child 27306 41905d824bee
child 27387 1c214e6d33d0
child 27608 b0fbae0ed40c
--- a/src-db/database/sourcedata/AD_TABLE.xml	Mon Jan 05 12:18:46 2015 +0100
+++ b/src-db/database/sourcedata/AD_TABLE.xml	Mon Jan 05 16:47:23 2015 +0100
@@ -11264,30 +11264,6 @@
 <!--A789EDFD186644B5A9B6EEA9A10CF040-->  <ISTREE><![CDATA[N]]></ISTREE>
 <!--A789EDFD186644B5A9B6EEA9A10CF040--></AD_TABLE>
 
-<!--A9BC62219E644720867F6402B0C25933--><AD_TABLE>
-<!--A9BC62219E644720867F6402B0C25933-->  <AD_TABLE_ID><![CDATA[A9BC62219E644720867F6402B0C25933]]></AD_TABLE_ID>
-<!--A9BC62219E644720867F6402B0C25933-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--A9BC62219E644720867F6402B0C25933-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--A9BC62219E644720867F6402B0C25933-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--A9BC62219E644720867F6402B0C25933-->  <NAME><![CDATA[C_RM_RFC_PE_LINES]]></NAME>
-<!--A9BC62219E644720867F6402B0C25933-->  <TABLENAME><![CDATA[C_RM_RFC_PE_LINES]]></TABLENAME>
-<!--A9BC62219E644720867F6402B0C25933-->  <CLASSNAME><![CDATA[C_RM_RFC_PE_LINES]]></CLASSNAME>
-<!--A9BC62219E644720867F6402B0C25933-->  <ISVIEW><![CDATA[N]]></ISVIEW>
-<!--A9BC62219E644720867F6402B0C25933-->  <ACCESSLEVEL><![CDATA[1]]></ACCESSLEVEL>
-<!--A9BC62219E644720867F6402B0C25933-->  <AD_WINDOW_ID><![CDATA[FF808081330213E60133021822E40007]]></AD_WINDOW_ID>
-<!--A9BC62219E644720867F6402B0C25933-->  <ISSECURITYENABLED><![CDATA[N]]></ISSECURITYENABLED>
-<!--A9BC62219E644720867F6402B0C25933-->  <ISDELETEABLE><![CDATA[Y]]></ISDELETEABLE>
-<!--A9BC62219E644720867F6402B0C25933-->  <ISHIGHVOLUME><![CDATA[N]]></ISHIGHVOLUME>
-<!--A9BC62219E644720867F6402B0C25933-->  <IMPORTTABLE><![CDATA[N]]></IMPORTTABLE>
-<!--A9BC62219E644720867F6402B0C25933-->  <ISCHANGELOG><![CDATA[N]]></ISCHANGELOG>
-<!--A9BC62219E644720867F6402B0C25933-->  <ISDEFAULTACCT><![CDATA[N]]></ISDEFAULTACCT>
-<!--A9BC62219E644720867F6402B0C25933-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
-<!--A9BC62219E644720867F6402B0C25933-->  <AD_PACKAGE_ID><![CDATA[5A3ED54AB1D94B84E040007F01006125]]></AD_PACKAGE_ID>
-<!--A9BC62219E644720867F6402B0C25933-->  <DATAORIGINTYPE><![CDATA[Datasource]]></DATAORIGINTYPE>
-<!--A9BC62219E644720867F6402B0C25933-->  <OBSERDS_DATASOURCE_ID><![CDATA[2B21809CD7E3464FBFBD5FD60DFC3959]]></OBSERDS_DATASOURCE_ID>
-<!--A9BC62219E644720867F6402B0C25933-->  <ISTREE><![CDATA[N]]></ISTREE>
-<!--A9BC62219E644720867F6402B0C25933--></AD_TABLE>
-
 <!--AC389EBD8A774AAE8223A77F692983D8--><AD_TABLE>
 <!--AC389EBD8A774AAE8223A77F692983D8-->  <AD_TABLE_ID><![CDATA[AC389EBD8A774AAE8223A77F692983D8]]></AD_TABLE_ID>
 <!--AC389EBD8A774AAE8223A77F692983D8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -11788,6 +11764,60 @@
 <!--CBF045D2539A4249B091CCE4B1F5EEDB-->  <ISTREE><![CDATA[N]]></ISTREE>
 <!--CBF045D2539A4249B091CCE4B1F5EEDB--></AD_TABLE>
 
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390--><AD_TABLE>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <AD_TABLE_ID><![CDATA[CDB9DC9655F24DF8AB41AA0ADBD04390]]></AD_TABLE_ID>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <NAME><![CDATA[C_RM_ReturnToVendorHQL]]></NAME>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <TABLENAME><![CDATA[C_RM_ReturnToVendorHQL]]></TABLENAME>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ISVIEW><![CDATA[N]]></ISVIEW>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <AD_WINDOW_ID><![CDATA[C50A8AEE6F044825B5EF54FAAE76826F]]></AD_WINDOW_ID>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ISSECURITYENABLED><![CDATA[N]]></ISSECURITYENABLED>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ISDELETEABLE><![CDATA[Y]]></ISDELETEABLE>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ISHIGHVOLUME><![CDATA[N]]></ISHIGHVOLUME>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <IMPORTTABLE><![CDATA[N]]></IMPORTTABLE>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ISCHANGELOG><![CDATA[N]]></ISCHANGELOG>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ISDEFAULTACCT><![CDATA[N]]></ISDEFAULTACCT>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <AD_PACKAGE_ID><![CDATA[5A3ED54AB1D94B84E040007F01006125]]></AD_PACKAGE_ID>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <DATAORIGINTYPE><![CDATA[HQL]]></DATAORIGINTYPE>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ISTREE><![CDATA[N]]></ISTREE>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <HQLQUERY><![CDATA[select iol.id as id, iol.organization as organization, iol.client as client,  iol.product as product,  
+iol.uOM as uOM, iol.id as goodsShipmentLine, iol.movementQuantity as movementQuantity,
+iol.shipmentReceipt.businessPartner as businessPartner, iol.shipmentReceipt.documentNo as shipmentNumber,
+iol.shipmentReceipt.movementDate as movementDate,  attributeSetValue as attributeSetValue,
+coalesce((select sum(ol.orderedQuantity)
+from OrderLine as ol
+left join ol.salesOrder as o
+where ol.goodsShipmentLine = iol
+and o.processed = true
+and o.documentStatus <> 'VO'), 0) as returnQtyOtherRM,
+(case when (select ('Y') from OrderLine as ol where ol.salesOrder.id = :salesOrderId and ol.goodsShipmentLine = iol) is null then false else true end) as obSelected,
+coalesce((select ol.orderedQuantity from OrderLine as ol where ol.salesOrder.id = :salesOrderId and ol.goodsShipmentLine = iol),0)*(-1) as returned,
+(select ol.returnReason from OrderLine as ol where ol.salesOrder.id = :salesOrderId and ol.goodsShipmentLine = iol) as returnReason,
+coalesce((select ol.tax from OrderLine as ol where ol.salesOrder.id = :salesOrderId and ol.goodsShipmentLine = iol) ,
+@taxSubQuery@) as tax,
+(case when @priceIncludeTaxSubQuery@ = true then
+ coalesce((select ol.@unitPriceProperty@ from OrderLine as ol where ol.salesOrder.id = :salesOrderId and ol.goodsShipmentLine = iol), 
+          @grossUnitPriceSubQuery@)
+else 
+ coalesce((select ol.@unitPriceProperty@ from OrderLine as ol where ol.salesOrder.id = :salesOrderId and ol.goodsShipmentLine = iol), 
+          @unitPriceSubQuery@)
+end) as unitPrice,
+@orderNoSubQuery@ as orderNo
+MAINFROM MaterialMgmtShipmentInOutLine as iol 
+left join  iol.attributeSetValue as attributeSetValue
+join iol.shipmentReceipt as io 
+where io.businessPartner.id = :businessPartnerId 
+and io.processed = true and io.documentStatus <> 'VO' 
+and io.salesTransaction = @isSalesTransaction@ 
+and @insertion_point_0@
+and @additional_filters@]]></HQLQUERY>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ENTITY_ALIAS><![CDATA[iol]]></ENTITY_ALIAS>
+<!--CDB9DC9655F24DF8AB41AA0ADBD04390--></AD_TABLE>
+
 <!--CE9AFF5F51B846AEAB0B6CBF829092CD--><AD_TABLE>
 <!--CE9AFF5F51B846AEAB0B6CBF829092CD-->  <AD_TABLE_ID><![CDATA[CE9AFF5F51B846AEAB0B6CBF829092CD]]></AD_TABLE_ID>
 <!--CE9AFF5F51B846AEAB0B6CBF829092CD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -11812,6 +11842,38 @@
 <!--CE9AFF5F51B846AEAB0B6CBF829092CD-->  <ISTREE><![CDATA[N]]></ISTREE>
 <!--CE9AFF5F51B846AEAB0B6CBF829092CD--></AD_TABLE>
 
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6--><AD_TABLE>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <AD_TABLE_ID><![CDATA[CEA5D55DB2AC497D98B9C02A5E1EA0B6]]></AD_TABLE_ID>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <NAME><![CDATA[C_RM_ReturnToVendorOrphanHQL]]></NAME>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <TABLENAME><![CDATA[C_RM_ReturnToVendorOrphanHQL]]></TABLENAME>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ISVIEW><![CDATA[N]]></ISVIEW>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ACCESSLEVEL><![CDATA[1]]></ACCESSLEVEL>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ISSECURITYENABLED><![CDATA[N]]></ISSECURITYENABLED>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ISDELETEABLE><![CDATA[Y]]></ISDELETEABLE>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ISHIGHVOLUME><![CDATA[N]]></ISHIGHVOLUME>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <IMPORTTABLE><![CDATA[N]]></IMPORTTABLE>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ISCHANGELOG><![CDATA[N]]></ISCHANGELOG>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ISDEFAULTACCT><![CDATA[N]]></ISDEFAULTACCT>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <AD_PACKAGE_ID><![CDATA[5A3ED54AB1C84B84E040007F01006125]]></AD_PACKAGE_ID>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <DATAORIGINTYPE><![CDATA[HQL]]></DATAORIGINTYPE>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ISTREE><![CDATA[N]]></ISTREE>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <HQLQUERY><![CDATA[select ol.id as id, ol.organization as organization, ol.client as client,  ol.product as product,  
+ol.uOM as uOM, '' as goodsShipmentLine, '' as movementQuantity,
+ol.salesOrder.businessPartner as businessPartner, '' as shipmentNumber,
+'' as movementDate,  '' as attributeSetValue,'' as returnQtyOtherRM,
+'Y' as obSelected, coalesce(ol.orderedQuantity,0)*(-1) as returned, 
+ (select oli.returnReason from OrderLine as oli where oli.salesOrder.id = :salesOrderId  and oli.id=ol.id) as returnReason, coalesce (ol.tax, '') as tax, ol.@unitPriceProperty@  as unitPrice, 
+'' as orderNo
+from OrderLine ol  
+where ol.goodsShipmentLine is null
+and  ol.salesOrder.id = :salesOrderId]]></HQLQUERY>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6-->  <ENTITY_ALIAS><![CDATA[ol]]></ENTITY_ALIAS>
+<!--CEA5D55DB2AC497D98B9C02A5E1EA0B6--></AD_TABLE>
+
 <!--CF666DF225D54938B5368B5FB2EC2E76--><AD_TABLE>
 <!--CF666DF225D54938B5368B5FB2EC2E76-->  <AD_TABLE_ID><![CDATA[CF666DF225D54938B5368B5FB2EC2E76]]></AD_TABLE_ID>
 <!--CF666DF225D54938B5368B5FB2EC2E76-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -12384,29 +12446,6 @@
 <!--FC90AED3E5ED45CAB28A1FF2D571FB99-->  <ISTREE><![CDATA[N]]></ISTREE>
 <!--FC90AED3E5ED45CAB28A1FF2D571FB99--></AD_TABLE>
 
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5--><AD_TABLE>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <AD_TABLE_ID><![CDATA[FCB35AE2A9CA48EFAACCB06CCD17BED5]]></AD_TABLE_ID>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <NAME><![CDATA[C_RM_ReturnToVendorPEDatasource]]></NAME>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <TABLENAME><![CDATA[C_RM_ReturnToVendorPEDatasource]]></TABLENAME>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <ISVIEW><![CDATA[N]]></ISVIEW>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <ACCESSLEVEL><![CDATA[1]]></ACCESSLEVEL>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <AD_WINDOW_ID><![CDATA[FF808081330213E60133021822E40007]]></AD_WINDOW_ID>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <ISSECURITYENABLED><![CDATA[N]]></ISSECURITYENABLED>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <ISDELETEABLE><![CDATA[N]]></ISDELETEABLE>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <ISHIGHVOLUME><![CDATA[N]]></ISHIGHVOLUME>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <IMPORTTABLE><![CDATA[N]]></IMPORTTABLE>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <ISCHANGELOG><![CDATA[N]]></ISCHANGELOG>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <ISDEFAULTACCT><![CDATA[N]]></ISDEFAULTACCT>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <AD_PACKAGE_ID><![CDATA[5A3ED54AB1D94B84E040007F01006125]]></AD_PACKAGE_ID>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <DATAORIGINTYPE><![CDATA[Datasource]]></DATAORIGINTYPE>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <OBSERDS_DATASOURCE_ID><![CDATA[DF3ACC1626CB4469B4ABBD3713D71D4E]]></OBSERDS_DATASOURCE_ID>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5-->  <ISTREE><![CDATA[N]]></ISTREE>
-<!--FCB35AE2A9CA48EFAACCB06CCD17BED5--></AD_TABLE>
-
 <!--FF8080812DFFA1CF012DFFB889F40016--><AD_TABLE>
 <!--FF8080812DFFA1CF012DFFB889F40016-->  <AD_TABLE_ID><![CDATA[FF8080812DFFA1CF012DFFB889F40016]]></AD_TABLE_ID>
 <!--FF8080812DFFA1CF012DFFB889F40016-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>