コード例 #1
0
  public void finalize() throws Throwable {

    m_fiscal.setDeviceEnabled(false);
    m_fiscal.release();
    m_fiscal.close();

    super.finalize();
  }
コード例 #2
0
 public void printTotal(String sPayment, double dpaid) {
   try {
     // el primer valor es el total calculado por la aplicacion.
     // al poner 0 no se debe chequear: CAPCHECKTOTAL = false.
     m_fiscal.printRecTotal(0, roundFiscal(dpaid), sPayment);
   } catch (JposException e) {
   }
 }
コード例 #3
0
  /** Creates new form DeviceFiscalPrinterJavaPOSPanel */
  public DeviceFiscalPrinterJavaPOS(String sDeviceFiscalPrinterName) throws TicketPrinterException {
    m_sName = sDeviceFiscalPrinterName;

    m_fiscal = new FiscalPrinter();
    try {
      m_fiscal.open(m_sName);
      m_fiscal.claim(10000);
      m_fiscal.setDeviceEnabled(true);
      // m_printer.setMapMode(POSPrinterConst.PTR_MM_METRIC);  // unit = 1/100 mm - i.e. 1 cm = 10
      // mm = 10 * 100 units

      m_fiscal.setCheckTotal(false);

    } catch (JposException e) {
      throw new TicketPrinterException(e.getMessage(), e);
    }

    initComponents();
  }
コード例 #4
0
 public void printLine(String sproduct, double dprice, double dunits, int taxinfo) {
   try {
     m_fiscal.printRecItem(
         sproduct,
         roundFiscal(dprice * dunits),
         (int) (dunits * 1000),
         taxinfo,
         roundFiscal(dprice),
         "");
   } catch (JposException e) {
   }
 }
コード例 #5
0
 public void printMessage(String smessage) {
   try {
     m_fiscal.printRecMessage(smessage);
   } catch (JposException e) {
   }
 }
コード例 #6
0
 public void endReceipt() {
   try {
     m_fiscal.endFiscalReceipt(false);
   } catch (JposException e) {
   }
 }
コード例 #7
0
 public void beginReceipt() {
   try {
     m_fiscal.beginFiscalReceipt(true);
   } catch (JposException e) {
   }
 }
コード例 #8
0
 public void printXReport() {
   try {
     m_fiscal.printXReport();
   } catch (JposException e) {
   }
 }