Service - CommerceAccounting Inventory: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Overview =
= Overview =


Creates connections between Commerce Inventory and Accounting Accounts where needed.
Links Inventory objects to Accounting structures.


= Repository =
= Repository =
Line 9: Line 9:
= Object Schemas =
= Object Schemas =
; Additional Information: [[Per Service Schemas]]
; Additional Information: [[Per Service Schemas]]
== comAccInventoryLink ==


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
objectType: "comAccAssetPurchaseLink",
objectType: "comAccInventoryLink",
canDelete: false,
canDelete: false,
belongTo: {
belongTo: {
serviceTag: "User",
serviceTag: "ComAccLink",
objectType: "user"
objectType: "comAccLinkByBusiness"
},
},
addOnDataStructure: [],
addOnDataStructure: [],
Line 22: Line 24:
"dynamo": {
"dynamo": {
"storageType": "dynamoDB",
"storageType": "dynamoDB",
"tableName": "comAccAssetPurchaseLink",
"tableName": "comAccInventoryLink",
}
}
     },
     },
     fieldNames: {
     fieldNames: {
// probably have two dynamo tables, one identified by inventoryId, one by journalId
// businessId
// inventoryId
// accountLinkTag // type of link: inventoryAsset|..
// accountId
     },
     },
     identifiers: [
     identifiers: [
{
{
// see above note
type: "partitionKey",
fieldNames: ["businessId","inventoryId"],
},
{
type: "sortKey",
fieldName: "accountLinkTag"
},
    ]
}
</syntaxhighlight>
 
== comAccInventoryLocationLink ==
 
<syntaxhighlight lang="JavaScript">
{
objectType: "comAccInventoryLocationLink",
canDelete: false,
belongTo: {
serviceTag: "ComAccLink",
objectType: "comAccLinkByBusiness"
},
addOnDataStructure: [],
storageResources: {
"dynamo": {
"storageType": "dynamoDB",
"tableName": "comAccInventoryLocationLink",
}
}
    },
    fieldNames: {
// businessId
// inventoryLocationId
// accountLinkTag // type of link: inventoryAsset|..
// accountId
    },
    identifiers: [
{
type: "partitionKey",
fieldNames: ["businessId", "inventoryLocationId"],
},
{
type: "sortKey",
fieldName: "accountLinkTag"
},
     ]
     ]
}
}
</syntaxhighlight>
</syntaxhighlight>


* maintains a link between inventoryId and asset purchase journalId
== comAccInventoryTemplateLink ==
* required so that depreciation can be accounted for when asset is sold
 
<syntaxhighlight lang="JavaScript">
{
objectType: "comAccInventoryTemplateLink",
canDelete: false,
belongTo: {
serviceTag: "ComAccLink",
objectType: "comAccLinkByBusiness"
},
addOnDataStructure: [],
storageResources: {
"dynamo": {
"storageType": "dynamoDB",
"tableName": "comAccInventoryTemplateLink",
}
    },
    fieldNames: {
// businessId
// inventoryTemplateId
// accountLinkTag // type of link: inventoryAsset|..
// accountId
    },
    identifiers: [
{
type: "partitionKey",
fieldNames: ["businessId", "inventoryTemplateId"],
},
{
type: "sortKey",
fieldName: "accountLinkTag"
},
    ]
}
</syntaxhighlight>
 
== comAccInventoryTypeLink ==
 
<syntaxhighlight lang="JavaScript">
{
objectType: "comAccInventoryTypeLink",
canDelete: false,
belongTo: {
serviceTag: "ComAccLink",
objectType: "comAccLinkByBusiness"
},
addOnDataStructure: [],
storageResources: {
"dynamo": {
"storageType": "dynamoDB",
"tableName": "comAccInventoryTypeLink",
}
    },
    fieldNames: {
// businessId
// inventoryType // goods|intangibleGoods|rawMaterial|asset|intangibleAsset
// accountLinkTag // type of link: inventoryAsset|..
// accountId
    },
    identifiers: [
{
type: "partitionKey",
fieldNames: ["businessId", "inventoryType"],
},
{
type: "sortKey",
fieldName: "accountLinkTag"
},
    ]
}
</syntaxhighlight>


== Relationships ==
== Relationships ==
Line 46: Line 160:
= flowSchemas =
= 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 =
= Working documents =

Latest revision as of 13:00, 16 April 2026

Overview

Links Inventory objects to Accounting structures.

Repository

...

Object Schemas

Additional Information
Per Service Schemas

comAccInventoryLink

{
	objectType: "comAccInventoryLink",
	canDelete: false,
	belongTo: {
		serviceTag: "ComAccLink",
		objectType: "comAccLinkByBusiness"
	},
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccInventoryLink",
		}
    },
    fieldNames: {
		// businessId
		// inventoryId
		// accountLinkTag // type of link: inventoryAsset|..
		// accountId
    },
    identifiers: [
		{
			type: "partitionKey",
			fieldNames: ["businessId","inventoryId"],
		},
		{
			type: "sortKey",
			fieldName: "accountLinkTag"
		},
    ]
}

comAccInventoryLocationLink

{
	objectType: "comAccInventoryLocationLink",
	canDelete: false,
	belongTo: {
		serviceTag: "ComAccLink",
		objectType: "comAccLinkByBusiness"
	},
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccInventoryLocationLink",
		}
    },
    fieldNames: {
		// businessId
		// inventoryLocationId
		// accountLinkTag // type of link: inventoryAsset|..
		// accountId
    },
    identifiers: [
		{
			type: "partitionKey",
			fieldNames: ["businessId", "inventoryLocationId"],
		},
		{
			type: "sortKey",
			fieldName: "accountLinkTag"
		},
    ]
}

comAccInventoryTemplateLink

{
	objectType: "comAccInventoryTemplateLink",
	canDelete: false,
	belongTo: {
		serviceTag: "ComAccLink",
		objectType: "comAccLinkByBusiness"
	},
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccInventoryTemplateLink",
		}
    },
    fieldNames: {
		// businessId
		// inventoryTemplateId
		// accountLinkTag // type of link: inventoryAsset|..
		// accountId
    },
    identifiers: [
		{
			type: "partitionKey",
			fieldNames: ["businessId", "inventoryTemplateId"],
		},
		{
			type: "sortKey",
			fieldName: "accountLinkTag"
		},
    ]
}

comAccInventoryTypeLink

{
	objectType: "comAccInventoryTypeLink",
	canDelete: false,
	belongTo: {
		serviceTag: "ComAccLink",
		objectType: "comAccLinkByBusiness"
	},
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccInventoryTypeLink",
		}
    },
    fieldNames: {
		// businessId
		// inventoryType // goods|intangibleGoods|rawMaterial|asset|intangibleAsset
		// accountLinkTag // type of link: inventoryAsset|..
		// accountId
    },
    identifiers: [
		{
			type: "partitionKey",
			fieldNames: ["businessId", "inventoryType"],
		},
		{
			type: "sortKey",
			fieldName: "accountLinkTag"
		},
    ]
}

Relationships

...

flowSchemas

...

Working documents

CommerceAccounting Inventory