Show invoice number(doc_name) on Point of Sale format

The new POS module is long awaited answer to all POS features lacking before now; but I find something missing; it does not show the Sales Invoice Doc Number or cashier number; this is extremely important to quickly track sales in situations where a customer returns goods; its easier to start addressing the issue. The Point of Sale Format will be hard to track; just the date, items and a few details.

People will need to see the invoice number, customer and maybe contact information. These are a breeze to add but the pos screen wont print if you do.

Any attempt to add lines to pull in these information into the Point of Sale print format, the POS module won’t print (I reported this issue before). If you select POS invoice which has all the standard info; POS wont print. Changing type to js, server etc, doesnt help. The POS module seems to only print with the “Point of Sale” format and editing this format breaks printing of invoices.

HI @noetico

In v7, POS record has POS number which act as a temporary invoice number. You can search pos invoice in the invoice list using POS number. For more details please check https://github.com/frappe/erpnext/issues/6298

Thanks, Rohit

Thanks @rohit_w

I have looked at the thread; one problem is once you reference {{ offline_pos_name }} or any other text in the print format; printing is dead; do you think I need to clear the browser’s cache? Although I tried once with that.

The print format seems to be “hard-coded” if I may say; any addition to it and the pos screen will not print; even adding extra information at the footer inside a

tag. Am I missing something?

I tried to update after doing git stash, fetch and pull on erpnext and frappe folders and I have this error:

serveradmin@ERPServer:/home/frappe/frappe-bench$ bench update --pull
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1057, in invoke
Command.invoke(self, ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/init.py”, line 21, in bench_command
setup_logging(bench_path=bench_path)
File “/home/frappe/.bench/bench/utils.py”, line 268, in setup_logging
hdlr = logging.FileHandler(log_file)
File “/usr/lib/python2.7/logging/init.py”, line 903, in init
StreamHandler.init(self, self._open())
File “/usr/lib/python2.7/logging/init.py”, line 928, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: ‘/home/frappe/frappe-bench/logs/bench.log’
serveradmin@ERPServer:/home/frappe/frappe-bench$ sudo bench update --pull
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe

  • branch master -> FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    error: cannot open .git/FETCH_HEAD: Permission denied

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 60, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
File “/home/frappe/.bench/bench/commands/update.py”, line 76, in _update
pull_all_apps(bench_path=bench_path)
File “/home/frappe/.bench/bench/app.py”, line 148, in pull_all_apps
remote=remote, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
File “/home/frappe/.bench/bench/utils.py”, line 130, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull upstream master

@rohit_w please also note that I tried with sudo again.

Hi @noetico,

ERPNext app version??

erpnext 7.0.31
frappe 7.0.44

Thanks

Was able to update using --pull after doing switch-to-master. Thank you

Ok, check default print format point of sale it has field offline_pos_name

Thanks @rohit_w

I have checked; its not there; maybe I should also do bench update --build right? So the js and css gets updated. I will also attempt again; a full update and see. Maybe restart supervisor. Will get back to you.

Kent@Live Mail

@rohit_w

Can you also please tell me what the update fixed; does it allow for customization of the point of sale format, use of the pos invoice print format or adding extra information like the offline_pos_name; addresses etc.

Thanks.

Kent@Live Mail

Hi @noetico,

Check below file, it’s showing {{offline_pos_name}}

If still it’s not showing on the print format run bench migrate

Thanks, Rohit

Many thanks @rohit_w; I will attempt to migrate or simply do a fresh installation as I always have a hard time getting a full update.

Thanks; I will tell you how it goes. Many thanks again.

Kent@Live Mail

Thanks @rohit_w

I got the updates, all is perfect!, so for the benefit of any other person, I will add the update steps that worked for me.

  1. do sudo git stash in the frappe-bench/apps/erpnext and frappe-bench/apps/frappe folders. If you have an error with git config, simply follow the global config options configuration offered.

  2. then do ‘sudo git fetch’ and after ‘sudo git pull’ on the same directories above, one after the other for the frappe and erpnext folder

  3. Dig back to frappe-bench and do sudo bench switch-to-master

  4. then sudo bench update --patch

  5. then sudo bench update --pull (if you’re lucky)

  6. if 4 and 5 fail, do sudo bench migrate.

I hope this helps, because I have replicated these steps twice my test systems, both times, it worked flawlessly.

One last thing @rohit_w; if I added the custom message; like an address to this js file; will this interrupt printing as adding text in the print format does from the print format module?

In a nutshell; can I add some extra text after the last p tag‎, maybe another p tag with the company contact information.

Thanks.

Kent@Live Mail

letter head does not appear in pos receipt … any help

Sorry for the late reply, I have been away for a while. In case you havent solved this; I would think showing the letterhead will need some little planning (if you are referring to the thermal receipts)

  1. The letterhead size will need to conform to the printer paper size + bleeds and margins, so the standard letterhead will look awkward at its recommended size of 900 by 100
  2. Some printers support adding an image to the print head, this is done from the printers setup, with epson and bixolon, this is fairly easy and may be what you need. Its accessible from the advanced settings.
  3. If you want to add the image to the print html then it will be pertinent to understand the location for the