Line 69: | Line 69: | ||
* Make sure the script is <span style="color:#0000ff">1 line ONLY</span> | * Make sure the script is <span style="color:#0000ff">1 line ONLY</span> | ||
=== | ===Today Only for Sales Invoice=== | ||
<pre> | <pre> | ||
(SL_IV.DOCDATE = CAST('Today' AS DATE)) | (SL_IV.DOCDATE = CAST('Today' AS DATE)) | ||
Line 75: | Line 75: | ||
<div style="float: right;"> [[#top|[top]]]</div> | <div style="float: right;"> [[#top|[top]]]</div> | ||
=== | ===Current Month Only for Sales Invoice=== | ||
<pre> | <pre> | ||
EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE)) | EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE)) | ||
Line 82: | Line 82: | ||
<div style="float: right;"> [[#top|[top]]]</div> | <div style="float: right;"> [[#top|[top]]]</div> | ||
=== | ===Last Month & Current Month for Sales Invoice=== | ||
<pre> | <pre> | ||
EXTRACT(Month FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN 12 ELSE EXTRACT(Month FROM CAST('Today' AS DATE)) -1 END) AND EXTRACT(Year FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN EXTRACT(Year FROM CAST('Today' AS DATE)) -1 ELSE EXTRACT(Year FROM CAST('Today' AS DATE)) END) OR EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE)) | EXTRACT(Month FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN 12 ELSE EXTRACT(Month FROM CAST('Today' AS DATE)) -1 END) AND EXTRACT(Year FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN EXTRACT(Year FROM CAST('Today' AS DATE)) -1 ELSE EXTRACT(Year FROM CAST('Today' AS DATE)) END) OR EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE)) | ||
Line 88: | Line 88: | ||
<div style="float: right;"> [[#top|[top]]]</div> | <div style="float: right;"> [[#top|[top]]]</div> | ||
==See also== | ==See also== | ||
* [[User Access Right Assignment (Acc)]] | * [[User Access Right Assignment (Acc)]] |
Revision as of 07:27, 7 April 2020
Menu: Tools | Form Mode...
Introduction
- 1. It helps to filter the data based on the conditions defined.
- 2. It is very useful for those who DO NOT ALLOW certain users to access the documents.
- 3. For example, agent Lip Fong' can view and access the sales invoices belong to his agent code LF ONLY.
Maintain Form Mode (eg. Filtered by Agent)
Options Explanation Allow Multiple Windows To allow duplicate Windows screen by click from the menu list. Force Filter Force filter. Split Browse & Detail Windows Enable to split the Windows when click on Browse and Detail button. Default Windows
* Browse
* DetailTo set the default mode.
- 10. Lets said you have created more than 1 form mode for same form (eg.invoice). Go to Sales | Invoice, you will get prompt the select browse mode to choose. See the screenshot below.
How to lock the form mode by Agent
- 1. Go to Tools | User Access Right Assignment...
- 2. Under the list of security, click on form mode.
- 3. Select the user, eg. user code: LF (Lip Fong).
- 4. Tick to allow execute the form mode, eg. tick on form mode: IV-LF.
- 5. Click Save. See the screenshot below.
- 6. Login the user as LF.
- 7. Go to Sales | Invoice...
- 8. User LF can see the invoices belong to his agent code: LF.
Other Form Mode/Filter
- Make sure the script is 1 line ONLY
Today Only for Sales Invoice
(SL_IV.DOCDATE = CAST('Today' AS DATE))
Current Month Only for Sales Invoice
EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE))
Last Month & Current Month for Sales Invoice
EXTRACT(Month FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN 12 ELSE EXTRACT(Month FROM CAST('Today' AS DATE)) -1 END) AND EXTRACT(Year FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN EXTRACT(Year FROM CAST('Today' AS DATE)) -1 ELSE EXTRACT(Year FROM CAST('Today' AS DATE)) END) OR EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE))