Commit graph

1354 commits

Author SHA1 Message Date
ce630573e0 Remove print statement & correct code return 2019-05-16 13:33:31 -04:00
69ec7d2b46 reuse of the env variable in the base settings 2019-05-13 03:44:09 -04:00
1faf46cc1b added validation to heck if the user is the one allowed to access 2019-05-12 21:34:10 -04:00
b8ca7286f2 Add view to check if the vm belongs to a user 2019-05-09 01:34:18 -04:00
PCoder
f0dfcccd96 Increase configuration length in VMDetail to 128 chars 2019-05-08 23:42:03 +02:00
PCoder
d8b95abb39 Check private key is true 2019-05-06 08:48:26 +02:00
PCoder
71d1e6e3c9 Add delete method for UserHostingKey 2019-04-28 23:13:54 +02:00
PCoder
1ccb4e9790 Correct the way we get periods for invoices list 2019-04-22 11:40:00 +02:00
PCoder
965cc3adf9 Show correct period start and period end in invoice list
Previously, we used to take the first element in the bill line
item, for invoice start and end date. However, it can be faulty in
cases where the first item does not represent a VM itself (which
we are sure has a monthly subscription and a correct start and end
dates)
2019-04-22 11:08:59 +02:00
PCoder
3a7c209b80 Fallback to Stripe plan name for product description if its set 2019-04-20 19:54:46 +02:00
PCoder
dad4f42dc3 Do not add vm_conf to details if it is None 2019-04-20 19:13:34 +02:00
PCoder
0b99a0cbec Fix getting users email and password from the request object 2019-04-20 18:52:34 +02:00
PCoder
a1a85e6c18 Style the invoice detail page for multiline items 2019-04-20 18:52:01 +02:00
PCoder
2ae0c8629b Add CSS styles for multi line invoice table 2019-04-20 18:51:23 +02:00
PCoder
a811e9f83d Add helper methods in HostingBillLineItem 2019-04-20 18:50:46 +02:00
PCoder
e782d27739 Attempt to show relevant lines when we have more than 1 line item 2019-04-20 15:20:55 +02:00
PCoder
aff197c1b5 Fix getting StripePlan by plan_id and not name 2019-04-20 14:12:45 +02:00
PCoder
c592c0768e Extract stripe plan from invoice and set it to MHB
If the plan does not exist, it implies that it was created in the
dashboard. So, we create it in the backend also.
2019-04-20 12:48:18 +02:00
PCoder
38d074811a Link HostingBillLineItem to StripePlan 2019-04-20 12:41:30 +02:00
PCoder
44ffd042a6 Obtain vm_id from multiple line items
- Remove empty string from VM_IDs string
- If more than one is present, check all of them are the same
  If same return, the unique value
  Else return none, as we don't handle this case
2019-04-20 10:00:53 +02:00
PCoder
9f13253475 Add missing braces 2019-04-20 09:49:26 +02:00
PCoder
2be59cb0c8 Add missing return value 2019-04-20 07:41:07 +02:00
PCoder
86d70a7f0b Count and log the number of invoices actually imported 2019-04-20 07:31:32 +02:00
PCoder
91695eaee4 Check if multiple line items belong to the same subscription
We are just fine in this case to create a Monthly hosting bill
Also return None explicitly if MonthlyHostingBill is not created
2019-04-20 07:23:16 +02:00
PCoder
0969c97eca Add missing string to debug code 2019-04-18 08:13:56 +02:00
PCoder
c3842a5ed5 Get periods from line items in invoice detail also 2019-04-13 15:43:27 +02:00
PCoder
c5f72792d2 Show period of the first line item as the period of the invoice 2019-04-13 15:35:36 +02:00
PCoder
a3a2016cb4 Attempt period from line_items 2019-04-13 15:24:37 +02:00
PCoder
77669c962c Fix passing correct created value 2019-04-13 15:00:19 +02:00
PCoder
869f74e4e6 Fix typo 2019-04-13 14:43:39 +02:00
PCoder
a4427dd3af Set empty string for description if not available 2019-04-13 14:40:20 +02:00
PCoder
ed6059feaa Set unit amount to 0 if not available in Stripe response 2019-04-13 14:34:42 +02:00
PCoder
4a01036ab5 Attempt correction to gt dict to be passed for created greater than 2019-04-13 14:34:17 +02:00
PCoder
94c7873397 Fix getting line_items 2019-04-13 13:50:09 +02:00
PCoder
8816793803 Add Line item 2019-04-13 13:42:04 +02:00
PCoder
061ef7d036 Fetch invoices whose date is greater than given date only 2019-04-13 12:54:57 +02:00
PCoder
9ee21b9bc3 Allow admin to see invoices 2019-04-13 12:37:37 +02:00
PCoder
fefcdb5647 Pass correct key email 2019-04-12 09:10:19 +02:00
PCoder
c232f4c1da Fix error in obtaining customuser for mab 2019-04-12 08:41:05 +02:00
PCoder
6a7b5459ce Allow admin to list invoices 2019-04-12 08:14:52 +02:00
PCoder
8c04acaff8 Check if user has stripecustomer attr 2019-04-06 14:07:26 +02:00
PCoder
92b2504f1e Paginate invoice list view by 10 items on each page 2019-04-05 00:09:52 +02:00
PCoder
5987962414 Add VM ID to invoices list 2019-04-04 23:50:49 +02:00
PCoder
3f3f47888d Fix missing codes 2019-04-04 23:20:11 +02:00
PCoder
73f7831744 Attempt to show IP address instead of invoice number 2019-04-04 23:14:24 +02:00
PCoder
6d4af0c193 Fix getting number of mabs of a user 2019-04-04 08:10:16 +02:00
PCoder
a59cd86fee Fix error: get mab using customer and not email 2019-04-04 07:59:38 +02:00
PCoder
8dfee2bd83 Show invoices only if the user's invoice were imported
Else fallback to orders url as before
2019-04-04 07:55:56 +02:00
PCoder
316646465d Use invoice's username and email 2019-04-04 07:46:28 +02:00
PCoder
bb7107fe80 Remove erroneous space before filter param 2019-04-04 07:28:50 +02:00