POS feature #2305
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 743f7ee..f679a90 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -387,10 +387,14 @@
}
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)) {
cur_frm.email_doc(frappe.boot.notification_settings.sales_invoice_message);
}
-
+
$.each(doc["entries"], function(i, row) {
if(row.delivery_note) frappe.model.clear_doc("Delivery Note", row.delivery_note)
})
diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js
index 41b3842..7943552 100644
--- a/erpnext/public/js/transaction.js
+++ b/erpnext/public/js/transaction.js
@@ -66,7 +66,7 @@
make_pos_btn: function() {
var me = this;
- if(this.frm.doc.docstatus===0) {
+ if(this.frm.doc.docstatus <= 1) {
if(!this.pos_active) {
var btn_label = __("POS View"),
icon = "icon-th";