mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 09:24:45 +00:00
fixed conflict
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1308829300',
|
||||
'_last_update': '1309508836',
|
||||
'allow_copy': 1,
|
||||
'allow_trash': 1,
|
||||
'colour': 'White:FFF',
|
||||
@@ -179,7 +179,7 @@
|
||||
'oldfieldtype': 'Data',
|
||||
'permlevel': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -225,7 +225,7 @@
|
||||
'options': '\nLedger\nGroup',
|
||||
'permlevel': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -259,7 +259,7 @@
|
||||
'oldfieldname': 'debit_or_credit',
|
||||
'oldfieldtype': 'Data',
|
||||
'permlevel': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -274,7 +274,7 @@
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'Yes\nNo',
|
||||
'permlevel': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -344,7 +344,7 @@
|
||||
'options': 'Company',
|
||||
'permlevel': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
'oldfieldname': 'fiscal_year',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Fiscal Year',
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -182,6 +182,7 @@
|
||||
'options': 'Company',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 0,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
@@ -227,7 +228,8 @@
|
||||
'oldfieldname': 'distribution_id',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Budget Distribution',
|
||||
'permlevel': 0
|
||||
'permlevel': 0,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Company',
|
||||
'permlevel': 0,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1294312170',
|
||||
'_last_update': '1309508838',
|
||||
'autoname': 'GL.#######',
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocType',
|
||||
@@ -119,7 +119,7 @@
|
||||
'label': 'Aging Date',
|
||||
'oldfieldname': 'aging_date',
|
||||
'oldfieldtype': 'Date',
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -221,7 +221,7 @@
|
||||
'oldfieldname': 'voucher_type',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'Journal Voucher\nReceivable Voucher\nPayable Voucher',
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -262,7 +262,7 @@
|
||||
'oldfieldname': 'is_cancelled',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'No\nYes',
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -276,7 +276,7 @@
|
||||
'oldfieldname': 'is_opening',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'No\nYes',
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -304,7 +304,7 @@
|
||||
'oldfieldname': 'fiscal_year',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'link:Fiscal Year',
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -318,6 +318,6 @@
|
||||
'oldfieldname': 'company',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Company',
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
}
|
||||
]
|
||||
@@ -1,802 +0,0 @@
|
||||
# DocType, Journal Voucher
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2010-08-08 17:09:06',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-07-15 14:37:05',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1310533805',
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocType',
|
||||
'module': 'Accounts',
|
||||
'name': '__common__',
|
||||
'search_fields': 'voucher_type,posting_date, due_date, cheque_no',
|
||||
'section_style': 'Tabbed',
|
||||
'server_code_error': ' ',
|
||||
'show_in_menu': 0,
|
||||
'subject': ' ',
|
||||
'tag_fields': 'voucher_type',
|
||||
'version': 308
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'name': '__common__',
|
||||
'parent': 'Journal Voucher',
|
||||
'parentfield': 'fields',
|
||||
'parenttype': 'DocType'
|
||||
},
|
||||
|
||||
# These values are common for all DocPerm
|
||||
{
|
||||
'doctype': 'DocPerm',
|
||||
'name': '__common__',
|
||||
'parent': 'Journal Voucher',
|
||||
'parentfield': 'permissions',
|
||||
'parenttype': 'DocType',
|
||||
'read': 1
|
||||
},
|
||||
|
||||
# DocType, Journal Voucher
|
||||
{
|
||||
'doctype': 'DocType',
|
||||
'name': 'Journal Voucher'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
'doctype': 'DocPerm',
|
||||
'idx': 1,
|
||||
'permlevel': 1,
|
||||
'role': 'Accounts Manager',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': 'DocPerm',
|
||||
'idx': 2,
|
||||
'permlevel': 0,
|
||||
'role': 'Accounts Manager',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': 'DocPerm',
|
||||
'idx': 3,
|
||||
'permlevel': 0,
|
||||
'role': 'Accounts User',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
'cancel': 0,
|
||||
'create': 0,
|
||||
'doctype': 'DocPerm',
|
||||
'idx': 4,
|
||||
'permlevel': 1,
|
||||
'role': 'Accounts User',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 1,
|
||||
'label': 'Basic Info',
|
||||
'oldfieldtype': 'Section Break',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 2,
|
||||
'label': '1. Select Series and Dates',
|
||||
'oldfieldtype': 'Section Break',
|
||||
'options': 'Simple',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 3,
|
||||
'oldfieldtype': 'Column Break',
|
||||
'permlevel': 0,
|
||||
'width': '50%'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'voucher_type',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 4,
|
||||
'in_filter': 1,
|
||||
'label': 'Voucher Type',
|
||||
'oldfieldname': 'voucher_type',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': '\nJournal Entry\nBank Voucher\nCash Voucher\nCredit Card Voucher\nDebit Note\nCredit Note\nContra Voucher\nExcise Voucher\nWrite Off Voucher\nLoan Receipt',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'depends_on': "eval:doc.voucher_type == 'Write Off Voucher'",
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'write_off_amount',
|
||||
'fieldtype': 'Currency',
|
||||
'idx': 5,
|
||||
'label': 'Write Off Amount <=',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'report_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'default': 'Accounts Receivable',
|
||||
'depends_on': "eval:doc.voucher_type == 'Write Off Voucher'",
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'write_off_based_on',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 6,
|
||||
'label': 'Write Off Based On',
|
||||
'options': 'Accounts Receivable\nAccounts Payable',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'report_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'To manage multiple series please go to Setup > Manage Series',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'naming_series',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 7,
|
||||
'label': 'Series',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'naming_series',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'JV',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'default': 'Today',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'voucher_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 8,
|
||||
'in_filter': 1,
|
||||
'label': 'Voucher Date',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'voucher_date',
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'description': 'The date at which current entry will get or has actually executed.',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'posting_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 9,
|
||||
'in_filter': 1,
|
||||
'label': 'Posting Date',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'posting_date',
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'due_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 10,
|
||||
'label': 'Due Date',
|
||||
'oldfieldname': 'due_date',
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'description': 'The date at which current entry is corrected in the system.',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'amendment_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 11,
|
||||
'label': 'Amendment Date',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'amendment_date',
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'amended_from',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 12,
|
||||
'label': 'Amended From',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'amended_from',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Journal Voucher',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'depends_on': "eval:doc.voucher_type == 'Write Off Voucher'",
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Button',
|
||||
'idx': 13,
|
||||
'label': 'Get Outstanding Invoices',
|
||||
'options': 'get_outstanding_invoices',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': 'Server'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 14,
|
||||
'oldfieldtype': 'Column Break',
|
||||
'permlevel': 0,
|
||||
'width': '50%'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'cheque_no',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 15,
|
||||
'in_filter': 1,
|
||||
'label': 'Cheque No',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'cheque_no',
|
||||
'oldfieldtype': 'Data',
|
||||
'permlevel': 0,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'cheque_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 16,
|
||||
'label': 'Cheque Date',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'cheque_date',
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'clearance_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 17,
|
||||
'in_filter': 1,
|
||||
'label': 'Clearance Date',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'clearance_date',
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 1,
|
||||
'print_hide': 0,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'user_remark',
|
||||
'fieldtype': 'Small Text',
|
||||
'idx': 18,
|
||||
'in_filter': 1,
|
||||
'label': 'User Remark',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'user_remark',
|
||||
'oldfieldtype': 'Small Text',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'description': 'User Remark will be added to Auto Remark',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'remark',
|
||||
'fieldtype': 'Small Text',
|
||||
'idx': 19,
|
||||
'label': 'Remark',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'remark',
|
||||
'oldfieldtype': 'Small Text',
|
||||
'permlevel': 1,
|
||||
'reqd': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 20,
|
||||
'label': '2. Add / Edit GL Entries',
|
||||
'oldfieldtype': 'Section Break',
|
||||
'options': 'Simple',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'entries',
|
||||
'fieldtype': 'Table',
|
||||
'idx': 21,
|
||||
'label': 'Entries',
|
||||
'oldfieldname': 'entries',
|
||||
'oldfieldtype': 'Table',
|
||||
'options': 'Journal Voucher Detail',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Button',
|
||||
'idx': 22,
|
||||
'label': 'Get Balance',
|
||||
'oldfieldtype': 'Button',
|
||||
'permlevel': 0,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'total_debit',
|
||||
'fieldtype': 'Currency',
|
||||
'idx': 23,
|
||||
'in_filter': 1,
|
||||
'label': 'Total Debit',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'total_debit',
|
||||
'oldfieldtype': 'Currency',
|
||||
'permlevel': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'total_credit',
|
||||
'fieldtype': 'Currency',
|
||||
'idx': 24,
|
||||
'in_filter': 1,
|
||||
'label': 'Total Credit',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'total_credit',
|
||||
'oldfieldtype': 'Currency',
|
||||
'permlevel': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'difference',
|
||||
'fieldtype': 'Currency',
|
||||
'idx': 25,
|
||||
'label': 'Difference',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'difference',
|
||||
'oldfieldtype': 'Currency',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 26,
|
||||
'label': 'Addtional Info',
|
||||
'oldfieldtype': 'Section Break',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 27,
|
||||
'oldfieldtype': 'Column Break',
|
||||
'permlevel': 0,
|
||||
'width': '50%'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'bill_no',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 28,
|
||||
'label': 'Bill No',
|
||||
'oldfieldname': 'bill_no',
|
||||
'oldfieldtype': 'Data',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'bill_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 29,
|
||||
'label': 'Bill Date',
|
||||
'oldfieldname': 'bill_date',
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'default': 'No',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'is_opening',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 30,
|
||||
'in_filter': 1,
|
||||
'label': 'Is Opening',
|
||||
'oldfieldname': 'is_opening',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'No\nYes',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'search_index': 1,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'aging_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 31,
|
||||
'label': 'Aging Date',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': 'aging_date',
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'cancel_reason',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 32,
|
||||
'label': 'Cancel Reason',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'cancel_reason',
|
||||
'oldfieldtype': 'Data',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'pay_to_recd_from',
|
||||
'fieldtype': 'Data',
|
||||
'hidden': 0,
|
||||
'idx': 33,
|
||||
'label': 'Pay To / Recd From',
|
||||
'no_copy': 1,
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'report_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'total_amount',
|
||||
'fieldtype': 'Data',
|
||||
'hidden': 0,
|
||||
'idx': 34,
|
||||
'label': 'Total Amount',
|
||||
'no_copy': 1,
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'report_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'total_amount_in_words',
|
||||
'fieldtype': 'Data',
|
||||
'hidden': 0,
|
||||
'idx': 35,
|
||||
'label': 'Total Amount in Words',
|
||||
'no_copy': 1,
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'report_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 36,
|
||||
'oldfieldtype': 'Column Break',
|
||||
'permlevel': 0,
|
||||
'width': '50%'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'fiscal_year',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 37,
|
||||
'in_filter': 1,
|
||||
'label': 'Fiscal Year',
|
||||
'oldfieldname': 'fiscal_year',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'link:Fiscal Year',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'company',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 38,
|
||||
'in_filter': 1,
|
||||
'label': 'Company',
|
||||
'oldfieldname': 'company',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Company',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'allow_on_submit': 1,
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'select_print_heading',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 39,
|
||||
'label': 'Select Print Heading',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'select_print_heading',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Print Heading',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'report_hide': 1,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 40,
|
||||
'oldfieldtype': 'Section Break',
|
||||
'options': 'Simple',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'allow_on_submit': 1,
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Button',
|
||||
'idx': 41,
|
||||
'label': 'View Ledger Entry',
|
||||
'oldfieldtype': 'Button',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 42,
|
||||
'label': 'TDS',
|
||||
'oldfieldtype': 'Section Break',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': 'No',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'tds_applicable',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 43,
|
||||
'in_filter': 1,
|
||||
'label': 'TDS Applicable',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'tds_applicable',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': '\nYes\nNo',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'tds_category',
|
||||
'fieldtype': 'Select',
|
||||
'hidden': 0,
|
||||
'idx': 44,
|
||||
'in_filter': 1,
|
||||
'label': 'TDS Category',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'tds_category',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'link:TDS Category',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'search_index': 1,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'supplier_account',
|
||||
'fieldtype': 'Link',
|
||||
'hidden': 0,
|
||||
'idx': 45,
|
||||
'label': 'Supplier Account',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'supplier_account',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Account',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Button',
|
||||
'idx': 46,
|
||||
'label': 'Get TDS',
|
||||
'no_copy': 0,
|
||||
'oldfieldtype': 'Button',
|
||||
'permlevel': 0,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Tax Code will be populated based on account head mentioned in TDS Category master',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'tax_code',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 47,
|
||||
'label': 'TDS Account Head',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'tax_code',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Account',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'rate',
|
||||
'fieldtype': 'Currency',
|
||||
'idx': 48,
|
||||
'label': 'Rate',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'rate',
|
||||
'oldfieldtype': 'Currency',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'ded_amount',
|
||||
'fieldtype': 'Currency',
|
||||
'idx': 49,
|
||||
'label': 'Amount',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'ded_amount',
|
||||
'oldfieldtype': 'Currency',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': 'Client'
|
||||
}
|
||||
]
|
||||
@@ -69,7 +69,7 @@
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Cost Center',
|
||||
'permlevel': 0,
|
||||
'search_index': 1,
|
||||
'search_index': 0,
|
||||
'width': '180px'
|
||||
},
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1308741898',
|
||||
'_last_update': '1309508838',
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocType',
|
||||
'module': 'Accounts',
|
||||
@@ -221,6 +221,7 @@
|
||||
'options': 'Supplier',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'search_index': 1,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
@@ -326,7 +327,7 @@
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -342,7 +343,7 @@
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -378,7 +379,7 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -394,7 +395,7 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 0,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -690,7 +691,7 @@
|
||||
'options': 'No\nYes',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'search_index': 1,
|
||||
'search_index': 0,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
@@ -768,7 +769,7 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -785,7 +786,7 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -1084,7 +1085,7 @@
|
||||
'oldfieldtype': 'Currency',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -147,7 +147,8 @@
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'link:Fiscal Year',
|
||||
'permlevel': 0,
|
||||
'reqd': 1
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -172,7 +172,8 @@
|
||||
'oldfieldname': 'company',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Company',
|
||||
'reqd': 1
|
||||
'reqd': 1,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -193,7 +194,8 @@
|
||||
'oldfieldname': 'customer_account',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Account',
|
||||
'reqd': 0
|
||||
'reqd': 0,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -206,7 +208,8 @@
|
||||
'oldfieldname': 'cash_bank_account',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Account',
|
||||
'reqd': 1
|
||||
'reqd': 1,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -219,7 +222,8 @@
|
||||
'oldfieldname': 'income_account',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Account',
|
||||
'reqd': 1
|
||||
'reqd': 1,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -232,7 +236,8 @@
|
||||
'oldfieldname': 'warehouse',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Warehouse',
|
||||
'reqd': 1
|
||||
'reqd': 1,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -245,7 +250,8 @@
|
||||
'oldfieldname': 'cost_center',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Cost Center',
|
||||
'reqd': 1
|
||||
'reqd': 1,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -257,7 +263,8 @@
|
||||
'label': 'Charge',
|
||||
'oldfieldname': 'charge',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Other Charges'
|
||||
'options': 'Other Charges',
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -282,7 +289,8 @@
|
||||
'label': 'Terms',
|
||||
'oldfieldname': 'tc_name',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Term'
|
||||
'options': 'Term',
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -151,6 +151,7 @@
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Cost Center',
|
||||
'permlevel': 0,
|
||||
'search_index': 0,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
'options': 'Item Group',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1308741898',
|
||||
'_last_update': '1309508839',
|
||||
'change_log': '1. Change in pull_details method dt.-26-06-2009',
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocType',
|
||||
@@ -323,7 +323,7 @@
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -342,7 +342,7 @@
|
||||
'oldfieldtype': 'Date',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -433,7 +433,7 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -903,7 +903,7 @@
|
||||
'options': 'No\nYes',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'search_index': 1,
|
||||
'search_index': 0,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
@@ -1027,7 +1027,7 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -1045,7 +1045,7 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -1116,7 +1116,7 @@
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -243,6 +243,7 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 1,
|
||||
'trigger': 'Client',
|
||||
'width': '120px'
|
||||
},
|
||||
@@ -262,6 +263,7 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 0,
|
||||
'search_index': 1,
|
||||
'trigger': 'Client',
|
||||
'width': '120px'
|
||||
},
|
||||
|
||||
@@ -80,7 +80,8 @@
|
||||
'oldfieldname': 'cost_center_other_charges',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Cost Center',
|
||||
'permlevel': 0
|
||||
'permlevel': 0,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
'label': 'Company',
|
||||
'oldfieldname': 'company',
|
||||
'options': 'Company',
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
'options': 'link:Fiscal Year',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@@ -269,7 +269,7 @@
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Company',
|
||||
'permlevel': 0,
|
||||
'search_index': 1,
|
||||
'search_index': 0,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
|
||||
@@ -2,134 +2,145 @@
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
|
||||
msgprint("Please select From Posting Date and To Posting Date ")
|
||||
raise Exception
|
||||
msgprint("Please select From Posting Date and To Posting Date ")
|
||||
raise Exception
|
||||
else:
|
||||
from_date = filter_values.get('posting_date')
|
||||
to_date = filter_values.get('posting_date1')
|
||||
from_date = filter_values.get('posting_date')
|
||||
to_date = filter_values.get('posting_date1')
|
||||
|
||||
if not filter_values['range_1'] or not filter_values['range_2'] or not filter_values['range_3'] or not filter_values['range_4']:
|
||||
msgprint("Please select aging ranges in no of days in 'More Filters' ")
|
||||
raise Exception
|
||||
msgprint("Please select aging ranges in no of days in 'More Filters' ")
|
||||
raise Exception
|
||||
|
||||
# validate Range
|
||||
range_list = ['range_1','range_2','range_3','range_4']
|
||||
for r in range(len(range_list)-1):
|
||||
if not cint(filter_values[range_list[r]]) < cint(filter_values[range_list[r + 1]]):
|
||||
msgprint("Range %s should be less than Range %s." % (cstr(r+1),cstr(r+2)))
|
||||
raise Exception
|
||||
if not cint(filter_values[range_list[r]]) < cint(filter_values[range_list[r + 1]]):
|
||||
msgprint("Range %s should be less than Range %s." % (cstr(r+1),cstr(r+2)))
|
||||
raise Exception
|
||||
|
||||
|
||||
|
||||
# Add columns
|
||||
# ------------------------------------------------------------------
|
||||
data = [['Aging Date','Date','80px',''],
|
||||
['Transaction Date','Date','80px',''],
|
||||
['Account','Data','120px',''],
|
||||
['Against Voucher Type','Data','120px',''],
|
||||
['Against Voucher','Data','120px',''],
|
||||
['Voucher Type','Data','120px',''],
|
||||
['Voucher No','Data','120px',''],
|
||||
['Remarks','Data','160px',''],
|
||||
['Supplier Type', 'Data', '80px', ''],
|
||||
['Due Date', 'Data', '80px', ''],
|
||||
['Bill No','Data','80px',''],
|
||||
['Bill Date','Data','80px',''],
|
||||
['Opening Amt','Currency','120px',''],
|
||||
['Outstanding Amt','Currency','120px',''],
|
||||
['Age (Days)', 'Currency', '150px', ''],
|
||||
['0-'+cstr(filter_values['range_1']),'Currency','100px',''],
|
||||
[cstr(cint(filter_values['range_1']) + 1)+ '-' +cstr(filter_values['range_2']),'Currency','100px',''],
|
||||
[cstr(cint(filter_values['range_2']) + 1)+ '-' +cstr(filter_values['range_3']),'Currency','100px',''],
|
||||
[cstr(cint(filter_values['range_3']) + 1)+ '-' +cstr(filter_values['range_4']),'Currency','100px',''],
|
||||
[cstr(filter_values['range_4']) + '-Above','Currency','100px','']]
|
||||
|
||||
['Transaction Date','Date','80px',''],
|
||||
['Account','Data','120px',''],
|
||||
['Against Voucher Type','Data','120px',''],
|
||||
['Against Voucher','Data','120px',''],
|
||||
['Voucher Type','Data','120px',''],
|
||||
['Voucher No','Data','120px',''],
|
||||
['Remarks','Data','160px',''],
|
||||
['Supplier Type', 'Data', '80px', ''],
|
||||
['Due Date', 'Data', '80px', ''],
|
||||
['Bill No','Data','80px',''],
|
||||
['Bill Date','Data','80px',''],
|
||||
['Opening Amt','Currency','120px',''],
|
||||
['Outstanding Amt','Currency','120px',''],
|
||||
['Age (Days)', 'Currency', '150px', ''],
|
||||
['0-'+cstr(filter_values['range_1']),'Currency','100px',''],
|
||||
[cstr(cint(filter_values['range_1']) + 1)+ '-' +cstr(filter_values['range_2']),'Currency','100px',''],
|
||||
[cstr(cint(filter_values['range_2']) + 1)+ '-' +cstr(filter_values['range_3']),'Currency','100px',''],
|
||||
[cstr(cint(filter_values['range_3']) + 1)+ '-' +cstr(filter_values['range_4']),'Currency','100px',''],
|
||||
[cstr(filter_values['range_4']) + '-Above','Currency','100px','']]
|
||||
|
||||
|
||||
for d in data:
|
||||
colnames.append(d[0])
|
||||
coltypes.append(d[1])
|
||||
colwidths.append(d[2])
|
||||
coloptions.append(d[3])
|
||||
col_idx[d[0]] = len(colnames)-1
|
||||
|
||||
colnames.append(d[0])
|
||||
coltypes.append(d[1])
|
||||
colwidths.append(d[2])
|
||||
coloptions.append(d[3])
|
||||
col_idx[d[0]] = len(colnames)-1
|
||||
|
||||
# ageing based on
|
||||
# ------------------------------------------------------------------
|
||||
aging_based_on = 'Aging Date'
|
||||
if filter_values.has_key('aging_based_on') and filter_values['aging_based_on']:
|
||||
aging_based_on = filter_values['aging_based_on'].split(NEWLINE)[-1]
|
||||
aging_based_on = filter_values['aging_based_on'].split(NEWLINE)[-1]
|
||||
|
||||
if len(res) > 600 and from_export == 0:
|
||||
msgprint("This is a very large report and cannot be shown in the browser as it is likely to make your browser very slow.Please select Account or click on 'Export' to open in excel")
|
||||
raise Exception
|
||||
if len(res) > 600 and from_export == 0:
|
||||
msgprint("This is a very large report and cannot be shown in the browser as it is likely to make your browser very slow.Please select Account or click on 'Export' to open in excel")
|
||||
raise Exception
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# main loop starts here
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
# get supplier type
|
||||
supp_type_dict = {}
|
||||
for each in sql("select t2.name, t1.supplier_type from tabSupplier t1, tabAccount t2 where t1.name = t2.account_name group by t2.name"):
|
||||
supp_type_dict[each[0]] = each[1]
|
||||
|
||||
# get due_date, bill_no, bill_date from PV
|
||||
pv_dict = {}
|
||||
for t in sql("select name, due_date, bill_no, bill_date from `tabPayable Voucher` group by name"):
|
||||
pv_dict[t[0]] = [cstr(t[1]), t[2], cstr(t[3])]
|
||||
|
||||
# pv outside this period
|
||||
pv_outside_period = [d[0] for d in sql("select distinct name from `tabPayable Voucher` where (posting_date < '%s' or posting_date > '%s') and docstatus = 1" % (from_date, to_date))]
|
||||
|
||||
|
||||
out = []
|
||||
total_booking_amt, total_outstanding_amt = 0,0
|
||||
|
||||
for r in res:
|
||||
# get supplier type
|
||||
supplier_type = sql("select t1.supplier_type from tabSupplier t1, tabAccount t2 where t1.name = t2.account_name and t2.name = '%s'" % r[col_idx['Account']])
|
||||
r.append(supplier_type and cstr(supplier_type[0][0]) or '')
|
||||
outstanding_amt, due_date, bill_no, bill_date, cond = 0, '','','', ''
|
||||
booking_amt = r.pop(8)
|
||||
|
||||
# supplier type
|
||||
r.append(supp_type_dict.get(r[col_idx['Account']], ''))
|
||||
|
||||
# if entry against Payable Voucher
|
||||
if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Payable Voucher':
|
||||
r += pv_dict.get(r[col_idx['Voucher No']], ['', '', ''])
|
||||
cond = " and ifnull(against_voucher, '') = '%s'" % r[col_idx['Against Voucher']]
|
||||
|
||||
outstanding_amt, booking_amt, due_date, bill_no, bill_date, cond = 0,0, '','','', ''
|
||||
# if entry against JV & and not adjusted within period
|
||||
elif r[col_idx['Against Voucher Type']] == 'Payable Voucher' and r[col_idx['Against Voucher']] in pv_outside_period:
|
||||
booking_amt = 0
|
||||
cond = " and voucher_no = '%s' and ifnull(against_voucher, '') = '%s'" % (r[col_idx['Voucher No']], r[col_idx['Against Voucher']])
|
||||
|
||||
# if un-adjusted
|
||||
elif not r[col_idx['Against Voucher']]:
|
||||
booking_amt = 0
|
||||
cond = " and ((voucher_no = '%s' and ifnull(against_voucher, '') = '') or (ifnull(against_voucher, '') = '%s' and voucher_type = 'Journal Voucher'))" % (r[col_idx['Voucher No']], r[col_idx['Voucher No']])
|
||||
|
||||
# if entry against Payable Voucher
|
||||
if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Payable Voucher':
|
||||
due_date, bill_no, bill_date = [cstr(t) for t in sql("select due_date,bill_no,bill_date from `tabPayable Voucher` where name = %s", r[col_idx['Voucher No']])[0]]
|
||||
if cond:
|
||||
outstanding_amt = flt(sql("select sum(ifnull(credit, 0))-sum(ifnull(debit, 0)) from `tabGL Entry` where account = '%s' and ifnull(is_cancelled, 'No') = 'No' and posting_date <= '%s' %s" % (r[col_idx['Account']], to_date, cond))[0][0] or 0)
|
||||
|
||||
# get opening
|
||||
booking_amt = sql("select credit from `tabGL Entry` where account = %s and voucher_no = %s and is_cancelled = 'No'", (r[col_idx['Account']], r[col_idx['Voucher No']]))
|
||||
booking_amt = booking_amt and flt(booking_amt[0][0]) or 0
|
||||
# add to total outstanding
|
||||
total_outstanding_amt += flt(outstanding_amt)
|
||||
|
||||
cond = " and against_voucher = '%s' and against_voucher is not null" % r[col_idx['Against Voucher']]
|
||||
# add to total booking amount
|
||||
if outstanding_amt and r[col_idx['Voucher Type']] == 'Payable Voucher' and r[col_idx['Against Voucher']]:
|
||||
total_booking_amt += flt(booking_amt)
|
||||
|
||||
# if entry against JV & and not adjusted within period
|
||||
elif r[col_idx['Against Voucher Type']] == 'Payable Voucher' and sql("select name from `tabPayable Voucher` where name = '%s' and (posting_date < '%s' or posting_date > '%s') and docstatus = 1" % (r[col_idx['Against Voucher']], from_date, to_date)):
|
||||
cond = " and voucher_no = '%s' and ifnull(against_voucher, '') = '%s'" % (r[col_idx['Voucher No']], r[col_idx['Against Voucher']])
|
||||
|
||||
# if un-adjusted
|
||||
elif not r[col_idx['Against Voucher']]:
|
||||
cond = " and ((voucher_no = '%s' and ifnull(against_voucher, '') = '') or (ifnull(against_voucher, '') = '%s' and voucher_type = 'Journal Voucher'))" % (r[col_idx['Voucher No']], r[col_idx['Voucher No']])
|
||||
r += [booking_amt, outstanding_amt]
|
||||
|
||||
# split into date ranges
|
||||
val_l1 = val_l2 = val_l3 = val_l4 = val_l5_above= 0
|
||||
if r[col_idx[aging_based_on]]:
|
||||
diff = (getdate(to_date) - getdate(r[col_idx[aging_based_on]])).days
|
||||
if diff < cint(filter_values['range_1']):
|
||||
val_l1 = outstanding_amt
|
||||
if diff >= cint(filter_values['range_1']) and diff < cint(filter_values['range_2']):
|
||||
val_l2 = outstanding_amt
|
||||
if diff >= cint(filter_values['range_2']) and diff < cint(filter_values['range_3']):
|
||||
val_l3 = outstanding_amt
|
||||
if diff >= cint(filter_values['range_3']) and diff < cint(filter_values['range_4']):
|
||||
val_l4 = outstanding_amt
|
||||
if diff >= cint(filter_values['range_4']):
|
||||
val_l5_above = outstanding_amt
|
||||
|
||||
if cond:
|
||||
outstanding_amt = flt(sql("select sum(ifnull(credit, 0))-sum(ifnull(debit, 0)) from `tabGL Entry` where account = '%s' and ifnull(is_cancelled, 'No') = 'No' and posting_date <= '%s' %s" % (r[col_idx['Account']], to_date, cond))[0][0] or 0)
|
||||
r += [diff, val_l1, val_l2, val_l3, val_l4, val_l5_above]
|
||||
|
||||
# add to total outstanding
|
||||
total_outstanding_amt += flt(outstanding_amt)
|
||||
|
||||
# add to total booking amount
|
||||
if outstanding_amt and r[col_idx['Voucher Type']] == 'Payable Voucher' and r[col_idx['Against Voucher']]:
|
||||
total_booking_amt += flt(booking_amt)
|
||||
|
||||
r += [due_date, bill_no, bill_date, booking_amt, outstanding_amt]
|
||||
|
||||
# split into date ranges
|
||||
val_l1 = val_l2 = val_l3 = val_l4 = val_l5_above= 0
|
||||
if r[col_idx[aging_based_on]]:
|
||||
diff = (getdate(to_date) - getdate(r[col_idx[aging_based_on]])).days
|
||||
if diff < cint(filter_values['range_1']):
|
||||
val_l1 = outstanding_amt
|
||||
if diff >= cint(filter_values['range_1']) and diff < cint(filter_values['range_2']):
|
||||
val_l2 = outstanding_amt
|
||||
if diff >= cint(filter_values['range_2']) and diff < cint(filter_values['range_3']):
|
||||
val_l3 = outstanding_amt
|
||||
if diff >= cint(filter_values['range_3']) and diff < cint(filter_values['range_4']):
|
||||
val_l4 = outstanding_amt
|
||||
if diff >= cint(filter_values['range_4']):
|
||||
val_l5_above = outstanding_amt
|
||||
|
||||
r += [diff, val_l1, val_l2, val_l3, val_l4, val_l5_above]
|
||||
|
||||
# Only show that entry which has outstanding
|
||||
if abs(flt(outstanding_amt)) > 0.001:
|
||||
out.append(r)
|
||||
|
||||
if len(out) > 300 and from_export == 0:
|
||||
msgprint("This is a very large report and cannot be shown in the browser as it is likely to make your browser very slow.Please select Account or click on 'Export' to open in excel")
|
||||
raise Exception
|
||||
# Only show that entry which has outstanding
|
||||
if abs(flt(outstanding_amt)) > 0.001:
|
||||
out.append(r)
|
||||
|
||||
if len(out) > 300 and from_export == 0:
|
||||
msgprint("This is a very large report and cannot be shown in the browser as it is likely to make your browser very slow.Please select Account or click on 'Export' to open in excel")
|
||||
raise Exception
|
||||
|
||||
|
||||
# Append Extra rows to RES
|
||||
|
||||
@@ -1,26 +1,11 @@
|
||||
SELECT *
|
||||
FROM (
|
||||
|
||||
SELECT a.posting_date, a.voucher_no, a.account, a.credit AS inv_amount, ifnull( a.credit, 0 ) - ifnull( b.debit, 0 ) AS outstanding
|
||||
FROM (
|
||||
|
||||
SELECT gl . *
|
||||
FROM `tabGL Entry` gl, `tabAccount` acc
|
||||
WHERE gl.account = acc.name
|
||||
AND acc.master_type = 'Supplier'
|
||||
AND ifnull( gl.is_cancelled, 'No' ) = 'No'
|
||||
AND gl.credit >0
|
||||
AND gl.posting_date <= current_date
|
||||
)a
|
||||
LEFT JOIN (
|
||||
|
||||
SELECT against_voucher, account, sum( debit ) AS debit
|
||||
FROM `tabGL Entry`
|
||||
WHERE ifnull( is_cancelled, 'No' ) = 'No'
|
||||
AND posting_date <= current_date
|
||||
GROUP BY against_voucher, account
|
||||
)b ON a.voucher_no = b.against_voucher
|
||||
AND a.account = b.account
|
||||
)c
|
||||
WHERE outstanding !=0
|
||||
ORDER BY posting_date, voucher_no
|
||||
SELECT DISTINCT `tabGL Entry`.`Aging_date`,`tabGL Entry`.`transaction_date`,`tabGL Entry`.`account`, `tabGL Entry`.`against_voucher_type`, `tabGL Entry`.`against_voucher`,`tabGL Entry`.`voucher_type`,`tabGL Entry`.`voucher_no`, `tabGL Entry`.`remarks`, `tabGL Entry`.`credit`
|
||||
FROM `tabGL Entry`,`tabAccount`
|
||||
WHERE `tabGL Entry`.`posting_date`>= '%(posting_date)s'
|
||||
AND `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
|
||||
AND `tabGL Entry`.`account` LIKE '%(account)s%%'
|
||||
AND `tabGL Entry`.`company` LIKE '%(company)s%%'
|
||||
AND ((ifnull(`tabGL Entry`.voucher_type,'') = 'Payable Voucher' and `tabGL Entry`.credit>0) OR `tabGL Entry`.voucher_type = 'Journal Voucher')
|
||||
AND `tabGL Entry`.`is_cancelled` = 'No'
|
||||
AND `tabAccount`.master_type = 'Supplier'
|
||||
AND `tabAccount`.name = `tabGL Entry`.account
|
||||
ORDER BY `tabGL Entry`.`posting_date`
|
||||
|
||||
Reference in New Issue
Block a user