Skip to content

Commit

Permalink
feat: allow draft pos invoices even if no stock available (#27078)
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib authored Aug 24, 2021
1 parent 9198caa commit f47cbae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/pos_invoice/pos_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def validate_delivered_serial_nos(self, item):
.format(item.idx, bold_delivered_serial_nos), title=_("Item Unavailable"))

def validate_stock_availablility(self):
if self.is_return:
if self.is_return or self.docstatus != 1:
return

allow_negative_stock = frappe.db.get_single_value('Stock Settings', 'allow_negative_stock')
Expand Down

0 comments on commit f47cbae

Please sign in to comment.