From 7fca9e617d9f6ee598cf02d5b093ce181c7f7c13 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 13 Apr 2012 12:18:06 +0530 Subject: [PATCH 1/3] 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() From b641ed2a1eff0354fb168e3e9b9e1166fc8f8013 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 13 Apr 2012 12:27:56 +0530 Subject: [PATCH 2/3] Added doc_type to JV Print Formats --- .../Cheque Printing Format.txt | 17 +++++++++-------- .../Payment Receipt Voucher.txt | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/erpnext/accounts/Print Format/Cheque Printing Format/Cheque Printing Format.txt b/erpnext/accounts/Print Format/Cheque Printing Format/Cheque Printing Format.txt index aa903116e0..e3355ec8b8 100755 --- a/erpnext/accounts/Print Format/Cheque Printing Format/Cheque Printing Format.txt +++ b/erpnext/accounts/Print Format/Cheque Printing Format/Cheque Printing Format.txt @@ -3,25 +3,26 @@ # These values are common in all dictionaries { - 'creation': '2011-03-28 15:17:25', + 'creation': '2012-04-11 13:16:56', 'docstatus': 0, - 'modified': '2011-03-28 12:33:24', - 'modified_by': 'umair@iwebnotes.com', - 'owner': 'Administrator' + 'modified': '2012-04-13 12:24:20', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all Print Format { + 'doc_type': u'Journal Voucher', 'doctype': 'Print Format', - 'html': '\n
\n



\n
\nPAYMENT ADVICE

\n\n\n\n\n\n\n\n
To :
\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Voucher No :\n\n
Voucher Date :\n\n
Cheque No :\n\n
Cheque Date :\n\n
\n
\n
We are pleased to enclose our cheque in full/part Settlement of your under noted bills
\n
\n\n\n\n\n\n\n\n\n\n\n\n
 Total :\n\n
Narration :\n\n


\n
Prepared By
\n
Authorised Signatory
\n
Received Payment as Above
\n
_____________
\n
A/c Payee
\n
_____________
\n
\n\n
\n
\n\n
\n
\n\n
\n
\n\n
\n
', - 'module': 'Accounts', + 'html': u'\n
\n



\n
\nPAYMENT ADVICE

\n\n\n\n\n\n\n\n
To :
\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Voucher No :\n\n
Voucher Date :\n\n
Cheque No :\n\n
Cheque Date :\n\n
\n
\n
We are pleased to enclose our cheque in full/part Settlement of your under noted bills
\n
\n\n\n\n\n\n\n\n\n\n\n\n
 Total :\n\n
Narration :\n\n


\n
Prepared By
\n
Authorised Signatory
\n
Received Payment as Above
\n
_____________
\n
A/c Payee
\n
_____________
\n
\n\n
\n
\n\n
\n
\n\n
\n
\n\n
\n
', + 'module': u'Accounts', 'name': '__common__', - 'standard': 'Yes' + 'standard': u'Yes' }, # Print Format, Cheque Printing Format { 'doctype': 'Print Format', - 'name': 'Cheque Printing Format' + 'name': u'Cheque Printing Format' } ] \ No newline at end of file diff --git a/erpnext/accounts/Print Format/Payment Receipt Voucher/Payment Receipt Voucher.txt b/erpnext/accounts/Print Format/Payment Receipt Voucher/Payment Receipt Voucher.txt index 932df2e5d6..4b56d7256e 100755 --- a/erpnext/accounts/Print Format/Payment Receipt Voucher/Payment Receipt Voucher.txt +++ b/erpnext/accounts/Print Format/Payment Receipt Voucher/Payment Receipt Voucher.txt @@ -3,25 +3,26 @@ # These values are common in all dictionaries { - 'creation': '2011-03-28 15:17:25', + 'creation': '2012-04-11 13:16:56', 'docstatus': 0, - 'modified': '2011-03-28 12:31:40', - 'modified_by': 'umair@iwebnotes.com', - 'owner': 'Administrator' + 'modified': '2012-04-13 12:24:59', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all Print Format { + 'doc_type': u'Journal Voucher', 'doctype': 'Print Format', - 'html': '
\n

\n

\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n
Receipt No.:
Date :
Remark:
Received From:
\n
\n\n

\n

\n
This receipt is issued subject to realization of the Cheque
\n
\n
\n\n\n\n\n

For ,


(Authorised Signatory)
', - 'module': 'Accounts', + 'html': u'
\n

\n

\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n
Receipt No.:
Date :
Remark:
Received From:
\n
\n\n

\n

\n
This receipt is issued subject to realization of the Cheque
\n
\n
\n\n\n\n\n

For ,


(Authorised Signatory)
', + 'module': u'Accounts', 'name': '__common__', - 'standard': 'Yes' + 'standard': u'Yes' }, # Print Format, Payment Receipt Voucher { 'doctype': 'Print Format', - 'name': 'Payment Receipt Voucher' + 'name': u'Payment Receipt Voucher' } ] \ No newline at end of file From 3abe9bd01899f2c76f8bac886bd907233e8fe46f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 13 Apr 2012 12:36:44 +0530 Subject: [PATCH 3/3] fixes in fieldnames and hide unnecessary fields in jv --- erpnext/accounts/doctype/account/account.js | 6 +- .../journal_voucher/journal_voucher.txt | 60 +++++++++---------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js index 640e2a9c22..501ae40720 100644 --- a/erpnext/accounts/doctype/account/account.js +++ b/erpnext/accounts/doctype/account/account.js @@ -33,9 +33,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { // hide India specific fields var cp = wn.control_panel; if(cp.country == 'India') - unhide_field(['pan_number', 'tds_applicable', 'tds_details', 'TDS']); + unhide_field(['pan_number', 'tds_applicable', 'tds_details', 'tds']); else - hide_field(['pan_number', 'tds_applicable', 'tds_details', 'TDS']); + hide_field(['pan_number', 'tds_applicable', 'tds_details', 'tds']); } // Refresh @@ -50,7 +50,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { // Hide/unhide group or ledger // ----------------------------------------- cur_frm.cscript.hide_unhide_group_ledger = function(doc) { - hide_field(['Convert to Group', 'Convert to Ledger']); + hide_field(['convert_to_group', 'convert_to_ledger']); if (cstr(doc.group_or_ledger) == 'Group') unhide_field('convert_to_ledger'); else if (cstr(doc.group_or_ledger) == 'Ledger') unhide_field('convert_to_ledger'); } diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt b/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt index dedd2f916a..97055f3be0 100644 --- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt +++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-03-27 14:35:43', + 'creation': '2012-04-13 11:55:50', 'docstatus': 0, - 'modified': '2012-03-27 14:45:48', + 'modified': '2012-04-13 12:28:24', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -25,7 +25,7 @@ 'show_in_menu': 0, 'subject': u' ', 'tag_fields': u'voucher_type', - 'version': 311 + 'version': 312 }, # These values are common for all DocField @@ -53,30 +53,6 @@ 'name': u'Journal Voucher' }, - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Accounts User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Accounts User', - 'submit': 0, - 'write': 0 - }, - # DocPerm { 'amend': 0, @@ -101,6 +77,30 @@ 'write': 1 }, + # DocPerm + { + 'amend': 1, + 'cancel': 1, + 'create': 1, + 'doctype': u'DocPerm', + 'permlevel': 0, + 'role': u'Accounts User', + 'submit': 1, + 'write': 1 + }, + + # DocPerm + { + 'amend': 0, + 'cancel': 0, + 'create': 0, + 'doctype': u'DocPerm', + 'permlevel': 1, + 'role': u'Accounts User', + 'submit': 0, + 'write': 0 + }, + # DocField { 'doctype': u'DocField', @@ -526,7 +526,7 @@ 'doctype': u'DocField', 'fieldname': u'pay_to_recd_from', 'fieldtype': u'Data', - 'hidden': 0, + 'hidden': 1, 'label': u'Pay To / Recd From', 'no_copy': 1, 'permlevel': 0, @@ -539,7 +539,7 @@ 'doctype': u'DocField', 'fieldname': u'total_amount', 'fieldtype': u'Data', - 'hidden': 0, + 'hidden': 1, 'label': u'Total Amount', 'no_copy': 1, 'permlevel': 1, @@ -552,7 +552,7 @@ 'doctype': u'DocField', 'fieldname': u'total_amount_in_words', 'fieldtype': u'Data', - 'hidden': 0, + 'hidden': 1, 'label': u'Total Amount in Words', 'no_copy': 1, 'permlevel': 1,