From 7fca9e617d9f6ee598cf02d5b093ce181c7f7c13 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 13 Apr 2012 12:18:06 +0530 Subject: [PATCH] fixes in global defaults --- css/all-app.css | 4 ++-- .../purchase_in_transit/purchase_in_transit.txt | 8 ++++---- erpnext/setup/doctype/global_defaults/global_defaults.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/css/all-app.css b/css/all-app.css index a87b4baa8e..85bea74aea 100644 --- a/css/all-app.css +++ b/css/all-app.css @@ -330,7 +330,7 @@ div.notice { div.form-title { /*background-color: #e0eeff;*/ - padding: 5px 19px 15px 19px; + padding: 5px 11px 15px 11px; margin: -15px -15px 0px -15px; border-bottom: 1px solid #eee; } @@ -338,7 +338,7 @@ div.form-title { div.form-section-head { margin: 11px -15px 3px -15px; border-top: 1px solid #ccc; - padding: 11px 23px 0px 23px; + padding: 11px 15px 0px 15px; } div.form-layout-row:first-child .form-section-head { diff --git a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt index 9009ccf774..e49ea0bf6a 100644 --- a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt +++ b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-04-03 12:49:52', + 'creation': '2012-04-11 13:16:55', 'docstatus': 0, - 'modified': '2012-04-03 12:49:52', + 'modified': '2012-04-13 12:06:15', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -15,13 +15,13 @@ 'add_col': u"`tabPurchase Receipt`.`posting_date` AS 'PR Posting Date'", 'add_cond': u"`tabPurchase Invoice Item`.`purchase_receipt` = `tabPurchase Receipt`.`name`\n`tabPurchase Receipt`.`posting_date` >= '%(pr_posting_date)s'\n`tabPurchase Receipt`.`posting_date` <= '%(pr_posting_date1)s'\n`tabPurchase Receipt`.`posting_date` > `tabPurchase Invoice`.`posting_date`", 'add_tab': u'`tabPurchase Receipt`', - 'columns': u'Purchase Invoice\x01ID,Purchase Invoice\x01Voucher Date,Purchase Invoice\x01Posting Date,Purchase Invoice\x01Credit To,Purchase Invoice Item\x01Rate,Purchase Invoice Item\x01Qty,Purchase Invoice Item\x01Amount,Purchase Invoice Item\x01Pur Order,Purchase Invoice Item\x01Pur Receipt', + 'columns': u'Purchase Invoice\x01ID,Purchase Invoice\x01Posting Date,Purchase Invoice\x01Credit To,Purchase Invoice Item\x01Qty,Purchase Invoice Item\x01Amount,Purchase Invoice Item\x01Pur Order,Purchase Invoice Item\x01Pur Receipt', 'criteria_name': u'Purchase in Transit', 'description': u'List of PR whose posting date is after PV posting date', 'dis_filters': u'`tabPurchase Receipt`.`pr_posting_date`', 'doc_type': u'Purchase Invoice Item', 'doctype': 'Search Criteria', - 'filters': u"{'Purchase Invoice\x01Submitted':1,'Purchase Invoice\x01From Posting Date\x01lower':'2009-04-01','Purchase Invoice\x01To Posting Date\x01upper':'2010-01-11','Purchase Invoice\x01Is Opening':'','Purchase Invoice\x01Fiscal Year':'','Purchase Invoice\x01Company':'','Purchase Receipt\x01From PR Posting Date\x01lower':'2009-04-01','Purchase Receipt\x01To PR Posting Date\x01upper':'2010-01-11'}", + 'filters': u'{"Purchase Invoice\\u0001Submitted":1,"Purchase Invoice\\u0001Is Opening":[""],"Purchase Invoice\\u0001Fiscal Year":[""]}', 'module': u'Buying', 'name': '__common__', 'page_len': 50, diff --git a/erpnext/setup/doctype/global_defaults/global_defaults.py b/erpnext/setup/doctype/global_defaults/global_defaults.py index 15700e89c4..41b3429ec9 100644 --- a/erpnext/setup/doctype/global_defaults/global_defaults.py +++ b/erpnext/setup/doctype/global_defaults/global_defaults.py @@ -56,7 +56,7 @@ class DocType: # update year start date and year end date from fiscal_year ysd = webnotes.conn.sql("""select year_start_date from `tabFiscal Year` - where name=%s""", self.doc.fiscal_year) + where name=%s""", self.doc.current_fiscal_year) ysd = ysd and ysd[0][0] or '' from webnotes.utils import get_first_day, get_last_day @@ -66,4 +66,4 @@ class DocType: get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d')) def get_defaults(self): - return webnotes.conn.get_defaults() \ No newline at end of file + return webnotes.conn.get_defaults()