` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: POS: two ways to open cash drawer
1999-05-07 -- Geoff Bomford
 
MEMBER('pd5.clw') ! This is a MEMBER module MAP INCLUDE('PD5008.INC') !Local module prodecure declarations END CashDrawerOpen PROCEDURE ! Declare Procedure RetCode BYTE Local:CString CSTRING(20) RecBufSize EQUATE(256) PrinterPort STRING(4) OutFile FILE,DRIVER('DOS'),CREATE,NAME(GLOB:PathString) Record RECORD Line CSTRING(RecBufSize) END END CODE IF Def:CashDrawerCode Local:CString = Def:CashDrawerCode ComPutS(COM2,Local:CString) ELSE PrinterPort = PRINTER{PropPrint:Port} !'LPTx' Glob:PathString = 'CDOpen.Txt' CREATE(OutFile) IF ERRORCODE() STOP(ERROR()) END OPEN(OutFile,11h) IF ERRORCODE() STOP(ERROR()) END OutFile.Line = '<7>' APPEND(OutFile,LEN(OutFile.Line)) CLOSE(OutFile) COPY(OutFile,PrinterPort) END There are two ways to open a cash drawer - either via the serial port - Def:CashDrawerCode = 'E' (For example) - or Via the Printer port, if the cash drawer is wired to the printer (Def:CashDrawerCode = '')


Today is November 23, 2024, 3:37 am
This article has been viewed 35211 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: