Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2012-11-06 10:26:59 +01:00
commit 46d49932fc
3 changed files with 28 additions and 16 deletions

View File

@ -15,18 +15,24 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
report.customize_filters = function() {
this.mytabs.items['Select Columns'].hide();
this.mytabs.tabs['More Filters'].hide();
this.hide_all_filters();
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'ID'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note Item'+FILTER_SEP +'Item Code'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
this.mytabs.items['Select Columns'].hide();
this.mytabs.tabs['More Filters'].hide();
this.hide_all_filters();
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'ID'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note Item'+FILTER_SEP +'Item Code'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'ID'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'ID'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note' + FILTER_SEP +
'From Posting Date'].df['report_default'] = sys_defaults["year_start_date"]
this.filter_fields_dict['Delivery Note' + FILTER_SEP +
'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
}

View File

@ -14,10 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from webnotes.utils import flt
if not (filter_values.get('posting_date') or filter_values.get('posting_date1')):
msgprint("Please select From and To Posting Date", raise_exception=1)
columns = [
['Delivery Note', 'Link', '120px', 'Delivery Note'],
['Posting Date', 'Date', '120px', ''],

View File

@ -5,6 +5,10 @@ SELECT
FROM
`tabDelivery Note Item` dn_item, `tabDelivery Note` dn
WHERE
dn.docstatus = 1
AND dn_item.parent = dn.name
dn_item.parent = dn.name
AND dn.docstatus = 1
AND dn.name like '%(name)s%%'
AND dn_item.item_code like '%(item_code)s%%'
AND dn.posting_date >= '%(posting_date)s'
AND dn.posting_date <= '%(posting_date1)s'
ORDER BY dn.name DESC