Service - CommerceAccounting Inventory: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Handles changes in inventory in Commerce = Repository = ... = Object Schemas = ; Additional Information: Per Service Schemas <syntaxhighlight lang="JavaScript"> { objectType: "comAccInventoryPurchasedLink", canDelete: false, belongTo: { serviceTag: "User", objectType: "user" }, addOnDataStructure: [], storageResources: { "dynamo": { "storageType": "dynamoDB", "tableName": "comAccLink", } }, fieldNames: { // probably hav...")
 
No edit summary
Line 1: Line 1:
= Overview =
= Overview =


Handles changes in inventory in Commerce
Creates connections between Commerce Inventory and Accounting Accounts where needed.


= Repository =
= Repository =
Line 12: Line 12:
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
objectType: "comAccInventoryPurchasedLink",
objectType: "comAccAssetPurchaseLink",
canDelete: false,
canDelete: false,
belongTo: {
belongTo: {
Line 22: Line 22:
"dynamo": {
"dynamo": {
"storageType": "dynamoDB",
"storageType": "dynamoDB",
"tableName": "comAccLink",
"tableName": "comAccAssetPurchaseLink",
}
}
     },
     },
     fieldNames: {
     fieldNames: {
// probably have two dynamo tables, one identified by saleLineItemId, one by journalId
// probably have two dynamo tables, one identified by inventoryId, one by journalId
     },
     },
Line 37: Line 37:
</syntaxhighlight>
</syntaxhighlight>


* maintains a link between saleLineItemId and journalId, so can adjust if changes made to purchases
* maintains a link between inventoryId and asset purchase journalId
* can maybe use for all inventory types
* required so that depreciation can be accounted for when asset is sold


== Relationships ==
== Relationships ==
Line 46: Line 46:
= flowSchemas =
= flowSchemas =


== inventoryGoodsPurchased ==
== inventoryAssetPurchased ==


* accountTag: inventoryGoods
* maybe triggered from ComAcc Sale saleCreated flow, because needs to know asset purchase journalId
* when submitting purchase order, if is inventoryGoods make a positive entry in inventoryGoods(Asset) Accounting Account
* simply saves the link for future actions
 
== inventoryGoodsPurchaseChange ==
 
* accountTag: inventoryGoods
* make adjustment to journal entry when purchase saleLineItemId changes
* perhaps handling removal of journal entry also


= Working documents =
= Working documents =

Revision as of 12:26, 11 January 2026

Overview

Creates connections between Commerce Inventory and Accounting Accounts where needed.

Repository

...

Object Schemas

Additional Information
Per Service Schemas
{
	objectType: "comAccAssetPurchaseLink",
	canDelete: false,
	belongTo: {
		serviceTag: "User",
		objectType: "user"
	},
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccAssetPurchaseLink",
		}
    },
    fieldNames: {
		// probably have two dynamo tables, one identified by inventoryId, one by journalId
		
    },
    identifiers: [
		{
			// see above note
		}
    ]
}
  • maintains a link between inventoryId and asset purchase journalId
  • required so that depreciation can be accounted for when asset is sold

Relationships

...

flowSchemas

inventoryAssetPurchased

  • maybe triggered from ComAcc Sale saleCreated flow, because needs to know asset purchase journalId
  • simply saves the link for future actions

Working documents

CommerceAccounting Inventory