Commit graph

1558 commits

Author SHA1 Message Date
PCoder
b284ed70a6 Show error elegantly 2019-12-26 13:56:31 +05:30
PCoder
7eff6fc92c Use correct field 2019-12-26 13:52:14 +05:30
PCoder
262bf3e2f7 Force VAT validation on each save 2019-12-26 13:49:18 +05:30
PCoder
99e70d95c4 VAT number validation in settings 2019-12-26 13:31:15 +05:30
PCoder
92570ada7f Add VAT number to order detail (hosting) 2019-12-25 10:37:45 +05:30
PCoder
f566aa8a2e Make VAT number a part of billing address 2019-12-21 08:43:34 +05:30
PCoder
c9de757bc7 Merge remote-tracking branch 'mainRepo/master' into feature/VAT_number 2019-12-21 08:19:23 +05:30
aa26458a8c Make greetings in dashboard font-weight equal to 300 2019-12-18 19:39:41 +05:00
75b08cfbf8 Change password in db only if password change in ldap is successfull 2019-12-18 12:52:46 +05:00
PCoder
24edf05e7a Save vat_number after payment is submitted 2019-12-17 23:57:15 +05:30
PCoder
6ea486b527 Initialize vat number in payment forms 2019-12-17 23:48:05 +05:30
PCoder
568d874476 Add initial value for the vat_number field in the settings 2019-12-17 23:32:49 +05:30
PCoder
5e97d70a5e Save VAT number 2019-12-17 22:52:22 +05:30
PCoder
0f3acf5db4 Change order_detail and invoice_detail templates to show VAT number 2019-12-17 22:51:54 +05:30
a8149edba5 Make greeting in dashboard a little bigger and increase margin 2019-12-16 20:17:26 +05:00
f9a9a24516 Show username in navbar and setting. Show greeting in dashboard for user's name 2019-12-16 12:54:59 +05:00
b52f2de8d7 now using hash func from utils.ldap_manager 2019-12-14 14:29:45 +05:00
3b9322b929 init commit 2019-12-10 22:53:50 +05:00
PCoder
cc027c2497 Add eu vat code 2019-12-09 18:07:46 +05:30
PCoder
fcc671a707 Fix >= for first_vm_id_after_eu_vat 2019-12-09 18:07:19 +05:30
PCoder
a6695a103f Refactor PRE_EU_VAT_RATE + fix >= for first_vm_id_after_eu_vat 2019-12-09 18:06:14 +05:30
PCoder
d2d9eafa41 Fix using wrongly copy/pasted variable 2019-12-09 15:20:05 +05:30
PCoder
d0398ddec2 Set after_eu_vat_intro for hosting VM buy flow 2019-12-09 15:15:21 +05:30
PCoder
52717c2ce7 EU VAT for hosting flow 2019-12-09 15:09:05 +05:30
PCoder
e334b01ad4 Fix the way we get variables 2019-12-09 14:44:31 +05:30
PCoder
73b590f480 Set EU VAT context for invoice_detail 2019-12-09 14:42:12 +05:30
PCoder
d864f82e0f Make invoice EU VAT compatible 2019-12-09 12:30:49 +05:30
PCoder
b759471274 Add /year text for yearly products 2019-12-04 01:17:46 +05:30
PCoder
cc5d82ccac Allow None value for billing_reason 2019-11-28 13:59:03 +05:30
PCoder
b683a5ac44 Save import remark 2019-11-28 13:38:45 +05:30
PCoder
987efe8f99 Move separator within loop 2019-11-28 12:35:32 +05:30
PCoder
9a84fc899e Add a line separator when fetching more than 1 stripe bill 2019-11-28 12:10:50 +05:30
_moep_
49ef761b2e translate it, too 2019-11-16 08:45:47 +01:00
PCoder
aec2002a9f Update django.po 2019-11-15 22:11:15 +05:30
PCoder
7dd57fb116 Fix old order detail page 2019-11-15 22:04:37 +05:30
PCoder
530e47586e Fix month name 2019-11-15 21:23:04 +05:30
PCoder
e726f953a4 Improve yearly recurring date text 2019-11-15 21:13:08 +05:30
PCoder
5697e313df Improve yearly recurring date text 2019-11-15 21:11:26 +05:30
PCoder
1e57eb5fae Handle TypeError raised in an invoice for generic product
Case: No VM_ID exists and hence int(vm_id) raises TypeError
2019-11-15 21:10:48 +05:30
PCoder
a423dd9f49 Correct invoice for yearly subscription 2019-11-15 20:43:58 +05:30
PCoder
6eef592cd8 Add migration file 2019-11-15 20:28:00 +05:30
PCoder
3bf2654b50 Update ProductPaymentForm for yearly subscription 2019-11-15 19:45:35 +05:30
PCoder
f0b604c6dc Update Generic product model to include product_subscription_interval 2019-11-15 19:40:53 +05:30
PCoder
efe411933f Missing float conversions 2019-11-15 12:41:27 +05:30
PCoder
940eaf3a07 Process prices as floats 2019-11-15 12:39:03 +05:30
PCoder
582e952187 Convert VAT rate to decimal to be consistent 2019-11-15 12:24:24 +05:30
PCoder
44a20a5029 Apply country specific VAT rates for Generic Products 2019-11-15 11:58:15 +05:30
PCoder
7040d908dd Add import_vat_rates management command 2019-11-15 11:03:09 +05:30
PCoder
b3dd57f189 Add vatrates migration 2019-11-15 11:02:45 +05:30
PCoder
c56d6bd627 Add VATRates model 2019-11-15 11:01:49 +05:30
PCoder
c29193f6c8 Fix bugs
- fetch_stripe_bills:
    - fix wrong assigment of strign to num_invoice_created variable
    - return None (do not handle the case) if we don't have an order
2019-11-04 12:05:57 +05:30
PCoder
6638d376b8 Make HostingBillLineAmount accept negative values 2019-10-26 10:32:49 +05:30
PCoder
6d8782415f Fix number formatting for price in invoice details 2019-10-08 06:33:52 +05:30
PCoder
cc03c11c4a Improve admin email logging 2019-09-24 10:34:04 +05:30
PCoder
8cd7a69162 Convert lazy loaded string to str 2019-09-24 09:44:45 +05:30
PCoder
e4e074ea8d Add explanatory text indicating puffy username on OpenBSD VMs 2019-09-15 09:12:36 +05:30
5646e370ec Merge branch '7032/bugfix_existing_key' into 'master'
7032/bugfix existing key

See merge request ungleich-public/dynamicweb!712
2019-08-28 18:36:51 +02:00
PCoder
b2d597232c Use opennebula user credentials to find if vm belongs to user 2019-08-27 11:13:38 +05:30
PCoder
7684687dbc Remove commented code 2019-08-26 16:13:31 +05:30
PCoder
97d83abffe Comment out code that denied adding the same key 2019-08-26 16:01:34 +05:30
PCoder
b50a543148 Remove public- prefix shown in django/node/rails hosting pages 2019-08-22 08:38:19 +05:30
PCoder
728fd5850b Update hosting django.po -- add "Expiry" -> Gültig bis 2019-07-09 21:21:22 +05:30
PCoder
b6ec2ac95b Add missing cc expiry year month in payment page 2019-07-09 19:08:19 +05:30
PCoder
903ef48c75 Format cc month to 2 decimal places 2019-07-09 19:03:09 +05:30
PCoder
fe44908868 Add expiry year and month to get_all_cards_list 2019-07-09 18:47:54 +05:30
PCoder
59c45492a9 Add expiry year and month in the settings and order payment pages 2019-07-09 18:40:41 +05:30
PCoder
921d832f9e Make user in UserHostingKey model nullable 2019-07-03 06:44:31 +05:30
PCoder
ddaa320628 Set user foreign key to be blank allowing null values 2019-07-01 23:11:49 +05:30
PCoder
32de20aaba Set unon authenticated user to NONE 2019-07-01 23:11:14 +05:30
PCoder
c8c5bb763a Remove Add SSH key form in "Order Confirm" page related code
(not needed)
2019-07-01 20:36:13 +05:30
PCoder
c285e1d9eb Set respective order_confirm_url for landing vs hosting flows
For hosting flow also take the user to add_ssh_key after payment
2019-07-01 20:30:06 +05:30
PCoder
5fcd0d6b18 Remove add SSH key form in the order confirmation 2019-07-01 08:18:10 +05:30
PCoder
47fd9a8f28 Adjust urls in datacenterlight/hosting apps urls/views after refactor 2019-07-01 08:09:37 +05:30
PCoder
f502e53845 Add basic implementation of AskSSHKeyView 2019-07-01 06:45:48 +05:30
PCoder
feeb102f92 Do SSH key validation only if the user doesn't have an existing key and
the user has input some value in the add ssh key field
2019-06-25 03:48:29 +02:00
PCoder
34c917acc2 Add SSH form to hosting VM buy flow also 2019-06-25 03:10:50 +02:00
PCoder
85f7d73442 Code cleanup: Remove ssh_key_added_to_vm email templates 2019-06-25 02:32:19 +02:00
PCoder
6d3b5f40c0 Merge remote-tracking branch 'mainRepo/master' into task/5509/add-keys-to-opennebula-user 2019-06-25 02:29:15 +02:00
PCoder
0cf5e541cc Code cleanup: remove VM poweroff/resume methods + styles + html code 2019-06-25 02:24:14 +02:00
PCoder
08608c726f Code cleanup: remove updating ssh keys on live VMs 2019-06-25 02:11:57 +02:00
PCoder
1e68ecb047 Confirm order button close: Redirect only to url specified 2019-06-24 04:31:29 +02:00
PCoder
1ebfc8b2dc Don't use VirtualMachineSerializer for obtaining users_vms 2019-06-10 14:51:40 +02:00
PCoder
496178f44c Check if VM belongs to user against opennebula backend 2019-06-08 04:40:16 +02:00
5ad871f124 updated for read vm realm 2019-05-16 16:35:44 -04:00
c469948901 Merge branch 'william' into 'master'
Add view to check if the vm belongs to a user (for ungleich-cli)

See merge request ungleich-public/dynamicweb!705
2019-05-16 22:01:21 +02:00
a82ecbe4d5 fix typho in check_vm 2019-05-16 13:34:13 -04:00
ce630573e0 Remove print statement & correct code return 2019-05-16 13:33:31 -04:00
PCoder
94d5c34152 [hosting/bill] Skip creating MHB for invoices that have been imported already 2019-05-13 21:15:38 +02:00
69ec7d2b46 reuse of the env variable in the base settings 2019-05-13 03:44:09 -04:00
PCoder
72ea362d01 Remove duplicated blocktrans in txt email template 2019-05-13 08:01:11 +02:00
PCoder
9fd396363f Center the add ssh key nicely 2019-05-13 07:13:49 +02:00
1faf46cc1b added validation to heck if the user is the one allowed to access 2019-05-12 21:34:10 -04:00
PCoder
641c556bb6 Simplify code 2019-05-12 21:16:46 +02:00
PCoder
f2af1f8708 Rename button id 2019-05-12 21:15:48 +02:00
PCoder
bbe0017fa0 Add missing return statements for error 2019-05-12 21:15:15 +02:00
PCoder
a44d50dd69 Fix wrong comparing of public_key object with a string value 2019-05-12 19:56:14 +02:00
PCoder
d38edb0dfa Add url for AddSshKeyToVMView 2019-05-12 19:22:10 +02:00
PCoder
09ab9a714d Add AddSshKeyToVMView 2019-05-12 19:21:19 +02:00
PCoder
0104a804c2 Do not allow comma in SSH key name 2019-05-12 19:20:35 +02:00
PCoder
c9c91b1ecb JS code to handle the add ssh key functionality 2019-05-12 19:19:40 +02:00
PCoder
61127e56ca Update virtual_machine_detail.html template
To show the Add SSH key button and the modal that pops up after clicking
it.
2019-05-12 19:16:53 +02:00
PCoder
7e538bf37b Add ssh_key_added_to_vm.{html,txt} email templates 2019-05-12 19:12:34 +02:00
PCoder
3133bde0e9 Don't set the key in the live template 2019-05-11 09:15:08 +02:00
PCoder
b189371a7b Call get_all_active_vmids to get the active vmids 2019-05-11 02:38:16 +02:00
PCoder
7f6d4c1c53 Refactor get_all_vmids -> get_all_active_vmids
We now get this info from opennebula
2019-05-11 02:23:51 +02:00
PCoder
65c9ccb671 Use save_key_in_opennebula_user and save_key_in_vm_template 2019-05-11 01:54:35 +02:00
PCoder
1d70563ea2 Save user's key in opennebula 2019-05-10 09:19:42 +02: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