Service - Purchase Line Item Manager

From Izara Wiki
Revision as of 14:54, 18 January 2026 by Sven the Barbarian (talk | contribs) (Created page with "= Overview = Each entry in a purchase is a line item, different line items types are handled by handler services. = Repository = .... = Object Schemas = ; Additional Information: Per Service Schemas == objType == === purchaseLineItem === <syntaxhighlight lang="JavaScript"> { objectType: "purchaseLineItem", canDelete: false, belongTo: { serviceTag: "Business", objectType: "business" }, addOnDataStructure: [ { type:"versionedData", versionedDat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

Each entry in a purchase is a line item, different line items types are handled by handler services.

Repository

....

Object Schemas

Additional Information
Per Service Schemas

objType

purchaseLineItem

{
	objectType: "purchaseLineItem",
	canDelete: false,
	belongTo: { 
		serviceTag: "Business",
		objectType: "business"
	},
	addOnDataStructure: [
		{
			type:"versionedData",
			versionedDataLabel: "purchaseLineItemDetail",
			storageResourceTag : "myGraph",
			fieldNames: {
				lineItemQuantity: {
					type: "integer",
					storageResourceTags: ['myGraph']
				},
				lineItemUnitPrice: {
					type: "numeric",
					storageResourceTags: ['myGraph']
				},
			}
        },	
	],
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
    },
    fieldNames: {
		purchaseLineItemId: {
			type: "string",
			randomOnCreate: true,
			storageResourceTags: ['myGraph']
		},
    },
    identifiers: [
		{
			type: "identifier",
			fieldName: "purchaseLineItemId"
		}
    ]
}

Object Relationships

includesInventoryUnit

{
	includesInventoryUnit: {
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "PurchaseLineItemManager",
						objectType: "purchaseLineItem"
					},
					linkType: "many",
				},
				to: {
					objType: {
						serviceTag: "InventoryManager",
						objectType: "inventoryUnit"
					},
					linkType: "one"
				}
			}
		]
	}
}

flowSchemas

updatePurchaseLineItem

  • if have ComAcc plugin enabled, send request to plugin to check if purchase has been locked on Accounting
  • set sale to purchaseCommitted=updateWorking

Working documents

Purchase Line Item Manager