mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
[docs] [minor] perpetual accounting
This commit is contained in:
@@ -2,19 +2,47 @@
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
|
||||
cur_frm.fields_dict['lc_pr_details'].grid.get_field("purchase_receipt").get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
filters:[['Purchase Receipt', 'docstatus', '=', '1']]
|
||||
}
|
||||
}
|
||||
wn.provide("erpnext.stock");
|
||||
wn.require("public/app/js/controllers/stock_controller.js");
|
||||
|
||||
cur_frm.fields_dict['landed_cost_details'].grid.get_field("account_head").get_query = function(doc, cdt, cdn) {
|
||||
return{
|
||||
filters:[
|
||||
['Account', 'group_or_ledger', '=', 'Ledger'],
|
||||
['Account', 'account_type', 'in', 'Tax, Chargeable'],
|
||||
['Account', 'is_pl_account', '=', 'Yes'],
|
||||
['Account', 'debit_or_credit', '=', 'Debit']
|
||||
]
|
||||
erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
|
||||
setup: function() {
|
||||
var me = this;
|
||||
this.frm.fields_dict.lc_pr_details.grid.get_field('purchase_receipt').get_query =
|
||||
function() {
|
||||
if(!me.frm.doc.company) msgprint(wn._("Please enter company first"));
|
||||
return {
|
||||
filters:[
|
||||
['Purchase Receipt', 'docstatus', '=', '1'],
|
||||
['Purchase Receipt', 'company', '=', me.frm.doc.company],
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
this.frm.fields_dict.landed_cost_details.grid.get_field('account_head').get_query = function() {
|
||||
if(!me.frm.doc.company) msgprint(wn._("Please enter company first"));
|
||||
return {
|
||||
filters:[
|
||||
['Account', 'group_or_ledger', '=', 'Ledger'],
|
||||
['Account', 'account_type', 'in', 'Tax, Chargeable'],
|
||||
['Account', 'is_pl_account', '=', 'Yes'],
|
||||
['Account', 'debit_or_credit', '=', 'Debit'],
|
||||
['Account', 'company', '=', me.frm.doc.company]
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
this.frm.fields_dict.landed_cost_details.grid.get_field('cost_center').get_query =
|
||||
function() {
|
||||
if(!me.frm.doc.company) msgprint(wn._("Please enter company first"));
|
||||
return {
|
||||
filters:[
|
||||
['Cost Center', 'group_or_ledger', '=', 'Ledger'],
|
||||
['Cost Center', 'company', '=', me.frm.doc.company]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
cur_frm.script_manager.make(erpnext.stock.LandedCostWizard);
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-22 16:50:39",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-09-02 13:45:54",
|
||||
"modified": "2013-09-02 19:13:09",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "wasim@webnotestech.com"
|
||||
},
|
||||
@@ -38,6 +38,14 @@
|
||||
"doctype": "DocType",
|
||||
"name": "Landed Cost Wizard"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"label": "Company",
|
||||
"options": "Company",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "section_break0",
|
||||
|
||||
Reference in New Issue
Block a user