Set Paid amount and write off amount for pos
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index aeab04c..5793541 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -182,13 +182,16 @@
 			frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
 			// this will make outstanding amount 0
 			this.frm.set_value("write_off_amount", 
-				flt(this.frm.doc.grand_total - this.frm.doc.paid_amount), precision("write_off_amount"));
+				flt(this.frm.doc.grand_total - this.frm.doc.paid_amount), 
+				precision("write_off_amount"));
 		}
+		
+		this.calculate_outstanding_amount();
+		this.frm.refresh_fields();
 	},
 	
 	write_off_amount: function() {
-		this.calculate_outstanding_amount();
-		this.frm.refresh_fields();
+		this.write_off_outstanding_amount_automatically();
 	},
 	
 	paid_amount: function() {