@softwear/latestcollectioncore 1.0.169 → 1.0.170

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -259,6 +259,14 @@ const buildTransaction = function (transaction) {
259
259
  docnr: transaction.docnr,
260
260
  time: transaction.time,
261
261
  };
262
+ if (transaction.qty !== undefined)
263
+ dbTransaction.qty = transaction.qty;
264
+ if (transaction.buyprice !== undefined)
265
+ dbTransaction.buyprice = transaction.buyprice;
266
+ if (transaction.sellprice !== undefined)
267
+ dbTransaction.sellprice = transaction.sellprice;
268
+ if (transaction.vat !== undefined)
269
+ dbTransaction.vat = transaction.vat;
262
270
  if (transaction.customer)
263
271
  dbTransaction.customer = transaction.customer;
264
272
  if (transaction.agent)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwear/latestcollectioncore",
3
- "version": "1.0.169",
3
+ "version": "1.0.170",
4
4
  "description": "Core functions for LatestCollections applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -278,6 +278,10 @@ const buildTransaction = function (transaction: TransactionI): dbTransactionI |
278
278
  docnr: transaction.docnr,
279
279
  time: transaction.time,
280
280
  }
281
+ if (transaction.qty !== undefined) dbTransaction.qty = transaction.qty
282
+ if (transaction.buyprice !== undefined) dbTransaction.buyprice = transaction.buyprice
283
+ if (transaction.sellprice !== undefined) dbTransaction.sellprice = transaction.sellprice
284
+ if (transaction.vat !== undefined) dbTransaction.vat = transaction.vat
281
285
  if (transaction.customer) dbTransaction.customer = transaction.customer
282
286
  if (transaction.agent) dbTransaction.agent = transaction.agent
283
287
  if (transaction.type == transactionTypeE.START_SHELF_STOCK) dbTransaction.type = transactionTypeE.START_STOCK
@@ -36,6 +36,10 @@ describe('#Transactions', () => {
36
36
  ean: '1234567890128',
37
37
  wh: '51',
38
38
  time: 314159265,
39
+ qty: 123,
40
+ buyprice: 9.95,
41
+ sellprice: 19.95,
42
+ vat: 21,
39
43
  customer: '123',
40
44
  agent: '01',
41
45
  docnr: '51-123',
@@ -60,6 +64,9 @@ describe('#Transactions', () => {
60
64
  ean: '1234567890128',
61
65
  wh: '51',
62
66
  time: 314159265,
67
+ qty: 123,
68
+ buyprice: 9.95,
69
+ vat: 21,
63
70
  docnr: '51-123',
64
71
  })
65
72
  expect(transaction.vector).toBe(undefined)