Added new Keys on Dynamic Billing Setting

This commit is contained in:
Angger 2022-06-17 03:53:05 +00:00 committed by Setyo Nugroho
parent 9c13da1c27
commit a9769317a3
3 changed files with 12 additions and 1 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View file

@ -4,10 +4,20 @@ from core.models import DynamicSetting
BILLING_ENABLED = "billing_enabled"
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 = {
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
data_type = DynamicSetting.DataType.STR
else:
print("SETTING TAB = ", type(value))
raise ValueError("Type not supported")
DynamicSetting.objects.update_or_create(key=key, defaults={

0
logs/.gitkeep Normal file
View file