POS Sale Processing

I put a sale through on POS, there was no stock. I booked some stock in via PO. Receipted the stock and transfer some to POS warehouse.
Now I can’t seem to see the sale anywhere, not on list of sales orders, not against the customer. But I get a pop up saying

Insufficient Stock

1.0 units of Item Item Name needed in Warehouse Warehouse Name to complete this transaction.

Doesn’t display what transaction, there isn’t any other detail.

1 Like

Actually I faced the same problem today and I was gonna ask about it.

Hi @iadr3805,

Can you share the browser’s console log, also make purchase receipt with posting time less than the creation time of sales invoice and check.

Thanks, Rohit

I’ll give your suggestion a try to provide you the details.

But can’t you process a sale if in a store you have the physical stock but your system stock numbers are wrong?
Or process a backorder? Then when stock comes allocation and PGI is done?

Hi @iadr3805,

System works as per the same, only it checks the stock availability based on posting date and time.

Can you make github issue, explain with an example.

Thanks, Rohit

Here is the browser log. I’ve booked stock into the warehouse and still the message keeps popping up.

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 879, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py”, line 182, in make_invoice
submit_invoice(si_doc, name)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py”, line 221, in submit_invoice
save_invoice(e, si_doc, name)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py”, line 226, in save_invoice
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 231, in insert
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 731, in run_post_save_methods
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 661, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 839, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 822, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 655, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py”, line 109, in on_submit
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/selling_controller.py”, line 304, in update_stock_ledger
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py”, line 205, in make_sl_entries
make_sl_entries(sl_entries, is_amended, allow_negative_stock, via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/stock_ledger.py”, line 38, in make_sl_entries
update_bin(args, allow_negative_stock, via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/utils.py”, line 96, in update_bin
bin.update_stock(args, allow_negative_stock, via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/bin/bin.py”, line 51, in update_stock
}, allow_negative_stock=allow_negative_stock, via_landed_cost_voucher=via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/stock_ledger.py”, line 107, in init
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/stock_ledger.py”, line 117, in build
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/stock_ledger.py”, line 361, in raise_exceptions
frappe.throw(msg, NegativeStockError, title=‘Insufficent Stock’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 299, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 292, in msgprint
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 265, in _raise_exception
raise raise_exception, encode(msg)
NegativeStockError: 1.0 units of Item Seagate 150GB SSD needed in Warehouse Melbourne Store - SC to complete this transaction.

Further to the log, I placed another POS order for the item after it was booked into the warehouse. Yet the quantity hasn’t changed.
I can’t see the Sales Order in the system, I could only view it on POS profit if I bring offline transactions even though all transactions are synced.

Hi @iadr3805,

Have you created pos profile? If yes what warehouse did you set on POS profile?

Thanks, Rohit

Yes profile created and default warehouse is the Melbourne store

I managed to sort of replicate the issue in demo

Created a new POS profile, f9df120072
Sold a Base Plate to Choices customer.
In the warehouse I can see there is stock, one is waiting to be delivered but that isn’t for my sale. Someone else put a test sale through and isn’t a POS sale.
Now the Pop up message keeps coming up. and I can not find any record of the sale other than going to POS and viewing offline records.

Put a second sale through, but again stock hasn’t adjusted. Can’t find the sale order or invoice anywhere… Maybe I’m missing something

Hi @iadr3805,

We have fixed the issue on develop branch and we’ll release it soon, now if there is stock deficiency then synced invoice will be in draft mode, user has to inward the stock and change the posting date and submit it.

Thanks, Rohit


my experience,

purchase receipt and stock entry date need to be ealier than the sale date and time, which make sense, if you dont have stock, how did you sell it. you need to cancel the purchase receipt and amend the posting date to earlier date and time and it will work. try it.