Merge branch 'shf_rename' of github.com:webnotes/erpnext into shf_rename

This commit is contained in:
Anand Doshi 2012-04-13 13:13:54 +05:30
commit 6af47a8c37
7 changed files with 59 additions and 57 deletions

View File

@ -334,7 +334,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;
}
@ -342,7 +342,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 {

View File

@ -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': '<!-- p.big {line-height: 200%} .noborder td { border: 0px solid #fff; } -->\n<div style="position: relative;">\n<h3><script>doc.company</script><br /> <br /> \n<hr />\nPAYMENT ADVICE</h3>\n<table class="noborder" style="width: 100%;">\n<tbody>\n<tr>\n<td style="vertical-align: top;" width="50%">To :<br />\n<script type="text/javascript">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</td>\n<td width="50%">\n<table class="noborder" width="100%">\n<tbody>\n<tr>\n<td width="30%">Voucher No :</td>\n<td width="70%">\n<script type="text/javascript">// <![CDATA[\ndoc.name\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width="30%">Voucher Date :</td>\n<td width="70%">\n<script type="text/javascript">// <![CDATA[\ndate.str_to_user(doc.voucher_date)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width="30%">Cheque No :</td>\n<td width="70%">\n<script type="text/javascript">// <![CDATA[\ndate.str_to_user(doc.cheque_no)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width="30%">Cheque Date :</td>\n<td width="70%">\n<script type="text/javascript">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n<br /> <strong>We are pleased to enclose our cheque in full/part Settlement of your under noted bills</strong> <br /> \n<hr />\n<table class="noborder" width="100%">\n<tbody>\n<tr>\n<td width="70%">&nbsp;</td>\n<td width="15%">Total :</td>\n<td class="pos_left" width="15%">\n<script type="text/javascript">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td colspan="3">Narration :\n<script type="text/javascript">// <![CDATA[\nreplace_newlines(doc.remark)\n// ]]></script>\n<br /><br /><br /></td>\n</tr>\n</tbody>\n</table>\n<div style="position: absolute; top: 14cm; left: 0cm;">Prepared By</div>\n<div style="position: absolute; top: 14cm; left: 5.5cm;">Authorised Signatory</div>\n<div style="position: absolute; top: 14cm; left: 11cm;">Received Payment as Above</div>\n<div style="position: absolute; top: 16.4cm; left: 5.9cm;"><strong>_____________</strong></div>\n<div style="position: absolute; top: 16.7cm; left: 6cm;"><strong>A/c Payee</strong></div>\n<div style="position: absolute; top: 16.7cm; left: 5.9cm;"><strong>_____________</strong></div>\n<div style="position: absolute; top: 16.9cm; left: 12cm;">\n<script type="text/javascript">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</div>\n<div style="position: absolute; top: 17.9cm; left: 1cm;">\n<script type="text/javascript">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</div>\n<div style="position: absolute; top: 18.6cm; left: 1cm; width: 7cm;">\n<script type="text/javascript">// <![CDATA[\ndoc.total_amount_in_words\n// ]]></script>\n</div>\n<div style="position: absolute; top: 19.7cm; left: 12cm;">\n<script type="text/javascript">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</div>\n</div>',
'module': 'Accounts',
'html': u'<!-- p.big {line-height: 200%} .noborder td { border: 0px solid #fff; } -->\n<div style="position: relative;">\n<h3><script>doc.company</script><br /> <br /> \n<hr />\nPAYMENT ADVICE</h3>\n<table class="noborder" style="width: 100%;">\n<tbody>\n<tr>\n<td style="vertical-align: top;" width="50%">To :<br />\n<script type="text/javascript">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</td>\n<td width="50%">\n<table class="noborder" width="100%">\n<tbody>\n<tr>\n<td width="30%">Voucher No :</td>\n<td width="70%">\n<script type="text/javascript">// <![CDATA[\ndoc.name\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width="30%">Voucher Date :</td>\n<td width="70%">\n<script type="text/javascript">// <![CDATA[\ndate.str_to_user(doc.voucher_date)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width="30%">Cheque No :</td>\n<td width="70%">\n<script type="text/javascript">// <![CDATA[\ndate.str_to_user(doc.cheque_no)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width="30%">Cheque Date :</td>\n<td width="70%">\n<script type="text/javascript">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n<br /> <strong>We are pleased to enclose our cheque in full/part Settlement of your under noted bills</strong> <br /> \n<hr />\n<table class="noborder" width="100%">\n<tbody>\n<tr>\n<td width="70%">&nbsp;</td>\n<td width="15%">Total :</td>\n<td class="pos_left" width="15%">\n<script type="text/javascript">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td colspan="3">Narration :\n<script type="text/javascript">// <![CDATA[\nreplace_newlines(doc.remark)\n// ]]></script>\n<br /><br /><br /></td>\n</tr>\n</tbody>\n</table>\n<div style="position: absolute; top: 14cm; left: 0cm;">Prepared By</div>\n<div style="position: absolute; top: 14cm; left: 5.5cm;">Authorised Signatory</div>\n<div style="position: absolute; top: 14cm; left: 11cm;">Received Payment as Above</div>\n<div style="position: absolute; top: 16.4cm; left: 5.9cm;"><strong>_____________</strong></div>\n<div style="position: absolute; top: 16.7cm; left: 6cm;"><strong>A/c Payee</strong></div>\n<div style="position: absolute; top: 16.7cm; left: 5.9cm;"><strong>_____________</strong></div>\n<div style="position: absolute; top: 16.9cm; left: 12cm;">\n<script type="text/javascript">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</div>\n<div style="position: absolute; top: 17.9cm; left: 1cm;">\n<script type="text/javascript">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</div>\n<div style="position: absolute; top: 18.6cm; left: 1cm; width: 7cm;">\n<script type="text/javascript">// <![CDATA[\ndoc.total_amount_in_words\n// ]]></script>\n</div>\n<div style="position: absolute; top: 19.7cm; left: 12cm;">\n<script type="text/javascript">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</div>\n</div>',
'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'
}
]

View File

@ -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': '<div style="position: relative;">\n<h3 align="center"><script>doc.company</script>\n</div>\n\n<font size="4">\n<table class=\'simpletable\'>\n<tr>\n<td><b> Receipt No.: </b></td>\n<td><script>doc.name</script></td>\n</tr>\n<tr>\n<td><b> Date : </b></td>\n<td><script>date.str_to_user(doc.voucher_date)</script></td>\n</tr> \n<tr>\n<td><b> Remark: </b></td>\n<td><script> doc.remark </script></td>\n</tr>\n<tr>\n<td><b> Received From: </b></td>\n<td><b><script> doc.pay_to_rec_from </script></b></td>\n</tr>\n</table>\n<br>\n\n<div><b><script>doc.total_amount</script></b> </td></div><br>\n<div style="text-align:left"><b><script>doc.total_amount_in_words</script></b></div><br>\n<div>This receipt is issued subject to realization of the Cheque</div>\n</font>\n<br>\n<table class="noborder">\n<tr>\n<td style = "text-align = right;"><h3>For <script>doc.company</script>,</h3><br><div>(Authorised Signatory)</div></td>\n</tr>\n</table>',
'module': 'Accounts',
'html': u'<div style="position: relative;">\n<h3 align="center"><script>doc.company</script>\n</div>\n\n<font size="4">\n<table class=\'simpletable\'>\n<tr>\n<td><b> Receipt No.: </b></td>\n<td><script>doc.name</script></td>\n</tr>\n<tr>\n<td><b> Date : </b></td>\n<td><script>date.str_to_user(doc.voucher_date)</script></td>\n</tr> \n<tr>\n<td><b> Remark: </b></td>\n<td><script> doc.remark </script></td>\n</tr>\n<tr>\n<td><b> Received From: </b></td>\n<td><b><script> doc.pay_to_rec_from </script></b></td>\n</tr>\n</table>\n<br>\n\n<div><b><script>doc.total_amount</script></b> </td></div><br>\n<div style="text-align:left"><b><script>doc.total_amount_in_words</script></b></div><br>\n<div>This receipt is issued subject to realization of the Cheque</div>\n</font>\n<br>\n<table class="noborder">\n<tr>\n<td style = "text-align = right;"><h3>For <script>doc.company</script>,</h3><br><div>(Authorised Signatory)</div></td>\n</tr>\n</table>',
'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'
}
]

View File

@ -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');
}

View File

@ -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,

View File

@ -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,

View File

@ -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()
return webnotes.conn.get_defaults()