mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 16:40:19 +00:00
Merge branch 'staging-fixes' into permission-fixes
This commit is contained in:
@@ -346,6 +346,11 @@ body[data-route="pos"] .btn-more {
|
||||
body[data-route="pos"] .collapse-btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
body[data-route="pos"] .page-actions {
|
||||
max-width: 110px;
|
||||
}
|
||||
}
|
||||
.price-info {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
||||
@@ -26,8 +26,8 @@ $(document).bind('toolbar_setup', function() {
|
||||
|
||||
$('<li><a data-link-type="forum" href="https://discuss.erpnext.com" \
|
||||
target="_blank">'+__('User Forum')+'</a></li>').insertBefore($help_menu);
|
||||
$('<li><a href="https://gitter.im/frappe/erpnext" \
|
||||
target="_blank">'+__('Chat')+'</a></li>').insertBefore($help_menu);
|
||||
$('<li class="gitter-chat-link"><a href="https://gitter.im/frappe/erpnext" \
|
||||
target="_blank">'+__('Gitter Chat')+'</a></li>').insertBefore($help_menu);
|
||||
$('<li><a href="https://github.com/frappe/erpnext/issues" \
|
||||
target="_blank">'+__('Report an Issue')+'</a></li>').insertBefore($help_menu);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
item.margin_rate_or_amount = 0;
|
||||
item.rate_with_margin = 0;
|
||||
}
|
||||
item.base_rate_with_margin = item.rate_with_margin * flt(this.frm.doc.conversion_rate);
|
||||
item.base_rate_with_margin = item.rate_with_margin * flt(frm.doc.conversion_rate);
|
||||
|
||||
cur_frm.cscript.set_gross_profit(item);
|
||||
cur_frm.cscript.calculate_taxes_and_totals();
|
||||
@@ -185,6 +185,12 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
}
|
||||
},
|
||||
|
||||
is_return: function() {
|
||||
if(!this.frm.doc.is_return && this.frm.doc.return_against) {
|
||||
this.frm.set_value('return_against', '');
|
||||
}
|
||||
},
|
||||
|
||||
setup_quality_inspection: function() {
|
||||
if(!in_list(["Delivery Note", "Sales Invoice", "Purchase Receipt", "Purchase Invoice"], this.frm.doc.doctype)) {
|
||||
return;
|
||||
|
||||
@@ -44,8 +44,8 @@ erpnext.timesheet.timer = function(frm, row, timestamp=0) {
|
||||
};
|
||||
|
||||
erpnext.timesheet.control_timer = function(frm, dialog, row, timestamp=0) {
|
||||
var $btn_start = $(".playpause .btn-start");
|
||||
var $btn_complete = $(".playpause .btn-complete");
|
||||
var $btn_start = dialog.$wrapper.find(".playpause .btn-start");
|
||||
var $btn_complete = dialog.$wrapper.find(".playpause .btn-complete");
|
||||
var interval = null;
|
||||
var currentIncrement = timestamp;
|
||||
var initialised = row ? true : false;
|
||||
|
||||
32
erpnext/public/js/utils.js
Normal file → Executable file
32
erpnext/public/js/utils.js
Normal file → Executable file
@@ -103,12 +103,32 @@ $.extend(erpnext, {
|
||||
$.extend(erpnext.utils, {
|
||||
set_party_dashboard_indicators: function(frm) {
|
||||
if(frm.doc.__onload && frm.doc.__onload.dashboard_info) {
|
||||
var info = frm.doc.__onload.dashboard_info;
|
||||
frm.dashboard.add_indicator(__('Annual Billing: {0}',
|
||||
[format_currency(info.billing_this_year, info.currency)]), 'blue');
|
||||
frm.dashboard.add_indicator(__('Total Unpaid: {0}',
|
||||
[format_currency(info.total_unpaid, info.currency)]),
|
||||
info.total_unpaid ? 'orange' : 'green');
|
||||
var company_wise_info = frm.doc.__onload.dashboard_info;
|
||||
if(company_wise_info.length > 1) {
|
||||
frm.dashboard.stats_area.removeClass('hidden');
|
||||
frm.dashboard.stats_area_row.addClass('flex');
|
||||
frm.dashboard.stats_area_row.css('flex-wrap', 'wrap');
|
||||
company_wise_info.forEach(function(info) {
|
||||
frm.dashboard.stats_area_row.append(
|
||||
'<div class="flex-column col-xs-6">'+
|
||||
'<div style="margin-bottom:20px"><h6>'+info.company+'</h6></div>'+
|
||||
'<div class="badge-link small" style="margin-bottom:10px">Annual Billing: '
|
||||
+format_currency(info.billing_this_year, info.currency)+'</div>'+
|
||||
'<div class="badge-link small" style="margin-bottom:20px">Total Unpaid: '
|
||||
+format_currency(info.total_unpaid, info.currency)+'</div>'+
|
||||
'</div>'
|
||||
);
|
||||
});
|
||||
}
|
||||
else if (company_wise_info.length === 1) {
|
||||
frm.dashboard.stats_area.removeClass('hidden');
|
||||
frm.dashboard.stats_area_row.append(
|
||||
'</div><div class="col-xs-6 small" style="margin-bottom:10px">Annual Billing: <b>'
|
||||
+format_currency(company_wise_info[0].billing_this_year, company_wise_info[0].currency)+'</b></div>' +
|
||||
'<div class="col-xs-6 small" style="margin-bottom:10px">Total Unpaid: <b>'
|
||||
+format_currency(company_wise_info[0].total_unpaid, company_wise_info[0].currency)+'</b></div>'
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ frappe.ui.form.ItemQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
||||
["attribute_value", "like", e.target.value + "%"]
|
||||
],
|
||||
fields: ["attribute_value"],
|
||||
parent: "Item"
|
||||
parent: "Item Attribute"
|
||||
},
|
||||
callback: function(r) {
|
||||
if (r.message) {
|
||||
|
||||
Reference in New Issue
Block a user