From cc9528c8e2960e839e4eb02d33bcbdb0f455349a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 1 Feb 2013 12:15:44 +0530 Subject: [PATCH] removed gl mapper with patch --- .../Journal Voucher/Journal Voucher.txt | 46 ------ .../POS with write off/POS with write off.txt | 148 ------------------ accounts/GL Mapper/POS/POS.txt | 117 -------------- .../Purchase Invoice with write off.txt | 96 ------------ .../Purchase Invoice/Purchase Invoice.txt | 79 ---------- .../GL Mapper/Sales Invoice/Sales Invoice.txt | 81 ---------- .../journal_voucher/journal_voucher.py | 5 +- .../journal_voucher/journal_voucher.txt | 9 +- .../doctype/sales_invoice/sales_invoice.py | 3 +- 9 files changed, 9 insertions(+), 575 deletions(-) delete mode 100644 accounts/GL Mapper/Journal Voucher/Journal Voucher.txt delete mode 100644 accounts/GL Mapper/POS with write off/POS with write off.txt delete mode 100644 accounts/GL Mapper/POS/POS.txt delete mode 100644 accounts/GL Mapper/Purchase Invoice with write off/Purchase Invoice with write off.txt delete mode 100644 accounts/GL Mapper/Purchase Invoice/Purchase Invoice.txt delete mode 100644 accounts/GL Mapper/Sales Invoice/Sales Invoice.txt diff --git a/accounts/GL Mapper/Journal Voucher/Journal Voucher.txt b/accounts/GL Mapper/Journal Voucher/Journal Voucher.txt deleted file mode 100644 index 63c1df86d6..0000000000 --- a/accounts/GL Mapper/Journal Voucher/Journal Voucher.txt +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "owner": "Administrator", - "docstatus": 0, - "creation": "2012-04-17 11:29:12", - "modified_by": "Administrator", - "modified": "2013-01-18 10:39:49" - }, - { - "doc_type": "Journal Voucher", - "name": "__common__", - "doctype": "GL Mapper" - }, - { - "parent": "Journal Voucher", - "company": "parent:company", - "fiscal_year": "parent:fiscal_year", - "voucher_type": "parent:doctype", - "debit": "debit", - "is_advance": "is_advance", - "remarks": "parent:remark", - "cost_center": "cost_center", - "account": "account", - "voucher_no": "parent:name", - "aging_date": "parent:aging_date", - "name": "__common__", - "against_voucher": "value:d.against_voucher or d.against_invoice or d.against_jv or ''", - "against_voucher_type": "value:(d.against_voucher and 'Purchase Invoice') or (d.against_invoice and 'Sales Invoice') or (d.against_jv and 'Journal Voucher') or ''", - "doctype": "GL Mapper Detail", - "against": "against_account", - "credit": "credit", - "table_field": "entries", - "transaction_date": "parent:voucher_date", - "is_opening": "parent:is_opening", - "posting_date": "parent:posting_date", - "parenttype": "GL Mapper", - "parentfield": "fields" - }, - { - "name": "Journal Voucher", - "doctype": "GL Mapper" - }, - { - "doctype": "GL Mapper Detail" - } -] \ No newline at end of file diff --git a/accounts/GL Mapper/POS with write off/POS with write off.txt b/accounts/GL Mapper/POS with write off/POS with write off.txt deleted file mode 100644 index 72b2305563..0000000000 --- a/accounts/GL Mapper/POS with write off/POS with write off.txt +++ /dev/null @@ -1,148 +0,0 @@ -[ - { - "owner": "Administrator", - "docstatus": 0, - "creation": "2011-05-20 10:07:58", - "modified_by": "Administrator", - "modified": "2012-05-01 09:16:31" - }, - { - "doc_type": "POS with write off", - "name": "__common__", - "doctype": "GL Mapper" - }, - { - "name": "__common__", - "parent": "POS with write off", - "doctype": "GL Mapper Detail", - "parenttype": "GL Mapper", - "parentfield": "fields" - }, - { - "name": "POS with write off", - "doctype": "GL Mapper" - }, - { - "account": "income_account", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "value:0", - "fiscal_year": "parent:fiscal_year", - "against": "parent:debit_to", - "voucher_type": "parent:doctype", - "credit": "amount", - "table_field": "entries", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center" - }, - { - "account": "account_head", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "value:0", - "fiscal_year": "parent:fiscal_year", - "against": "parent:debit_to", - "voucher_type": "parent:doctype", - "credit": "tax_amount", - "table_field": "other_charges", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center_other_charges" - }, - { - "account": "debit_to", - "doctype": "GL Mapper Detail", - "against_voucher": "name", - "against_voucher_type": "doctype", - "company": "company", - "debit": "grand_total", - "fiscal_year": "fiscal_year", - "against": "against_income_account", - "voucher_type": "doctype", - "credit": "value:0", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name" - }, - { - "account": "debit_to", - "doctype": "GL Mapper Detail", - "against_voucher": "name", - "against_voucher_type": "doctype", - "company": "company", - "debit": "value:0", - "fiscal_year": "fiscal_year", - "against": "cash_bank_account", - "voucher_type": "doctype", - "credit": "paid_amount", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name" - }, - { - "account": "debit_to", - "doctype": "GL Mapper Detail", - "against_voucher": "name", - "against_voucher_type": "doctype", - "company": "company", - "debit": "value:0", - "fiscal_year": "fiscal_year", - "against": "write_off_account", - "voucher_type": "doctype", - "credit": "write_off_amount", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name" - }, - { - "account": "cash_bank_account", - "doctype": "GL Mapper Detail", - "company": "company", - "debit": "paid_amount", - "fiscal_year": "fiscal_year", - "against": "debit_to", - "voucher_type": "doctype", - "credit": "value:0", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name" - }, - { - "account": "write_off_account", - "doctype": "GL Mapper Detail", - "company": "company", - "debit": "write_off_amount", - "fiscal_year": "fiscal_year", - "against": "debit_to", - "voucher_type": "doctype", - "credit": "value:0", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name", - "cost_center": "write_off_cost_center" - } -] \ No newline at end of file diff --git a/accounts/GL Mapper/POS/POS.txt b/accounts/GL Mapper/POS/POS.txt deleted file mode 100644 index 0fca5e4aa2..0000000000 --- a/accounts/GL Mapper/POS/POS.txt +++ /dev/null @@ -1,117 +0,0 @@ -[ - { - "owner": "Administrator", - "docstatus": 0, - "creation": "2010-12-15 08:39:20", - "modified_by": "Administrator", - "modified": "2012-05-01 09:16:31" - }, - { - "doc_type": "POS", - "name": "__common__", - "doctype": "GL Mapper" - }, - { - "name": "__common__", - "parent": "POS", - "doctype": "GL Mapper Detail", - "parenttype": "GL Mapper", - "parentfield": "fields" - }, - { - "name": "POS", - "doctype": "GL Mapper" - }, - { - "account": "income_account", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "value:0", - "fiscal_year": "parent:fiscal_year", - "against": "parent:debit_to", - "voucher_type": "parent:doctype", - "credit": "amount", - "table_field": "entries", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center" - }, - { - "account": "account_head", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "value:0", - "fiscal_year": "parent:fiscal_year", - "against": "parent:debit_to", - "voucher_type": "parent:doctype", - "credit": "tax_amount", - "table_field": "other_charges", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center_other_charges" - }, - { - "account": "debit_to", - "doctype": "GL Mapper Detail", - "against_voucher": "name", - "against_voucher_type": "doctype", - "company": "company", - "debit": "grand_total", - "fiscal_year": "fiscal_year", - "against": "against_income_account", - "voucher_type": "doctype", - "credit": "value:0", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name" - }, - { - "account": "debit_to", - "doctype": "GL Mapper Detail", - "credit": "paid_amount", - "against_voucher_type": "doctype", - "company": "company", - "debit": "value:0", - "fiscal_year": "fiscal_year", - "against": "cash_bank_account", - "voucher_type": "doctype", - "against_voucher": "name", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name", - "cost_center": "" - }, - { - "account": "cash_bank_account", - "doctype": "GL Mapper Detail", - "credit": "value:0", - "against_voucher_type": "", - "company": "company", - "debit": "paid_amount", - "fiscal_year": "fiscal_year", - "against": "debit_to", - "voucher_type": "doctype", - "against_voucher": "", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name", - "cost_center": "" - } -] \ No newline at end of file diff --git a/accounts/GL Mapper/Purchase Invoice with write off/Purchase Invoice with write off.txt b/accounts/GL Mapper/Purchase Invoice with write off/Purchase Invoice with write off.txt deleted file mode 100644 index 5b47fd7747..0000000000 --- a/accounts/GL Mapper/Purchase Invoice with write off/Purchase Invoice with write off.txt +++ /dev/null @@ -1,96 +0,0 @@ -[ - { - "owner": "Administrator", - "docstatus": 0, - "creation": "2012-10-03 11:26:38", - "modified_by": "Administrator", - "modified": "2013-01-18 10:38:40" - }, - { - "doc_type": "Purchase Invoice with write off", - "name": "__common__", - "doctype": "GL Mapper" - }, - { - "name": "__common__", - "parent": "Purchase Invoice with write off", - "doctype": "GL Mapper Detail", - "parenttype": "GL Mapper", - "parentfield": "fields" - }, - { - "name": "Purchase Invoice with write off", - "doctype": "GL Mapper" - }, - { - "account": "expense_head", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "amount", - "fiscal_year": "parent:fiscal_year", - "against": "parent:credit_to", - "voucher_type": "parent:doctype", - "credit": "value:0", - "table_field": "entries", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center" - }, - { - "account": "account_head", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "value:d.fields.get('category') != 'Valuation' and d.fields.get('add_deduct_tax') == 'Add' and d.fields.get('tax_amount') or 0", - "fiscal_year": "parent:fiscal_year", - "against": "parent:credit_to", - "voucher_type": "parent:doctype", - "credit": "value:d.fields.get('category') != 'Valuation' and d.fields.get('add_deduct_tax') == 'Deduct' and d.fields.get('tax_amount') or 0", - "table_field": "purchase_tax_details", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center" - }, - { - "account": "credit_to", - "doctype": "GL Mapper Detail", - "against_voucher": "name", - "against_voucher_type": "value:'Purchase Invoice'", - "company": "company", - "debit": "value:0", - "fiscal_year": "fiscal_year", - "against": "against_expense_account", - "voucher_type": "doctype", - "credit": "total_amount_to_pay", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name" - }, - { - "account": "write_off_account", - "doctype": "GL Mapper Detail", - "company": "company", - "debit": "value:0", - "fiscal_year": "fiscal_year", - "against": "credit_to", - "voucher_type": "doctype", - "credit": "write_off_amount", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name", - "cost_center": "write_off_cost_center" - } -] \ No newline at end of file diff --git a/accounts/GL Mapper/Purchase Invoice/Purchase Invoice.txt b/accounts/GL Mapper/Purchase Invoice/Purchase Invoice.txt deleted file mode 100644 index 662cf8d126..0000000000 --- a/accounts/GL Mapper/Purchase Invoice/Purchase Invoice.txt +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "owner": "Administrator", - "docstatus": 0, - "creation": "2012-10-03 11:26:38", - "modified_by": "Administrator", - "modified": "2013-01-18 10:39:38" - }, - { - "doc_type": "Purchase Invoice", - "name": "__common__", - "doctype": "GL Mapper" - }, - { - "name": "__common__", - "parent": "Purchase Invoice", - "doctype": "GL Mapper Detail", - "parenttype": "GL Mapper", - "parentfield": "fields" - }, - { - "name": "Purchase Invoice", - "doctype": "GL Mapper" - }, - { - "account": "expense_head", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "amount", - "fiscal_year": "parent:fiscal_year", - "against": "parent:credit_to", - "voucher_type": "parent:doctype", - "credit": "value:0", - "table_field": "entries", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center" - }, - { - "account": "account_head", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "value:d.fields.get('category') != 'Valuation' and d.fields.get('add_deduct_tax') == 'Add' and d.fields.get('tax_amount') or 0", - "fiscal_year": "parent:fiscal_year", - "against": "parent:credit_to", - "voucher_type": "parent:doctype", - "credit": "value:d.fields.get('category') != 'Valuation' and d.fields.get('add_deduct_tax') == 'Deduct' and d.fields.get('tax_amount') or 0", - "table_field": "purchase_tax_details", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center" - }, - { - "account": "credit_to", - "doctype": "GL Mapper Detail", - "against_voucher": "name", - "against_voucher_type": "value:'Purchase Invoice'", - "company": "company", - "debit": "value:0", - "fiscal_year": "fiscal_year", - "against": "against_expense_account", - "voucher_type": "doctype", - "credit": "total_amount_to_pay", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name" - } -] \ No newline at end of file diff --git a/accounts/GL Mapper/Sales Invoice/Sales Invoice.txt b/accounts/GL Mapper/Sales Invoice/Sales Invoice.txt deleted file mode 100644 index 6057a27d8f..0000000000 --- a/accounts/GL Mapper/Sales Invoice/Sales Invoice.txt +++ /dev/null @@ -1,81 +0,0 @@ -[ - { - "owner": "Administrator", - "docstatus": 0, - "creation": "2010-08-08 17:09:36", - "modified_by": "Administrator", - "modified": "2012-05-01 09:16:31" - }, - { - "doc_type": "Receivable Voucher", - "name": "__common__", - "doctype": "GL Mapper" - }, - { - "name": "__common__", - "parent": "Sales Invoice", - "doctype": "GL Mapper Detail", - "parenttype": "GL Mapper", - "parentfield": "fields" - }, - { - "name": "Sales Invoice", - "doctype": "GL Mapper" - }, - { - "account": "income_account", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "value:0", - "fiscal_year": "parent:fiscal_year", - "against": "parent:debit_to", - "voucher_type": "parent:doctype", - "credit": "amount", - "table_field": "entries", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center" - }, - { - "account": "account_head", - "doctype": "GL Mapper Detail", - "company": "parent:company", - "debit": "value:0", - "fiscal_year": "parent:fiscal_year", - "against": "parent:debit_to", - "voucher_type": "parent:doctype", - "credit": "tax_amount", - "table_field": "other_charges", - "transaction_date": "parent:voucher_date", - "aging_date": "parent:aging_date", - "is_opening": "parent:is_opening", - "remarks": "parent:remarks", - "posting_date": "parent:posting_date", - "voucher_no": "parent:name", - "cost_center": "cost_center_other_charges" - }, - { - "account": "debit_to", - "doctype": "GL Mapper Detail", - "credit": "value:0", - "against_voucher_type": "value:'Sales Invoice'", - "company": "company", - "debit": "grand_total", - "fiscal_year": "fiscal_year", - "against": "against_income_account", - "voucher_type": "doctype", - "against_voucher": "name", - "table_field": "", - "transaction_date": "voucher_date", - "aging_date": "aging_date", - "is_opening": "is_opening", - "remarks": "remarks", - "posting_date": "posting_date", - "voucher_no": "name", - "cost_center": "" - } -] \ No newline at end of file diff --git a/accounts/doctype/journal_voucher/journal_voucher.py b/accounts/doctype/journal_voucher/journal_voucher.py index 0a4a1a117c..2e1bc7e5e5 100644 --- a/accounts/doctype/journal_voucher/journal_voucher.py +++ b/accounts/doctype/journal_voucher/journal_voucher.py @@ -143,7 +143,6 @@ class DocType(AccountsController): from `tabPurchase Invoice` where name=%s""", d.against_voucher) if bill_no and bill_no[0][0] and bill_no[0][0].lower().strip() \ not in ['na', 'not applicable', 'none']: - bill_no = bill_no and bill_no[0] r.append('%s %s against Bill %s dated %s' % (cstr(bill_no[0][2]), fmt_money(flt(d.debit)), bill_no[0][0], bill_no[0][1] and formatdate(bill_no[0][1].strftime('%Y-%m-%d')) or '')) @@ -238,11 +237,11 @@ class DocType(AccountsController): def check_account_against_entries(self): for d in self.doclist.get({"parentfield": "entries"}): if d.against_invoice and webnotes.conn.get_value("Sales Invoice", - d.against_invoice, "credit_to") != d.account: + d.against_invoice, "debit_to") != d.account: msgprint("Debit account is not matching with Sales Invoice", raise_exception=1) if d.against_voucher and webnotes.conn.get_value("Purchase Invoice", - d.against_voucher, "debit_to") != d.account: + d.against_voucher, "credit_to") != d.account: msgprint("Credit account is not matching with Purchase Invoice", raise_exception=1) def make_gl_entries(self, cancel=0, adv_adj=0): diff --git a/accounts/doctype/journal_voucher/journal_voucher.txt b/accounts/doctype/journal_voucher/journal_voucher.txt index 601ab5f97e..b36008e134 100644 --- a/accounts/doctype/journal_voucher/journal_voucher.txt +++ b/accounts/doctype/journal_voucher/journal_voucher.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-19 10:23:34", + "creation": "2013-01-30 12:49:46", "docstatus": 0, - "modified": "2013-01-29 18:19:58", + "modified": "2013-02-01 10:50:16", "modified_by": "Administrator", "owner": "Administrator" }, @@ -83,6 +83,7 @@ "fieldname": "posting_date", "fieldtype": "Date", "in_filter": 1, + "in_list_view": 1, "label": "Posting Date", "no_copy": 1, "oldfieldname": "posting_date", @@ -176,6 +177,7 @@ "fieldname": "cheque_no", "fieldtype": "Data", "in_filter": 1, + "in_list_view": 1, "label": "Reference Number", "no_copy": 1, "oldfieldname": "cheque_no", @@ -224,7 +226,7 @@ "doctype": "DocField", "fieldname": "remark", "fieldtype": "Small Text", - "in_list_view": 1, + "in_list_view": 0, "label": "Remark", "no_copy": 1, "oldfieldname": "remark", @@ -236,6 +238,7 @@ "doctype": "DocField", "fieldname": "bill_no", "fieldtype": "Data", + "in_list_view": 0, "label": "Bill No", "oldfieldname": "bill_no", "oldfieldtype": "Data", diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py index 7cb165bb95..65f23f5be1 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.py +++ b/accounts/doctype/sales_invoice/sales_invoice.py @@ -250,8 +250,7 @@ class DocType(SellingController): for d in getlist(self.doclist, doctype): if d.item_code: item = webnotes.conn.get_value("Item", d.item_code, - ["default_income_account", "default_sales_cost_center"]) - + ["default_income_account", "default_sales_cost_center"], as_dict=True) d.income_account = item['default_income_account'] or "" d.cost_center = item['default_sales_cost_center'] or ""