hiramvillarreal / iotpos

IotPOS, an open source Point of Sale software.
GNU General Public License v2.0
146 stars 77 forks source link

Print Credit not working via CUPS #12

Closed Shaggs closed 4 years ago

Shaggs commented 6 years ago

I'm trying to print a credit from credit look-up.

I find the person and click print but no dialogue comes up.

In settings I've got ticks for all except thermal printer settings

Output from terminal displays no error

StartOperations::INSERT_BALANCE Inserted the new BALANCE # 4 trigger grid action done... -SEARCHED TEXT: "123456 -- Test User 1" TRIMMED: "123456" getCreditInfoForClient ----> Got credit: 1 for $ 6 getCreditInfoForClient Getting CREDIT INFO FOR CLIENT ID: 2 .. create= true query size: 1 filterClientForCredit Getting credit info for clientId: 2 -- $ 6 getCreditHistoryForClient Got history for 2 SaleID: 31 Amount: 6 calculateTotalForClient Credit for 2 -- $ 6

Can screen shot of required

hiramvillarreal commented 6 years ago

Hi, thanks for report, I will check as soon I can.

Shaggs commented 6 years ago

If possible can we change how credit cards are used. If credit card is selected put a pop up box saying "did card approve" with a yes / no.

If yes add to balance under.

If no tick box displaying reason Declined Canceled

As this would allow POS users to integrate an EFTPOS at a lower level.

hiramvillarreal commented 6 years ago

For the moment it only save the card data that you enter manually, it does not interact with the credit card terminal, it could be great if someone could help to integrate EFTPOS

hiramvillarreal commented 6 years ago

Ha by the way I remeber the internal credit report only can be printed using serial small recipt printers not cups, LemonPOS had that issue too, so than function it is into the to do list.

Shaggs commented 6 years ago

This would still work for some EFTPOS as you can enter the amount on the EFTPOS this way it would be separate.

Example here

https://m.youtube.com/results?q=albert%20eftpos%20machine&sm=1

Shaggs commented 6 years ago

@hiramvillarreal would a simple box as per my previous idea of small pop up box?

With credit print would the same print function be a copy / paste job?

hiramvillarreal commented 6 years ago

Those credit terminal works via BT?

Shaggs commented 6 years ago

Not 100% sure as I don't have one.. When I seen them used the operator enters the amount in..

Think is used for those using older POS cash registers

Shaggs commented 6 years ago

So I've had a look at trying to get the print button working but as I'm new to qt: I'm struggling to find it links. I've found the button but not the function for it.. Why can it be easy?

hiramvillarreal commented 6 years ago

Did you install de QTcreator IDE?

Shaggs commented 6 years ago

Yes have installed it and found the button I need but can find the actual function to change it.

Shaggs commented 6 years ago

I'ved manage to add A4 printing to the internal credit.

@hiramvillarreal if you could verify will then close this ticket if your happy

Shaggs commented 6 years ago

Do after some more testing when you press pay now it prints a receipt do default printer with no dialog box.. I'll update shortly to include a dialog to cancel if not required

hiramvillarreal commented 6 years ago

Sure buddy thanks. I will looking to add the "small matrix printer" to for serials ttl

Shaggs commented 6 years ago

I don't have a TTL printer but correct me if I wrong. I was under the impression that CUPS still handled TTL printers?

hiramvillarreal commented 6 years ago

Shaggs, if you go to Configure IotPOS>Printer you would find a check box that say: "Print under demand" that check box is named printZeroTicket: if (Settings::printZeroTicket()) {

I grab that setting to confirm printing using python scripts for serial TTL printers. Please see CONECTION.png to get an idea.

I thing think you could improve a lot those python scripts if you connect a push button, a led and see the relay working for the cash drawer(the TTL printers does not have the RJ connector to open cash drawers).

Shaggs commented 6 years ago

OK I've run the CUPS A4 printer under that command.

We have 2 options change it and add a dialog box so yet can cancel it or I put an else statement in. Both an easy fix

hiramvillarreal commented 6 years ago

I like the dialog box dialog.

Shaggs commented 6 years ago

@hiramvillarreal OK? That made no real sense so I'll make a dialog box on printZeroTicket

hiramvillarreal commented 6 years ago

It could be great if you could order a mini thermal printer from adafruit to see the python scripts working.

Shaggs commented 6 years ago

I've seen a few on eBay for $30 and example

https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.com.au%2Fulk%2Fitm%2F372215093989

So when I find some extra cash I might

On 18 Feb 2018 12:16, "Hiram Villarreal" notifications@github.com wrote:

It could be great if you could order a mini thermal printer from adafruit to see the python scripts working.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hiramvillarreal/iotpos/issues/12#issuecomment-366485890, or mute the thread https://github.com/notifications/unsubscribe-auth/AAu-yUl-WK0KHM99bwXnVSfi5v7GquLhks5tV4DigaJpZM4SBMhT .

Shaggs commented 5 years ago

Hi @hirmvillarreal I'm about to start looking at this again

hiramvillarreal commented 5 years ago

Hey buddy check this: www.cashinotech.com Check Products>panel printers. I have 3 models from them, adafruit resell some of their models. most of them are compatible with its thermal printer library