Account type Temporary and removed Aging Date field from all documents
This commit is contained in:
parent
50ce9753e0
commit
5616ff417c
@ -101,7 +101,7 @@
|
||||
"label": "Account Type",
|
||||
"oldfieldname": "account_type",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment\nStock",
|
||||
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment\nStock\nTemporary",
|
||||
"permlevel": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
@ -171,7 +171,7 @@
|
||||
"icon": "icon-money",
|
||||
"idx": 1,
|
||||
"in_create": 0,
|
||||
"modified": "2015-04-23 02:53:48.056520",
|
||||
"modified": "2015-04-27 20:07:37.147184",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Account",
|
||||
|
@ -55,7 +55,9 @@
|
||||
"is_group": 1
|
||||
},
|
||||
"Temporary Accounts": {
|
||||
"Temporary Opening": {}
|
||||
"Temporary Opening": {
|
||||
"account_type": "Temporary"
|
||||
}
|
||||
},
|
||||
"root_type": "Asset"
|
||||
},
|
||||
|
@ -58,7 +58,9 @@ def get():
|
||||
"is_group": 1
|
||||
},
|
||||
_("Temporary Accounts"): {
|
||||
_("Temporary Opening"): {}
|
||||
_("Temporary Opening"): {
|
||||
"account_type": "Temporary"
|
||||
}
|
||||
},
|
||||
"root_type": "Asset"
|
||||
},
|
||||
|
@ -24,17 +24,6 @@
|
||||
"oldfieldtype": "Date",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "aging_date",
|
||||
"fieldtype": "Date",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Aging Date",
|
||||
"oldfieldname": "aging_date",
|
||||
"oldfieldtype": "Date",
|
||||
"permlevel": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "account",
|
||||
"fieldtype": "Link",
|
||||
@ -203,7 +192,7 @@
|
||||
"icon": "icon-list",
|
||||
"idx": 1,
|
||||
"in_create": 1,
|
||||
"modified": "2014-09-11 18:35:22.822064",
|
||||
"modified": "2015-04-27 20:32:48.246818",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "GL Entry",
|
||||
|
@ -163,11 +163,6 @@ cur_frm.cscript.posting_date = function(doc, cdt, cdn){
|
||||
erpnext.get_fiscal_year(doc.company, doc.posting_date);
|
||||
}
|
||||
|
||||
cur_frm.cscript.is_opening = function(doc, cdt, cdn) {
|
||||
hide_field('aging_date');
|
||||
if (doc.is_opening == 'Yes') unhide_field('aging_date');
|
||||
}
|
||||
|
||||
cur_frm.cscript.update_totals = function(doc) {
|
||||
var td=0.0; var tc =0.0;
|
||||
var el = doc.accounts || [];
|
||||
|
@ -294,18 +294,6 @@
|
||||
"read_only": 0,
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"fieldname": "aging_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "Ageing Date",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "aging_date",
|
||||
"oldfieldtype": "Date",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"default": "Accounts Receivable",
|
||||
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
|
||||
@ -457,7 +445,7 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2015-03-25 07:11:27.108475",
|
||||
"modified": "2015-04-27 20:32:31.655580",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Journal Entry",
|
||||
|
@ -32,7 +32,6 @@ class JournalEntry(AccountsController):
|
||||
self.validate_against_purchase_invoice()
|
||||
self.set_against_account()
|
||||
self.create_remarks()
|
||||
self.set_aging_date()
|
||||
self.set_print_format_fields()
|
||||
self.validate_against_sales_order()
|
||||
self.validate_against_purchase_order()
|
||||
@ -306,18 +305,6 @@ class JournalEntry(AccountsController):
|
||||
if r:
|
||||
self.remark = ("\n").join(r) #User Remarks is not mandatory
|
||||
|
||||
|
||||
def set_aging_date(self):
|
||||
if self.is_opening != 'Yes':
|
||||
self.aging_date = self.posting_date
|
||||
else:
|
||||
party_list = [d.party for d in self.get("accounts") if d.party_type and d.party]
|
||||
|
||||
if len(party_list) and not self.aging_date:
|
||||
frappe.throw(_("Aging Date is mandatory for opening entry"))
|
||||
else:
|
||||
self.aging_date = self.posting_date
|
||||
|
||||
def set_print_format_fields(self):
|
||||
for d in self.get('accounts'):
|
||||
if d.party_type and d.party:
|
||||
|
@ -116,11 +116,6 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
||||
|
||||
cur_frm.script_manager.make(erpnext.accounts.PurchaseInvoice);
|
||||
|
||||
cur_frm.cscript.is_opening = function(doc, dt, dn) {
|
||||
hide_field('aging_date');
|
||||
if (doc.is_opening == 'Yes') unhide_field('aging_date');
|
||||
}
|
||||
|
||||
cur_frm.cscript.make_bank_entry = function() {
|
||||
return frappe.call({
|
||||
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_from_purchase_invoice",
|
||||
|
@ -749,18 +749,6 @@
|
||||
"read_only": 0,
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"description": "Actual Invoice Date",
|
||||
"fieldname": "aging_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "Aging Date",
|
||||
"oldfieldname": "aging_date",
|
||||
"oldfieldtype": "Date",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"fieldname": "select_print_heading",
|
||||
@ -965,7 +953,7 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2015-03-23 14:47:57.373436",
|
||||
"modified": "2015-04-27 20:32:12.436976",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice",
|
||||
|
@ -47,7 +47,6 @@ class PurchaseInvoice(BuyingController):
|
||||
self.check_for_stopped_status()
|
||||
self.validate_with_previous_doc()
|
||||
self.validate_uom_is_integer("uom", "qty")
|
||||
self.set_aging_date()
|
||||
self.set_against_expense_account()
|
||||
self.validate_write_off_account()
|
||||
self.update_valuation_rate("items")
|
||||
@ -141,13 +140,6 @@ class PurchaseInvoice(BuyingController):
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
def set_aging_date(self):
|
||||
if self.is_opening != 'Yes':
|
||||
self.aging_date = self.posting_date
|
||||
elif not self.aging_date:
|
||||
throw(_("Ageing date is mandatory for opening entry"))
|
||||
|
||||
def set_against_expense_account(self):
|
||||
auto_accounting_for_stock = cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
|
||||
|
||||
@ -173,7 +165,7 @@ class PurchaseInvoice(BuyingController):
|
||||
elif item.expense_account not in against_accounts:
|
||||
# if no auto_accounting_for_stock or not a stock item
|
||||
against_accounts.append(item.expense_account)
|
||||
|
||||
|
||||
self.against_expense_account = ",".join(against_accounts)
|
||||
|
||||
def po_required(self):
|
||||
@ -393,7 +385,7 @@ def get_expense_account(doctype, txt, searchfield, start, page_len, filters):
|
||||
# Hence the first condition is an "OR"
|
||||
return frappe.db.sql("""select tabAccount.name from `tabAccount`
|
||||
where (tabAccount.report_type = "Profit and Loss"
|
||||
or tabAccount.account_type in ("Expense Account", "Fixed Asset"))
|
||||
or tabAccount.account_type in ("Expense Account", "Fixed Asset", "Temporary"))
|
||||
and tabAccount.is_group=0
|
||||
and tabAccount.docstatus!=2
|
||||
and tabAccount.company = '%(company)s'
|
||||
|
@ -262,11 +262,6 @@ cur_frm.cscript.update_stock = function(doc, dt, dn) {
|
||||
cur_frm.cscript.hide_fields(doc, dt, dn);
|
||||
}
|
||||
|
||||
cur_frm.cscript.is_opening = function(doc, dt, dn) {
|
||||
hide_field('aging_date');
|
||||
if (doc.is_opening == 'Yes') unhide_field('aging_date');
|
||||
}
|
||||
|
||||
cur_frm.cscript['Make Delivery Note'] = function() {
|
||||
frappe.model.open_mapped_doc({
|
||||
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.make_delivery_note",
|
||||
|
@ -986,17 +986,6 @@
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "Actual Invoice Date",
|
||||
"fieldname": "aging_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "Aging Date",
|
||||
"oldfieldname": "aging_date",
|
||||
"oldfieldtype": "Date",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "fiscal_year",
|
||||
"fieldtype": "Link",
|
||||
@ -1254,8 +1243,8 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2015-04-02 13:42:22.985078",
|
||||
"modified_by": "anand@erpnext.com",
|
||||
"modified": "2015-04-27 20:31:51.966964",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice",
|
||||
"owner": "Administrator",
|
||||
|
@ -62,7 +62,6 @@ class SalesInvoice(SellingController):
|
||||
if not self.is_opening:
|
||||
self.is_opening = 'No'
|
||||
|
||||
self.set_aging_date()
|
||||
self.set_against_income_account()
|
||||
self.validate_c_form()
|
||||
self.validate_time_logs_are_submitted()
|
||||
@ -282,13 +281,6 @@ class SalesInvoice(SellingController):
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
def set_aging_date(self):
|
||||
if self.is_opening != 'Yes':
|
||||
self.aging_date = self.posting_date
|
||||
elif not self.aging_date:
|
||||
throw(_("Ageing Date is mandatory for opening entry"))
|
||||
|
||||
def set_against_income_account(self):
|
||||
"""Set against account for debit to account"""
|
||||
against_acc = []
|
||||
@ -616,7 +608,7 @@ def get_income_account(doctype, txt, searchfield, start, page_len, filters):
|
||||
# Hence the first condition is an "OR"
|
||||
return frappe.db.sql("""select tabAccount.name from `tabAccount`
|
||||
where (tabAccount.report_type = "Profit and Loss"
|
||||
or tabAccount.account_type = "Income Account")
|
||||
or tabAccount.account_type in ("Income Account", "Temporary"))
|
||||
and tabAccount.is_group=0
|
||||
and tabAccount.docstatus!=2
|
||||
and tabAccount.company = '%(company)s'
|
||||
|
@ -204,7 +204,7 @@ erpnext.AccountsChart = Class.extend({
|
||||
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
|
||||
options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable',
|
||||
'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account',
|
||||
'Income Account', 'Tax', 'Chargeable'].join('\n'),
|
||||
'Income Account', 'Tax', 'Chargeable', 'Temporary'].join('\n'),
|
||||
description: __("Optional. This setting will be used to filter in various transactions.") },
|
||||
{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate')},
|
||||
{fieldtype:'Link', fieldname:'warehouse', label:__('Warehouse'), options:"Warehouse"}
|
||||
|
@ -39,9 +39,8 @@ class AccountsController(TransactionBase):
|
||||
|
||||
def before_recurring(self):
|
||||
self.fiscal_year = None
|
||||
for fieldname in ("due_date", "aging_date"):
|
||||
if self.meta.get_field(fieldname):
|
||||
self.set(fieldname, None)
|
||||
if self.meta.get_field("due_date"):
|
||||
self.due_date = None
|
||||
|
||||
def set_missing_values(self, for_validate=False):
|
||||
for fieldname in ["posting_date", "transaction_date"]:
|
||||
@ -178,7 +177,6 @@ class AccountsController(TransactionBase):
|
||||
'posting_date': self.posting_date,
|
||||
'voucher_type': self.doctype,
|
||||
'voucher_no': self.name,
|
||||
'aging_date': self.get("aging_date") or self.posting_date,
|
||||
'remarks': self.get("remarks"),
|
||||
'fiscal_year': self.fiscal_year,
|
||||
'debit': 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user