Service - Sale Line Item Manager

From Izara Wiki
Revision as of 13:57, 12 January 2026 by Sven the Barbarian (talk | contribs)
Jump to navigation Jump to search

Overview

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

Repository

....

Object Schemas

Additional Information
Per Service Schemas

objType

saleLineItem

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

Object Relationships

includesInventoryUnit

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

flowSchemas

updateSaleLineItem

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

Working documents

Sale Line Item Manager