fixes to valid elements
diff --git a/accounts/doctype/journal_voucher/journal_voucher.js b/accounts/doctype/journal_voucher/journal_voucher.js
index 8c60838..b00fc25 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.js
+++ b/accounts/doctype/journal_voucher/journal_voucher.js
@@ -52,11 +52,11 @@
}
cur_frm.fields_dict['entries'].grid.get_field('account').get_query = function(doc) {
- return "SELECT `tabAccount`.name FROM `tabAccount` WHERE `tabAccount`.company='"+doc.company+"' AND tabAccount.group_or_ledger = 'Ledger' AND tabAccount.docstatus != 2 AND `tabAccount`.%(key)s LIKE '%s' ORDER BY `tabAccount`.name DESC LIMIT 50";
+ return "SELECT `tabAccount`.name, `tabAccount`.parent_account FROM `tabAccount` WHERE `tabAccount`.company='"+doc.company+"' AND tabAccount.group_or_ledger = 'Ledger' AND tabAccount.docstatus != 2 AND `tabAccount`.%(key)s LIKE '%s' ORDER BY `tabAccount`.name DESC LIMIT 50";
}
cur_frm.fields_dict["entries"].grid.get_field("cost_center").get_query = function(doc, cdt, cdn) {
- return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.`company_name` = "' +doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.docstatus != 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50';
+ return 'SELECT `tabCost Center`.`name`, `tabCost Center`.parent_cost_center FROM `tabCost Center` WHERE `tabCost Center`.`company_name` = "' +doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.docstatus != 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50';
}
// Restrict Voucher based on Account
diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js
index 1a0f76e..8f6b598 100644
--- a/accounts/page/general_ledger/general_ledger.js
+++ b/accounts/page/general_ledger/general_ledger.js
@@ -243,13 +243,9 @@
out = this.group_data_by_ledger(grouped_ledgers);
}
- if(me.account_by_name[me.account].debit_or_credit == "Debit") {
- opening.debit -= opening.credit; opening.credit = 0;
- closing.debit -= closing.credit; closing.credit = 0;
- } else {
- opening.credit -= opening.debit; opening.debit = 0;
- closing.credit -= closing.debit; closing.debit = 0;
- }
+ opening = me.get_balance(me.account_by_name[me.account].debit_or_credit, opening)
+ closing = me.get_balance(me.account_by_name[me.account].debit_or_credit, closing)
+
out = [opening].concat(out).concat([totals, closing]);
} else {
me.appframe.set_title("General Ledger");
@@ -260,6 +256,7 @@
},
group_data_by_ledger: function(grouped_ledgers) {
+ var me = this;
var out = []
$.each(Object.keys(grouped_ledgers).sort(), function(i, account) {
if(grouped_ledgers[account].entries.length) {
@@ -270,7 +267,14 @@
grouped_ledgers[account].closing.credit =
grouped_ledgers[account].opening.credit
+ grouped_ledgers[account].totals.credit;
-
+
+ grouped_ledgers[account].opening =
+ me.get_balance(me.account_by_name[me.account].debit_or_credit,
+ grouped_ledgers[account].opening)
+ grouped_ledgers[account].closing =
+ me.get_balance(me.account_by_name[me.account].debit_or_credit,
+ grouped_ledgers[account].closing)
+
out = out.concat([grouped_ledgers[account].opening])
.concat(grouped_ledgers[account].entries)
.concat([grouped_ledgers[account].totals,
@@ -280,6 +284,15 @@
});
return [{id: "_blank_first", _no_format: true, debit: "", credit: ""}].concat(out);
},
+
+ get_balance: function(debit_or_credit, balance) {
+ if(debit_or_credit == "Debit") {
+ balance.debit -= balance.credit; balance.credit = 0;
+ } else {
+ balance.credit -= balance.debit; balance.debit = 0;
+ }
+ return balance
+ },
make_summary_row: function(label, item_account) {
return {
diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js
index 99a4bf9..926d607 100644
--- a/home/page/latest_updates/latest_updates.js
+++ b/home/page/latest_updates/latest_updates.js
@@ -1,4 +1,8 @@
erpnext.updates = [
+ ["2nd January 2013", [
+ "Permission Manager: New Design with better help and better advanced permission selection.",
+ "User Properties: Better way to set User Properties (defaults).",
+ ]],
["1st January 2013", [
"Trial Balance: Added an option to see the report <b>without period closing entry</b>\
You will find this checkbox at the bottom of the report.",
diff --git a/patches/patch_list.py b/patches/patch_list.py
index e620c9b..1b4f762 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -576,10 +576,19 @@
},
{
'patch_module': 'patches.january_2013',
+<<<<<<< HEAD
+ 'patch_file': 'remove_bad_permissions',
+ },
+ {
+ 'patch_module': 'patches.january_2013',
+ 'patch_file': 'deprecate_stock_search_criteria',
+ },
+=======
'patch_file': 'deprecate_stock_search_criteria',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'remove_bad_permissions',
},
+>>>>>>> 93a02a3995e93ec0915d99ecfeabf456b65591b4
]
\ No newline at end of file
diff --git a/projects/doctype/task/task.txt b/projects/doctype/task/task.txt
index f47d2eb..9b8c2eb 100644
--- a/projects/doctype/task/task.txt
+++ b/projects/doctype/task/task.txt
@@ -4,7 +4,7 @@
"docstatus": 0,
"creation": "2012-10-29 14:30:00",
"modified_by": "Administrator",
- "modified": "2012-12-24 10:46:06"
+ "modified": "2013-01-02 12:40:26"
},
{
"autoname": "TASK.#####",
@@ -37,6 +37,7 @@
"doctype": "DocType"
},
{
+ "print_width": "50%",
"oldfieldtype": "Section Break",
"doctype": "DocField",
"label": "Task Details",
@@ -76,6 +77,7 @@
"in_filter": 1
},
{
+ "print_width": "50%",
"oldfieldtype": "Column Break",
"doctype": "DocField",
"width": "50%",
@@ -121,6 +123,7 @@
"options": "Simple"
},
{
+ "print_width": "300px",
"oldfieldtype": "Text Editor",
"doctype": "DocField",
"label": "Details",
@@ -138,6 +141,7 @@
"fieldtype": "Section Break"
},
{
+ "print_width": "50%",
"oldfieldtype": "Column Break",
"doctype": "DocField",
"label": "Expected",
@@ -163,6 +167,7 @@
"fieldtype": "Currency"
},
{
+ "print_width": "50%",
"oldfieldtype": "Column Break",
"doctype": "DocField",
"label": "Actual",
@@ -216,7 +221,7 @@
"fieldname": "review_date",
"fieldtype": "Date",
"depends_on": "eval:doc.status == \"Closed\" || doc.status == \"Pending Review\"",
- "hidden": 1
+ "hidden": 0
},
{
"oldfieldtype": "Date",
@@ -226,7 +231,7 @@
"fieldname": "closing_date",
"fieldtype": "Date",
"depends_on": "eval:doc.status == \"Closed\"",
- "hidden": 1
+ "hidden": 0
},
{
"print_hide": 1,
@@ -245,7 +250,11 @@
"permlevel": 0
},
{
+ "amend": 0,
+ "create": 0,
"doctype": "DocPerm",
+ "submit": 0,
+ "cancel": 0,
"permlevel": 1
}
]
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/timesheet_detail.txt b/projects/doctype/timesheet_detail/timesheet_detail.txt
index 88e2880..6d55d4b 100644
--- a/projects/doctype/timesheet_detail/timesheet_detail.txt
+++ b/projects/doctype/timesheet_detail/timesheet_detail.txt
@@ -2,11 +2,12 @@
{
"owner": "Administrator",
"docstatus": 0,
- "creation": "2012-11-30 18:13:54",
+ "creation": "2012-12-03 10:31:04",
"modified_by": "Administrator",
- "modified": "2012-12-03 09:33:28"
+ "modified": "2013-01-02 12:46:48"
},
{
+ "istable": 1,
"autoname": "TSD.#####",
"name": "__common__",
"doctype": "DocType",
@@ -24,6 +25,7 @@
"doctype": "DocType"
},
{
+ "print_width": "160px",
"oldfieldtype": "Time",
"doctype": "DocField",
"label": "Actual Start Time",
@@ -35,6 +37,7 @@
"permlevel": 0
},
{
+ "print_width": "160px",
"oldfieldtype": "Time",
"doctype": "DocField",
"label": "Actual End Time",
@@ -46,17 +49,19 @@
"permlevel": 0
},
{
+ "print_width": "200px",
+ "permlevel": 0,
"search_index": 0,
"doctype": "DocField",
"label": "Activity Type",
"width": "200px",
- "options": "Activity Type",
"fieldname": "activity_type",
"fieldtype": "Link",
"reqd": 1,
- "permlevel": 0
+ "options": "Activity Type"
},
{
+ "print_width": "200px",
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "Additional Info",
@@ -67,6 +72,7 @@
"permlevel": 0
},
{
+ "print_width": "100px",
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Total Hours (Actual)",
@@ -77,6 +83,7 @@
"permlevel": 1
},
{
+ "print_width": "150px",
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Customer Name",
@@ -88,6 +95,7 @@
"permlevel": 0
},
{
+ "print_width": "150px",
"permlevel": 0,
"oldfieldtype": "Link",
"doctype": "DocField",
@@ -102,19 +110,21 @@
"in_filter": 1
},
{
+ "print_width": "150px",
+ "permlevel": 0,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Task Id",
"oldfieldname": "task_id",
"width": "150px",
- "options": "Task",
"fieldname": "task_id",
"fieldtype": "Link",
"search_index": 1,
- "permlevel": 0,
+ "options": "Task",
"in_filter": 1
},
{
+ "print_width": "250px",
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Task Name",