Merge branch 'master' of github.com:webnotes/erpnext into purchase_price_list

Conflicts:
	patches/patch_list.py
This commit is contained in:
Anand Doshi
2013-01-18 12:32:00 +05:30
6 changed files with 200 additions and 237 deletions

View File

@@ -2,9 +2,9 @@
{ {
"owner": "Administrator", "owner": "Administrator",
"docstatus": 0, "docstatus": 0,
"creation": "2012-05-01 12:46:31", "creation": "2012-04-17 11:29:12",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2012-05-01 09:16:31" "modified": "2013-01-18 10:39:49"
}, },
{ {
"doc_type": "Journal Voucher", "doc_type": "Journal Voucher",
@@ -12,9 +12,27 @@
"doctype": "GL Mapper" "doctype": "GL Mapper"
}, },
{ {
"name": "__common__",
"parent": "Journal Voucher", "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", "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", "parenttype": "GL Mapper",
"parentfield": "fields" "parentfield": "fields"
}, },
@@ -23,40 +41,6 @@
"doctype": "GL Mapper" "doctype": "GL Mapper"
}, },
{ {
"account": "account", "doctype": "GL Mapper Detail"
"doctype": "GL Mapper Detail",
"credit": "credit",
"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 ''",
"company": "parent:company",
"debit": "debit",
"fiscal_year": "parent:fiscal_year",
"against": "against_account",
"voucher_type": "parent:doctype",
"against_voucher": "value:d.against_voucher or d.against_invoice or d.against_jv or ''",
"table_field": "entries",
"transaction_date": "parent:voucher_date",
"is_advance": "is_advance",
"aging_date": "parent:aging_date",
"is_opening": "parent:is_opening",
"remarks": "parent:remark",
"posting_date": "parent:posting_date",
"voucher_no": "parent:name",
"cost_center": "cost_center"
},
{
"account": "tax_code",
"doctype": "GL Mapper Detail",
"company": "company",
"debit": "value:0",
"fiscal_year": "fiscal_year",
"against": "supplier_account",
"voucher_type": "doctype",
"credit": "ded_amount",
"transaction_date": "voucher_date",
"aging_date": "aging_date",
"is_opening": "is_opening",
"remarks": "remark",
"posting_date": "posting_date",
"voucher_no": "name"
} }
] ]

View File

@@ -2,9 +2,9 @@
{ {
"owner": "Administrator", "owner": "Administrator",
"docstatus": 0, "docstatus": 0,
"creation": "2012-10-03 11:29:52", "creation": "2012-10-03 11:26:38",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2012-10-03 11:08:09" "modified": "2013-01-18 10:38:40"
}, },
{ {
"doc_type": "Purchase Invoice with write off", "doc_type": "Purchase Invoice with write off",
@@ -24,7 +24,9 @@
}, },
{ {
"account": "expense_head", "account": "expense_head",
"doctype": "GL Mapper Detail",
"company": "parent:company", "company": "parent:company",
"debit": "amount",
"fiscal_year": "parent:fiscal_year", "fiscal_year": "parent:fiscal_year",
"against": "parent:credit_to", "against": "parent:credit_to",
"voucher_type": "parent:doctype", "voucher_type": "parent:doctype",
@@ -32,17 +34,17 @@
"table_field": "entries", "table_field": "entries",
"transaction_date": "parent:voucher_date", "transaction_date": "parent:voucher_date",
"aging_date": "parent:aging_date", "aging_date": "parent:aging_date",
"doctype": "GL Mapper Detail",
"remarks": "parent:remarks",
"is_opening": "parent:is_opening", "is_opening": "parent:is_opening",
"remarks": "parent:remarks",
"posting_date": "parent:posting_date",
"voucher_no": "parent:name", "voucher_no": "parent:name",
"debit": "amount", "cost_center": "cost_center"
"cost_center": "cost_center",
"posting_date": "parent:posting_date"
}, },
{ {
"account": "account_head", "account": "account_head",
"doctype": "GL Mapper Detail",
"company": "parent:company", "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", "fiscal_year": "parent:fiscal_year",
"against": "parent:credit_to", "against": "parent:credit_to",
"voucher_type": "parent:doctype", "voucher_type": "parent:doctype",
@@ -50,63 +52,45 @@
"table_field": "purchase_tax_details", "table_field": "purchase_tax_details",
"transaction_date": "parent:voucher_date", "transaction_date": "parent:voucher_date",
"aging_date": "parent:aging_date", "aging_date": "parent:aging_date",
"doctype": "GL Mapper Detail",
"remarks": "parent:remarks",
"is_opening": "parent:is_opening", "is_opening": "parent:is_opening",
"remarks": "parent:remarks",
"posting_date": "parent:posting_date",
"voucher_no": "parent:name", "voucher_no": "parent:name",
"debit": "value:d.fields.get('category') != 'Valuation' and d.fields.get('add_deduct_tax') == 'Add' and d.fields.get('tax_amount') or 0", "cost_center": "cost_center"
"cost_center": "cost_center",
"posting_date": "parent:posting_date"
},
{
"account": "tax_code",
"company": "company",
"fiscal_year": "fiscal_year",
"against": "credit_to",
"voucher_type": "doctype",
"credit": "ded_amount",
"debit": "value:0",
"transaction_date": "voucher_date",
"aging_date": "aging_date",
"doctype": "GL Mapper Detail",
"remarks": "remarks",
"is_opening": "is_opening",
"voucher_no": "name",
"posting_date": "posting_date"
}, },
{ {
"account": "credit_to", "account": "credit_to",
"doctype": "GL Mapper Detail",
"against_voucher": "name", "against_voucher": "name",
"against_voucher_type": "value:'Purchase Invoice'", "against_voucher_type": "value:'Purchase Invoice'",
"company": "company", "company": "company",
"debit": "value:0",
"fiscal_year": "fiscal_year", "fiscal_year": "fiscal_year",
"against": "against_expense_account", "against": "against_expense_account",
"voucher_type": "doctype", "voucher_type": "doctype",
"credit": "total_amount_to_pay", "credit": "total_amount_to_pay",
"debit": "value:0",
"transaction_date": "voucher_date", "transaction_date": "voucher_date",
"aging_date": "aging_date", "aging_date": "aging_date",
"doctype": "GL Mapper Detail",
"remarks": "remarks",
"is_opening": "is_opening", "is_opening": "is_opening",
"voucher_no": "name", "remarks": "remarks",
"posting_date": "posting_date" "posting_date": "posting_date",
"voucher_no": "name"
}, },
{ {
"account": "write_off_account", "account": "write_off_account",
"doctype": "GL Mapper Detail",
"company": "company", "company": "company",
"debit": "value:0",
"fiscal_year": "fiscal_year", "fiscal_year": "fiscal_year",
"against": "credit_to", "against": "credit_to",
"voucher_type": "doctype", "voucher_type": "doctype",
"credit": "write_off_amount", "credit": "write_off_amount",
"debit": "value:0",
"transaction_date": "voucher_date", "transaction_date": "voucher_date",
"aging_date": "aging_date", "aging_date": "aging_date",
"doctype": "GL Mapper Detail",
"remarks": "remarks",
"is_opening": "is_opening", "is_opening": "is_opening",
"remarks": "remarks",
"posting_date": "posting_date",
"voucher_no": "name", "voucher_no": "name",
"cost_center": "write_off_cost_center", "cost_center": "write_off_cost_center"
"posting_date": "posting_date"
} }
] ]

View File

@@ -2,9 +2,9 @@
{ {
"owner": "Administrator", "owner": "Administrator",
"docstatus": 0, "docstatus": 0,
"creation": "2012-10-03 11:29:52", "creation": "2012-10-03 11:26:38",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2012-10-03 11:07:26" "modified": "2013-01-18 10:39:38"
}, },
{ {
"doc_type": "Purchase Invoice", "doc_type": "Purchase Invoice",
@@ -58,22 +58,6 @@
"voucher_no": "parent:name", "voucher_no": "parent:name",
"cost_center": "cost_center" "cost_center": "cost_center"
}, },
{
"account": "tax_code",
"doctype": "GL Mapper Detail",
"company": "company",
"debit": "value:0",
"fiscal_year": "fiscal_year",
"against": "credit_to",
"voucher_type": "doctype",
"credit": "ded_amount",
"transaction_date": "voucher_date",
"aging_date": "aging_date",
"is_opening": "is_opening",
"remarks": "remarks",
"posting_date": "posting_date",
"voucher_no": "name"
},
{ {
"account": "credit_to", "account": "credit_to",
"doctype": "GL Mapper Detail", "doctype": "GL Mapper Detail",

View File

@@ -25,7 +25,8 @@ cur_frm.cscript.onload = function(doc) {
cur_frm.cscript.refresh = function(doc) { cur_frm.cscript.refresh = function(doc) {
if(!doc.__islocal) { if(!doc.__islocal) {
hide_field("naming_series"); hide_field("naming_series");
cur_frm.add_custom_button('Make Salary Structure', cur_frm.cscript['Make Salary Structure']); cur_frm.add_custom_button('Make Salary Structure',
cur_frm.cscript['Make Salary Structure']);
} }
} }
@@ -44,15 +45,19 @@ cur_frm.cscript.salutation = function(doc,dt,dn) {
} }
cur_frm.cscript['Make Salary Structure']=function(){ cur_frm.cscript['Make Salary Structure']=function(){
$c_obj(make_doclist (doc.doctype,doc.name),'check_sal_structure',cur_frm.doc.name,function(r, rt) { $c_obj(make_doclist (cur_frm.doc.doctype, cur_frm.doc.name), 'check_sal_structure',
cur_frm.doc.name, function(r, rt) {
if(r.message) if(r.message)
alert("You have already created Active salary structure.\nIf you want to create new one, please ensure that no active salary structure exist.\nTo inactive salary structure select 'Is Active' as 'No'."); msgprint("You have already created Active salary structure.\n \
If you want to create new one, please ensure that no active salary structure \
exist.\nTo inactive salary structure select 'Is Active' as 'No'.");
else else
cur_frm.cscript.make_salary_structure(cur_frm.doc); cur_frm.cscript.make_salary_structure(cur_frm.doc);
}); }
);
} }
cur_frm.cscript.make_salary_structure = function(doc,dt,dn,det){ cur_frm.cscript.make_salary_structure = function(doc, dt, dn, det){
var st = wn.model.make_new_doc_and_get_name('Salary Structure'); var st = wn.model.make_new_doc_and_get_name('Salary Structure');
st = locals['Salary Structure'][st]; st = locals['Salary Structure'][st];
st.employee = doc.name; st.employee = doc.name;

View File

@@ -0,0 +1,5 @@
def execute():
from webnotes.modules.import_file import import_file
import_file("accounts", "GL Mapper", "Journal Voucher")
import_file("accounts", "GL Mapper", "Purchase Invoice")
import_file("accounts", "GL Mapper", "Purchase Invoice with write off")

View File

@@ -150,5 +150,6 @@ patch_list = [
"patches.january_2013.update_closed_on", "patches.january_2013.update_closed_on",
"patches.january_2013.change_patch_structure", "patches.january_2013.change_patch_structure",
"patches.january_2013.update_country_info", "patches.january_2013.update_country_info",
"patches.january_2013.remove_tds_entry_from_gl_mapper",
"patches.january_2013.purchase_price_list", "patches.january_2013.purchase_price_list",
] ]