Exemplo n.º 1
0
plu.addItem(Item('00000000050555', 'item 50555', 1.00, 1))
plu.addItem(Item('00000000060123', 'item 60123', 1.00, 1))
plu.addItem(Item('00002880016205', 'item 2880016205', 5.00, 1))
plu.addItem(Item('00004676800001', 'PDXRxItem', 0.50, 1))
plu.addItem(Item('00000000079101', 'PDXRxItem2', 0.50, 1))
plu.addItem(Item('00000000000300', 'item 300', 1.00, 1))
plu.addItem(Item('00000000000301', 'item 301', 2.00, 1))
plu.addItem(Item('00000000000302', 'item 302', 3.00, 1))
plu.addItem(Item('00000000000303', 'item 303', 4.00, 1))
plu.addItem(Item('00004138309018', 'Offer37 item', 4.00, 1))
plu.addItem(Item('00004126819384', 'Offer38 item', 4.00, 1))
plu.addItem(Item('00000000004030', 'kiwi', 0.33, 1))

tlu = TLU()
# description, tenderID, subID, bin
tlu.addTender(Tender('cash', 11, 12, 0))

total = 0.0
subtotal = 0.0

print(datetime.datetime.now())

# p = protocol_281b9('153.73.247.228', 1099, 'cpe01', 2, False)
p = protocol_281b9('dz-cpe1', 1099, 'cpe01', 2, False)

p.sendSTATUS()

###########################################################################################
p.sendBEGIN_TRANSACTION()

#p.sendMEMBER_ID('000000250329', '000000250329')
Exemplo n.º 2
0
plu = PLU()
# upc, description, price, department
plu.addItem(Item('0000000333333444', 'DeliHam', 3.49, 3000))
plu.addItem(Item('0000000333333445', 'Wurst', 5.49, 3000))
plu.addItem(Item('0000000333333446', 'OlivLoaf', 4.49, 3000))
plu.addItem(Item('000000120000013', 'DtPepsi', 1.79, 1000))
plu.addItem(Item('13803001198', 'DtPepsiStap', 3.99, 1000))
plu.addItem(Item('1899698432', 'battery pack', 7.99, 1))
plu.addItem(Item('41555000701', 'Corn', 0.60, 1000))
plu.addItem(Item('4401', 'CatFood', 28.77, 1))
plu.addItem(Item('0000000000004756', 'PrepMeal', 9.99, 3000))

tlu = TLU()
# description, tenderID, subID, bin
tlu.addTender(Tender('ckstender', 1, 1, 0))

p = protocol_281b9('153.60.64.126', 1099, '126', 4, False)

total = 0.0
subtotal = 0.0

p.sendSTATUS()

###########################################################################################
p.sendBEGIN_TRANSACTION()
p.sendMEMBER_ID('46100008013', '46100008013')

ScanItem('Corn', 3)

p.sendTOTAL(total, subtotal)