Browse Source

Attachment option and total invoiced amt added in c-form

develop
Nabin Hait 13 years ago
parent
commit
7da6ebc9af
  1. 8
      erpnext/accounts/doctype/c_form/c_form.py
  2. 195
      erpnext/accounts/doctype/c_form/c_form.txt

8
erpnext/accounts/doctype/c_form/c_form.py

@ -46,6 +46,14 @@ class DocType:
else:
msgprint("Please enter atleast 1 invoice in the table below", raise_exception=1)
self.calculate_total_invoiced_amount()
def calculate_total_invoiced_amount(self):
total = 0
for d in getlist(self.doclist, 'invoice_details'):
total += flt(d.grand_total)
webnotes.conn.set(self.doc, 'total_invoiced_amount', total)
def get_invoice_details(self, invoice_no):
""" Pull details from invoices for referrence """

195
erpnext/accounts/doctype/c_form/c_form.txt

@ -3,188 +3,223 @@
# These values are common in all dictionaries
{
'creation': '2011-12-07 16:16:16',
'creation': '2011-12-14 11:40:47',
'docstatus': 0,
'modified': '2011-12-07 17:50:17',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-04-06 17:29:50',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': '1323255350',
'colour': 'White:FFF',
'_last_update': u'1333712835',
'allow_attach': 1,
'colour': u'White:FFF',
'doctype': 'DocType',
'module': 'Accounts',
'max_attachments': 3,
'module': u'Accounts',
'name': '__common__',
'section_style': 'Simple',
'section_style': u'Simple',
'show_in_menu': 0,
'version': 11
'version': 19
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'C-Form',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0
'parent': u'C-Form',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
'doctype': 'DocPerm',
'doctype': u'DocPerm',
'name': '__common__',
'parent': 'C-Form',
'parentfield': 'permissions',
'parenttype': 'DocType',
'parent': u'C-Form',
'parentfield': u'permissions',
'parenttype': u'DocType',
'read': 1
},
# DocType, C-Form
{
'doctype': 'DocType',
'name': 'C-Form'
'name': u'C-Form'
},
# DocPerm
{
'create': 1,
'doctype': 'DocPerm',
'doctype': u'DocPerm',
'permlevel': 0,
'role': 'Accounts User',
'role': u'Accounts User',
'write': 1
},
# DocPerm
{
'create': 1,
'doctype': 'DocPerm',
'doctype': u'DocPerm',
'permlevel': 0,
'role': 'Accounts Manager',
'role': u'Accounts Manager',
'submit': 0,
'write': 1
},
# DocPerm
{
'doctype': 'DocPerm',
'doctype': u'DocPerm',
'permlevel': 1,
'role': 'All'
'role': u'All'
},
# DocField
{
'doctype': 'DocField',
'fieldtype': 'Column Break',
'width': '50%'
'doctype': u'DocField',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'naming_series',
'fieldtype': 'Select',
'label': 'Series',
'options': '\nC-FORM/',
'doctype': u'DocField',
'fieldname': u'naming_series',
'fieldtype': u'Select',
'label': u'Series',
'options': u'\nC-FORM/',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'c_form_no',
'fieldtype': 'Data',
'label': 'C-Form No',
'doctype': u'DocField',
'fieldname': u'c_form_no',
'fieldtype': u'Data',
'label': u'C-Form No',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'received_date',
'fieldtype': 'Date',
'label': 'Received Date',
'doctype': u'DocField',
'fieldname': u'received_date',
'fieldtype': u'Date',
'label': u'Received Date',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'customer',
'fieldtype': 'Link',
'label': 'Customer',
'options': 'Customer',
'doctype': u'DocField',
'fieldname': u'customer',
'fieldtype': u'Link',
'label': u'Customer',
'options': u'Customer',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': 'DocField',
'fieldtype': 'Column Break',
'width': '50%'
'doctype': u'DocField',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'company',
'fieldtype': 'Select',
'label': 'Company',
'options': 'link:Company'
'doctype': u'DocField',
'fieldname': u'company',
'fieldtype': u'Select',
'label': u'Company',
'options': u'link:Company',
'permlevel': 0
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'fiscal_year',
'fieldtype': 'Select',
'label': 'Fiscal Year',
'options': 'link:Fiscal Year',
'doctype': u'DocField',
'fieldname': u'fiscal_year',
'fieldtype': u'Select',
'label': u'Fiscal Year',
'options': u'link:Fiscal Year',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'quarter',
'fieldtype': 'Select',
'label': 'Quarter',
'options': '\nI\nII\nIII\nIV'
'doctype': u'DocField',
'fieldname': u'quarter',
'fieldtype': u'Select',
'label': u'Quarter',
'options': u'\nI\nII\nIII\nIV',
'permlevel': 0
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'total_amount',
'fieldtype': 'Currency',
'label': 'Total Amount',
'doctype': u'DocField',
'fieldname': u'total_amount',
'fieldtype': u'Currency',
'label': u'Total Amount',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'state',
'fieldtype': 'Select',
'label': 'State',
'options': "link:State\ncountry='India'",
'doctype': u'DocField',
'fieldname': u'state',
'fieldtype': u'Select',
'label': u'State',
'options': u"link:State\ncountry='India'",
'permlevel': 0,
'reqd': 1
},
# DocField
{
'doctype': 'DocField',
'fieldtype': 'Section Break'
'doctype': u'DocField',
'fieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'invoice_details',
'fieldtype': u'Table',
'label': u'Invoice Details',
'options': u'C-Form Invoice Detail',
'permlevel': 0
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'invoice_details',
'fieldtype': 'Table',
'label': 'Invoice Details',
'options': 'C-Form Invoice Detail'
'doctype': u'DocField',
'fieldname': u'total_invoiced_amount',
'fieldtype': u'Currency',
'label': u'Total Invoiced Amount',
'permlevel': 1,
'print_hide': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'file_list',
'fieldtype': u'Text',
'hidden': 1,
'label': u'File List',
'permlevel': 0,
'print_hide': 1
}
]
Loading…
Cancel
Save