Service - CommerceAccounting Purchase: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Handle purchases in one service, becuase some Accounting entries include the full amount, some break up according to purchaseLineItems. = Repository = ... = Object Schemas = ; Additional Information: Per Service Schemas <syntaxhighlight lang="JavaScript"> { objectType: "comAccPurchaseLink", canDelete: false, belongTo: { serviceTag: "User", objectType: "user" }, addOnDataStructure: [], storageResources: { "dynamo": { "storageType": "dy...")
 
Line 15: Line 15:
canDelete: false,
canDelete: false,
belongTo: {
belongTo: {
serviceTag: "User",
serviceTag: "ComAccLink",
objectType: "user"
objectType: "comAccLink"
},
},
addOnDataStructure: [],
addOnDataStructure: [],

Revision as of 15:22, 21 January 2026

Overview

Handle purchases in one service, becuase some Accounting entries include the full amount, some break up according to purchaseLineItems.

Repository

...

Object Schemas

Additional Information
Per Service Schemas
{
	objectType: "comAccPurchaseLink",
	canDelete: false,
	belongTo: {
		serviceTag: "ComAccLink",
		objectType: "comAccLink"
	},
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccPurchaseLink",
		}
    },
    fieldNames: {
		// probably have two dynamo tables, one identified by purchaseId, one by journalId
		
    },
    identifiers: [
		{
			// see above note
		}
    ]
}
  • one purchaseId may link to multiple journalIds, purchase value and inventory adjustment entries
  • maintains a link between purchaseId and journalIds, so can adjust if changes made to purchase

Relationships

...

flowSchemas

purchaseCreated

  • when creating a purchase, iterate purchaseLineItems to decide which journal entries are created
  • accountsPayable accountId will need to come from Service - CommerceAccounting Vendor

Purchase Value

  • the total purchase value has journal entry for all the below:
    1. (credit)accountsPayable(Liability)
  • The other side (debit) is broken up depending on lineItem type
  • For expenses value an entry is entered into the below
  • Maybe classify expenses and have different accounts depending on classification
    1. (debit)expense(Expense)
  • Goods:
    1. (debit)inventory(Asset)
  • Intangible Goods:
    1. (debit)expense(Expense)
  • Services:
    1. (debit)expense(Expense)
  • Assets:
    1. (debit)inventoryAsset(Asset)
  • Intangible Assets have:
    1. (debit)inventoryIntangibleAsset(Asset)
  • all debit side may have:
    1. (debit)vatReceivable(Asset)

purchaseChange

  • make adjustment to journal entries when purchaseLineItemId changes
  • perhaps handling removal of purchase/journal entries, or creation of new entries
  • basically re-calculate all entries and check against existing

Working documents

CommerceAccounting Purchase