Skip to content

Commit

Permalink
Merge pull request #123 from nginformatica/feature/lot-number
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksjm authored Oct 18, 2024
2 parents a50d9ef + 7a09590 commit f408f04
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quirons-broker",
"version": "0.0.1-alpha.135",
"version": "0.0.1-alpha.136",
"description": "A small library to expose the broker types",
"typings": "index.d.ts",
"types": "index.d.ts",
Expand Down
15 changes: 15 additions & 0 deletions src/inventory/schema/StockLevel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ const WarehouseStock = t.type({
BookedStockAmount: t.union([t.string, t.number]),
})

const ListOfLotStock = t.intersection([
t.type({
WarehouseInternalId: t.string,
LotNumber: t.string,
CurrentStockAmount: t.union([t.string, t.number]),
AvaliableStockAmount: t.union([t.string, t.number]),
BookedStockAmount: t.union([t.string, t.number]),
}),
t.partial({
SubLotCode: t.string,
LotExpirationDate: t.union([datetime, date]),
})
])

const ReturnItem = t.intersection([
t.type({
CompanyId: t.string,
Expand All @@ -81,6 +95,7 @@ const ReturnItem = t.intersection([
UnitItemCost: t.union([t.string, t.number]),
WarehouseInternalId: t.string,
BranchId: nullable(t.string),
ListOfLotStock: nullable(t.array(ListOfLotStock))
})
])

Expand Down
3 changes: 2 additions & 1 deletion src/inventory/schema/StockTurnOver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ const StockTurnoverItem = t.intersection([
CostCenterInternalId: nullable(t.string),
CostCenterCode: nullable(t.string),
UnitPrice: nullable(t.number),
TotalPrice: nullable(t.number)
TotalPrice: nullable(t.number),
LotOrSerialNumber: nullable(t.string),
})
])

Expand Down

0 comments on commit f408f04

Please sign in to comment.