From 0c1ed4d9c6db4b23e66910de991589e9c4043089 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 26 Nov 2012 11:53:50 +0530 Subject: [PATCH 1/3] fixed: added missing option Address for link field: Supplier Address --- .../purchase_invoice/purchase_invoice.txt | 2221 ++++++++--------- 1 file changed, 1026 insertions(+), 1195 deletions(-) diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.txt b/accounts/doctype/purchase_invoice/purchase_invoice.txt index 1f0e75097d..be503e6972 100755 --- a/accounts/doctype/purchase_invoice/purchase_invoice.txt +++ b/accounts/doctype/purchase_invoice/purchase_invoice.txt @@ -1,1197 +1,1028 @@ -# DocType, Purchase Invoice [ - - # These values are common in all dictionaries - { - 'creation': '2012-06-11 12:09:53', - 'docstatus': 0, - 'modified': '2012-07-16 16:26:02', - 'modified_by': u'Administrator', - 'owner': u'Administrator' - }, - - # These values are common for all DocType - { - '_last_update': u'1330345793', - 'allow_attach': 1, - 'colour': u'White:FFF', - 'default_print_format': u'Standard', - 'doctype': 'DocType', - 'is_submittable': 1, - 'module': u'Accounts', - 'name': '__common__', - 'read_only_onload': 1, - 'search_fields': u'posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount', - 'section_style': u'Tabbed', - 'server_code_error': u' ', - 'show_in_menu': 0, - 'subject': u'From %(supplier_name)s worth %(grand_total)s due on %(due_date)s | %(outstanding_amount)s outstanding', - 'version': 1 - }, - - # These values are common for all DocField - { - 'doctype': u'DocField', - 'name': '__common__', - 'parent': u'Purchase Invoice', - 'parentfield': u'fields', - 'parenttype': u'DocType' - }, - - # These values are common for all DocPerm - { - 'doctype': u'DocPerm', - 'name': '__common__', - 'parent': u'Purchase Invoice', - 'parentfield': u'permissions', - 'parenttype': u'DocType', - 'read': 1 - }, - - # DocType, Purchase Invoice - { - 'doctype': 'DocType', - 'name': u'Purchase Invoice' - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'basic_info', - 'fieldtype': u'Section Break', - 'label': u'Basic Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break0', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'To manage multiple series please go to Setup > Manage Series', - 'doctype': u'DocField', - 'fieldname': u'naming_series', - 'fieldtype': u'Select', - 'label': u'Series', - 'no_copy': 1, - 'oldfieldname': u'naming_series', - 'oldfieldtype': u'Select', - 'options': u'BILL\nBILLJ', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1 - }, - - # DocField - { - 'description': u'The account to which you will pay (have paid) the money to.', - 'doctype': u'DocField', - 'fieldname': u'credit_to', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Credit To', - 'oldfieldname': u'credit_to', - 'oldfieldtype': u'Link', - 'options': u'Account', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'supplier_name', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Name', - 'oldfieldname': u'supplier_name', - 'oldfieldtype': u'Data', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'address_display', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'label': u'Address', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_display', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'label': u'Contact', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_mobile', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Mobile No', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_email', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Contact Email', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break1', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'reqd': 0, - 'width': u'50%' - }, - - # DocField - { - 'default': u'Today', - 'description': u'The date at which current entry will get or has actually executed.', - 'doctype': u'DocField', - 'fieldname': u'posting_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Posting Date', - 'no_copy': 0, - 'oldfieldname': u'posting_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - 'description': u'If not applicable please enter: NA', - 'doctype': u'DocField', - 'fieldname': u'bill_no', - 'fieldtype': u'Data', - 'in_filter': 1, - 'label': u'Bill No', - 'oldfieldname': u'bill_no', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'bill_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Bill Date', - 'oldfieldname': u'bill_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'search_index': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'items', - 'fieldtype': u'Section Break', - 'label': u'Items', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'entries', - 'fieldtype': u'Table', - 'label': u'Entries', - 'oldfieldname': u'entries', - 'oldfieldtype': u'Table', - 'options': u'Purchase Invoice Item', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'section_break0', - 'fieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'description': u'Will be calculated automatically when you enter the details', - 'doctype': u'DocField', - 'fieldname': u'net_total', - 'fieldtype': u'Currency', - 'label': u'Net Total', - 'oldfieldname': u'net_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'net_total_import', - 'fieldtype': u'Currency', - 'label': u'Net Total (Import)', - 'oldfieldname': u'net_total_import', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'recalculate', - 'fieldtype': u'Button', - 'label': u'Recalculate', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break2', - 'fieldtype': u'Column Break', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'1', - 'description': u"The rate at which Bill Currency is converted into company's base currency", - 'doctype': u'DocField', - 'fieldname': u'conversion_rate', - 'fieldtype': u'Float', - 'label': u'Bill Conversion Rate', - 'oldfieldname': u'conversion_rate', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'currency', - 'fieldtype': u'Select', - 'label': u'Bill Currency', - 'oldfieldname': u'currency', - 'oldfieldtype': u'Select', - 'options': u'link:Currency', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select Items from Purchase Order', - 'doctype': u'DocField', - 'fieldname': u'purchase_order_main', - 'fieldtype': u'Link', - 'label': u'Purchase Order', - 'oldfieldname': u'purchase_order_main', - 'oldfieldtype': u'Link', - 'options': u'Purchase Order', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select Items from Purchase Receipt', - 'doctype': u'DocField', - 'fieldname': u'purchase_receipt_main', - 'fieldtype': u'Link', - 'label': u'Purchase Receipt', - 'oldfieldname': u'purchase_receipt_main', - 'oldfieldtype': u'Link', - 'options': u'Purchase Receipt', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'get_items', - 'fieldtype': u'Button', - 'label': u'Get Items', - 'oldfieldtype': u'Button', - 'options': u'pull_details', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Add / Edit Taxes and Charges', - 'doctype': u'DocField', - 'fieldname': u'taxes', - 'fieldtype': u'Section Break', - 'label': u'Taxes', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'purchase_other_charges', - 'fieldtype': u'Link', - 'label': u'Purchase Taxes and Charges', - 'oldfieldname': u'purchase_other_charges', - 'oldfieldtype': u'Link', - 'options': u'Purchase Taxes and Charges Master', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'get_tax_detail', - 'fieldtype': u'Button', - 'label': u'Get Tax Detail', - 'oldfieldtype': u'Button', - 'options': u'get_purchase_tax_details', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'purchase_tax_details', - 'fieldtype': u'Table', - 'label': u'Purchase Taxes and Charges', - 'oldfieldname': u'purchase_tax_details', - 'oldfieldtype': u'Table', - 'options': u'Purchase Taxes and Charges', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'calculate_tax', - 'fieldtype': u'Button', - 'label': u'Calculate Tax', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'tax_calculation', - 'fieldtype': u'HTML', - 'label': u'Tax Calculation', - 'oldfieldtype': u'HTML', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'total_tax', - 'fieldtype': u'Currency', - 'label': u'Total Tax', - 'oldfieldname': u'total_tax', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_section', - 'fieldtype': u'Section Break', - 'label': u'Contact Info', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'supplier', - 'fieldtype': u'Link', - 'hidden': 0, - 'label': u'Supplier', - 'oldfieldname': u'supplier', - 'oldfieldtype': u'Link', - 'options': u'Supplier', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:doc.supplier', - 'doctype': u'DocField', - 'fieldname': u'supplier_address', - 'fieldtype': u'Link', - 'label': u'Supplier Address', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break23', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:doc.supplier', - 'doctype': u'DocField', - 'fieldname': u'contact_person', - 'fieldtype': u'Link', - 'label': u'Contact Person', - 'options': u'Contact', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'more_info', - 'fieldtype': u'Section Break', - 'label': u'More Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break3', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'No', - 'doctype': u'DocField', - 'fieldname': u'is_opening', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Is Opening', - 'oldfieldname': u'is_opening', - 'oldfieldtype': u'Select', - 'options': u'No\nYes', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'aging_date', - 'fieldtype': u'Date', - 'label': u'Aging Date', - 'oldfieldname': u'aging_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'amended_from', - 'fieldtype': u'Link', - 'label': u'Amended From', - 'no_copy': 1, - 'oldfieldname': u'amended_from', - 'oldfieldtype': u'Link', - 'options': u'Purchase Invoice', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'description': u'The date at which current entry is corrected in the system.', - 'doctype': u'DocField', - 'fieldname': u'amendment_date', - 'fieldtype': u'Date', - 'label': u'Amendment Date', - 'no_copy': 1, - 'oldfieldname': u'amendment_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'select_print_heading', - 'fieldtype': u'Link', - 'label': u'Select Print Heading', - 'no_copy': 1, - 'oldfieldname': u'select_print_heading', - 'oldfieldtype': u'Link', - 'options': u'Print Heading', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'due_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Due Date', - 'no_copy': 0, - 'oldfieldname': u'due_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 0, - 'search_index': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'mode_of_payment', - 'fieldtype': u'Select', - 'label': u'Mode of Payment', - 'oldfieldname': u'mode_of_payment', - 'oldfieldtype': u'Select', - 'options': u'link:Mode of Payment', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break4', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'company', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Company', - 'oldfieldname': u'company', - 'oldfieldtype': u'Link', - 'options': u'Company', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'fiscal_year', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Fiscal Year', - 'oldfieldname': u'fiscal_year', - 'oldfieldtype': u'Select', - 'options': u'link:Fiscal Year', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'doctype': u'DocField', - 'fieldname': u'cancel_reason', - 'fieldtype': u'Data', - 'label': u'Cancel Reason', - 'no_copy': 1, - 'oldfieldname': u'cancel_reason', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'remarks', - 'fieldtype': u'Small Text', - 'label': u'Remarks', - 'no_copy': 1, - 'oldfieldname': u'remarks', - 'oldfieldtype': u'Text', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'advances', - 'fieldtype': u'Section Break', - 'label': u'Advances', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'get_advances_paid', - 'fieldtype': u'Button', - 'label': u'Get Advances Paid', - 'oldfieldtype': u'Button', - 'options': u'get_advances', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'advance_allocation_details', - 'fieldtype': u'Table', - 'label': u'Purchase Invoice Advances', - 'no_copy': 1, - 'oldfieldname': u'advance_allocation_details', - 'oldfieldtype': u'Table', - 'options': u'Purchase Invoice Advance', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'tds', - 'fieldtype': u'Section Break', - 'label': u'TDS', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break5', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'tds_applicable', - 'fieldtype': u'Select', - 'label': u'TDS Applicable', - 'oldfieldname': u'tds_applicable', - 'oldfieldtype': u'Select', - 'options': u'\nYes\nNo', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'tds_category', - 'fieldtype': u'Select', - 'label': u'TDS Category', - 'oldfieldname': u'tds_category', - 'oldfieldtype': u'Select', - 'options': u'link:TDS Category', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'get_tds', - 'fieldtype': u'Button', - 'label': u'Get TDS', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break6', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'tax_code', - 'fieldtype': u'Link', - 'label': u'TDS Account Head', - 'oldfieldname': u'tax_code', - 'oldfieldtype': u'Link', - 'options': u'Account', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'rate', - 'fieldtype': u'Currency', - 'label': u'Rate', - 'oldfieldname': u'rate', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'ded_amount', - 'fieldtype': u'Currency', - 'label': u'TDS Amount', - 'oldfieldname': u'ded_amount', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'totals', - 'fieldtype': u'Section Break', - 'label': u'Totals', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break7', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges_added', - 'fieldtype': u'Currency', - 'label': u'Taxes and Charges Added', - 'oldfieldname': u'other_charges_added', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges_deducted', - 'fieldtype': u'Currency', - 'label': u'Taxes and Charges Deducted', - 'oldfieldname': u'other_charges_deducted', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'grand_total', - 'fieldtype': u'Currency', - 'label': u'Grand Total', - 'oldfieldname': u'grand_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'In Words will be visible once you save the Purchase Invoice.', - 'doctype': u'DocField', - 'fieldname': u'in_words', - 'fieldtype': u'Data', - 'label': u'In Words', - 'oldfieldname': u'in_words', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'total_tds_on_voucher', - 'fieldtype': u'Currency', - 'label': u'Total TDS On Voucher', - 'no_copy': 1, - 'oldfieldname': u'total_tds_on_voucher', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'tds_amount_on_advance', - 'fieldtype': u'Currency', - 'label': u'TDS Amount On Advance', - 'no_copy': 1, - 'oldfieldname': u'tds_amount_on_advance', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break8', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'total_amount_to_pay', - 'fieldtype': u'Currency', - 'hidden': 0, - 'label': u'Total Amount To Pay', - 'no_copy': 1, - 'oldfieldname': u'total_amount_to_pay', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'total_advance', - 'fieldtype': u'Currency', - 'label': u'Total Advance (Incl. TDS)', - 'no_copy': 1, - 'oldfieldname': u'total_advance', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'outstanding_amount', - 'fieldtype': u'Currency', - 'in_filter': 1, - 'label': u'Outstanding Amount', - 'no_copy': 1, - 'oldfieldname': u'outstanding_amount', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'search_index': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'write_off_amount', - 'fieldtype': u'Currency', - 'label': u'Write Off Amount', - 'no_copy': 1, - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:flt(doc.write_off_amount)!=0', - 'doctype': u'DocField', - 'fieldname': u'write_off_account', - 'fieldtype': u'Link', - 'label': u'Write Off Account', - 'no_copy': 1, - 'options': u'Account', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:flt(doc.write_off_amount)!=0', - 'doctype': u'DocField', - 'fieldname': u'write_off_cost_center', - 'fieldtype': u'Link', - 'label': u'Write Off Cost Center', - 'no_copy': 1, - 'options': u'Account', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges_added_import', - 'fieldtype': u'Currency', - 'label': u'Taxes and Charges Added (Import)', - 'oldfieldname': u'other_charges_added_import', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges_deducted_import', - 'fieldtype': u'Currency', - 'label': u'Taxes and Charges Deducted (Import)', - 'oldfieldname': u'other_charges_deducted_import', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'grand_total_import', - 'fieldtype': u'Currency', - 'label': u'Grand Total (Import)', - 'oldfieldname': u'grand_total_import', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'in_words_import', - 'fieldtype': u'Data', - 'label': u'In Words (Import)', - 'oldfieldname': u'in_words_import', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'against_expense_account', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'label': u'Against Expense Account', - 'no_copy': 1, - 'oldfieldname': u'against_expense_account', - 'oldfieldtype': u'Small Text', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'file_list', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'File List', - 'no_copy': 1, - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Accounts Manager', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Accounts Manager', - '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 - { - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Purchase User' - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Purchase User', - 'submit': 0, - 'write': 1 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Accounts User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'match': u'supplier', - 'permlevel': 0, - 'role': u'Supplier' - } + { + "owner": "Administrator", + "docstatus": 0, + "creation": "2012-07-17 13:24:59", + "modified_by": "Administrator", + "modified": "2012-11-26 11:52:32" + }, + { + "is_submittable": 1, + "allow_attach": 1, + "default_print_format": "Standard", + "search_fields": "posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount", + "module": "Accounts", + "doctype": "DocType", + "read_only_onload": 1, + "name": "__common__" + }, + { + "name": "__common__", + "parent": "Purchase Invoice", + "doctype": "DocField", + "parenttype": "DocType", + "parentfield": "fields" + }, + { + "name": "__common__", + "parent": "Purchase Invoice", + "read": 1, + "doctype": "DocPerm", + "parenttype": "DocType", + "parentfield": "permissions" + }, + { + "name": "Purchase Invoice", + "doctype": "DocType" + }, + { + "oldfieldtype": "Section Break", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Basic Info", + "fieldname": "basic_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break0", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "To manage multiple series please go to Setup > Manage Series", + "no_copy": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Series", + "oldfieldname": "naming_series", + "permlevel": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "reqd": 1, + "options": "BILL\nBILLJ", + "report_hide": 0 + }, + { + "print_hide": 1, + "description": "The account to which you will pay (have paid) the money to.", + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Credit To", + "oldfieldname": "credit_to", + "permlevel": 0, + "trigger": "Client", + "fieldname": "credit_to", + "fieldtype": "Link", + "search_index": 1, + "reqd": 1, + "in_filter": 1, + "options": "Account" + }, + { + "oldfieldtype": "Data", + "doctype": "DocField", + "label": "Name", + "oldfieldname": "supplier_name", + "fieldname": "supplier_name", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Address", + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Contact", + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Mobile No", + "fieldname": "contact_mobile", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Contact Email", + "fieldname": "contact_email", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "reqd": 0, + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "The date at which current entry will get or has actually executed.", + "default": "Today", + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Posting Date", + "oldfieldname": "posting_date", + "no_copy": 0, + "fieldname": "posting_date", + "fieldtype": "Date", + "search_index": 1, + "reqd": 1, + "in_filter": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "If not applicable please enter: NA", + "oldfieldtype": "Data", + "doctype": "DocField", + "label": "Bill No", + "oldfieldname": "bill_no", + "fieldname": "bill_no", + "fieldtype": "Data", + "search_index": 1, + "reqd": 1, + "in_filter": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Bill Date", + "oldfieldname": "bill_date", + "fieldname": "bill_date", + "fieldtype": "Date", + "search_index": 1, + "reqd": 0, + "permlevel": 0, + "in_filter": 1 + }, + { + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "Items", + "fieldname": "items", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "oldfieldtype": "Table", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Entries", + "oldfieldname": "entries", + "options": "Purchase Invoice Item", + "fieldname": "entries", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "doctype": "DocField", + "fieldname": "section_break0", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Will be calculated automatically when you enter the details", + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Net Total", + "oldfieldname": "net_total", + "fieldname": "net_total", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Net Total (Import)", + "oldfieldname": "net_total_import", + "fieldname": "net_total_import", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Recalculate", + "trigger": "Client", + "fieldname": "recalculate", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "doctype": "DocField", + "fieldname": "column_break2", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "The rate at which Bill Currency is converted into company's base currency", + "default": "1", + "oldfieldtype": "Currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Bill Conversion Rate", + "oldfieldname": "conversion_rate", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Bill Currency", + "oldfieldname": "currency", + "options": "link:Currency", + "fieldname": "currency", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Select Items from Purchase Order", + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Purchase Order", + "oldfieldname": "purchase_order_main", + "permlevel": 0, + "trigger": "Client", + "fieldname": "purchase_order_main", + "fieldtype": "Link", + "options": "Purchase Order" + }, + { + "print_hide": 1, + "description": "Select Items from Purchase Receipt", + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Purchase Receipt", + "oldfieldname": "purchase_receipt_main", + "permlevel": 0, + "trigger": "Client", + "fieldname": "purchase_receipt_main", + "fieldtype": "Link", + "options": "Purchase Receipt" + }, + { + "oldfieldtype": "Button", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Get Items", + "options": "pull_details", + "fieldname": "get_items", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "description": "Add / Edit Taxes and Charges", + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Taxes", + "fieldname": "taxes", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Purchase Taxes and Charges", + "oldfieldname": "purchase_other_charges", + "options": "Purchase Taxes and Charges Master", + "fieldname": "purchase_other_charges", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Get Tax Detail", + "options": "get_purchase_tax_details", + "fieldname": "get_tax_detail", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "oldfieldtype": "Table", + "doctype": "DocField", + "label": "Purchase Taxes and Charges", + "oldfieldname": "purchase_tax_details", + "options": "Purchase Taxes and Charges", + "fieldname": "purchase_tax_details", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Calculate Tax", + "trigger": "Client", + "fieldname": "calculate_tax", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "HTML", + "doctype": "DocField", + "label": "Tax Calculation", + "fieldname": "tax_calculation", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Total Tax", + "oldfieldname": "total_tax", + "fieldname": "total_tax", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Contact Info", + "fieldname": "contact_section", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Supplier", + "oldfieldname": "supplier", + "permlevel": 0, + "trigger": "Client", + "fieldname": "supplier", + "fieldtype": "Link", + "hidden": 0, + "options": "Supplier" + }, + { + "depends_on": "eval:doc.supplier", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Supplier Address", + "options": "Address", + "fieldname": "supplier_address", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break23", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "depends_on": "eval:doc.supplier", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Contact Person", + "options": "Contact", + "fieldname": "contact_person", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "More Info", + "fieldname": "more_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break3", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "default": "No", + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Is Opening", + "oldfieldname": "is_opening", + "permlevel": 0, + "trigger": "Client", + "fieldname": "is_opening", + "fieldtype": "Select", + "search_index": 1, + "options": "No\nYes", + "in_filter": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Aging Date", + "oldfieldname": "aging_date", + "fieldname": "aging_date", + "fieldtype": "Date", + "search_index": 0, + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Amended From", + "oldfieldname": "amended_from", + "options": "Purchase Invoice", + "fieldname": "amended_from", + "fieldtype": "Link", + "permlevel": 1 + }, + { + "print_hide": 1, + "description": "The date at which current entry is corrected in the system.", + "no_copy": 1, + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Amendment Date", + "oldfieldname": "amendment_date", + "fieldname": "amendment_date", + "fieldtype": "Date", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Select Print Heading", + "oldfieldname": "select_print_heading", + "permlevel": 0, + "trigger": "Client", + "fieldname": "select_print_heading", + "fieldtype": "Link", + "options": "Print Heading", + "report_hide": 1 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Due Date", + "oldfieldname": "due_date", + "fieldname": "due_date", + "fieldtype": "Date", + "search_index": 1, + "permlevel": 0, + "in_filter": 1 + }, + { + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Mode of Payment", + "oldfieldname": "mode_of_payment", + "options": "link:Mode of Payment", + "fieldname": "mode_of_payment", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break4", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Company", + "oldfieldname": "company", + "options": "Company", + "fieldname": "company", + "fieldtype": "Link", + "search_index": 1, + "permlevel": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Fiscal Year", + "oldfieldname": "fiscal_year", + "options": "link:Fiscal Year", + "fieldname": "fiscal_year", + "fieldtype": "Select", + "search_index": 1, + "permlevel": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Cancel Reason", + "oldfieldname": "cancel_reason", + "fieldname": "cancel_reason", + "fieldtype": "Data", + "depends_on": "eval:!doc.__islocal", + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Text", + "doctype": "DocField", + "label": "Remarks", + "oldfieldname": "remarks", + "fieldname": "remarks", + "fieldtype": "Small Text", + "reqd": 0, + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "Advances", + "fieldname": "advances", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Get Advances Paid", + "options": "get_advances", + "fieldname": "get_advances_paid", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Table", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Purchase Invoice Advances", + "oldfieldname": "advance_allocation_details", + "options": "Purchase Invoice Advance", + "fieldname": "advance_allocation_details", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "TDS", + "fieldname": "tds", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break5", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "TDS Applicable", + "oldfieldname": "tds_applicable", + "options": "\nYes\nNo", + "fieldname": "tds_applicable", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "TDS Category", + "oldfieldname": "tds_category", + "options": "link:TDS Category", + "fieldname": "tds_category", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Get TDS", + "trigger": "Client", + "fieldname": "get_tds", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break6", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "TDS Account Head", + "oldfieldname": "tax_code", + "options": "Account", + "fieldname": "tax_code", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Rate", + "oldfieldname": "rate", + "fieldname": "rate", + "fieldtype": "Currency", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "TDS Amount", + "oldfieldname": "ded_amount", + "fieldname": "ded_amount", + "fieldtype": "Currency", + "permlevel": 0 + }, + { + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "Totals", + "fieldname": "totals", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break7", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Taxes and Charges Added", + "oldfieldname": "other_charges_added", + "fieldname": "other_charges_added", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Taxes and Charges Deducted", + "oldfieldname": "other_charges_deducted", + "fieldname": "other_charges_deducted", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Grand Total", + "oldfieldname": "grand_total", + "fieldname": "grand_total", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "description": "In Words will be visible once you save the Purchase Invoice.", + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "In Words", + "oldfieldname": "in_words", + "fieldname": "in_words", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Total TDS On Voucher", + "oldfieldname": "total_tds_on_voucher", + "fieldname": "total_tds_on_voucher", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "TDS Amount On Advance", + "oldfieldname": "tds_amount_on_advance", + "fieldname": "tds_amount_on_advance", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break8", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Total Amount To Pay", + "oldfieldname": "total_amount_to_pay", + "fieldname": "total_amount_to_pay", + "fieldtype": "Currency", + "hidden": 0, + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Total Advance (Incl. TDS)", + "oldfieldname": "total_advance", + "fieldname": "total_advance", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Outstanding Amount", + "oldfieldname": "outstanding_amount", + "fieldname": "outstanding_amount", + "fieldtype": "Currency", + "search_index": 1, + "permlevel": 1, + "in_filter": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "doctype": "DocField", + "label": "Write Off Amount", + "fieldname": "write_off_amount", + "fieldtype": "Currency", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "depends_on": "eval:flt(doc.write_off_amount)!=0", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Write Off Account", + "options": "Account", + "fieldname": "write_off_account", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "depends_on": "eval:flt(doc.write_off_amount)!=0", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Write Off Cost Center", + "options": "Account", + "fieldname": "write_off_cost_center", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Taxes and Charges Added (Import)", + "oldfieldname": "other_charges_added_import", + "fieldname": "other_charges_added_import", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Taxes and Charges Deducted (Import)", + "oldfieldname": "other_charges_deducted_import", + "fieldname": "other_charges_deducted_import", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Grand Total (Import)", + "oldfieldname": "grand_total_import", + "fieldname": "grand_total_import", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "In Words (Import)", + "oldfieldname": "in_words_import", + "fieldname": "in_words_import", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Small Text", + "doctype": "DocField", + "label": "Against Expense Account", + "oldfieldname": "against_expense_account", + "fieldname": "against_expense_account", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 0, + "report_hide": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "doctype": "DocField", + "label": "File List", + "fieldname": "file_list", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 0 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "cancel": 1, + "role": "Accounts User", + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "cancel": 0, + "role": "Purchase User", + "permlevel": 1 + }, + { + "amend": 0, + "create": 1, + "doctype": "DocPerm", + "submit": 0, + "write": 1, + "cancel": 0, + "role": "Purchase User", + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "cancel": 0, + "role": "Supplier", + "permlevel": 0, + "match": "supplier" + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "cancel": 0, + "role": "Accounts Manager", + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "cancel": 1, + "role": "Accounts Manager", + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "cancel": 0, + "role": "Accounts User", + "permlevel": 1 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "cancel": 0, + "role": "Auditor", + "permlevel": 1 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "cancel": 0, + "role": "Auditor", + "permlevel": 0 + } ] \ No newline at end of file From 934cb933d16313ac805f2221df0dcd6a8d4e800a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 26 Nov 2012 12:27:28 +0530 Subject: [PATCH 2/3] cleanup communicationview.js --- .../doctype/support_ticket/support_ticket.css | 16 +--- .../doctype/support_ticket/support_ticket.js | 79 +++++++++---------- 2 files changed, 41 insertions(+), 54 deletions(-) diff --git a/support/doctype/support_ticket/support_ticket.css b/support/doctype/support_ticket/support_ticket.css index 370d99c851..dbfff3c65c 100644 --- a/support/doctype/support_ticket/support_ticket.css +++ b/support/doctype/support_ticket/support_ticket.css @@ -1,16 +1,8 @@ -.communication { - border: 1px solid #aaa; - border-top: 0px; - padding: 7px; - background-color: #f2f2f2 -} -.communication:hover { - background-color: #fffff0; -} - -.communication:first-child { - border-top: 1px solid #aaa; +.comm-content { + border-top: 1px solid #ddd; + padding: 10px; + display: none; } .support-ticket-wrapper { diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js index 689ddbf041..5185b9a56b 100644 --- a/support/doctype/support_ticket/support_ticket.js +++ b/support/doctype/support_ticket/support_ticket.js @@ -14,14 +14,6 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -// threading structure -// -------- orginal message -------- -// xoxoxoxo -// -------- reply 1 -------- -// -------- reply 2 -------- -// xoxoxoxo -// -------- new reply -------- - $.extend(cur_frm.cscript, { onload: function(doc, dt, dn) { // @@ -56,9 +48,6 @@ $.extend(cur_frm.cscript, { refresh_field('status'); }, - // - // make thread listing - // make_listing: function(doc) { var wrapper = cur_frm.fields_dict['thread_html'].wrapper; $(wrapper) @@ -73,17 +62,12 @@ $.extend(cur_frm.cscript, { comm_list.sort(function(a, b) { return new Date(a.modified) > new Date(b.modified) ? -1 : 1 }) - - $.each(comm_list, function(i, c) { - var comm = new erpnext.CommunicationView({ - doc: c, - support_ticket: doc, - parent: wrapper - }); - if(i==0) { - comm.toggle(); - } - }); + + new erpnext.CommunicationView({ + list: comm_list, + parent: wrapper + }) + }, send: function(doc, dt, dn) { @@ -131,36 +115,47 @@ $.extend(cur_frm.cscript, { erpnext.CommunicationView = Class.extend({ init: function(opts) { + this.comm_list = []; $.extend(this, opts); - this.prepare(); this.make(); - this.toggle(); - }, - prepare: function() { - //this.doc.when = comment_when(this.doc.modified); - this.doc.when = this.doc.modified; - if(this.doc.content.indexOf("
")== -1 && this.doc.content.indexOf("

")== -1) { - this.doc.content = this.doc.content.replace(/\n/g, "
"); - } - this.doc.content = this.doc.content.split("=== In response to ===")[0]; - this.doc.content = this.doc.content.split("-----Original Message-----")[0]; }, make: function() { var me = this; - this.body = $(repl('

\ + this.make_body(); + $.each(this.list, function(i, d) { + me.prepare(d); + me.make_line(d); + }); + // show first + this.comm_list[0].find('.comm-content').toggle(true); + }, + make_body: function() { + this.body = $("").appendTo(this.parent); + }, + prepare: function(doc) { + //doc.when = comment_when(this.doc.modified); + doc.when = doc.modified; + if(doc.content.indexOf("
")== -1 && doc.content.indexOf("

")== -1) { + doc.content = doc.content.replace(/\n/g, "
"); + } + doc.email_address = doc.email_address.replace(//, ">"); + doc.content = doc.content.split("=== In response to ===")[0]; + doc.content = doc.content.split("-----Original Message-----")[0]; + }, + make_line: function(doc) { + var me = this; + var comm = $(repl('

', doc)) + .appendTo(this.body) .css({"cursor":"pointer"}) .click(function() { $(this).find(".comm-content").toggle(); }); - - this.body.find(".comm-content").html(this.doc.content); - }, - toggle: function() { - this.body.find(".comm-content").toggle(); + + this.comm_list.push(comm); + comm.find(".comm-content").html(doc.content); } }) From 00403e3dcc6c0afb2625d76aeda14110b4819774 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 26 Nov 2012 12:31:28 +0530 Subject: [PATCH 3/3] support ticket: reload if older than 20 sec. --- support/doctype/support_ticket/support_ticket.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js index 5185b9a56b..97ed89a6aa 100644 --- a/support/doctype/support_ticket/support_ticket.js +++ b/support/doctype/support_ticket/support_ticket.js @@ -16,9 +16,7 @@ $.extend(cur_frm.cscript, { onload: function(doc, dt, dn) { - // - // help area - // + cur_frm.last_reload = new Date(); if(in_list(user_roles,'System Manager')) { cur_frm.page_layout.footer.help_area.innerHTML = '
\

Email Settings
\ @@ -29,6 +27,11 @@ $.extend(cur_frm.cscript, { }, refresh: function(doc) { + if(new Date() - cur_frm.last_reload > 20000) { + cur_frm.last_reload = new Date(); + cur_frm.reload_doc(); + return; + } erpnext.hide_naming_series(); cur_frm.cscript.make_listing(doc); if(!doc.__islocal) {

\

%(email_address)s on %(when)s

\ -
\ - ', this.doc)) - .appendTo(this.parent) +
\ +