This commit is contained in:
Neil Trini Lasrado 2014-11-05 15:23:12 +05:30
parent 012cc2cfe1
commit 2c388f9d7e
2 changed files with 6 additions and 2 deletions

View File

@ -387,10 +387,14 @@ cur_frm.cscript.cost_center = function(doc, cdt, cdn) {
} }
cur_frm.cscript.on_submit = function(doc, cdt, cdn) { cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cur_frm.doc.is_pos ) {
new_doc("Sales Invoice");
}
if(cint(frappe.boot.notification_settings.sales_invoice)) { if(cint(frappe.boot.notification_settings.sales_invoice)) {
cur_frm.email_doc(frappe.boot.notification_settings.sales_invoice_message); cur_frm.email_doc(frappe.boot.notification_settings.sales_invoice_message);
} }
$.each(doc["entries"], function(i, row) { $.each(doc["entries"], function(i, row) {
if(row.delivery_note) frappe.model.clear_doc("Delivery Note", row.delivery_note) if(row.delivery_note) frappe.model.clear_doc("Delivery Note", row.delivery_note)
}) })

View File

@ -66,7 +66,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
make_pos_btn: function() { make_pos_btn: function() {
var me = this; var me = this;
if(this.frm.doc.docstatus===0) { if(this.frm.doc.docstatus <= 1) {
if(!this.pos_active) { if(!this.pos_active) {
var btn_label = __("POS View"), var btn_label = __("POS View"),
icon = "icon-th"; icon = "icon-th";