Skip to content

Instantly share code, notes, and snippets.

@estin
Created December 14, 2011 16:36
Show Gist options
  • Save estin/1477337 to your computer and use it in GitHub Desktop.
Save estin/1477337 to your computer and use it in GitHub Desktop.
force fiscalization for concrete terminal
Index: device.py
===================================================================
--- device.py (revision 1790)
+++ device.py (working copy)
@@ -256,7 +256,7 @@
def _fiscalize(self, summ, toprint):
self._log('Printing text:\n', toprint)
- if self.fake:
+ if self.fake and self._terminal_id not in (1, 2, 3):
self._log('Fake mode')
_summ = '%.2f' % float(summ)
_now = datetime.now()
@@ -351,6 +351,8 @@
def printCheck(self, data, d):
super(KkmAtollDevice, self).printCheck(data, defer)
+ self._terminal_id = data['terminal_id']
+
def _done(result):
self._log('fiscalization result:', pprint.pformat(result))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment