Fixed issue 0026631: Create price lists based on a fixed price and cost plus a margin
authorAaron Calero <aaron.calero@openbravo.com>
Wed, 28 May 2014 09:20:58 +0200
changeset 23399 4eea5c0c8248
parent 23398 77eadf48af69
child 23400 a7ca298ecd76
Fixed issue 0026631: Create price lists based on a fixed price and cost plus a margin
src-db/database/model/functions/M_PRICELIST_CREATE.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_REF_LIST.xml
--- a/src-db/database/model/functions/M_PRICELIST_CREATE.xml	Thu May 29 09:59:19 2014 +0530
+++ b/src-db/database/model/functions/M_PRICELIST_CREATE.xml	Wed May 28 09:20:58 2014 +0200
@@ -78,7 +78,7 @@
       )
     LOOP
       v_PriceList_Version_ID:=Cur_Parameter.Record_ID;
-	
+
       IF(Cur_Parameter.ParameterName='DeleteOld') THEN
         v_DeleteOld:=Cur_Parameter.P_String;
         DBMS_OUTPUT.PUT_LINE('  DeleteOld=' || v_DeleteOld) ;
@@ -506,7 +506,7 @@
           CASE Cur_DiscountLine.Limit_Base WHEN 'F' THEN Cur_DiscountLine.Limit_Fixed ELSE PriceLimit
           END
           ),
-	      updated=now()
+          updated=now()
         WHERE M_PriceList_Version_ID=v_PriceList_Version_ID
           AND EXISTS
           (SELECT *
@@ -517,18 +517,24 @@
         ELSE    
          UPDATE M_ProductPrice
           SET PriceList=ROUND((
-          CASE Cur_DiscountLine.List_Base WHEN 'C' THEN PriceList*(1+Cur_DiscountLine.LIST_MARGIN/100) ELSE PriceList
+          CASE Cur_DiscountLine.List_Base WHEN 'C' THEN PriceList*(1+Cur_DiscountLine.LIST_MARGIN/100) 
+                                          WHEN 'FC' THEN CASE WHEN Cur_DiscountLine.List_Fixed >= PriceList THEN Cur_DiscountLine.List_Fixed ELSE PriceList*(1+Cur_DiscountLine.LIST_MARGIN/100) END
+                                          ELSE PriceList
           END
           ), v_StdPrecision),
           PriceStd=ROUND((
-          CASE Cur_DiscountLine.Std_Base WHEN 'C' THEN PriceStd*(1+Cur_DiscountLine.STD_MARGIN/100) ELSE PriceStd 
+          CASE Cur_DiscountLine.Std_Base WHEN 'C' THEN PriceStd*(1+Cur_DiscountLine.STD_MARGIN/100) 
+                                         WHEN 'FC' THEN CASE WHEN Cur_DiscountLine.Std_Fixed >= PriceStd THEN Cur_DiscountLine.Std_Fixed ELSE PriceStd*(1+Cur_DiscountLine.STD_MARGIN/100) END
+                                         ELSE PriceStd 
           END
           ), v_StdPrecision),
           PriceLimit=ROUND((
-          CASE Cur_DiscountLine.Limit_Base WHEN 'C' THEN PriceLimit*(1+Cur_DiscountLine.LIMIT_MARGIN/100) ELSE PriceLimit
+          CASE Cur_DiscountLine.Limit_Base WHEN 'C' THEN PriceLimit*(1+Cur_DiscountLine.LIMIT_MARGIN/100) 
+                                           WHEN 'FC' THEN CASE WHEN Cur_DiscountLine.List_Fixed >= PriceLimit THEN Cur_DiscountLine.Limit_Fixed ELSE PriceLimit*(1+Cur_DiscountLine.LIST_MARGIN/100) END
+                                           ELSE PriceLimit
           END
           ), v_StdPrecision),
-	      updated=now()
+          updated=now()
         WHERE M_PriceList_Version_ID=v_PriceList_Version_ID
           AND EXISTS
           (SELECT 1
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu May 29 09:59:19 2014 +0530
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Wed May 28 09:20:58 2014 +0200
@@ -63485,7 +63485,7 @@
 <!--5255-->  <AD_COLUMN_ID><![CDATA[6628]]></AD_COLUMN_ID>
 <!--5255-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5255-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5255-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C']]></DISPLAYLOGIC>
+<!--5255-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C' & @List_Base@!'FC']]></DISPLAYLOGIC>
 <!--5255-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5255-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5255-->  <SEQNO><![CDATA[90]]></SEQNO>
@@ -63515,7 +63515,7 @@
 <!--5256-->  <AD_COLUMN_ID><![CDATA[6629]]></AD_COLUMN_ID>
 <!--5256-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5256-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5256-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C']]></DISPLAYLOGIC>
+<!--5256-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C' & @List_Base@!'FC']]></DISPLAYLOGIC>
 <!--5256-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5256-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5256-->  <SEQNO><![CDATA[100]]></SEQNO>
@@ -63545,7 +63545,7 @@
 <!--5257-->  <AD_COLUMN_ID><![CDATA[6630]]></AD_COLUMN_ID>
 <!--5257-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5257-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5257-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C']]></DISPLAYLOGIC>
+<!--5257-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C' @List_Base@!'FC']]></DISPLAYLOGIC>
 <!--5257-->  <DISPLAYLENGTH><![CDATA[21]]></DISPLAYLENGTH>
 <!--5257-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5257-->  <SEQNO><![CDATA[140]]></SEQNO>
@@ -63575,7 +63575,7 @@
 <!--5258-->  <AD_COLUMN_ID><![CDATA[6631]]></AD_COLUMN_ID>
 <!--5258-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5258-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5258-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C']]></DISPLAYLOGIC>
+<!--5258-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C' & @List_Base@!'FC']]></DISPLAYLOGIC>
 <!--5258-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5258-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5258-->  <SEQNO><![CDATA[120]]></SEQNO>
@@ -63605,7 +63605,7 @@
 <!--5259-->  <AD_COLUMN_ID><![CDATA[6632]]></AD_COLUMN_ID>
 <!--5259-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5259-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5259-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C']]></DISPLAYLOGIC>
+<!--5259-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C' & @List_Base@!'FC']]></DISPLAYLOGIC>
 <!--5259-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5259-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5259-->  <SEQNO><![CDATA[130]]></SEQNO>
@@ -63664,7 +63664,7 @@
 <!--5261-->  <AD_COLUMN_ID><![CDATA[6634]]></AD_COLUMN_ID>
 <!--5261-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5261-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5261-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C']]></DISPLAYLOGIC>
+<!--5261-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C' & @Std_Base@!'FC']]></DISPLAYLOGIC>
 <!--5261-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5261-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5261-->  <SEQNO><![CDATA[180]]></SEQNO>
@@ -63694,7 +63694,7 @@
 <!--5262-->  <AD_COLUMN_ID><![CDATA[6635]]></AD_COLUMN_ID>
 <!--5262-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5262-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5262-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C']]></DISPLAYLOGIC>
+<!--5262-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C' & @Std_Base@!'FC']]></DISPLAYLOGIC>
 <!--5262-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5262-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5262-->  <SEQNO><![CDATA[190]]></SEQNO>
@@ -63724,7 +63724,7 @@
 <!--5263-->  <AD_COLUMN_ID><![CDATA[6636]]></AD_COLUMN_ID>
 <!--5263-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5263-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5263-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C']]></DISPLAYLOGIC>
+<!--5263-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C' & @Std_Base@!'FC']]></DISPLAYLOGIC>
 <!--5263-->  <DISPLAYLENGTH><![CDATA[21]]></DISPLAYLENGTH>
 <!--5263-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5263-->  <SEQNO><![CDATA[220]]></SEQNO>
@@ -63754,7 +63754,7 @@
 <!--5264-->  <AD_COLUMN_ID><![CDATA[6637]]></AD_COLUMN_ID>
 <!--5264-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5264-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5264-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C']]></DISPLAYLOGIC>
+<!--5264-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C' & @Std_Base@!'FC']]></DISPLAYLOGIC>
 <!--5264-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5264-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5264-->  <SEQNO><![CDATA[200]]></SEQNO>
@@ -63784,7 +63784,7 @@
 <!--5265-->  <AD_COLUMN_ID><![CDATA[6638]]></AD_COLUMN_ID>
 <!--5265-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5265-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5265-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C']]></DISPLAYLOGIC>
+<!--5265-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C' & @Std_Base@!'FC']]></DISPLAYLOGIC>
 <!--5265-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5265-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5265-->  <SEQNO><![CDATA[210]]></SEQNO>
@@ -63844,7 +63844,7 @@
 <!--5267-->  <AD_COLUMN_ID><![CDATA[6640]]></AD_COLUMN_ID>
 <!--5267-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5267-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5267-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C']]></DISPLAYLOGIC>
+<!--5267-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C' & @Limit_Base@!'FC']]></DISPLAYLOGIC>
 <!--5267-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5267-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5267-->  <SEQNO><![CDATA[280]]></SEQNO>
@@ -63874,7 +63874,7 @@
 <!--5268-->  <AD_COLUMN_ID><![CDATA[6641]]></AD_COLUMN_ID>
 <!--5268-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5268-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5268-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C']]></DISPLAYLOGIC>
+<!--5268-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C' & @Limit_Base@!'FC']]></DISPLAYLOGIC>
 <!--5268-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5268-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5268-->  <SEQNO><![CDATA[300]]></SEQNO>
@@ -63904,7 +63904,7 @@
 <!--5269-->  <AD_COLUMN_ID><![CDATA[6642]]></AD_COLUMN_ID>
 <!--5269-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5269-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5269-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C']]></DISPLAYLOGIC>
+<!--5269-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C' & @Limit_Base@!'FC']]></DISPLAYLOGIC>
 <!--5269-->  <DISPLAYLENGTH><![CDATA[21]]></DISPLAYLENGTH>
 <!--5269-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5269-->  <SEQNO><![CDATA[310]]></SEQNO>
@@ -63934,7 +63934,7 @@
 <!--5270-->  <AD_COLUMN_ID><![CDATA[6643]]></AD_COLUMN_ID>
 <!--5270-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5270-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5270-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C']]></DISPLAYLOGIC>
+<!--5270-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C' & @Limit_Base@!'FC']]></DISPLAYLOGIC>
 <!--5270-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5270-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5270-->  <SEQNO><![CDATA[270]]></SEQNO>
@@ -63964,7 +63964,7 @@
 <!--5271-->  <AD_COLUMN_ID><![CDATA[6644]]></AD_COLUMN_ID>
 <!--5271-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5271-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5271-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C']]></DISPLAYLOGIC>
+<!--5271-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@!'F' & @Limit_Base@!'C' & @Limit_Base@!'FC']]></DISPLAYLOGIC>
 <!--5271-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5271-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5271-->  <SEQNO><![CDATA[290]]></SEQNO>
@@ -65152,7 +65152,7 @@
 <!--5348-->  <AD_COLUMN_ID><![CDATA[6714]]></AD_COLUMN_ID>
 <!--5348-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5348-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5348-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@='F']]></DISPLAYLOGIC>
+<!--5348-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@Limit_Base@='F' | @Limit_Base@='FC')]]></DISPLAYLOGIC>
 <!--5348-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5348-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5348-->  <SEQNO><![CDATA[320]]></SEQNO>
@@ -65182,7 +65182,7 @@
 <!--5349-->  <AD_COLUMN_ID><![CDATA[6715]]></AD_COLUMN_ID>
 <!--5349-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5349-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5349-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@='F']]></DISPLAYLOGIC>
+<!--5349-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@List_Base@='F' | @List_Base@='FC')]]></DISPLAYLOGIC>
 <!--5349-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5349-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5349-->  <SEQNO><![CDATA[110]]></SEQNO>
@@ -65212,7 +65212,7 @@
 <!--5350-->  <AD_COLUMN_ID><![CDATA[6716]]></AD_COLUMN_ID>
 <!--5350-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5350-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5350-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@='F']]></DISPLAYLOGIC>
+<!--5350-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@Std_Base@='F' | @Std_Base@='FC')]]></DISPLAYLOGIC>
 <!--5350-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5350-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5350-->  <SEQNO><![CDATA[170]]></SEQNO>
@@ -262154,7 +262154,7 @@
 <!--C3DA0880F565707CE040007F01003707-->  <AD_COLUMN_ID><![CDATA[C3DA0880F54C707CE040007F01003707]]></AD_COLUMN_ID>
 <!--C3DA0880F565707CE040007F01003707-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--C3DA0880F565707CE040007F01003707-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--C3DA0880F565707CE040007F01003707-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@='C']]></DISPLAYLOGIC>
+<!--C3DA0880F565707CE040007F01003707-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@List_Base@='C' | @List_Base@='FC')]]></DISPLAYLOGIC>
 <!--C3DA0880F565707CE040007F01003707-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
 <!--C3DA0880F565707CE040007F01003707-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--C3DA0880F565707CE040007F01003707-->  <SEQNO><![CDATA[150]]></SEQNO>
@@ -262181,7 +262181,7 @@
 <!--C3DA0880F566707CE040007F01003707-->  <AD_COLUMN_ID><![CDATA[C3DA0880F54D707CE040007F01003707]]></AD_COLUMN_ID>
 <!--C3DA0880F566707CE040007F01003707-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--C3DA0880F566707CE040007F01003707-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--C3DA0880F566707CE040007F01003707-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@='C']]></DISPLAYLOGIC>
+<!--C3DA0880F566707CE040007F01003707-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@Std_Base@='C' | @Std_Base@='FC')]]></DISPLAYLOGIC>
 <!--C3DA0880F566707CE040007F01003707-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
 <!--C3DA0880F566707CE040007F01003707-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--C3DA0880F566707CE040007F01003707-->  <SEQNO><![CDATA[230]]></SEQNO>
@@ -262208,7 +262208,7 @@
 <!--C3DA0880F567707CE040007F01003707-->  <AD_COLUMN_ID><![CDATA[C3DA0880F54E707CE040007F01003707]]></AD_COLUMN_ID>
 <!--C3DA0880F567707CE040007F01003707-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--C3DA0880F567707CE040007F01003707-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
-<!--C3DA0880F567707CE040007F01003707-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Limit_Base@='C']]></DISPLAYLOGIC>
+<!--C3DA0880F567707CE040007F01003707-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@Limit_Base@='C' | @Limit_Base@='FC')]]></DISPLAYLOGIC>
 <!--C3DA0880F567707CE040007F01003707-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
 <!--C3DA0880F567707CE040007F01003707-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--C3DA0880F567707CE040007F01003707-->  <SEQNO><![CDATA[350]]></SEQNO>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Thu May 29 09:59:19 2014 +0530
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Wed May 28 09:20:58 2014 +0200
@@ -8679,6 +8679,17 @@
 <!--31FB1CE10A204DD491E0BDE895210BCB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--31FB1CE10A204DD491E0BDE895210BCB--></AD_REF_LIST>
 
+<!--32281D8B206E46AE8BED3F837021E1B5--><AD_REF_LIST>
+<!--32281D8B206E46AE8BED3F837021E1B5-->  <AD_REF_LIST_ID><![CDATA[32281D8B206E46AE8BED3F837021E1B5]]></AD_REF_LIST_ID>
+<!--32281D8B206E46AE8BED3F837021E1B5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--32281D8B206E46AE8BED3F837021E1B5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--32281D8B206E46AE8BED3F837021E1B5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--32281D8B206E46AE8BED3F837021E1B5-->  <VALUE><![CDATA[FC]]></VALUE>
+<!--32281D8B206E46AE8BED3F837021E1B5-->  <NAME><![CDATA[Fixed Price or Cost Based]]></NAME>
+<!--32281D8B206E46AE8BED3F837021E1B5-->  <AD_REFERENCE_ID><![CDATA[194]]></AD_REFERENCE_ID>
+<!--32281D8B206E46AE8BED3F837021E1B5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--32281D8B206E46AE8BED3F837021E1B5--></AD_REF_LIST>
+
 <!--33FF914AAED849C1BE557ECFFF606C81--><AD_REF_LIST>
 <!--33FF914AAED849C1BE557ECFFF606C81-->  <AD_REF_LIST_ID><![CDATA[33FF914AAED849C1BE557ECFFF606C81]]></AD_REF_LIST_ID>
 <!--33FF914AAED849C1BE557ECFFF606C81-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>