refactored communication and added to Lead / Contact
This commit is contained in:
commit
fe9707a08a
@ -248,11 +248,11 @@ class DocType:
|
||||
# add rows for profit / loss in P/L
|
||||
else:
|
||||
if c[2]=='Debit':
|
||||
self.return_data.append([1, 'Total Expenses (before Profit)'] + totals)
|
||||
self.return_data.append([1, 'Total Expenses'] + totals)
|
||||
self.return_data.append([5, 'Profit/Loss (Provisional)'] + level0_diff)
|
||||
for i in range(len(totals)): # make totals
|
||||
level0_diff[i] = flt(totals[i]) + level0_diff[i]
|
||||
self.return_data.append([4, 'Total '+c[0]] + level0_diff)
|
||||
self.return_data.append([4, 'Total Income'] + level0_diff)
|
||||
else:
|
||||
self.return_data.append([4, 'Total '+c[0]] + totals)
|
||||
|
||||
|
@ -23,6 +23,8 @@ wn.pages['financial-analytics'].onload = function(wrapper) {
|
||||
single_column: true
|
||||
});
|
||||
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
|
||||
|
||||
wrapper.appframe.add_module_tab("Accounts");
|
||||
}
|
||||
|
||||
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
||||
|
@ -22,6 +22,8 @@ wn.pages['general-ledger'].onload = function(wrapper) {
|
||||
});
|
||||
|
||||
erpnext.general_ledger = new erpnext.GeneralLedger(wrapper);
|
||||
|
||||
wrapper.appframe.add_module_tab("Accounts");
|
||||
|
||||
}
|
||||
|
||||
|
@ -55,4 +55,6 @@ wn.pages['trial-balance'].onload = function(wrapper) {
|
||||
},
|
||||
})
|
||||
erpnext.trial_balance = new TrialBalance(wrapper, 'Trial Balance');
|
||||
|
||||
wrapper.appframe.add_module_tab("Accounts");
|
||||
}
|
@ -139,7 +139,7 @@ cur_frm.cscript['Make Purchase Receipt'] = function() {
|
||||
//========================== Make Purchase Invoice =====================================================
|
||||
cur_frm.cscript['Make Purchase Invoice'] = function() {
|
||||
n = createLocal('Purchase Invoice');
|
||||
$c('dt_map', args={
|
||||
$c('dt_map', {
|
||||
'docs':compress_doclist([locals['Purchase Invoice'][n]]),
|
||||
'from_doctype':cur_frm.doc.doctype,
|
||||
'to_doctype':'Purchase Invoice',
|
||||
|
@ -22,6 +22,8 @@ wn.pages['purchase-analytics'].onload = function(wrapper) {
|
||||
});
|
||||
|
||||
new erpnext.PurchaseAnalytics(wrapper);
|
||||
|
||||
wrapper.appframe.add_module_tab("Buying");
|
||||
}
|
||||
|
||||
erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
||||
|
@ -398,3 +398,7 @@ class DocType:
|
||||
if par:
|
||||
msgprint("BOM can not be cancelled, as it is a child item in following active BOM %s"% [d[0] for d in par])
|
||||
raise Exception
|
||||
|
||||
webnotes.conn.set(self.doc, "is_active", "No")
|
||||
webnotes.conn.set(self.doc, "is_default", 0)
|
||||
self.manage_default_bom()
|
||||
|
@ -20,8 +20,9 @@ erpnext.CommunicationView = Class.extend({
|
||||
this.comm_list = [];
|
||||
$.extend(this, opts);
|
||||
|
||||
this.list.sort(function(a, b) { return new Date(a.modified) > new Date(b.modified)
|
||||
? -1 : 1 })
|
||||
this.list.sort(function(a, b) { return
|
||||
(new Date(a.modified) > new Date(b.modified))
|
||||
? -1 : 1; })
|
||||
|
||||
this.make();
|
||||
},
|
||||
|
@ -717,7 +717,7 @@ class StatusUpdater:
|
||||
|
||||
tolerance = flt(get_value('Item',item_code,'tolerance') or 0)
|
||||
|
||||
if not(tolerance):
|
||||
if not tolerance:
|
||||
if self.global_tolerance == None:
|
||||
self.global_tolerance = flt(get_value('Global Defaults',None,'tolerance') or 0)
|
||||
tolerance = self.global_tolerance
|
||||
@ -732,7 +732,7 @@ class StatusUpdater:
|
||||
|
||||
# check if overflow is within tolerance
|
||||
tolerance = self.get_tolerance_for(item['item_code'])
|
||||
overflow_percent = ((item[args['compare_field']] - item[args['compare_ref_field']]) / item[args['compare_ref_field']] * 100)
|
||||
overflow_percent = ((item[args['compare_field']] - item[args['compare_ref_field']]) / item[args['compare_ref_field']]) * 100
|
||||
|
||||
if overflow_percent - tolerance > 0.01:
|
||||
item['max_allowed'] = flt(item[args['compare_ref_field']] * (100+tolerance)/100)
|
||||
|
@ -21,6 +21,8 @@ wn.pages['sales-analytics'].onload = function(wrapper) {
|
||||
single_column: true
|
||||
});
|
||||
new erpnext.SalesAnalytics(wrapper);
|
||||
|
||||
wrapper.appframe.add_module_tab("Selling");
|
||||
}
|
||||
|
||||
erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
|
||||
|
@ -24,6 +24,7 @@ wn.pages['stock-ageing'].onload = function(wrapper) {
|
||||
|
||||
new erpnext.StockAgeing(wrapper);
|
||||
|
||||
wrapper.appframe.add_module_tab("Stock");
|
||||
}
|
||||
|
||||
wn.require("app/js/stock_grid_report.js");
|
||||
|
@ -22,6 +22,8 @@ wn.pages['stock-analytics'].onload = function(wrapper) {
|
||||
});
|
||||
|
||||
new erpnext.StockAnalytics(wrapper);
|
||||
|
||||
wrapper.appframe.add_module_tab("Stock");
|
||||
}
|
||||
|
||||
wn.require("app/js/stock_grid_report.js");
|
||||
|
@ -22,6 +22,8 @@ wn.pages['stock-ledger'].onload = function(wrapper) {
|
||||
});
|
||||
|
||||
new erpnext.StockLedger(wrapper);
|
||||
|
||||
wrapper.appframe.add_module_tab("Stock");
|
||||
}
|
||||
|
||||
wn.require("app/js/stock_grid_report.js");
|
||||
|
@ -58,5 +58,5 @@ class DocType(TransactionBase):
|
||||
update_feed(self.doc)
|
||||
|
||||
def on_trash(self):
|
||||
webnotes.conn.sql("""update `tabCommunication` set support_ticket=""
|
||||
where support_ticket=%s`""", self.doc.name)
|
||||
webnotes.conn.sql("""update `tabCommunication` set support_ticket=NULL
|
||||
where support_ticket=%s""", (self.doc.name,))
|
||||
|
Loading…
x
Reference in New Issue
Block a user