Closed odiea closed 8 years ago
I had to revise my code so the print dialog would not show. I have it online now at https://github.com/odiea/opensourcepos/blob/master/application/views/sales/receipt.php. Thanks to the internet I found a new function and placed it at the top of the page and changed from the javascript print. So here is what it looks like now.
Is the button showing on the printed receipt?
This 'Print Button' will not print itself on the printed document :
code for printing receipt is in receipt.php. Why not use text-align in css instead of html4 markup center tag? Also best to move css to the print.css stylesheet.
Yes, the style section should be placed in print.css ... in fact it is in templates/css/style.css in my case.
I have presented the code this way so that, new users can just put this code in their receipt.php / invoice.php (in one place) and use it. Experts already know which part to put where.
EDIT: center tag replaced with text-align :
I am glad to see we are making headway on the receipt printing. I am no expert but I do like to fiddle around with stuff. I am using this as a classroom to learn more. So yes You can teach an old dog new tricks.
And the button does not print.
I embellished the code some more. I got tired of moving the mouse.
@odiea another addition to share via a PR for a new 2.3.5?
It is my personal preference . If the receipt is going to show it should have more functions. It also lets you reprint the receipt in takings.
Yes, the reprint with the button at the bottom of the receipt looks a good addition.
Apply #394 changes to 2.4.
I'll try to cherry pick those changes relevant to 2.4 and commit later today.
OK, you need to apply the old button style to the three added buttons. Also the jsPrint to takings if we want that as well. Thanks for the help. I'm a bit busy these days.
No prob, I just continue work at my own pace, probably minimum about 1.5 hours a day and maybe more if I feel up to it (and real life doesnt get in the way ;)
I have this feature backported now but one last thing to solve is the button layout on invoice and receipt sheets. In bootstrap specific css is used to position it above the receipt container. Need to find something that does the same for the old.
You can always do it in a "direct" way and style directly in the code the button group.
Anyway with 3.0 that will be dropped, and I hope we can release 3.0 any time soon. Coming late spring and summer we will all slow down to enjoy a bit of more sunlight and less "nerdy/geeky" lifestyle :-)
yes but in the bootstrap version there's an extra container div that widens the whole area and takes care of the additional div positioning, putting it above the original receipt and invoice wrapper. Was looking how it's done to duplicate it but the style used is in bootstrap css
Yes we've been making quite some progress last couple of weeks and indeed probably it won't be feasible to keep this pace for a long time.
I would like just to give a push to get 3.0 and maybe I need to temporary hack in my repo the extra categories so I can migrate my wife's POS to the latest.
That's why I wasn't yet sure about the tables & charts, but we can see. Maybe the chart is not a lot of work for me. Let see how it goes.
I've done some thinking on this part already, also I think that should be the next feature to finish after bootstrap
For now I'll try to close all 2.4 issues so we can get it out. Next I'll try and start with the tables.
Yes, tested and seems working fine.
I close.
Anyone having issues with jsprint not working correctly. It wants to show the printer dialog. It only appears to show using javascript windowprint() and not when checking the print box. Jekko where is your print feature in the php files so I can change it ? The takings button shows the same issue.