Service - Entry: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (10 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
= Overview = | = Overview = | ||
A credit or debit entry | A credit or debit entry linking between a journal entry and an account. | ||
= Repository = | = Repository = | ||
| Line 21: | Line 21: | ||
}, | }, | ||
addOnDataStructure: [ | addOnDataStructure: [ | ||
{ | |||
type: "versionedData", | |||
versionedDataLabel: "Detail", | |||
storageResourceTag: "myGraph", | |||
fieldNames: { | |||
amount: { | |||
type: "currencyValue", // string|integer|currency|currencyValue|float|special|object|boolean|arrayMixed|arrayNumeric|arrayString | |||
requiredOnCreate: true, // default = false | |||
}, | |||
functionalCurrencyAmount: { | |||
type: "currencyValue", | |||
requiredOnCreate: true, | |||
} | |||
} | |||
}, | |||
], | |||
storageResources: { | storageResources: { | ||
myGraph: { | myGraph: { | ||
storageType: "graph", | storageType: "graph", | ||
| Line 51: | Line 51: | ||
type: "string", | type: "string", | ||
randomOnCreate: true, | randomOnCreate: true, | ||
storageResourceTags: ['myGraph','dynamo'] | |||
}, | |||
amount: { | |||
type: "numeric", | |||
requiredOnCreate: true, | |||
storageResourceTags: ['myGraph','dynamo'] | |||
}, | |||
functionalCurrencyAmount: { | |||
type: "currencyValue", | |||
storageResourceTags: ['myGraph'] | storageResourceTags: ['myGraph'] | ||
} | } | ||
}, | }, | ||
identifiers: [ | identifiers: [ | ||
| Line 78: | Line 84: | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
hasEntry: { | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "GraphHandler" | |||
} | |||
}, | |||
links: [ | |||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "Journal", | |||
objectType: "journal" | |||
}, | |||
linkType: "one", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "Entry", | |||
objectType: "entry" | |||
}, | |||
requiredOnCreate: true, | |||
linkType: "many" | |||
} | |||
}, | |||
] | |||
} | |||
} | |||
</syntaxhighlight> | |||
=== hasEntry === | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
hasEntry: { | |||
storageResources: { | storageResources: { | ||
myGraph: { | myGraph: { | ||
| Line 108: | Line 149: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== oldEntry === | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
oldEntry: { | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "GraphHandler" | |||
} | |||
}, | |||
links: [ | |||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "Journal", | |||
objectType: "journal" | |||
}, | |||
linkType: "one", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "Entry", | |||
objectType: "entry" | |||
}, | |||
requiredOnCreate: true, | |||
linkType: "many" | |||
} | |||
}, | |||
] | |||
} | |||
} | |||
</syntaxhighlight> | |||
* has can change to old, but old cannot change to has, create new entry if make new that links to same account | |||
=== inAccount === | === inAccount === | ||
| Line 113: | Line 191: | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
inAccount: { | |||
storageResources: { | storageResources: { | ||
myGraph: { | myGraph: { | ||
Latest revision as of 04:24, 11 June 2026
Overview
A credit or debit entry linking between a journal entry and an account.
Repository
...
Object Schemas
- Additional Information
- Per Service Schemas
entry
{
objectType: "entry",
canDelete: false,
belongTo: {
serviceTag: "Organization",
objectType: "organization"
},
addOnDataStructure: [
{
type: "versionedData",
versionedDataLabel: "Detail",
storageResourceTag: "myGraph",
fieldNames: {
amount: {
type: "currencyValue", // string|integer|currency|currencyValue|float|special|object|boolean|arrayMixed|arrayNumeric|arrayString
requiredOnCreate: true, // default = false
},
functionalCurrencyAmount: {
type: "currencyValue",
requiredOnCreate: true,
}
}
},
],
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
},
"dynamo": {
"storageType": "dynamoDB",
"tableName": "entry",
}
},
fieldNames: {
entryId: {
type: "string",
randomOnCreate: true,
storageResourceTags: ['myGraph','dynamo']
},
amount: {
type: "numeric",
requiredOnCreate: true,
storageResourceTags: ['myGraph','dynamo']
},
functionalCurrencyAmount: {
type: "currencyValue",
storageResourceTags: ['myGraph']
}
},
identifiers: [
{
type: "identifier",
fieldName: "entryId"
}
]
}
- accountingStatus: when a period is being closed we set all entries to processing, then once the return is completed set to locked
- when beginning process of an entry, maybe trigger ComAcc plugin to check whether journalId can be locked, for example if it is connected to a sale and the sale is in saleCommitted=working/updateWorking cannot be locked
- when processing or locked entries cannot be changed (journals cannot be changed if either of the entries on each side are processing or locked
- maybe the journal also has an accountingStatus, so easy to confirm cannot make changes, or perhaps only journals because entries cannot be changed directly
Relationships
hasEntry
{
hasEntry: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "Journal",
objectType: "journal"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "Entry",
objectType: "entry"
},
requiredOnCreate: true,
linkType: "many"
}
},
]
}
}
hasEntry
{
hasEntry: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "Journal",
objectType: "journal"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "Entry",
objectType: "entry"
},
requiredOnCreate: true,
linkType: "many"
}
},
]
}
}
oldEntry
{
oldEntry: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "Journal",
objectType: "journal"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "Entry",
objectType: "entry"
},
requiredOnCreate: true,
linkType: "many"
}
},
]
}
}
- has can change to old, but old cannot change to has, create new entry if make new that links to same account
inAccount
{
inAccount: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "Entry",
objectType: "entry"
},
requiredOnCreate: true,
linkType: "many"
},
to: {
objType: {
serviceTag: "AccountManager",
objectType: "account"
},
linkType: "one"
}
},
]
}
}