Add "import batch" support for Square -> CORE-POS (TransactionDetail)
This commit is contained in:
parent
4193503719
commit
fcd3c6e49d
|
@ -59,6 +59,8 @@ class TransactionDetailImporter(FromSquare, corepos_importing.model.TransactionD
|
|||
'total',
|
||||
]
|
||||
|
||||
batches_supported = True
|
||||
|
||||
def setup(self):
|
||||
super(TransactionDetailImporter, self).setup()
|
||||
|
||||
|
@ -129,6 +131,9 @@ class TransactionDetailImporter(FromSquare, corepos_importing.model.TransactionD
|
|||
if card_number:
|
||||
card_number = int(card_number)
|
||||
|
||||
# description
|
||||
description = csvrow['Item']
|
||||
|
||||
# quantity
|
||||
quantity = float(csvrow['Qty'])
|
||||
|
||||
|
@ -161,11 +166,12 @@ class TransactionDetailImporter(FromSquare, corepos_importing.model.TransactionD
|
|||
log.warning("cannot parse 'total' from: %s", csvrow['Net Sales'])
|
||||
|
||||
return {
|
||||
'_object_str': "({}) {}".format(upc, description),
|
||||
'store_row_id': store_row_id,
|
||||
'date_time': date_time,
|
||||
'card_number': card_number,
|
||||
'upc': upc,
|
||||
'description': csvrow['Item'],
|
||||
'description': description,
|
||||
'quantity': quantity,
|
||||
'unit_price': unit_price,
|
||||
'discount': discount,
|
||||
|
|
Loading…
Reference in a new issue