@colijnit/transaction 257.1.33 → 257.1.35
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.
- package/bundles/colijnit-transaction.umd.js +115 -48
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/add-product/add-product.component.js +77 -43
- package/esm2015/lib/component/transaction-line-image-and-description/transaction-line-image-and-description.component.js +7 -3
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.component.js +44 -28
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-purchase-order-overview/transaction-quick-access-purchase-order-overview.component.js +2 -1
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +130 -75
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/add-product/add-product.component.d.ts +4 -0
- package/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.component.d.ts +6 -0
- package/package.json +3 -3
|
@@ -286,8 +286,8 @@ class Version {
|
|
|
286
286
|
constructor() {
|
|
287
287
|
this.name = "@colijnit/transaction";
|
|
288
288
|
this.description = "Colijn IT transaction package";
|
|
289
|
-
this.symVer = "257.1.
|
|
290
|
-
this.publishDate = "
|
|
289
|
+
this.symVer = "257.1.35";
|
|
290
|
+
this.publishDate = "27-3-2025 09:42:01";
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
|
|
@@ -17606,6 +17606,10 @@ class TransactionLineImageAndDescriptionComponent extends TransactionLineBaseCom
|
|
|
17606
17606
|
transactionLineSet() {
|
|
17607
17607
|
super.transactionLineSet();
|
|
17608
17608
|
this._loadLineImage();
|
|
17609
|
+
if (this.transactionLine.configurationReadable) {
|
|
17610
|
+
// @ts-ignore
|
|
17611
|
+
this.transactionLine.configurationReadable = this.transactionLine.configurationReadable.replaceAll('\n', '<br>');
|
|
17612
|
+
}
|
|
17609
17613
|
}
|
|
17610
17614
|
visibilitySet() {
|
|
17611
17615
|
super.visibilitySet();
|
|
@@ -17660,10 +17664,10 @@ TransactionLineImageAndDescriptionComponent.decorators = [
|
|
|
17660
17664
|
screenConfigNativeElement>
|
|
17661
17665
|
<div [ngClass]="{'article-text-expand': true, 'large-article': !expanded && !customerPortal}" class="co-small-scrollbar">
|
|
17662
17666
|
<div class="article-text" *ngFor="let text of transactionLine.articleTextAsArray">
|
|
17663
|
-
<
|
|
17667
|
+
<div [innerHTML]="text | safeHtml" (dblclick)="handleOpenArticleText()"></div>
|
|
17664
17668
|
</div>
|
|
17665
17669
|
<div *ngIf="!popUpView && transactionLine.configurationReadable" class="configuration-text">
|
|
17666
|
-
<
|
|
17670
|
+
<div [innerHTML]="transactionLine.configurationReadable"></div>
|
|
17667
17671
|
</div>
|
|
17668
17672
|
</div>
|
|
17669
17673
|
<div class="expand-wrapper" (click)="expandClicked()" *ngIf="!customerPortal">
|
|
@@ -21360,8 +21364,11 @@ class TransactionQuickAccessOrderPurchaseComponent extends TransactionQuickAcces
|
|
|
21360
21364
|
this.reportDocumentPrintRequest = new ReportingDocumentPrintSignDocBaseRequest();
|
|
21361
21365
|
this.reportDocumentPdfRequest = new ReportingDocumentPdfBaseRequest();
|
|
21362
21366
|
this.batchTransactionSendingRequest = new BatchTransactionSendingRequest();
|
|
21367
|
+
this.printPurchaseOrderForSalesOrderRequest = new PrintPurchaseOrderForSalesOrderRequest();
|
|
21363
21368
|
this.useDefaultLayout = false;
|
|
21364
21369
|
this.useDefaultShippingMethods = false;
|
|
21370
|
+
this.saveDefaultPrinterForUser = false;
|
|
21371
|
+
this.saveDefaultPrinterForAllUsers = false;
|
|
21365
21372
|
this.printerList = [];
|
|
21366
21373
|
this.defaultSendMethodInitialized = false;
|
|
21367
21374
|
this._subs = [];
|
|
@@ -21399,33 +21406,38 @@ class TransactionQuickAccessOrderPurchaseComponent extends TransactionQuickAcces
|
|
|
21399
21406
|
var _a, _b, _c, _d;
|
|
21400
21407
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21401
21408
|
this.showSendMethodDialog = false;
|
|
21402
|
-
|
|
21403
|
-
|
|
21404
|
-
|
|
21405
|
-
|
|
21406
|
-
|
|
21407
|
-
|
|
21408
|
-
|
|
21409
|
-
|
|
21410
|
-
|
|
21411
|
-
|
|
21412
|
-
|
|
21413
|
-
this.
|
|
21414
|
-
|
|
21415
|
-
|
|
21416
|
-
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21421
|
-
|
|
21422
|
-
|
|
21423
|
-
|
|
21424
|
-
|
|
21425
|
-
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21409
|
+
this.useDefaultLayout = methodData.useDefaultLayout;
|
|
21410
|
+
this.useDefaultShippingMethods = methodData.useDefaultShippingMethods;
|
|
21411
|
+
this.saveDefaultPrinterForUser = methodData.saveDefaultPrinterForUser;
|
|
21412
|
+
this.saveDefaultPrinterForAllUsers = methodData.saveDefaultPrinterForAllUsers;
|
|
21413
|
+
if (!this.useDefaultShippingMethods) {
|
|
21414
|
+
this.overruledEmail = methodData.overruledEmail;
|
|
21415
|
+
this.overruledEdi = methodData.overruledEdi;
|
|
21416
|
+
this.overruledPrint = methodData.overruledPrint;
|
|
21417
|
+
}
|
|
21418
|
+
if (!this.useDefaultLayout) {
|
|
21419
|
+
this.reportIdForPrinting = methodData.reportIdForPrinting.reportId;
|
|
21420
|
+
this.reportIdForEmail = methodData.reportIdForEmail.reportId;
|
|
21421
|
+
}
|
|
21422
|
+
if (methodData.printerName) {
|
|
21423
|
+
this.selectedPrinter = this.printerList.find(p => p.name === methodData.printerName) || null;
|
|
21424
|
+
}
|
|
21425
|
+
this.printPurchaseOrderForSalesOrderRequest.useRelationSpecificReports = this.useDefaultLayout;
|
|
21426
|
+
this.printPurchaseOrderForSalesOrderRequest.useRelationSpecificSendMethods = this.useDefaultShippingMethods;
|
|
21427
|
+
this.printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForUser = this.saveDefaultPrinterForUser;
|
|
21428
|
+
this.printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForAllUsers = this.saveDefaultPrinterForAllUsers;
|
|
21429
|
+
this.printPurchaseOrderForSalesOrderRequest.printerName = ((_a = this.selectedPrinter) === null || _a === void 0 ? void 0 : _a.name) || null;
|
|
21430
|
+
if (!this.useDefaultShippingMethods) {
|
|
21431
|
+
this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEmail = (_b = this.overruledEmail) === null || _b === void 0 ? void 0 : _b.code;
|
|
21432
|
+
this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForPrinting = (_c = this.overruledPrint) === null || _c === void 0 ? void 0 : _c.code;
|
|
21433
|
+
this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEDI = (_d = this.overruledEdi) === null || _d === void 0 ? void 0 : _d.code;
|
|
21434
|
+
}
|
|
21435
|
+
if (!this.useDefaultLayout) {
|
|
21436
|
+
this.printPurchaseOrderForSalesOrderRequest.reportIdForPrinting = this.reportIdForPrinting;
|
|
21437
|
+
this.printPurchaseOrderForSalesOrderRequest.reportIdForEmail = this.reportIdForEmail;
|
|
21438
|
+
}
|
|
21439
|
+
yield this.printDocument(this.reportDocumentPrintRequest);
|
|
21440
|
+
this._setDefaultMethod(this.defaultSendMethod);
|
|
21429
21441
|
});
|
|
21430
21442
|
}
|
|
21431
21443
|
handleReservationModeClick() {
|
|
@@ -21491,8 +21503,15 @@ class TransactionQuickAccessOrderPurchaseComponent extends TransactionQuickAcces
|
|
|
21491
21503
|
var _a, _b;
|
|
21492
21504
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21493
21505
|
const printPurchaseOrderForSalesOrderRequest = Object.assign(new PrintPurchaseOrderForSalesOrderRequest(), request);
|
|
21494
|
-
(_a = printPurchaseOrderForSalesOrderRequest.useRelationSpecificReports) !== null && _a !== void 0 ? _a :
|
|
21495
|
-
(_b = printPurchaseOrderForSalesOrderRequest.useRelationSpecificSendMethods) !== null && _b !== void 0 ? _b :
|
|
21506
|
+
printPurchaseOrderForSalesOrderRequest.useRelationSpecificReports = (_a = this.printPurchaseOrderForSalesOrderRequest.useRelationSpecificReports) !== null && _a !== void 0 ? _a : true;
|
|
21507
|
+
printPurchaseOrderForSalesOrderRequest.useRelationSpecificSendMethods = (_b = this.printPurchaseOrderForSalesOrderRequest.useRelationSpecificSendMethods) !== null && _b !== void 0 ? _b : true;
|
|
21508
|
+
printPurchaseOrderForSalesOrderRequest.reportIdForPrinting = this.printPurchaseOrderForSalesOrderRequest.reportIdForPrinting;
|
|
21509
|
+
printPurchaseOrderForSalesOrderRequest.reportIdForEmail = this.printPurchaseOrderForSalesOrderRequest.reportIdForEmail;
|
|
21510
|
+
printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEmail = this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEmail;
|
|
21511
|
+
printPurchaseOrderForSalesOrderRequest.overruleSendMethodForPrinting = this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForPrinting;
|
|
21512
|
+
printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEDI = this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEDI;
|
|
21513
|
+
printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForUser = this.printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForUser;
|
|
21514
|
+
printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForAllUsers = this.printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForAllUsers;
|
|
21496
21515
|
yield this.transactionService.generateAndSendPurchaseOrdersForSalesOrder(printPurchaseOrderForSalesOrderRequest, this.transactionInfo.version);
|
|
21497
21516
|
});
|
|
21498
21517
|
}
|
|
@@ -21529,6 +21548,7 @@ TransactionQuickAccessOrderPurchaseComponent.decorators = [
|
|
|
21529
21548
|
[emailLayouts]="emailLayouts"
|
|
21530
21549
|
[printLayouts]="printLayouts"
|
|
21531
21550
|
[defaultPrinterName]="defaultPrinterName"
|
|
21551
|
+
[disablePdfPreview]="true"
|
|
21532
21552
|
[isDocSignEnabled]="true"
|
|
21533
21553
|
[pdfDoc]="pdfDoc"
|
|
21534
21554
|
[(reportingDocumentEmailRequest)]="reportDocumentEmailRequest"
|
|
@@ -22120,6 +22140,7 @@ TransactionQuickAccessPurchaseOrderOverviewComponent.decorators = [
|
|
|
22120
22140
|
[emailAddresses]="emailAddresses"
|
|
22121
22141
|
[emailLayouts]="emailLayouts"
|
|
22122
22142
|
[printLayouts]="printLayouts"
|
|
22143
|
+
[disablePdfPreview]="true"
|
|
22123
22144
|
[isDocSignEnabled]="true"
|
|
22124
22145
|
[(reportingDocumentEmailRequest)]="reportDocumentEmailRequest"
|
|
22125
22146
|
[(reportingDocumentPrintRequest)]="reportDocumentPrintRequest"
|
|
@@ -58078,6 +58099,7 @@ class AddProductComponent {
|
|
|
58078
58099
|
this.showRelatedProductsPopup = false;
|
|
58079
58100
|
this.cartPlusIcon = this.iconService.getIcon(this.icons.CartPlusRegular);
|
|
58080
58101
|
this.cartMinIcon = this.iconService.getIcon(this.icons.CartMinusRegular);
|
|
58102
|
+
this.pendingAddArticleAction = false;
|
|
58081
58103
|
this._showCatalog = false;
|
|
58082
58104
|
this._subs = [];
|
|
58083
58105
|
}
|
|
@@ -58108,35 +58130,40 @@ class AddProductComponent {
|
|
|
58108
58130
|
}
|
|
58109
58131
|
this.searchText = text;
|
|
58110
58132
|
this._prepareCatalogRequest();
|
|
58111
|
-
this.
|
|
58133
|
+
this._changeDetector.detectChanges();
|
|
58134
|
+
this.searchText = "";
|
|
58112
58135
|
// first check if there's a single article found
|
|
58113
58136
|
// This is a two check step:
|
|
58114
58137
|
// Check if there is an exact match on barcode, ean or articlenumber
|
|
58115
58138
|
// if not: check with search like
|
|
58116
58139
|
// else open catalogus
|
|
58117
|
-
|
|
58118
|
-
|
|
58119
|
-
|
|
58120
|
-
|
|
58121
|
-
this.showCatalogDialog();
|
|
58122
|
-
}
|
|
58123
|
-
else {
|
|
58124
|
-
yield this.handleAddArticle(article);
|
|
58125
|
-
}
|
|
58126
|
-
}
|
|
58127
|
-
else {
|
|
58128
|
-
const foundArticles = yield this.transactionService.getArticles(this.catalogParameters);
|
|
58129
|
-
if (foundArticles && foundArticles.length === 1) {
|
|
58130
|
-
const article = yield this.transactionService.getArticleExtended(foundArticles[0].articleNumber);
|
|
58140
|
+
if (!this.pendingAddArticleAction) {
|
|
58141
|
+
const fullMatchSearch = yield this.transactionService.getArticleListWithBarcodeArticleNrEanCode(text);
|
|
58142
|
+
if (fullMatchSearch && fullMatchSearch.length === 1) {
|
|
58143
|
+
const article = yield this.transactionService.getArticleExtended(fullMatchSearch[0].articleNr);
|
|
58131
58144
|
if (article.goodType === "B") {
|
|
58132
58145
|
this.showCatalogDialog();
|
|
58133
58146
|
}
|
|
58134
58147
|
else {
|
|
58148
|
+
this.pendingAddArticleAction = true;
|
|
58135
58149
|
yield this.handleAddArticle(article);
|
|
58136
58150
|
}
|
|
58137
58151
|
}
|
|
58138
58152
|
else {
|
|
58139
|
-
this.
|
|
58153
|
+
const foundArticles = yield this.transactionService.getArticles(this.catalogParameters);
|
|
58154
|
+
if (foundArticles && foundArticles.length === 1) {
|
|
58155
|
+
const article = yield this.transactionService.getArticleExtended(foundArticles[0].articleNumber);
|
|
58156
|
+
if (article.goodType === "B") {
|
|
58157
|
+
this.showCatalogDialog();
|
|
58158
|
+
}
|
|
58159
|
+
else {
|
|
58160
|
+
this.pendingAddArticleAction = true;
|
|
58161
|
+
yield this.handleAddArticle(article);
|
|
58162
|
+
}
|
|
58163
|
+
}
|
|
58164
|
+
else {
|
|
58165
|
+
this.showCatalogDialog();
|
|
58166
|
+
}
|
|
58140
58167
|
}
|
|
58141
58168
|
}
|
|
58142
58169
|
});
|
|
@@ -58148,9 +58175,13 @@ class AddProductComponent {
|
|
|
58148
58175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58149
58176
|
if (this.handleAddArticleInternally) {
|
|
58150
58177
|
const success = yield this.transactionService.addArticle(article.articleNumber, this.return ? -1 : 1);
|
|
58151
|
-
if (
|
|
58178
|
+
if (success) {
|
|
58179
|
+
this.searchText = "";
|
|
58180
|
+
}
|
|
58181
|
+
else {
|
|
58152
58182
|
this.transactionService.rollback();
|
|
58153
58183
|
}
|
|
58184
|
+
this.pendingAddArticleAction = false;
|
|
58154
58185
|
}
|
|
58155
58186
|
else {
|
|
58156
58187
|
this.addArticle.next({
|
|
@@ -58160,6 +58191,7 @@ class AddProductComponent {
|
|
|
58160
58191
|
belowLineNr: 0,
|
|
58161
58192
|
lastArticle: true
|
|
58162
58193
|
});
|
|
58194
|
+
this.pendingAddArticleAction = false;
|
|
58163
58195
|
}
|
|
58164
58196
|
});
|
|
58165
58197
|
}
|
|
@@ -58170,29 +58202,7 @@ class AddProductComponent {
|
|
|
58170
58202
|
// }
|
|
58171
58203
|
this.showCatalog = false;
|
|
58172
58204
|
if (this.handleAddArticleInternally) {
|
|
58173
|
-
|
|
58174
|
-
if (typeof data.article === 'string') {
|
|
58175
|
-
const article = JSON.parse(data.article);
|
|
58176
|
-
if (article.selectorData.compositions) { // configured (frozen) article
|
|
58177
|
-
yield this.transactionService.addArticle(article.selectorData.compositions[0].compositionArticleNo, data.quantity, 0, 0, true, true);
|
|
58178
|
-
}
|
|
58179
|
-
else if (article.selectorData.articleNr) { // flat article
|
|
58180
|
-
yield this.transactionService.addArticle(article.selectorData.articleNr, data.quantity, 0, 0, true, true);
|
|
58181
|
-
}
|
|
58182
|
-
}
|
|
58183
|
-
else { // flat (simple) article
|
|
58184
|
-
let articleNr;
|
|
58185
|
-
if (data.article instanceof ArticleExtended) {
|
|
58186
|
-
articleNr = data.article.articleNumber;
|
|
58187
|
-
}
|
|
58188
|
-
else {
|
|
58189
|
-
articleNr = data.article.hasOwnProperty('articleNr') ? data.article['articleNr'] : data.article['articleNo'];
|
|
58190
|
-
}
|
|
58191
|
-
if (articleNr) {
|
|
58192
|
-
yield this.transactionService.addArticle(articleNr, data.quantity, 0, 0, true, true);
|
|
58193
|
-
}
|
|
58194
|
-
}
|
|
58195
|
-
}
|
|
58205
|
+
yield this._handleArticleTypeOnAdd(data);
|
|
58196
58206
|
}
|
|
58197
58207
|
else {
|
|
58198
58208
|
if (data && data.article instanceof ArticleExtended) {
|
|
@@ -58207,6 +58217,46 @@ class AddProductComponent {
|
|
|
58207
58217
|
}
|
|
58208
58218
|
});
|
|
58209
58219
|
}
|
|
58220
|
+
_tryAddArticle(articleNr, quantity) {
|
|
58221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58222
|
+
const success = yield this.transactionService.addArticle(articleNr, quantity, 0, 0, true, true);
|
|
58223
|
+
console.log(success);
|
|
58224
|
+
if (success) {
|
|
58225
|
+
this.searchText = "";
|
|
58226
|
+
}
|
|
58227
|
+
else {
|
|
58228
|
+
// keep the search text
|
|
58229
|
+
this.searchText = this.inputSearchText.model;
|
|
58230
|
+
}
|
|
58231
|
+
});
|
|
58232
|
+
}
|
|
58233
|
+
_handleArticleTypeOnAdd(data) {
|
|
58234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58235
|
+
if (data && data.article) {
|
|
58236
|
+
if (typeof data.article === 'string') {
|
|
58237
|
+
const article = JSON.parse(data.article);
|
|
58238
|
+
if (article.selectorData.compositions) { // configured (frozen) article
|
|
58239
|
+
yield this._tryAddArticle(article.selectorData.compositions[0].compositionArticleNo, data.quantity);
|
|
58240
|
+
}
|
|
58241
|
+
else if (article.selectorData.articleNr) { // flat article
|
|
58242
|
+
yield this._tryAddArticle(article.selectorData.articleNr, data.quantity);
|
|
58243
|
+
}
|
|
58244
|
+
}
|
|
58245
|
+
else { // flat (simple) article
|
|
58246
|
+
let articleNr;
|
|
58247
|
+
if (data.article instanceof ArticleExtended) {
|
|
58248
|
+
articleNr = data.article.articleNumber;
|
|
58249
|
+
}
|
|
58250
|
+
else {
|
|
58251
|
+
articleNr = data.article.hasOwnProperty('articleNr') ? data.article['articleNr'] : data.article['articleNo'];
|
|
58252
|
+
}
|
|
58253
|
+
if (articleNr) {
|
|
58254
|
+
yield this._tryAddArticle(articleNr, data.quantity);
|
|
58255
|
+
}
|
|
58256
|
+
}
|
|
58257
|
+
}
|
|
58258
|
+
});
|
|
58259
|
+
}
|
|
58210
58260
|
getActualQuantity(quantityInput) {
|
|
58211
58261
|
let quantity = 0;
|
|
58212
58262
|
if (this.return && quantityInput > 0) {
|
|
@@ -58225,6 +58275,11 @@ class AddProductComponent {
|
|
|
58225
58275
|
}
|
|
58226
58276
|
showCatalogDialog() {
|
|
58227
58277
|
this.showCatalog = true;
|
|
58278
|
+
this.pendingAddArticleAction = false;
|
|
58279
|
+
}
|
|
58280
|
+
handleCloseCatalogueClick() {
|
|
58281
|
+
this.showCatalog = false;
|
|
58282
|
+
this.searchText = "";
|
|
58228
58283
|
}
|
|
58229
58284
|
handleCartIconClick(event) {
|
|
58230
58285
|
this.return = !this.return;
|
|
@@ -58234,7 +58289,7 @@ class AddProductComponent {
|
|
|
58234
58289
|
this.searchText = this.inputSearchText.model;
|
|
58235
58290
|
}
|
|
58236
58291
|
this._prepareCatalogRequest();
|
|
58237
|
-
this.searchText = undefined;
|
|
58292
|
+
// this.searchText = undefined;
|
|
58238
58293
|
this.showCatalogDialog();
|
|
58239
58294
|
}
|
|
58240
58295
|
handleIFrameFeedback(iFrameFeedbackObject) {
|
|
@@ -58296,7 +58351,7 @@ AddProductComponent.decorators = [
|
|
|
58296
58351
|
[isReturn]="return"
|
|
58297
58352
|
[showRelatedProductsPopup]="showRelatedProductsPopup"
|
|
58298
58353
|
[transaction]="transactionService.currentTransaction"
|
|
58299
|
-
(closeClick)="
|
|
58354
|
+
(closeClick)="handleCloseCatalogueClick()"
|
|
58300
58355
|
(articleClicked)="handleCatalogArticleClick($event)"
|
|
58301
58356
|
(addArticleClicked)="handleAddArticleClick($event)"
|
|
58302
58357
|
(addCatFarmArticleClicked)="handleAddCatFarmArticleClick($event)"
|