Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0036076 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
feature request | [Retail Modules] Discounts and Promotions | minor | always | 2017-05-23 17:51 | 2017-09-14 09:45 | |||||||
Reporter | malsasua | View Status | public | |||||||||
Assigned To | Retail | |||||||||||
Priority | high | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0036076: to able to apply a discount by hours ("time from" and "time to") | |||||||||||
Description | It should be possible to configure the "time from" and "time to" values in the discount window, so, the discount could be applied by hours, no the whole day, in ERP and POS | |||||||||||
Steps To Reproduce | n/a | |||||||||||
Proposed Solution | . in discounts and promotions window, add two fields in header: time from time to . adapt the code to manage this two new fields | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | disc_core.diff [^] (17,991 bytes) 2017-05-23 17:53 [Show Content] [Hide Content]--- a/src-db/database/model/tables/M_OFFER.xml +++ a/src-db/database/model/tables/M_OFFER.xml @@ -121,6 +121,14 @@ <default><![CDATA[Y]]></default> <onCreateDefault><![CDATA['Y']]></onCreateDefault> </column> + <column name="START_TIME" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> + <column name="FINISHES_TIME" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> <foreign-key foreignTable="AD_CLIENT" name="M_OFFER_AD_CLIENT"> <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/> </foreign-key> --- a/src-db/database/sourcedata/AD_COLUMN.xml +++ b/src-db/database/sourcedata/AD_COLUMN.xml @@ -1,4 +1,4 @@ -<?xml version='1.0' encoding='UTF-8'?> +<?xml version="1.0" encoding="UTF-8"?> <data> <!--100--><AD_COLUMN> <!--100--> <AD_COLUMN_ID><![CDATA[100]]></AD_COLUMN_ID> @@ -262165,6 +262165,42 @@ <!--411B6E7873FC4939906984022DDF9F6D--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--411B6E7873FC4939906984022DDF9F6D--></AD_COLUMN> +<!--41A04F8D547446C4B576553F7E2923C2--><AD_COLUMN> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_COLUMN_ID><![CDATA[41A04F8D547446C4B576553F7E2923C2]]></AD_COLUMN_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--41A04F8D547446C4B576553F7E2923C2--> <NAME><![CDATA[Finishes_Time]]></NAME> +<!--41A04F8D547446C4B576553F7E2923C2--> <COLUMNNAME><![CDATA[Finishes_Time]]></COLUMNNAME> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_TABLE_ID><![CDATA[800062]]></AD_TABLE_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_REFERENCE_ID><![CDATA[24]]></AD_REFERENCE_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISKEY><![CDATA[N]]></ISKEY> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISMANDATORY><![CDATA[N]]></ISMANDATORY> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--41A04F8D547446C4B576553F7E2923C2--> <SEQNO><![CDATA[440]]></SEQNO> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_ELEMENT_ID><![CDATA[571984A637328AA9E040007F01011B27]]></AD_ELEMENT_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--41A04F8D547446C4B576553F7E2923C2--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <POSITION><![CDATA[48]]></POSITION> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--41A04F8D547446C4B576553F7E2923C2--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--41A04F8D547446C4B576553F7E2923C2--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--41A04F8D547446C4B576553F7E2923C2--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--41A04F8D547446C4B576553F7E2923C2--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--41A04F8D547446C4B576553F7E2923C2--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--41A04F8D547446C4B576553F7E2923C2--></AD_COLUMN> + <!--41F88DE1D95E4BDB8EEEEE8C78EA72AA--><AD_COLUMN> <!--41F88DE1D95E4BDB8EEEEE8C78EA72AA--> <AD_COLUMN_ID><![CDATA[41F88DE1D95E4BDB8EEEEE8C78EA72AA]]></AD_COLUMN_ID> <!--41F88DE1D95E4BDB8EEEEE8C78EA72AA--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -368669,6 +368705,42 @@ <!--DAC4572C7363492CADB4742107D17F18--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--DAC4572C7363492CADB4742107D17F18--></AD_COLUMN> +<!--DB0C61A62C834860A266DB8D4ED1C51E--><AD_COLUMN> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_COLUMN_ID><![CDATA[DB0C61A62C834860A266DB8D4ED1C51E]]></AD_COLUMN_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <NAME><![CDATA[Start_Time]]></NAME> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <COLUMNNAME><![CDATA[Start_Time]]></COLUMNNAME> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_TABLE_ID><![CDATA[800062]]></AD_TABLE_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_REFERENCE_ID><![CDATA[24]]></AD_REFERENCE_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISKEY><![CDATA[N]]></ISKEY> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISMANDATORY><![CDATA[N]]></ISMANDATORY> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <SEQNO><![CDATA[430]]></SEQNO> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_ELEMENT_ID><![CDATA[571984A637378AA9E040007F01011B27]]></AD_ELEMENT_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <POSITION><![CDATA[47]]></POSITION> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--DB0C61A62C834860A266DB8D4ED1C51E--></AD_COLUMN> + <!--DB141BB0EEE7482CB93C3B53A9DEF96C--><AD_COLUMN> <!--DB141BB0EEE7482CB93C3B53A9DEF96C--> <AD_COLUMN_ID><![CDATA[DB141BB0EEE7482CB93C3B53A9DEF96C]]></AD_COLUMN_ID> <!--DB141BB0EEE7482CB93C3B53A9DEF96C--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -375086,7 +375158,7 @@ <!--EDA2301E6E14420BBA6E6D35589B0824--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> <!--EDA2301E6E14420BBA6E6D35589B0824--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> <!--EDA2301E6E14420BBA6E6D35589B0824--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> -<!--EDA2301E6E14420BBA6E6D35589B0824--> <POSITION><![CDATA[43]]></POSITION> +<!--EDA2301E6E14420BBA6E6D35589B0824--> <POSITION><![CDATA[30]]></POSITION> <!--EDA2301E6E14420BBA6E6D35589B0824--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> <!--EDA2301E6E14420BBA6E6D35589B0824--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> <!--EDA2301E6E14420BBA6E6D35589B0824--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> --- a/src-db/database/sourcedata/AD_FIELD.xml +++ b/src-db/database/sourcedata/AD_FIELD.xml @@ -1,4 +1,4 @@ -<?xml version='1.0' encoding='UTF-8'?> +<?xml version="1.0" encoding="UTF-8"?> <data> <!--100--><AD_FIELD> <!--100--> <AD_FIELD_ID><![CDATA[100]]></AD_FIELD_ID> @@ -232382,6 +232382,33 @@ <!--6ED88E4100284BA3AA5C6B9D54EA55D4--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY> <!--6ED88E4100284BA3AA5C6B9D54EA55D4--></AD_FIELD> +<!--6EEE68410C664A3C9B707B721A8779F4--><AD_FIELD> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_FIELD_ID><![CDATA[6EEE68410C664A3C9B707B721A8779F4]]></AD_FIELD_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--6EEE68410C664A3C9B707B721A8779F4--> <NAME><![CDATA[Start Time]]></NAME> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_TAB_ID><![CDATA[800079]]></AD_TAB_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_COLUMN_ID><![CDATA[DB0C61A62C834860A266DB8D4ED1C51E]]></AD_COLUMN_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED> +<!--6EEE68410C664A3C9B707B721A8779F4--> <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISREADONLY><![CDATA[N]]></ISREADONLY> +<!--6EEE68410C664A3C9B707B721A8779F4--> <SEQNO><![CDATA[72]]></SEQNO> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISSAMELINE><![CDATA[N]]></ISSAMELINE> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--6EEE68410C664A3C9B707B721A8779F4--> <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <GRID_SEQNO><![CDATA[72]]></GRID_SEQNO> +<!--6EEE68410C664A3C9B707B721A8779F4--> <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN> +<!--6EEE68410C664A3C9B707B721A8779F4--> <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR> +<!--6EEE68410C664A3C9B707B721A8779F4--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY> +<!--6EEE68410C664A3C9B707B721A8779F4--></AD_FIELD> + <!--6F00EDF18AAB411DB92CAA824DA5153D--><AD_FIELD> <!--6F00EDF18AAB411DB92CAA824DA5153D--> <AD_FIELD_ID><![CDATA[6F00EDF18AAB411DB92CAA824DA5153D]]></AD_FIELD_ID> <!--6F00EDF18AAB411DB92CAA824DA5153D--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -310753,6 +310780,33 @@ <!--F647516E12FE4315B9E2054F647DC9E6--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY> <!--F647516E12FE4315B9E2054F647DC9E6--></AD_FIELD> +<!--F65DF8ED04CF4883A7307FABD1213AF0--><AD_FIELD> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_FIELD_ID><![CDATA[F65DF8ED04CF4883A7307FABD1213AF0]]></AD_FIELD_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <NAME><![CDATA[Finish Time]]></NAME> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_TAB_ID><![CDATA[800079]]></AD_TAB_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_COLUMN_ID><![CDATA[41A04F8D547446C4B576553F7E2923C2]]></AD_COLUMN_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISREADONLY><![CDATA[N]]></ISREADONLY> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <SEQNO><![CDATA[74]]></SEQNO> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISSAMELINE><![CDATA[N]]></ISSAMELINE> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <GRID_SEQNO><![CDATA[74]]></GRID_SEQNO> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY> +<!--F65DF8ED04CF4883A7307FABD1213AF0--></AD_FIELD> + <!--F665B3375D394ACD841413C3DF3AF5FD--><AD_FIELD> <!--F665B3375D394ACD841413C3DF3AF5FD--> <AD_FIELD_ID><![CDATA[F665B3375D394ACD841413C3DF3AF5FD]]></AD_FIELD_ID> <!--F665B3375D394ACD841413C3DF3AF5FD--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> --- a/src-db/database/model/functions/M_PROMOTION_CALCULATE.xml +++ a/src-db/database/functions/M_PROMOTION_CALCULATE.xml @@ -27,6 +27,7 @@ * Contributor(s): ______________________________________. ************************************************************************/ v_date DATE; + v_created DATE; v_partner VARCHAR2(32); v_priceList VARCHAR2(32); v_method VARCHAR(200); @@ -48,9 +49,9 @@ BEGIN if (p_type = 'O') then select o.c_bpartner_id, o.m_priceList_id, o.dateordered, - c.priceprecision, c.stdPrecision, pl.isTaxIncluded + c.priceprecision, c.stdPrecision, pl.isTaxIncluded, o.created into v_partner, v_priceList, v_date, - v_precision, v_stdPrecision, v_taxIncluded + v_precision, v_stdPrecision, v_taxIncluded, v_created from C_Order o, c_currency c, m_priceList pl where C_Order_ID = p_doc_id and c.C_Currency_ID = o.C_Currency_ID @@ -67,9 +68,9 @@ end if; select o.c_bpartner_id, o.m_priceList_id, o.dateinvoiced, - c.priceprecision, c.stdPrecision, pl.isTaxIncluded + c.priceprecision, c.stdPrecision, pl.isTaxIncluded, o.created into v_partner, v_priceList, v_date, - v_precision, v_stdPrecision, v_taxIncluded + v_precision, v_stdPrecision, v_taxIncluded, v_created from C_Invoice o, c_currency c, m_priceList pl where C_Invoice_ID = p_doc_id and c.C_Currency_ID = o.C_Currency_ID @@ -104,6 +105,8 @@ from m_offer where isactive = 'Y' and v_date between DateFrom and coalesce(DateTo, TO_DATE('31-12-9999', 'DD-MM-YYYY')) + and ( coalesce(start_time,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) + and ( coalesce(created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(finishes_time,to_timestamp('23:59:59.99', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) and AD_Client_ID = Cur_Order.AD_Client_ID and M_Offer_Type_ID = '5D4BAF6BB86D4D2C9ED3D5A6FC051579'; end if; @@ -138,6 +141,8 @@ from m_offer where isactive = 'Y' and v_date between DateFrom and coalesce(DateTo, TO_DATE('31-12-9999', 'DD-MM-YYYY')) + and (coalesce(start_time,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) + and ( coalesce(created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(finishes_time,to_timestamp('23:59:59.99', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) and AD_Client_ID = Cur_Order.AD_Client_ID and M_Offer_Type_ID = '5D4BAF6BB86D4D2C9ED3D5A6FC051579'; end if; @@ -209,6 +214,8 @@ (SELECT M_OFFER_ID, t.PL_Order_Implementor FROM M_OFFER, M_Offer_Type t WHERE v_date BETWEEN DATEFROM AND COALESCE(DATETO, TO_DATE('31-12-9999', 'DD-MM-YYYY')) + and (coalesce(start_time,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) + and ( coalesce(created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(finishes_time,to_timestamp('23:59:59.99', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) AND M_OFFER.AD_Client_ID = Cur_Order.AD_Client_ID AND M_OFFER.IsActive = 'Y' AND t.M_Offer_Type_ID = M_Offer.M_Offer_Type_ID disc_webpos.diff [^] (1,500 bytes) 2017-05-23 17:53 [Show Content] [Hide Content] --- a/modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/model/executor.js +++ b/modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/model/executor.js @@ -193,6 +193,8 @@ }, createActions: function (evt) { + var date = new Date(evt.get('receipt').get('orderDate')); + var created = date.getUTCHours()+':'+date.getUTCMinutes()+':'+date.getUTCSeconds(); var line = evt.get('line'), receipt = evt.get('receipt'), bpId = receipt.get('bp').id, @@ -201,6 +203,8 @@ me = this, criteria, t0 = new Date().getTime(), whereClause = OB.Model.Discounts.computeStandardFilter(receipt) // + + " AND (coalesce(start_time, '00:00:00' )<= coalesce('"+created+"','00:00:00' ) ) " // + + " AND (coalesce('"+created+"','00:00:00') <= coalesce(finishes_time,'23:59:59.00' ) ) " // + " AND M_OFFER_TYPE_ID NOT IN (" + OB.Model.Discounts.getManualPromotions() + ")" // + " AND ((EM_OBDISC_ROLE_SELECTION = 'Y' AND NOT EXISTS (SELECT 1 FROM OBDISC_OFFER_ROLE WHERE M_OFFER_ID = M_OFFER.M_OFFER_ID " + " AND AD_ROLE_ID = '" + OB.MobileApp.model.get('context').role.id + "')) OR (EM_OBDISC_ROLE_SELECTION = 'N' " // + " AND EXISTS (SELECT 1 FROM OBDISC_OFFER_ROLE WHERE M_OFFER_ID = M_OFFER.M_OFFER_ID " // @@ -235,6 +239,7 @@ }); }, + applyRule: function (disc, evt, promCandidates) { var receipt = evt.get('receipt'), line = evt.get('line'), disc_core1.diff [^] (19,599 bytes) 2017-09-14 09:44 [Show Content] [Hide Content] --- a/src-db/database/model/tables/M_OFFER.xml +++ a/src-db/database/model/tables/M_OFFER.xml @@ -121,6 +121,14 @@ <default><![CDATA[Y]]></default> <onCreateDefault><![CDATA['Y']]></onCreateDefault> </column> + <column name="START_TIME" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> + <column name="FINISHES_TIME" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> <foreign-key foreignTable="AD_CLIENT" name="M_OFFER_AD_CLIENT"> <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/> </foreign-key> --- a/src-db/database/sourcedata/AD_FIELD.xml +++ a/src-db/database/sourcedata/AD_FIELD.xml @@ -232382,6 +232382,33 @@ <!--6ED88E4100284BA3AA5C6B9D54EA55D4--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY> <!--6ED88E4100284BA3AA5C6B9D54EA55D4--></AD_FIELD> +<!--6EEE68410C664A3C9B707B721A8779F4--><AD_FIELD> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_FIELD_ID><![CDATA[6EEE68410C664A3C9B707B721A8779F4]]></AD_FIELD_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--6EEE68410C664A3C9B707B721A8779F4--> <NAME><![CDATA[Start Time]]></NAME> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_TAB_ID><![CDATA[800079]]></AD_TAB_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_COLUMN_ID><![CDATA[DB0C61A62C834860A266DB8D4ED1C51E]]></AD_COLUMN_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED> +<!--6EEE68410C664A3C9B707B721A8779F4--> <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISREADONLY><![CDATA[N]]></ISREADONLY> +<!--6EEE68410C664A3C9B707B721A8779F4--> <SEQNO><![CDATA[72]]></SEQNO> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISSAMELINE><![CDATA[N]]></ISSAMELINE> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--6EEE68410C664A3C9B707B721A8779F4--> <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD> +<!--6EEE68410C664A3C9B707B721A8779F4--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--6EEE68410C664A3C9B707B721A8779F4--> <GRID_SEQNO><![CDATA[72]]></GRID_SEQNO> +<!--6EEE68410C664A3C9B707B721A8779F4--> <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN> +<!--6EEE68410C664A3C9B707B721A8779F4--> <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE> +<!--6EEE68410C664A3C9B707B721A8779F4--> <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR> +<!--6EEE68410C664A3C9B707B721A8779F4--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY> +<!--6EEE68410C664A3C9B707B721A8779F4--></AD_FIELD> + <!--6F00EDF18AAB411DB92CAA824DA5153D--><AD_FIELD> <!--6F00EDF18AAB411DB92CAA824DA5153D--> <AD_FIELD_ID><![CDATA[6F00EDF18AAB411DB92CAA824DA5153D]]></AD_FIELD_ID> <!--6F00EDF18AAB411DB92CAA824DA5153D--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -310753,6 +310780,33 @@ <!--F647516E12FE4315B9E2054F647DC9E6--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY> <!--F647516E12FE4315B9E2054F647DC9E6--></AD_FIELD> +<!--F65DF8ED04CF4883A7307FABD1213AF0--><AD_FIELD> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_FIELD_ID><![CDATA[F65DF8ED04CF4883A7307FABD1213AF0]]></AD_FIELD_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <NAME><![CDATA[Finish Time]]></NAME> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_TAB_ID><![CDATA[800079]]></AD_TAB_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_COLUMN_ID><![CDATA[41A04F8D547446C4B576553F7E2923C2]]></AD_COLUMN_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISREADONLY><![CDATA[N]]></ISREADONLY> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <SEQNO><![CDATA[74]]></SEQNO> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISSAMELINE><![CDATA[N]]></ISSAMELINE> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <GRID_SEQNO><![CDATA[74]]></GRID_SEQNO> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR> +<!--F65DF8ED04CF4883A7307FABD1213AF0--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY> +<!--F65DF8ED04CF4883A7307FABD1213AF0--></AD_FIELD> + <!--F665B3375D394ACD841413C3DF3AF5FD--><AD_FIELD> <!--F665B3375D394ACD841413C3DF3AF5FD--> <AD_FIELD_ID><![CDATA[F665B3375D394ACD841413C3DF3AF5FD]]></AD_FIELD_ID> <!--F665B3375D394ACD841413C3DF3AF5FD--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> --- a/src-db/database/sourcedata/AD_COLUMN.xml +++ a/src-db/database/sourcedata/AD_COLUMN.xml @@ -262165,6 +262165,42 @@ <!--411B6E7873FC4939906984022DDF9F6D--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--411B6E7873FC4939906984022DDF9F6D--></AD_COLUMN> +<!--41A04F8D547446C4B576553F7E2923C2--><AD_COLUMN> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_COLUMN_ID><![CDATA[41A04F8D547446C4B576553F7E2923C2]]></AD_COLUMN_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--41A04F8D547446C4B576553F7E2923C2--> <NAME><![CDATA[Finishes_Time]]></NAME> +<!--41A04F8D547446C4B576553F7E2923C2--> <COLUMNNAME><![CDATA[Finishes_Time]]></COLUMNNAME> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_TABLE_ID><![CDATA[800062]]></AD_TABLE_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_REFERENCE_ID><![CDATA[24]]></AD_REFERENCE_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISKEY><![CDATA[N]]></ISKEY> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISMANDATORY><![CDATA[N]]></ISMANDATORY> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--41A04F8D547446C4B576553F7E2923C2--> <SEQNO><![CDATA[440]]></SEQNO> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_ELEMENT_ID><![CDATA[571984A637328AA9E040007F01011B27]]></AD_ELEMENT_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--41A04F8D547446C4B576553F7E2923C2--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--41A04F8D547446C4B576553F7E2923C2--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--41A04F8D547446C4B576553F7E2923C2--> <POSITION><![CDATA[48]]></POSITION> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--41A04F8D547446C4B576553F7E2923C2--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--41A04F8D547446C4B576553F7E2923C2--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--41A04F8D547446C4B576553F7E2923C2--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--41A04F8D547446C4B576553F7E2923C2--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--41A04F8D547446C4B576553F7E2923C2--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--41A04F8D547446C4B576553F7E2923C2--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--41A04F8D547446C4B576553F7E2923C2--></AD_COLUMN> + <!--41F88DE1D95E4BDB8EEEEE8C78EA72AA--><AD_COLUMN> <!--41F88DE1D95E4BDB8EEEEE8C78EA72AA--> <AD_COLUMN_ID><![CDATA[41F88DE1D95E4BDB8EEEEE8C78EA72AA]]></AD_COLUMN_ID> <!--41F88DE1D95E4BDB8EEEEE8C78EA72AA--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -368669,6 +368705,42 @@ <!--DAC4572C7363492CADB4742107D17F18--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--DAC4572C7363492CADB4742107D17F18--></AD_COLUMN> +<!--DB0C61A62C834860A266DB8D4ED1C51E--><AD_COLUMN> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_COLUMN_ID><![CDATA[DB0C61A62C834860A266DB8D4ED1C51E]]></AD_COLUMN_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <NAME><![CDATA[Start_Time]]></NAME> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <COLUMNNAME><![CDATA[Start_Time]]></COLUMNNAME> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_TABLE_ID><![CDATA[800062]]></AD_TABLE_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_REFERENCE_ID><![CDATA[24]]></AD_REFERENCE_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISKEY><![CDATA[N]]></ISKEY> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISMANDATORY><![CDATA[N]]></ISMANDATORY> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <SEQNO><![CDATA[430]]></SEQNO> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_ELEMENT_ID><![CDATA[571984A637378AA9E040007F01011B27]]></AD_ELEMENT_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <POSITION><![CDATA[47]]></POSITION> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--DB0C61A62C834860A266DB8D4ED1C51E--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--DB0C61A62C834860A266DB8D4ED1C51E--></AD_COLUMN> + <!--DB141BB0EEE7482CB93C3B53A9DEF96C--><AD_COLUMN> <!--DB141BB0EEE7482CB93C3B53A9DEF96C--> <AD_COLUMN_ID><![CDATA[DB141BB0EEE7482CB93C3B53A9DEF96C]]></AD_COLUMN_ID> <!--DB141BB0EEE7482CB93C3B53A9DEF96C--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -375086,7 +375158,7 @@ <!--EDA2301E6E14420BBA6E6D35589B0824--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> <!--EDA2301E6E14420BBA6E6D35589B0824--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> <!--EDA2301E6E14420BBA6E6D35589B0824--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> -<!--EDA2301E6E14420BBA6E6D35589B0824--> <POSITION><![CDATA[43]]></POSITION> +<!--EDA2301E6E14420BBA6E6D35589B0824--> <POSITION><![CDATA[30]]></POSITION> <!--EDA2301E6E14420BBA6E6D35589B0824--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> <!--EDA2301E6E14420BBA6E6D35589B0824--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> <!--EDA2301E6E14420BBA6E6D35589B0824--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> --- a/src-db/database/model/functions/M_PROMOTION_CALCULATE.xml +++ a/src-db/database/model/functions/M_PROMOTION_CALCULATE.xml @@ -27,6 +27,7 @@ * Contributor(s): ______________________________________. ************************************************************************/ v_date DATE; + v_created DATE; v_partner VARCHAR2(32); v_priceList VARCHAR2(32); v_method VARCHAR(200); @@ -48,9 +49,11 @@ BEGIN if (p_type = 'O') then select o.c_bpartner_id, o.m_priceList_id, o.dateordered, - c.priceprecision, c.stdPrecision, pl.isTaxIncluded - into v_partner, v_priceList, v_date, - v_precision, v_stdPrecision, v_taxIncluded +-- c.priceprecision, c.stdPrecision, pl.isTaxIncluded + c.priceprecision, c.stdPrecision, pl.isTaxIncluded, o.created + into v_partner, v_priceList, v_date, +-- v_precision, v_stdPrecision, v_taxIncluded + v_precision, v_stdPrecision, v_taxIncluded, v_created from C_Order o, c_currency c, m_priceList pl where C_Order_ID = p_doc_id and c.C_Currency_ID = o.C_Currency_ID @@ -67,9 +70,11 @@ end if; select o.c_bpartner_id, o.m_priceList_id, o.dateinvoiced, - c.priceprecision, c.stdPrecision, pl.isTaxIncluded +-- c.priceprecision, c.stdPrecision, pl.isTaxIncluded + c.priceprecision, c.stdPrecision, pl.isTaxIncluded, o.created into v_partner, v_priceList, v_date, - v_precision, v_stdPrecision, v_taxIncluded +-- v_precision, v_stdPrecision, v_taxIncluded + v_precision, v_stdPrecision, v_taxIncluded, v_created from C_Invoice o, c_currency c, m_priceList pl where C_Invoice_ID = p_doc_id and c.C_Currency_ID = o.C_Currency_ID @@ -104,6 +109,8 @@ from m_offer where isactive = 'Y' and v_date between DateFrom and coalesce(DateTo, TO_DATE('31-12-9999', 'DD-MM-YYYY')) + and ( coalesce(start_time,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(v_created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) + and ( coalesce(v_created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(finishes_time,to_timestamp('23:59:59.99', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) and AD_Client_ID = Cur_Order.AD_Client_ID and M_Offer_Type_ID = '5D4BAF6BB86D4D2C9ED3D5A6FC051579'; end if; @@ -138,6 +145,8 @@ from m_offer where isactive = 'Y' and v_date between DateFrom and coalesce(DateTo, TO_DATE('31-12-9999', 'DD-MM-YYYY')) + and (coalesce(start_time,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(v_created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) + and ( coalesce(v_created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(finishes_time,to_timestamp('23:59:59.99', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) and AD_Client_ID = Cur_Order.AD_Client_ID and M_Offer_Type_ID = '5D4BAF6BB86D4D2C9ED3D5A6FC051579'; end if; @@ -209,6 +218,8 @@ (SELECT M_OFFER_ID, t.PL_Order_Implementor FROM M_OFFER, M_Offer_Type t WHERE v_date BETWEEN DATEFROM AND COALESCE(DATETO, TO_DATE('31-12-9999', 'DD-MM-YYYY')) + and (coalesce(start_time,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(v_created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) + and ( coalesce(v_created,to_timestamp('00:00:00', 'HH24-MM-SS.MS')::timestamp without time zone)::time <= coalesce(finishes_time,to_timestamp('23:59:59.99', 'HH24-MM-SS.MS')::timestamp without time zone)::time ) AND M_OFFER.AD_Client_ID = Cur_Order.AD_Client_ID AND M_OFFER.IsActive = 'Y' AND t.M_Offer_Type_ID = M_Offer.M_Offer_Type_ID --- a/modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/model/executor.js +++ b/modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/model/executor.js @@ -193,6 +193,21 @@ }, createActions: function (evt) { + var dateordered = new Date(evt.get('receipt').get('orderDate')).toISOString(); + var created =""; + var qryHours = ""; + try { + var hourIni = dateordered.indexOf("T"); + var hourEnd = dateordered.indexOf("Z"); + if ((hourIni>0) && (hourEnd>0)) { + created = dateordered.substring(hourIni+1,hourIni+9); + qryHours = " AND ( strftime('%s',coalesce(start_time, '00:00:00' )) <= strftime('%s',coalesce('"+created+"','00:00:00' )) "; + qryHours += " AND strftime('%s',coalesce('"+created+"','00:00:00')) <= strftime('%s',coalesce(finishes_time,'23:59:59.99' )) ) "; + } + } + catch (ex) { + qryHours = "" + } var line = evt.get('line'), receipt = evt.get('receipt'), bpId = receipt.get('bp').id, @@ -201,6 +216,7 @@ me = this, criteria, t0 = new Date().getTime(), whereClause = OB.Model.Discounts.computeStandardFilter(receipt) // + + qryHours + " AND M_OFFER_TYPE_ID NOT IN (" + OB.Model.Discounts.getManualPromotions() + ")" // + " AND ((EM_OBDISC_ROLE_SELECTION = 'Y' AND NOT EXISTS (SELECT 1 FROM OBDISC_OFFER_ROLE WHERE M_OFFER_ID = M_OFFER.M_OFFER_ID " + " AND AD_ROLE_ID = '" + OB.MobileApp.model.get('context').role.id + "')) OR (EM_OBDISC_ROLE_SELECTION = 'N' " // + " AND EXISTS (SELECT 1 FROM OBDISC_OFFER_ROLE WHERE M_OFFER_ID = M_OFFER.M_OFFER_ID " // | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Issue History | |||
Date Modified | Username | Field | Change |
2017-05-23 17:51 | malsasua | New Issue | |
2017-05-23 17:51 | malsasua | Assigned To | => Retail |
2017-05-23 17:51 | malsasua | Triggers an Emergency Pack | => No |
2017-05-23 17:52 | malsasua | Description Updated | View Revisions |
2017-05-23 17:53 | malsasua | File Added: disc_core.diff | |
2017-05-23 17:53 | malsasua | File Added: disc_webpos.diff | |
2017-05-23 18:07 | heccam | Issue Monitored: heccam | |
2017-09-14 09:44 | malsasua | File Added: disc_core1.diff | |
2017-09-14 09:45 | malsasua | Note Added: 0099028 |
Copyright © 2000 - 2009 MantisBT Group |