Invoice time support (#269)

* Changed invoice date to datetime

* Fixed code style errors

* Update TimeFormatsController.php

* Update TimeFormatter.php

* Update TimeFormatsController namespace

* Fix missing comma in language file

* Fix formatting

---------

Co-authored-by: troky <troky2001@yahoo.com>
This commit is contained in:
Darko Gjorgjijoski
2025-01-12 13:32:47 +01:00
committed by GitHub
parent 32e03b98a3
commit f52b73f517
14 changed files with 242 additions and 3 deletions

View File

@@ -254,6 +254,14 @@ const carbonFormat = computed(() => {
return companyStore.selectedCompanySettings?.carbon_date_format
})
const carbonFormatWithTime = computed(() => {
let format = companyStore.selectedCompanySettings?.carbon_date_format
if (companyStore.selectedCompanySettings?.invoice_use_time === 'YES') {
format += ' ' + companyStore.selectedCompanySettings?.carbon_time_format
}
return format.replace("g", "h").replace("a", "K");
})
const hasIconSlot = computed(() => {
return !!slots.icon
})
@@ -301,7 +309,7 @@ watch(
config.altFormat = carbonFormat.value ? carbonFormat.value : 'd M Y'
} else {
config.altFormat = carbonFormat.value
? `${carbonFormat.value} H:i `
? `${carbonFormatWithTime.value}`
: 'd M Y H:i'
}
},