Fixed issue 29422.Adds Fixed price or Cost plus margin.
authorAlberto Santos <alberto.santos@openbravo.com>
Mon, 09 Nov 2015 16:06:16 +0100
changeset 27843 797fabffe660
parent 27842 10ff05690b1a
child 27844 710400f71264
Fixed issue 29422.Adds Fixed price or Cost plus 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	Fri Nov 06 16:42:23 2015 +0530
+++ b/src-db/database/model/functions/M_PRICELIST_CREATE.xml	Mon Nov 09 16:06:16 2015 +0100
@@ -444,18 +444,21 @@
           SET PriceList=ROUND((
           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
+					  WHEN 'FCM' THEN CASE WHEN Cur_DiscountLine.List_Fixed >= PriceList*(1+Cur_DiscountLine.LIST_MARGIN/100) 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) 
                                          WHEN 'FC' THEN CASE WHEN Cur_DiscountLine.Std_Fixed >= PriceStd THEN Cur_DiscountLine.Std_Fixed ELSE PriceStd*(1+Cur_DiscountLine.STD_MARGIN/100) END
+					 WHEN 'FCM' THEN CASE WHEN Cur_DiscountLine.Std_Fixed >= PriceStd*(1+Cur_DiscountLine.STD_MARGIN/100) 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) 
                                            WHEN 'FC' THEN CASE WHEN Cur_DiscountLine.List_Fixed >= PriceLimit THEN Cur_DiscountLine.Limit_Fixed ELSE PriceLimit*(1+Cur_DiscountLine.LIST_MARGIN/100) END
+					   WHEN 'FCM' THEN CASE WHEN Cur_DiscountLine.List_Fixed >= PriceLimit*(1+Cur_DiscountLine.LIST_MARGIN/100) THEN Cur_DiscountLine.Limit_Fixed ELSE PriceLimit*(1+Cur_DiscountLine.LIST_MARGIN/100) END
                                            ELSE PriceLimit
           END
           ), v_StdPrecision),
--- a/src-db/database/sourcedata/AD_FIELD.xml	Fri Nov 06 16:42:23 2015 +0530
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Mon Nov 09 16:06:16 2015 +0100
@@ -63495,7 +63495,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' & @List_Base@!'FC']]></DISPLAYLOGIC>
+<!--5255-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C' & @List_Base@!'FC' & @List_Base@!'FCM']]></DISPLAYLOGIC>
 <!--5255-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5255-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5255-->  <SEQNO><![CDATA[90]]></SEQNO>
@@ -63525,7 +63525,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' & @List_Base@!'FC']]></DISPLAYLOGIC>
+<!--5256-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @List_Base@!'F' & @List_Base@!'C' & @List_Base@!'FC' & @List_Base@!'FCM']]></DISPLAYLOGIC>
 <!--5256-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5256-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5256-->  <SEQNO><![CDATA[100]]></SEQNO>
@@ -63674,7 +63674,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' & @Std_Base@!'FC']]></DISPLAYLOGIC>
+<!--5261-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C' & @Std_Base@!'FC' & @Std_Base@!'FCM']]></DISPLAYLOGIC>
 <!--5261-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5261-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5261-->  <SEQNO><![CDATA[180]]></SEQNO>
@@ -63704,7 +63704,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' & @Std_Base@!'FC']]></DISPLAYLOGIC>
+<!--5262-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & @Std_Base@!'F' & @Std_Base@!'C' & @Std_Base@!'FC' & @Std_Base@!'FCM']]></DISPLAYLOGIC>
 <!--5262-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5262-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5262-->  <SEQNO><![CDATA[190]]></SEQNO>
@@ -65192,7 +65192,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' | @List_Base@='FC')]]></DISPLAYLOGIC>
+<!--5349-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@List_Base@='F' | @List_Base@='FC' | @List_Base@='FCM')]]></DISPLAYLOGIC>
 <!--5349-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5349-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5349-->  <SEQNO><![CDATA[110]]></SEQNO>
@@ -65222,7 +65222,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' | @Std_Base@='FC')]]></DISPLAYLOGIC>
+<!--5350-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@Std_Base@='F' | @Std_Base@='FC' | @Std_Base@='FCM')]]></DISPLAYLOGIC>
 <!--5350-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--5350-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5350-->  <SEQNO><![CDATA[170]]></SEQNO>
@@ -280591,7 +280591,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' | @List_Base@='FC')]]></DISPLAYLOGIC>
+<!--C3DA0880F565707CE040007F01003707-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@List_Base@='C' | @List_Base@='FC' | @List_Base@='FCM')]]></DISPLAYLOGIC>
 <!--C3DA0880F565707CE040007F01003707-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
 <!--C3DA0880F565707CE040007F01003707-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--C3DA0880F565707CE040007F01003707-->  <SEQNO><![CDATA[150]]></SEQNO>
@@ -280618,7 +280618,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' | @Std_Base@='FC')]]></DISPLAYLOGIC>
+<!--C3DA0880F566707CE040007F01003707-->  <DISPLAYLOGIC><![CDATA[@DiscountType@='P' & (@Std_Base@='C' | @Std_Base@='FC' | @Std_Base@='FCM')]]></DISPLAYLOGIC>
 <!--C3DA0880F566707CE040007F01003707-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
 <!--C3DA0880F566707CE040007F01003707-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--C3DA0880F566707CE040007F01003707-->  <SEQNO><![CDATA[230]]></SEQNO>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Fri Nov 06 16:42:23 2015 +0530
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Mon Nov 09 16:06:16 2015 +0100
@@ -8290,6 +8290,17 @@
 <!--137FAE2E0B2E41CB901067BC77E37EE7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--137FAE2E0B2E41CB901067BC77E37EE7--></AD_REF_LIST>
 
+<!--13BE42BFDE6448F1A8B1A179E17D3018--><AD_REF_LIST>
+<!--13BE42BFDE6448F1A8B1A179E17D3018-->  <AD_REF_LIST_ID><![CDATA[13BE42BFDE6448F1A8B1A179E17D3018]]></AD_REF_LIST_ID>
+<!--13BE42BFDE6448F1A8B1A179E17D3018-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--13BE42BFDE6448F1A8B1A179E17D3018-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--13BE42BFDE6448F1A8B1A179E17D3018-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--13BE42BFDE6448F1A8B1A179E17D3018-->  <VALUE><![CDATA[FCM]]></VALUE>
+<!--13BE42BFDE6448F1A8B1A179E17D3018-->  <NAME><![CDATA[Fixed Price or Cost plus Margin Based]]></NAME>
+<!--13BE42BFDE6448F1A8B1A179E17D3018-->  <AD_REFERENCE_ID><![CDATA[194]]></AD_REFERENCE_ID>
+<!--13BE42BFDE6448F1A8B1A179E17D3018-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--13BE42BFDE6448F1A8B1A179E17D3018--></AD_REF_LIST>
+
 <!--146E194904144669A27BEDDB0D79C47B--><AD_REF_LIST>
 <!--146E194904144669A27BEDDB0D79C47B-->  <AD_REF_LIST_ID><![CDATA[146E194904144669A27BEDDB0D79C47B]]></AD_REF_LIST_ID>
 <!--146E194904144669A27BEDDB0D79C47B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>