opensourcepos / opensourcepos

Open Source Point of Sale is a web based point of sale application written in PHP using CodeIgniter framework. It uses MySQL as the data back end and has a Bootstrap 3 based user interface.
http://www.opensourcepos.org
Other
3.4k stars 2.16k forks source link

JSPrint #277

Closed odiea closed 8 years ago

odiea commented 8 years ago

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.

odiea commented 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. 2016-01-07 17_38_27-ugly sweater store -- powered by os point of sale

jekkos commented 8 years ago

Is the button showing on the printed receipt?

cpl2015 commented 8 years ago

This 'Print Button' will not print itself on the printed document : 500 600

700

jekkos commented 8 years ago

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.

cpl2015 commented 8 years ago

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 :

800

odiea commented 8 years ago

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.

odiea commented 8 years ago

2016-01-08 14_43_47-c__users_pavilion_desktop_pos shit_noprint txt - notepad And the button does not print.

odiea commented 8 years ago

I embellished the code some more. I got tired of moving the mouse. 2016-01-08 17_23_53-c__xampp_htdocs_tabbed_application_views_sales_receipt php - notepad

daN4cat commented 8 years ago

@odiea another addition to share via a PR for a new 2.3.5?

odiea commented 8 years ago

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.

daN4cat commented 8 years ago

Yes, the reprint with the button at the bottom of the receipt looks a good addition.

daN4cat commented 8 years ago

Apply #394 changes to 2.4.

jekkos commented 8 years ago

I'll try to cherry pick those changes relevant to 2.4 and commit later today.

daN4cat commented 8 years ago

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.

jekkos commented 8 years ago

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 ;)

jekkos commented 8 years ago

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.

daN4cat commented 8 years ago

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 :-)

jekkos commented 8 years ago

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

jekkos commented 8 years ago

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.

daN4cat commented 8 years ago

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.

jekkos commented 8 years ago

I've done some thinking on this part already, also I think that should be the next feature to finish after bootstrap

jekkos commented 8 years ago

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.

daN4cat commented 8 years ago

Yes, tested and seems working fine.

I close.