Add payment time column to Stripe export
This commit is contained in:
parent
a74244efb4
commit
6139a13fde
1 changed files with 3 additions and 2 deletions
|
@ -9,13 +9,14 @@ class Command(BaseCommand):
|
|||
help = "Closes the specified poll for voting"
|
||||
|
||||
def handle(self, *args, **options):
|
||||
orders = SustainerOrder.objects.filter(paid_time__isnull=False)
|
||||
columns = ['time', 'name', 'email', 'amount', 'transaction_id', 'public_ack', 'shirt_size', 'join_list', 'street', 'city', 'state', 'zip_code', 'country']
|
||||
orders = SustainerOrder.objects.filter(paid_time__isnull=False).order_by('paid_time')
|
||||
columns = ['order_time', 'payment_time', 'name', 'email', 'amount', 'transaction_id', 'public_ack', 'shirt_size', 'join_list', 'street', 'city', 'state', 'zip_code', 'country']
|
||||
writer = csv.writer(sys.stdout)
|
||||
writer.writerow(columns)
|
||||
for order in orders:
|
||||
writer.writerow([
|
||||
order.created_time,
|
||||
order.paid_time,
|
||||
order.name,
|
||||
order.email,
|
||||
order.amount,
|
||||
|
|
Loading…
Reference in a new issue