Merge branch '21-yuyu_dashboard-Features/setting-billing-company' into 'main'
Added new Keys on Dynamic Billing Setting See merge request dev/yuyu!2
This commit is contained in:
commit
3ce9f97dfc
3 changed files with 12 additions and 1 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -4,10 +4,20 @@ from core.models import DynamicSetting
|
||||||
|
|
||||||
BILLING_ENABLED = "billing_enabled"
|
BILLING_ENABLED = "billing_enabled"
|
||||||
INVOICE_TAX = "invoice_tax"
|
INVOICE_TAX = "invoice_tax"
|
||||||
|
COMPANY_NAME = "company_name"
|
||||||
|
COMPANY_LOGO = "company_logo"
|
||||||
|
COMPANY_ADDRESS = "company_address"
|
||||||
|
EMAIL_ADMIN = "email_admin"
|
||||||
|
EMAIL_NOTIFICATION = "email_notification"
|
||||||
|
|
||||||
DEFAULTS = {
|
DEFAULTS = {
|
||||||
BILLING_ENABLED: False,
|
BILLING_ENABLED: False,
|
||||||
INVOICE_TAX: 11
|
INVOICE_TAX: 11,
|
||||||
|
COMPANY_NAME: "BTECH DEV",
|
||||||
|
COMPANY_LOGO: '',
|
||||||
|
COMPANY_ADDRESS: '',
|
||||||
|
EMAIL_ADMIN: '',
|
||||||
|
EMAIL_NOTIFICATION: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,6 +65,7 @@ def set_dynamic_setting(key, value):
|
||||||
inserted_value = value
|
inserted_value = value
|
||||||
data_type = DynamicSetting.DataType.STR
|
data_type = DynamicSetting.DataType.STR
|
||||||
else:
|
else:
|
||||||
|
print("SETTING TAB = ", type(value))
|
||||||
raise ValueError("Type not supported")
|
raise ValueError("Type not supported")
|
||||||
|
|
||||||
DynamicSetting.objects.update_or_create(key=key, defaults={
|
DynamicSetting.objects.update_or_create(key=key, defaults={
|
||||||
|
|
0
logs/.gitkeep
Normal file
0
logs/.gitkeep
Normal file
Loading…
Add table
Reference in a new issue