Author Topic: save the print file .txt  (Read 18211 times)

spanky

  • Full Member
  • ***
  • Posts: 152
save the print file .txt
« on: May 21, 2012, 05:32:50 am »
A request for emre. There are many software like this
http://www.rtseng.it/dett_prodotto.php?id_prodotto=7
which means a text file saved to a folder allows you to print on any visual cash register.
What I was wondering if you could add a configuration that would allow you to save a file .txt file in a folder with specific products to be printed.
an example of how it should be a product line
PLUD,C[012],:test Article,N1,P1;   
an example would be:
<J00>PLUD,C[012],:{NAME},N1,P{TOTAL AMOUNT};
code followed by the closing
CASH;
The only limitation is that the price should not contain commas
then 1.50 euros will be P150 and P050 will be 0.50 euro
If you have implemented this function, you can connect all the cash registers at the time. thanks

spanky

  • Full Member
  • ***
  • Posts: 152
Re: save the print file .txt
« Reply #1 on: May 21, 2012, 01:41:31 pm »
I'm doing tests with notepad.
Attached I have included the press and as we see from this product the only problem is the comma!
If somehow you could remove the comma and save the file. Txt in a specific folder, interfacing with cash registers after it would be possible.

spanky

  • Full Member
  • ***
  • Posts: 152
Re: save the print file .txt
« Reply #2 on: May 21, 2012, 01:43:05 pm »
I have trouble uploading photos!

spanky

  • Full Member
  • ***
  • Posts: 152
Re: save the print file .txt
« Reply #3 on: May 22, 2012, 04:43:47 am »
This file

spanky

  • Full Member
  • ***
  • Posts: 152
Re: save the print file .txt
« Reply #4 on: May 22, 2012, 07:16:03 am »
As you can see from the proof that I did it all works perfectly.
But all the software to connect to cash registers (FPMate epson, fpconnector, wpos1 and others) work with numbers without commas.
It would be enough to insert a {TOTAL AMOUNT NO COMMAS} end {TICKET TOTAL NO COMMAS}
and a new type of printer that saves to file, where port number is the path and where it will also decide the extent possiobile example. txt.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: save the print file .txt
« Reply #5 on: May 25, 2012, 05:03:51 pm »
Hello spanky. What do you mean by total amount with no commas? Do you want 2.60 instead of 2,60 ? It formats the number according to your regional settings.

Additionally some cash registers needs whole price in cents. In this case we send 260 instead of 2,60. If you need that you can use {CENTS} value.

I hope to release a printer type for creating files on next version.

Thanks.

spanky

  • Full Member
  • ***
  • Posts: 152
Re: save the print file .txt
« Reply #6 on: May 25, 2012, 05:35:39 pm »
exactly! I send 260 instead of 2.60.
Are you telling me that with {CENTS} I can do?
Where should I put this {CENTS} ?
Always helpful and friendly, Thanks

spanky

  • Full Member
  • ***
  • Posts: 152
Re: save the print file .txt
« Reply #7 on: May 26, 2012, 02:14:56 am »
I tried the {CENTS} The problem is that I calculate the price of the product without VAT, So 1 euro = 91 cents with VAT at 10%
To work with Epson printers, rch, mct, ditron ecc. We need {TOTAL AMOUNT CENTS} end {TICKET TOTAL  CENTS}
Then to save printing a specific file with specific extension.
I would be very happy if you could include in a future update
Trying to collabborare with evidence and otherwise.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: save the print file .txt
« Reply #8 on: May 26, 2012, 02:38:22 am »
Can you check "Expression Evaluation in Printer Templates" part of the http://forum2.sambapos.org/index.php/topic,423.0.html post?
With that feature you can print any value in cents. For example

[=ToNumber('{TICKET TOTAL}')*100]

Should convert 25,10 Ticket Total to 2510

There are some fixes for that feature in latest updates.

spanky

  • Full Member
  • ***
  • Posts: 152
Re: save the print file .txt
« Reply #9 on: May 26, 2012, 04:07:41 am »
is true, I never thought of, and it works perfectly. ;D
Now missing only the saving of files.
Emre Thanks!
Now do some testing with a virtual printer. Txt.

spanky

  • Full Member
  • ***
  • Posts: 152
Re: save the print file .txt
« Reply #10 on: May 26, 2012, 07:50:50 am »
I have tested a virtual printer with text only.
As you see from the attached file is the text printed in the right way.
The only drawback and that is left a blank line at the beginning, and a space at the beginning of each line.
This happens if no mold on the printer demo notepad.

sukasem

  • Jr. Member
  • **
  • Posts: 68
Re: save the print file .txt
« Reply #11 on: June 28, 2012, 03:08:46 pm »
+1 for automatically create txt file, Please ;D

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: save the print file .txt
« Reply #12 on: June 28, 2012, 03:51:43 pm »

sukasem

  • Jr. Member
  • **
  • Posts: 68
Re: save the print file .txt
« Reply #13 on: June 29, 2012, 05:26:36 pm »
This is already implemented at 2.98.
http://forum2.sambapos.org/index.php/topic,592.msg3241.html#msg3241
Hi emre,
That is only fixed filename. Is it possible to generate filename like ticket number or date,time?
I want to process those text fie before printing it. What I want to archive are consolidating items (that having the same modifiers which is much better for kitchen staff and not to print some modifiers on customer bill.
Thank you,
Sukasem