mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 00:34:28 +08:00
add transaction template
This commit is contained in:
@@ -37,6 +37,10 @@ export function categoryTypeToTransactionType(categoryType) {
|
||||
}
|
||||
|
||||
export function getTransactionPrimaryCategoryName(categoryId, allCategories) {
|
||||
if (!allCategories) {
|
||||
return '';
|
||||
}
|
||||
|
||||
for (let i = 0; i < allCategories.length; i++) {
|
||||
for (let j = 0; j < allCategories[i].subCategories.length; j++) {
|
||||
const subCategory = allCategories[i].subCategories[j];
|
||||
@@ -50,6 +54,10 @@ export function getTransactionPrimaryCategoryName(categoryId, allCategories) {
|
||||
}
|
||||
|
||||
export function getTransactionSecondaryCategoryName(categoryId, allCategories) {
|
||||
if (!allCategories) {
|
||||
return '';
|
||||
}
|
||||
|
||||
for (let i = 0; i < allCategories.length; i++) {
|
||||
for (let j = 0; j < allCategories[i].subCategories.length; j++) {
|
||||
const subCategory = allCategories[i].subCategories[j];
|
||||
|
||||
Reference in New Issue
Block a user