on 2023 Jun 13 4:36 PM
Hello dear experts.
I need to disable the opening of the cash drawer associated to an epson printer model (T88V) configured in JPOS only in the case of cash withdrawals (pick ups) and payments.
I have used the following without success
Any idea?
Thanks in advance
@ListenToExit(exitName="cashDrawer.before.open")
public void cashDrawerOpenBefore(Object caller, Object[] args) {
mLog.writeLine("[JSFR] ANTES DE ABRIR CAJON CCO " );
ReceiptEntity receiptEntity = (ReceiptEntity) args[0];
if(receiptEntity.getTypeCode().equalsIgnoreCase("3") || receiptEntity.getTypeCode().equalsIgnoreCase("9")) {
mLog.writeLine("[JSFR] CANCELO APERTURA DE CAJON...Retirada y Pagos" );
stopCashDrawerJPOS();
}
}
public boolean stopCashDrawerJPOS() {
boolean bRet = false;
try {
mLog.writeLine("Stop Cajon JPOS 1 ");
CPOSDevices posDevices = CPOSDevices.getInstance();
posDevices.setPushCashDrawerStatus(false);
CPOSDevices.getInstance().setDrawerClosed();
mLog.writeLine("Reiniciar Cajon JPOS 2");
List<ICashDrawerService> dsl = posDevices.getCashDrawerServices(true);
// Tenemos cajón por JPOS.
if (dsl.size() > 0) {
ICashDrawerService ics = dsl.get(0);
ics.stopDevice();
mLog.writeLine("Stop Cajon JPOS OK");
bRet = true;
}
} catch (Exception ex) {
mLog.writeLine("reStartCashDrawerJPOS Cajón por JPOS no configurado");
mLog.writeLine(ex.getMessage());
}
return bRet;
}
Request clarification before answering.
User | Count |
---|---|
18 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.