[ux] added folds, show actual / projected qty in pos
This commit is contained in:
parent
cf8bb668b3
commit
ab8bde0149
@ -60,17 +60,14 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.cscript.add_toolbar_buttons = function(doc) {
|
||||
cur_frm.appframe.add_button(__('Chart of Accounts'),
|
||||
cur_frm.add_custom_button(__('Chart of Accounts'),
|
||||
function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
|
||||
|
||||
if (cstr(doc.group_or_ledger) == 'Group') {
|
||||
cur_frm.add_custom_button(__('Convert to Ledger'),
|
||||
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet', 'btn-default');
|
||||
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
|
||||
cur_frm.add_custom_button(__('Convert to Group'),
|
||||
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
|
||||
|
||||
cur_frm.appframe.add_button(__('View Ledger'), function() {
|
||||
cur_frm.add_custom_button(__('View Ledger'), function() {
|
||||
frappe.route_options = {
|
||||
"account": doc.name,
|
||||
"from_date": sys_defaults.year_start_date,
|
||||
@ -79,6 +76,9 @@ cur_frm.cscript.add_toolbar_buttons = function(doc) {
|
||||
};
|
||||
frappe.set_route("query-report", "General Ledger");
|
||||
}, "icon-table");
|
||||
|
||||
cur_frm.add_custom_button(__('Convert to Group'),
|
||||
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,6 +149,12 @@
|
||||
"permlevel": 0,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "view_details",
|
||||
"fieldtype": "Fold",
|
||||
"label": "View Details",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "reference",
|
||||
"fieldtype": "Section Break",
|
||||
@ -440,7 +446,7 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2014-07-31 05:05:03.294068",
|
||||
"modified": "2014-08-11 07:29:48.343753",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Journal Voucher",
|
||||
|
@ -533,6 +533,11 @@
|
||||
"read_only": 0,
|
||||
"report_hide": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "fold",
|
||||
"fieldtype": "Fold",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "advances",
|
||||
"fieldtype": "Section Break",
|
||||
@ -753,7 +758,7 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2014-07-31 04:59:24.939856",
|
||||
"modified": "2014-08-12 05:25:16.261614",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice",
|
||||
|
@ -21,9 +21,9 @@ erpnext.POS = Class.extend({
|
||||
<tr>\
|
||||
<th style="width: 40%">'+__("Item")+'</th>\
|
||||
<th style="width: 9%"></th>\
|
||||
<th style="width: 17%; text-align: right;">Qty</th>\
|
||||
<th style="width: 22%; text-align: right;">Qty</th>\
|
||||
<th style="width: 9%"></th>\
|
||||
<th style="width: 25%; text-align: right;">Rate</th>\
|
||||
<th style="width: 20%; text-align: right;">Rate</th>\
|
||||
</tr>\
|
||||
</thead>\
|
||||
<tbody>\
|
||||
@ -387,14 +387,19 @@ erpnext.POS = Class.extend({
|
||||
|
||||
$(repl('<tr id="%(item_code)s" data-selected="false">\
|
||||
<td>%(item_code)s%(item_name)s</td>\
|
||||
<td style="vertical-align:middle;" align="right">\
|
||||
<td style="vertical-align:top; padding-top: 10px;" \
|
||||
align="right">\
|
||||
<div class="decrease-qty" style="cursor:pointer;">\
|
||||
<i class="icon-minus-sign icon-large text-danger"></i>\
|
||||
</div>\
|
||||
</td>\
|
||||
<td style="vertical-align:middle;"><input type="text" value="%(qty)s" \
|
||||
class="form-control qty" style="text-align: right;"></td>\
|
||||
<td style="vertical-align:middle;cursor:pointer;">\
|
||||
<td style="vertical-align:middle;">\
|
||||
<input type="text" value="%(qty)s" \
|
||||
class="form-control qty" style="text-align: right;">\
|
||||
<div class="actual-qty small text-muted">'
|
||||
+__("Stock: ")+'<span class="text-success">%(actual_qty)s</span>%(projected_qty)s</div>\
|
||||
</td>\
|
||||
<td style="vertical-align:top; padding-top: 10px;">\
|
||||
<div class="increase-qty" style="cursor:pointer;">\
|
||||
<i class="icon-plus-sign icon-large text-success"></i>\
|
||||
</div>\
|
||||
@ -405,6 +410,9 @@ erpnext.POS = Class.extend({
|
||||
item_code: d.item_code,
|
||||
item_name: d.item_name===d.item_code ? "" : ("<br>" + d.item_name),
|
||||
qty: d.qty,
|
||||
actual_qty: d.actual_qty,
|
||||
projected_qty: d.projected_qty ? (" <span title='"+__("Projected Qty")
|
||||
+"'>(" + d.projected_qty + ")<span>") : "",
|
||||
rate: format_currency(d.rate, me.frm.doc.currency),
|
||||
amount: format_currency(d.amount, me.frm.doc.currency)
|
||||
}
|
||||
@ -479,7 +487,11 @@ erpnext.POS = Class.extend({
|
||||
});
|
||||
|
||||
me.refresh_delete_btn();
|
||||
if(me.frm.doc[this.party]) {
|
||||
this.barcode.$input.focus();
|
||||
} else {
|
||||
this.party_field.$input.focus();
|
||||
}
|
||||
},
|
||||
increase_decrease_qty: function(tr, operation) {
|
||||
var item_code = tr.attr("id");
|
||||
|
@ -443,6 +443,11 @@
|
||||
"print_hide": 0,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "fold",
|
||||
"fieldtype": "Fold",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "terms_section_break",
|
||||
"fieldtype": "Section Break",
|
||||
@ -645,7 +650,7 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2014-07-31 04:59:24.561351",
|
||||
"modified": "2014-08-12 05:22:53.496614",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Purchase Order",
|
||||
|
@ -85,6 +85,7 @@ class StatusUpdater(Document):
|
||||
|
||||
if update:
|
||||
frappe.db.set_value(self.doctype, self.name, "status", self.status)
|
||||
self.add_comment("Label", self.status)
|
||||
|
||||
def on_communication(self):
|
||||
if not self.get("communications"): return
|
||||
|
@ -4,12 +4,6 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
cur_frm.cscript = {
|
||||
onload: function(doc, dt, dn) {
|
||||
if(in_list(user_roles,'System Manager')) {
|
||||
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Jobs Email Settings">'+__("Jobs Email Settings")+'</a><br>\
|
||||
<span class="help">'+__('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"</span></p>';
|
||||
}
|
||||
},
|
||||
refresh: function(doc) {
|
||||
cur_frm.cscript.make_listing(doc);
|
||||
},
|
||||
|
@ -7,7 +7,6 @@
|
||||
],
|
||||
"js/erpnext.min.js": [
|
||||
"public/js/conf.js",
|
||||
"public/js/toolbar.js",
|
||||
"public/js/feature_setup.js",
|
||||
"public/js/utils.js",
|
||||
"public/js/queries.js",
|
||||
|
@ -32,5 +32,6 @@
|
||||
margin-left: -30px;
|
||||
margin-top: -10px;
|
||||
padding: 20px 10px;
|
||||
font-family: Monospace;
|
||||
border-right: 1px solid #c7c7c7;
|
||||
border-bottom: 1px solid #c7c7c7;
|
||||
}
|
@ -57,8 +57,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
||||
this.set_dynamic_labels();
|
||||
|
||||
// Show POS button only if it is enabled from features setup
|
||||
if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request")
|
||||
if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request") {
|
||||
this.make_pos_btn();
|
||||
}
|
||||
},
|
||||
|
||||
make_pos_btn: function() {
|
||||
@ -77,6 +78,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
||||
erpnext.open_as_pos = false;
|
||||
}
|
||||
|
||||
this.$pos_btn && this.$pos_btn.remove();
|
||||
|
||||
this.$pos_btn = this.frm.appframe.add_primary_action(btn_label, function() {
|
||||
me.toggle_pos();
|
||||
}, icon, "btn-default");
|
||||
|
@ -20,11 +20,6 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
|
||||
cur_frm.fields_dict.contact_by.get_query = function(doc, cdt, cdn) {
|
||||
return { query:"frappe.core.doctype.user.user.user_query" } }
|
||||
}
|
||||
|
||||
if(in_list(user_roles,'System Manager')) {
|
||||
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Sales Email Settings">'+__('Sales Email Settings')+'</a><br>\
|
||||
<span class="help">'+__('Automatically extract Leads from a mail box e.g.')+' "sales@example.com"</span></p>';
|
||||
}
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
|
@ -185,6 +185,12 @@
|
||||
"oldfieldtype": "Table",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "fold",
|
||||
"fieldtype": "Fold",
|
||||
"label": "fold",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "contact_info",
|
||||
"fieldtype": "Section Break",
|
||||
@ -362,7 +368,7 @@
|
||||
],
|
||||
"icon": "icon-user",
|
||||
"idx": 1,
|
||||
"modified": "2014-05-27 03:49:12.570184",
|
||||
"modified": "2014-08-12 05:22:18.801092",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Lead",
|
||||
|
@ -154,6 +154,11 @@
|
||||
"permlevel": 0,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "fold",
|
||||
"fieldtype": "Fold",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.lead || doc.customer",
|
||||
"fieldname": "contact_info",
|
||||
@ -411,7 +416,7 @@
|
||||
"icon": "icon-info-sign",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2014-07-30 03:37:31.687489",
|
||||
"modified": "2014-08-12 05:21:51.282397",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Opportunity",
|
||||
|
@ -538,6 +538,12 @@
|
||||
"read_only": 1,
|
||||
"width": "200px"
|
||||
},
|
||||
{
|
||||
"fieldname": "fold",
|
||||
"fieldtype": "Fold",
|
||||
"label": "Fold",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "terms_section_break",
|
||||
"fieldtype": "Section Break",
|
||||
@ -827,7 +833,7 @@
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"max_attachments": 1,
|
||||
"modified": "2014-07-31 06:34:26.339765",
|
||||
"modified": "2014-08-12 05:04:36.157045",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Quotation",
|
||||
|
@ -315,28 +315,6 @@
|
||||
"print_hide": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"description": "Display all the individual items delivered with the main items",
|
||||
"fieldname": "packing_list",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"label": "Packing List",
|
||||
"oldfieldtype": "Section Break",
|
||||
"options": "icon-suitcase",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "packing_details",
|
||||
"fieldtype": "Table",
|
||||
"label": "Packing Details",
|
||||
"oldfieldname": "packing_details",
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Packed Item",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_31",
|
||||
"fieldtype": "Section Break",
|
||||
@ -556,6 +534,34 @@
|
||||
"read_only": 1,
|
||||
"width": "200px"
|
||||
},
|
||||
{
|
||||
"fieldname": "view_details",
|
||||
"fieldtype": "Fold",
|
||||
"label": "View Details",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"description": "Display all the individual items delivered with the main items",
|
||||
"fieldname": "packing_list",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"label": "Packing List",
|
||||
"oldfieldtype": "Section Break",
|
||||
"options": "icon-suitcase",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "packing_details",
|
||||
"fieldtype": "Table",
|
||||
"label": "Packing Details",
|
||||
"oldfieldname": "packing_details",
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Packed Item",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "terms_section_break",
|
||||
"fieldtype": "Section Break",
|
||||
@ -889,7 +895,7 @@
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"issingle": 0,
|
||||
"modified": "2014-07-31 06:34:14.727868",
|
||||
"modified": "2014-08-11 07:28:11.362232",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Sales Order",
|
||||
|
@ -572,6 +572,11 @@
|
||||
"read_only": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"fieldname": "fold",
|
||||
"fieldtype": "Fold",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "terms_section_break",
|
||||
"fieldtype": "Section Break",
|
||||
@ -1009,7 +1014,7 @@
|
||||
"idx": 1,
|
||||
"in_create": 0,
|
||||
"is_submittable": 1,
|
||||
"modified": "2014-07-31 06:34:59.028308",
|
||||
"modified": "2014-08-12 05:23:55.104153",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Delivery Note",
|
||||
|
@ -89,6 +89,12 @@
|
||||
"options": "Material Request Item",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "view_details",
|
||||
"fieldtype": "Fold",
|
||||
"label": "View Details",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "more_info",
|
||||
"fieldtype": "Section Break",
|
||||
@ -230,7 +236,7 @@
|
||||
"icon": "icon-ticket",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2014-06-23 07:55:49.393708",
|
||||
"modified": "2014-08-11 07:11:55.802625",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Material Request",
|
||||
|
@ -430,6 +430,11 @@
|
||||
"print_hide": 0,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "fold",
|
||||
"fieldtype": "Fold",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "terms_section_break",
|
||||
"fieldtype": "Section Break",
|
||||
@ -762,7 +767,7 @@
|
||||
"icon": "icon-truck",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2014-07-31 04:59:25.379024",
|
||||
"modified": "2014-08-12 05:23:28.960161",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Purchase Receipt",
|
||||
|
@ -238,6 +238,11 @@
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "fold",
|
||||
"fieldtype": "Fold",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:(doc.purpose!==\"Sales Return\" && doc.purpose!==\"Purchase Return\")",
|
||||
"fieldname": "sb1",
|
||||
@ -573,7 +578,7 @@
|
||||
"is_submittable": 1,
|
||||
"issingle": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2014-07-24 08:52:33.496200",
|
||||
"modified": "2014-08-12 05:24:41.892586",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Stock Entry",
|
||||
@ -640,7 +645,7 @@
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"search_fields": "from_warehouse, to_warehouse, purpose, remarks",
|
||||
"search_fields": "transfer_date, from_warehouse, to_warehouse, purpose, remarks",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC"
|
||||
}
|
@ -9,13 +9,6 @@ frappe.provide("erpnext.support");
|
||||
cur_frm.add_fetch("customer", "customer_name", "customer_name")
|
||||
|
||||
$.extend(cur_frm.cscript, {
|
||||
onload: function(doc, dt, dn) {
|
||||
if(in_list(user_roles,'System Manager')) {
|
||||
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Support Email Settings/Support Email Settings">'+__("Support Email Settings")+'</a><br>\
|
||||
<span class="help">'+__("Integrate incoming support emails to Support Ticket")+'</span></p>';
|
||||
}
|
||||
},
|
||||
|
||||
refresh: function(doc) {
|
||||
erpnext.toggle_naming_series();
|
||||
cur_frm.cscript.make_listing(doc);
|
||||
|
@ -93,6 +93,11 @@
|
||||
"permlevel": 0,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "fold",
|
||||
"fieldtype": "Fold",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "additional_info",
|
||||
"fieldtype": "Section Break",
|
||||
@ -237,7 +242,7 @@
|
||||
],
|
||||
"icon": "icon-ticket",
|
||||
"idx": 1,
|
||||
"modified": "2014-06-03 10:49:47.781578",
|
||||
"modified": "2014-08-12 05:25:45.420934",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Support",
|
||||
"name": "Support Ticket",
|
||||
|
6
erpnext/support/doctype/support_ticket/test_records.json
Normal file
6
erpnext/support/doctype/support_ticket/test_records.json
Normal file
@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"doctype": "Support Ticket",
|
||||
"name": "_Test Support Ticket 1"
|
||||
}
|
||||
]
|
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
||||
# See license.txt
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
test_records = frappe.get_test_records('Support Ticket')
|
||||
|
||||
class TestSupportTicket(unittest.TestCase):
|
||||
pass
|
Loading…
x
Reference in New Issue
Block a user