Create Native windows app for POS linking with erpnext?

Hello ,
As there are many issues in online POS still and the offline POS is unreliable as its loosing invoices ,
IS there a way we can create a native windows app for POS with the necessary things and then sync it with the ERPnext system

That way the invoices will be stored on Ram and locally and not just on browser cache(has proven unreliable) to guarantee the safety of invoices as well as the required functionality.

Is there a way to do that considering permissions and integrations etc ,
If so can someone help me with it?(can discuss in private about the formalities)

Thanks,

Actually, there are plans to use IndexDB but I’m wary of the work required because it’s NOSql. I’m thinking SQLite with the POS will be a good option…

The long term cache for browsers is called webstorage, are you sure you’re using this ?
https://www.w3schools.com/html/html5_webstorage.asp

Actually I’m working on native Android and iOS app for the pos and chose to work with document based noSQL database (using couchbase lite) over SQLite. with noSQL you don’t need to do the complicated restructuring of the database and complicated relationships. Instead, if a document is well structured, then it carries it relations within (e.g. a customer document will also contain the address and the contact, while an item document while contain all information related to that item like different price lists prices, batch numbers…). Also in noSQL, if you create views wisely taking advantage of Map/Reduce functions, then your data will be nicely indexed and can create powerful queries similar to SQL. So for browser a javascript noSQL database like https://pouchdb.com is a wiser choice.

my only problem is with the current pos API is they return document fragmented instead of structured (maybe this because the team don’t have much experience with noSQL). See my example here Stand alone POS in React Native

For now I’m restructuring the document on the fly at the device, but in the future I’m planning to use Sync gateway on the server (which support both couchbase and pouchdb) for continues pull and push sync based on defined filters (e.g. using pos profile as a filter for syncing)

Correct me if i am wrong-
I Think the ERPNext already uses web storage to store offline POS data , but that still doesn’t solve Sync issues and randomly missing invoices .[A major and unacceptable issue].

So i need a more full proof way of storing data.

Currently the invoice record disappears from POS view after the system asumes it has been synced.

with a native app or any similar solution i wish to make it such that the invoice remains locally(on the server) even if the sync is done.

Maybe @tundebabzy s solution or any other.

The point is to store POS invoices locally as well
thus giving another level of backup.

It will also help in auditing as you can just verify the number of invoices locally stored and ones in system created by POS for a given time.
You can then delete the invoices from the file system if required.

To Sync stuff is extremely hard, there are many edge cases and conflicts that can occur between old and new data. That is why there are syncing databases like couchdb and firebase.

Generally this sort of problems are due to the Sync strategy rather than the storage method.

Do you mean the paper invoice or just the invoice data?

It’s not-so-easy to keep data on the client. You must have a single source of truth to be sure to have coherent data. To achieve that you must have a bi-directional sync between server and client, and a strategy to solve incoherent versions.

(btw, solving these problems is going to be harder on Windows: you cannot take advantage of the code born in the last few years to address this problem)

If you can solve it on the web interface, then a native windows app can be easily created with https://electronjs.org/ to use a more stable and reliable local storage backend.

I am Ok with having a linux based or just a server side application as well as long as it does the job.

I meant as data which can be stores on local and synced with system…

I think we can also add a code in the existing app to store the data locally on the server in the file system along with the browser one and we can run a job which rechecks the invoices on the local files in a specific folder and fetches it and merges it with data if missing .

That seems like a easier solution and can be verified by the number of data file created in the folder,
.
Is there a way we can create a invoice file and push the data which is saved on the POS to a file system ?
Or from browser to local ?
.
@ganas , how far is your development progressed?

Why not write your own endpoint which returns things correctly? At some time, the other endpoint could be deprecated and this new endpoint could become the new standard.

Syncing is really hard and that’s why I don’t really buy the idea of a NOSql solution. It’s much easier to add two cups than a cup and a jug (this is probably a bad example but you get the point). That does not mean I’m dismissing NOSql, it just means I’ll be watching from a distance. I think using SQLite instead of any browser storage is more robust and possibly more secure. SQLite was actually meant to be used for such things. Although the problem of frappe’s ORM being compatible with SQLite comes into question but then, if NOSQl will work, definitely SQLite will work much more easier.

(Please take my opinions with a pinch of salt) :slight_smile:

Hello All,

I am actually working on a POS app myself and have it about 98% done it will be for Windows and will run as a native app, currently it can search or scan a barcode and it returns the data instantly and we also have a search screen. The ERPnext POS screen is really for people working with less then 1000 skus and is very basic. I need something very robust and stable enough to handle 100K skus and multiple calls at ones.

@ganas: I would be interested in working together to further develop iOS and Android and do not mind sharing in the costs. I need something to be able to pick and pack using iOS as well.

Sreen shot of POS app

Screen shot of POS search screen.

1 Like

HI

How will this connect to ERPNEXT?

Hello @Taher_Khalil
Are you looking for build App in window PC or Window Mobile?
We are able to develop App in both platform with ERPNext.
Please let me know if you have any Query.

mailto:maheshwaribhavesh95863@gmail.com

Thanks,
Bhavesh Maheshwari

Hello

Can you explain what you mean by this.

Are you saying you can build a windows PoS app that syncs with an online ERPNext instance or it is a standalone?

Regards

@olamide_shodunke

For Both.

Can we have a proof of concept for this? Like a demo?

Regards

@olamide_shodunke
No, I dont have proof of concept in window platforn but i have demo in android and ios.

Great,is that different from the erpnext android/ios app?

Hello @Abdul_Ghafoor_Khuday ,Are you willing to share the app ?

@Maheshwari_Bhavesh , I was talking about a native one ,
A proof of work and the concept of how it would sync with the online system would be greatly appreciated.

Thanks

@olamide_shodunke: We are using erpnext credentials to login and using POS profile for user to rules, we are using the erpnext api for the calls. The online version of the the POS will not suite our needs, we need to be able to look up 100K skus in less then seconds and need to be able to process a sale/return/exchange/credit through the POS app. We also need to track the sales person per item or per order and handle various types of payments.

We also need to be able to search the DB of products and get important info like stock on hand in other locations, pricing, cost, competitor price and so on.

@Taher_Khalil: Not sure what you mean by “share the app”, do you just want me to send you a exe file so you can see how it works? Or do you want to share in developing it with me? I don’t mind sending the install file to anyone who wants to test it.

I can make a quick video of how it currently works if anyone is interested, however a beta version will be ready in about 2-3 weeks time.