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"
|
help = "Closes the specified poll for voting"
|
||||||
|
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
orders = SustainerOrder.objects.filter(paid_time__isnull=False)
|
orders = SustainerOrder.objects.filter(paid_time__isnull=False).order_by('paid_time')
|
||||||
columns = ['time', 'name', 'email', 'amount', 'transaction_id', 'public_ack', 'shirt_size', 'join_list', 'street', 'city', 'state', 'zip_code', 'country']
|
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 = csv.writer(sys.stdout)
|
||||||
writer.writerow(columns)
|
writer.writerow(columns)
|
||||||
for order in orders:
|
for order in orders:
|
||||||
writer.writerow([
|
writer.writerow([
|
||||||
order.created_time,
|
order.created_time,
|
||||||
|
order.paid_time,
|
||||||
order.name,
|
order.name,
|
||||||
order.email,
|
order.email,
|
||||||
order.amount,
|
order.amount,
|
||||||
|
|
Loading…
Reference in a new issue