40 |
from gnue.pointofsale import VERSION |
from gnue.pointofsale import VERSION |
41 |
from gnue.pointofsale.Config import ConfigOptions |
from gnue.pointofsale.Config import ConfigOptions |
42 |
|
|
43 |
|
from Handler import Handler |
44 |
|
|
45 |
class POSClient(GClientApp, events.EventAware): |
class POSClient(GClientApp, events.EventAware): |
46 |
# |
# |
47 |
# GClientApp() overrides |
# GClientApp() overrides |
106 |
if hasattr(sys, 'frozen'): |
if hasattr(sys, 'frozen'): |
107 |
self.frontend.UILoginHandler().getDummyLogin() |
self.frontend.UILoginHandler().getDummyLogin() |
108 |
|
|
109 |
|
Handler(self) |
110 |
|
|
111 |
# |
# |
112 |
# Testing stuff.... |
# Testing stuff.... |
113 |
# |
# |
114 |
self.dispatchEvent('BeginTicket', serial=100000) |
## self.dispatchEvent('BeginTicket', serial=100000) |
115 |
self.dispatchEvent('AddTicketItem', sku=123355, description='A Tale of Two Cities (Dickens, Charles) USED', department=20, |
## self.dispatchEvent('AddTicketItem', sku=123355, description='A Tale of Two Cities (Dickens, Charles) USED', department=20, |
116 |
quantity=1, each=5.95, extended=5.95) |
## quantity=1, each=5.95, extended=5.95) |
117 |
self.dispatchEvent('AddTicketItem', sku=123356, description='Harry Potter and the Order of the Phoenix (Rowling, J.K.)', department=20, |
## self.dispatchEvent('AddTicketItem', sku=123356, description='Harry Potter and the Order of the Phoenix (Rowling, J.K.)', department=20, |
118 |
quantity=2, each=29.99, extended=59.98) |
## quantity=2, each=29.99, extended=59.98) |
119 |
self.dispatchEvent('AddTicketItem', description='Gift Certificate', department=999, |
## self.dispatchEvent('AddTicketItem', description='Gift Certificate', department=999, |
120 |
quantity=1, each=30.00, extended=30.00) |
## quantity=1, each=30.00, extended=30.00) |
121 |
self.dispatchEvent('UpdateTotal', field="subtotal", amount=95.93) |
## self.dispatchEvent('UpdateTotal', field="subtotal", amount=95.93) |
122 |
self.dispatchEvent('UpdateTotal', field="mstax", amount=6.72) |
## self.dispatchEvent('UpdateTotal', field="mstax", amount=6.72) |
123 |
self.dispatchEvent('UpdateTotal', field="total", amount=102.65) |
## self.dispatchEvent('UpdateTotal', field="total", amount=102.65) |
124 |
self.dispatchEvent('EndTicket') |
## self.dispatchEvent('Prompt', label='Enter User ID:', field="login") |
125 |
|
## self.dispatchEvent('EndTicket') |
126 |
|
|
127 |
self.frontend.run() |
self.frontend.run() |
128 |
|
|