@colijnit/transactionapi 1.1.10 → 1.1.11

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.
@@ -54,5 +54,6 @@ export declare enum PublicServiceMethod {
54
54
  GetRelationListObjects = "getRelationListObjects",
55
55
  GetStandardTextsNoHeadOrFeet = "getStandardTextsNoHeadOrFeet",
56
56
  GetCustomerGroups = "getCustomerGroups",
57
- Commit = "commit"
57
+ Commit = "commit",
58
+ GetCashRegisters = "getCashRegisters"
58
59
  }
@@ -56,4 +56,5 @@ export var PublicServiceMethod;
56
56
  PublicServiceMethod["GetStandardTextsNoHeadOrFeet"] = "getStandardTextsNoHeadOrFeet";
57
57
  PublicServiceMethod["GetCustomerGroups"] = "getCustomerGroups";
58
58
  PublicServiceMethod["Commit"] = "commit";
59
+ PublicServiceMethod["GetCashRegisters"] = "getCashRegisters";
59
60
  })(PublicServiceMethod || (PublicServiceMethod = {}));
@@ -35,6 +35,7 @@ export declare abstract class IoneApiTransaction {
35
35
  abstract getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
36
36
  abstract getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
37
37
  abstract getArticleBoundTextLinesOfArticleLine(articleLineUuid: string): Promise<DataServiceResponseData>;
38
+ abstract getCashRegisters(branch?: string, group?: number): Promise<DataServiceResponseData>;
38
39
  abstract addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
39
40
  abstract saveTransaction(uuid: string): Promise<DataServiceResponseData>;
40
41
  abstract setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
@@ -0,0 +1,13 @@
1
+ import { BusinessObject } from "./business-object";
2
+ export declare class CashRegister extends BusinessObject {
3
+ nr: number;
4
+ description: string;
5
+ group: number;
6
+ cashDrawerConnection: string;
7
+ localCashDrawerCommunicationPort: string;
8
+ displayString: string;
9
+ defaultDrawerNumber: string;
10
+ defaultPrinter: string;
11
+ constructor();
12
+ getId(): string;
13
+ }
@@ -0,0 +1,25 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ import { BusinessObject } from "./business-object";
15
+ var CashRegister = (function (_super) {
16
+ __extends(CashRegister, _super);
17
+ function CashRegister() {
18
+ return _super.call(this) || this;
19
+ }
20
+ CashRegister.prototype.getId = function () {
21
+ return this.nr + " " + this.group;
22
+ };
23
+ return CashRegister;
24
+ }(BusinessObject));
25
+ export { CashRegister };
@@ -13,4 +13,11 @@ export declare class SetTransactionDeliveryOptionsRequest extends BusinessObject
13
13
  ownReference: string;
14
14
  transactionAddress: number;
15
15
  invoiceAddress: number;
16
+ confirmedDeliveryDate: Date;
17
+ downpaymentPercentage: number;
18
+ downpaymentAmount: number;
19
+ downpaymentBR: number;
20
+ downpaymentOnDelivery: number;
21
+ branch: string;
22
+ relationAdmin: string;
16
23
  }
@@ -35,6 +35,10 @@ var SetTransactionDeliveryOptionsRequest = (function (_super) {
35
35
  DateField(),
36
36
  __metadata("design:type", Date)
37
37
  ], SetTransactionDeliveryOptionsRequest.prototype, "preferredDeliveryDate", void 0);
38
+ __decorate([
39
+ DateField(),
40
+ __metadata("design:type", Date)
41
+ ], SetTransactionDeliveryOptionsRequest.prototype, "confirmedDeliveryDate", void 0);
38
42
  return SetTransactionDeliveryOptionsRequest;
39
43
  }(BusinessObject));
40
44
  export { SetTransactionDeliveryOptionsRequest };
@@ -13,6 +13,7 @@ export declare class TransactionAuth extends IoneApiTransaction {
13
13
  getGoodIdFromArticleNr(sku: string): Promise<DataServiceResponseData>;
14
14
  getSingleImage(nodeId: number | string, publication?: number, includeMimetype?: boolean, thumb?: boolean): Promise<DataServiceResponseData>;
15
15
  getDocumentContent(id: number, thumbnail?: boolean): Promise<DataServiceResponseData>;
16
+ getCashRegisters(branch?: string, group?: number): Promise<DataServiceResponseData>;
16
17
  getCountries(): Promise<DataServiceResponseData>;
17
18
  getCustomerGroups(): Promise<DataServiceResponseData>;
18
19
  commit(): Promise<DataServiceResponseData>;
@@ -126,6 +126,16 @@ var TransactionAuth = (function (_super) {
126
126
  };
127
127
  return this._call(DataServiceMethod.ExecuteMethod, data);
128
128
  };
129
+ TransactionAuth.prototype.getCashRegisters = function (branch, group) {
130
+ var params = {};
131
+ if (branch !== undefined && branch !== null) {
132
+ params.branchNumber = branch;
133
+ }
134
+ if (group !== undefined && group !== null) {
135
+ params.cashRegistry = group;
136
+ }
137
+ return this.selectMultiple(ModuleName.Transaction, 'CashRegister', undefined, params);
138
+ };
129
139
  TransactionAuth.prototype.getCountries = function () {
130
140
  return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.Country);
131
141
  };
@@ -339,7 +349,7 @@ var TransactionAuth = (function (_super) {
339
349
  TransactionAuth.prototype.deleteTransactionLine = function (transactionUuid, lineUuid) {
340
350
  var params = {
341
351
  transactionUuid: transactionUuid,
342
- transactionLineUuid: lineUuid,
352
+ lineUuid: lineUuid,
343
353
  };
344
354
  var data = {
345
355
  moduleName: ModuleName.Transaction,
@@ -16,6 +16,7 @@ export declare class TransactionPublic extends IoneApiTransaction {
16
16
  getDocumentContent(id: number, thumbnail?: boolean): Promise<DataServiceResponseData>;
17
17
  getSingleImage(nodeId: number | string, publication?: number, includeMimetype?: boolean, thumb?: boolean): Promise<DataServiceResponseData>;
18
18
  getCountries(): Promise<DataServiceResponseData>;
19
+ getCashRegisters(): Promise<DataServiceResponseData>;
19
20
  getCustomerGroups(): Promise<DataServiceResponseData>;
20
21
  commit(): Promise<DataServiceResponseData>;
21
22
  getPrivacySettings(): Promise<DataServiceResponseData>;
@@ -165,6 +165,10 @@ var TransactionPublic = (function (_super) {
165
165
  });
166
166
  });
167
167
  };
168
+ TransactionPublic.prototype.getCashRegisters = function () {
169
+ var data = __assign({}, this.createServiceRequestData());
170
+ return this._call(PublicServiceMethod.GetCashRegisters, data);
171
+ };
168
172
  TransactionPublic.prototype.getCustomerGroups = function () {
169
173
  return __awaiter(this, void 0, void 0, function () {
170
174
  var data;
@@ -46,6 +46,7 @@ export declare class Transaction {
46
46
  getTransactionByNrAndKind(kind: TransactionKind, transactionNo: number): Promise<DataServiceResponseData>;
47
47
  getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
48
48
  getArticleBoundTextLinesOfArticleLine(articleLineUuid: string): Promise<DataServiceResponseData>;
49
+ getCashRegister(branch?: string, group?: number): Promise<DataServiceResponseData>;
49
50
  addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
50
51
  saveTransaction(uuid: string): Promise<DataServiceResponseData>;
51
52
  setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
@@ -124,6 +124,9 @@ var Transaction = (function () {
124
124
  Transaction.prototype.getArticleBoundTextLinesOfArticleLine = function (articleLineUuid) {
125
125
  return this.transaction.getArticleBoundTextLinesOfArticleLine(articleLineUuid);
126
126
  };
127
+ Transaction.prototype.getCashRegister = function (branch, group) {
128
+ return this.transaction.getCashRegisters(branch, group);
129
+ };
127
130
  Transaction.prototype.addRelationToTransaction = function (uuid, relationId) {
128
131
  return this.transaction.addRelationToTransaction(uuid, relationId);
129
132
  };
@@ -231,4 +231,40 @@ describe("TransactionAPI", function () {
231
231
  }
232
232
  });
233
233
  }); });
234
+ it('getCashRegisters', function () { return __awaiter(void 0, void 0, void 0, function () {
235
+ var result;
236
+ return __generator(this, function (_a) {
237
+ switch (_a.label) {
238
+ case 0: return [4, transaction.getCashRegister()];
239
+ case 1:
240
+ result = _a.sent();
241
+ expect(result.validationResult.success).toBeTruthy();
242
+ return [2];
243
+ }
244
+ });
245
+ }); });
246
+ it('getCashRegistersFromBranch', function () { return __awaiter(void 0, void 0, void 0, function () {
247
+ var result;
248
+ return __generator(this, function (_a) {
249
+ switch (_a.label) {
250
+ case 0: return [4, transaction.getCashRegister("1")];
251
+ case 1:
252
+ result = _a.sent();
253
+ expect(result.validationResult.success).toBeTruthy();
254
+ return [2];
255
+ }
256
+ });
257
+ }); });
258
+ it('getCashRegistersFromGroup', function () { return __awaiter(void 0, void 0, void 0, function () {
259
+ var result;
260
+ return __generator(this, function (_a) {
261
+ switch (_a.label) {
262
+ case 0: return [4, transaction.getCashRegister()];
263
+ case 1:
264
+ result = _a.sent();
265
+ expect(result.validationResult.success).toBeTruthy();
266
+ return [2];
267
+ }
268
+ });
269
+ }); });
234
270
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/transactionapi",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "scripts": {
5
5
  "build": "grunt clean && tsc",
6
6
  "browserify": "browserify build/connector.js --s colijn -o dist/out-tsc/bundle.js",