commit
e0a7ff77df
@ -732,7 +732,7 @@ def notify_errors(inv, customer, owner):
|
|||||||
|
|
||||||
frappe.sendmail(recipients + [frappe.db.get_value("User", owner, "email")],
|
frappe.sendmail(recipients + [frappe.db.get_value("User", owner, "email")],
|
||||||
subject="[Urgent] Error while creating recurring invoice for %s" % inv,
|
subject="[Urgent] Error while creating recurring invoice for %s" % inv,
|
||||||
message = frappe.get_template("template/emails/recurring_invoice_failed.html").render({
|
message = frappe.get_template("templates/emails/recurring_invoice_failed.html").render({
|
||||||
"name": inv,
|
"name": inv,
|
||||||
"customer": customer
|
"customer": customer
|
||||||
}))
|
}))
|
||||||
|
|||||||
@ -232,7 +232,7 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
|||||||
indent: 0,
|
indent: 0,
|
||||||
opening: 0,
|
opening: 0,
|
||||||
checked: false,
|
checked: false,
|
||||||
report_type: me.pl_or_bs,
|
report_type: me.pl_or_bs=="Balance Sheet"? "Balance Sheet" : "Profit and Loss",
|
||||||
};
|
};
|
||||||
me.item_by_name[net_profit.name] = net_profit;
|
me.item_by_name[net_profit.name] = net_profit;
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
|||||||
|
|
||||||
$.each(me.data, function(i, ac) {
|
$.each(me.data, function(i, ac) {
|
||||||
if(!ac.parent_account && me.apply_filter(ac, "company") &&
|
if(!ac.parent_account && me.apply_filter(ac, "company") &&
|
||||||
ac.report_type==me.pl_or_bs) {
|
ac.report_type==net_profit.report_type) {
|
||||||
$.each(me.columns, function(i, col) {
|
$.each(me.columns, function(i, col) {
|
||||||
if(col.formatter==me.currency_formatter && col.balance_type=="Dr") {
|
if(col.formatter==me.currency_formatter && col.balance_type=="Dr") {
|
||||||
var bal = net_profit[col.date+"_dr"] -
|
var bal = net_profit[col.date+"_dr"] -
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"allow_attach": 1,
|
"allow_attach": 1,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
|
"allow_rename": 1,
|
||||||
"autoname": "field:project_name",
|
"autoname": "field:project_name",
|
||||||
"creation": "2013-03-07 11:55:07",
|
"creation": "2013-03-07 11:55:07",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
@ -258,7 +259,7 @@
|
|||||||
"icon": "icon-puzzle-piece",
|
"icon": "icon-puzzle-piece",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"max_attachments": 4,
|
"max_attachments": 4,
|
||||||
"modified": "2014-05-27 03:49:15.252736",
|
"modified": "2014-06-24 12:44:19.530707",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Project",
|
"name": "Project",
|
||||||
|
|||||||
@ -481,7 +481,27 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
|
|
||||||
set_dynamic_labels: function() {
|
set_dynamic_labels: function() {
|
||||||
this._super();
|
this._super();
|
||||||
set_sales_bom_help(this.frm.doc);
|
this.set_sales_bom_help(this.frm.doc);
|
||||||
|
},
|
||||||
|
|
||||||
|
set_sales_bom_help: function(doc) {
|
||||||
|
if(!cur_frm.fields_dict.packing_list) return;
|
||||||
|
if ((doc.packing_details || []).length) {
|
||||||
|
$(cur_frm.fields_dict.packing_list.row.wrapper).toggle(true);
|
||||||
|
|
||||||
|
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
||||||
|
help_msg = "<div class='alert alert-warning'>" +
|
||||||
|
__("For 'Sales BOM' items, Warehouse, Serial No and Batch No will be considered from the 'Packing List' table. If Warehouse and Batch No are same for all packing items for any 'Sales BOM' item, those values can be entered in the main Item table, values will be copied to 'Packing List' table.")+
|
||||||
|
"</div>";
|
||||||
|
frappe.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$(cur_frm.fields_dict.packing_list.row.wrapper).toggle(false);
|
||||||
|
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
||||||
|
frappe.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
refresh_field('sales_bom_help');
|
||||||
},
|
},
|
||||||
|
|
||||||
change_form_labels: function(company_currency) {
|
change_form_labels: function(company_currency) {
|
||||||
@ -574,26 +594,5 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
var df = frappe.meta.get_docfield(fname[0], fname[1], me.frm.doc.name);
|
var df = frappe.meta.get_docfield(fname[0], fname[1], me.frm.doc.name);
|
||||||
if(df) df.label = label;
|
if(df) df.label = label;
|
||||||
});
|
});
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// Help for Sales BOM items
|
|
||||||
var set_sales_bom_help = function(doc) {
|
|
||||||
if(!cur_frm.fields_dict.packing_list) return;
|
|
||||||
if ((doc.packing_details || []).length) {
|
|
||||||
$(cur_frm.fields_dict.packing_list.row.wrapper).toggle(true);
|
|
||||||
|
|
||||||
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
|
||||||
help_msg = "<div class='alert alert-warning'>" +
|
|
||||||
__("For 'Sales BOM' items, warehouse, serial no and batch no will be considered from the 'Packing List' table. If warehouse and batch no are same for all packing items for any 'Sales BOM' item, those values can be entered in the main item table, values will be copied to 'Packing List' table.")+
|
|
||||||
"</div>";
|
|
||||||
frappe.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$(cur_frm.fields_dict.packing_list.row.wrapper).toggle(false);
|
|
||||||
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
|
||||||
frappe.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
refresh_field('sales_bom_help');
|
});
|
||||||
}
|
|
||||||
|
|||||||
@ -139,19 +139,10 @@ cur_frm.cscript.delete_doc = function(doctype, name) {
|
|||||||
var go_ahead = confirm(__("Delete {0} {1}?", [doctype, name]));
|
var go_ahead = confirm(__("Delete {0} {1}?", [doctype, name]));
|
||||||
if (!go_ahead) return;
|
if (!go_ahead) return;
|
||||||
|
|
||||||
return frappe.call({
|
frappe.model.delete_doc(doctype, name, function(r) {
|
||||||
method: 'frappe.model.delete_doc',
|
if (!r.exc) {
|
||||||
args: {
|
var list_name = doctype.toLowerCase() + '_list';
|
||||||
dt: doctype,
|
cur_frm[list_name].run();
|
||||||
dn: name
|
|
||||||
},
|
|
||||||
callback: function(r) {
|
|
||||||
//console.log(r);
|
|
||||||
if (!r.exc) {
|
|
||||||
// run the correct list
|
|
||||||
var list_name = doctype.toLowerCase() + '_list';
|
|
||||||
cur_frm[list_name].run();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -220,8 +220,8 @@ class StockEntry(StockController):
|
|||||||
# get incoming rate
|
# get incoming rate
|
||||||
if not d.bom_no:
|
if not d.bom_no:
|
||||||
if not flt(d.incoming_rate) or d.s_warehouse or self.purpose == "Sales Return":
|
if not flt(d.incoming_rate) or d.s_warehouse or self.purpose == "Sales Return":
|
||||||
incoming_rate = self.get_incoming_rate(args)
|
incoming_rate = flt(self.get_incoming_rate(args), self.precision("incoming_rate", d))
|
||||||
if flt(incoming_rate) > 0:
|
if incoming_rate > 0:
|
||||||
d.incoming_rate = incoming_rate
|
d.incoming_rate = incoming_rate
|
||||||
|
|
||||||
d.amount = flt(d.transfer_qty) * flt(d.incoming_rate)
|
d.amount = flt(d.transfer_qty) * flt(d.incoming_rate)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user