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
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Overview =
= Overview =


Handles changes in inventory in Commerce
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: "comAccInventoryPurchasedLink",
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": "comAccLink",
"tableName": "comAccInventoryLink",
}
}
     },
     },
     fieldNames: {
     fieldNames: {
// probably have two dynamo tables, one identified by saleLineItemId, 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 saleLineItemId and journalId, so can adjust if changes made to purchases
== comAccInventoryTemplateLink ==
* can maybe use for all inventory types
 
<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 =


== inventoryGoodsPurchased ==
...
 
* accountTag: inventoryGoods
* when submitting purchase order, if is inventoryGoods make a positive entry in inventoryGoods(Asset) Accounting Account
 
== inventoryGoodsPurchaseChange ==
 
* accountTag: inventoryGoods
* make adjustment to journal entry when purchase saleLineItemId changes
* perhaps handling removal of journal entry also


= 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