@colijnit/transaction 12.1.78 → 12.1.79
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/package.json +1 -1
- package/projects/transaction/package.json +1 -1
- package/projects/transaction/src/lib/component/transaction/style/_layout.scss +4 -4
- package/projects/transaction/src/lib/component/transaction/style/material.scss +0 -1
- package/projects/transaction/src/lib/component/transaction/transaction.component.ts +5 -4
- package/projects/transaction/src/lib/component/transaction/transaction.module.ts +29 -31
- package/projects/transaction/src/lib/component/transaction-line/transaction-order-delivery-line/service/transaction-order-delivery.service.ts +0 -59
- package/projects/transaction/src/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line.component.ts +6 -50
- package/projects/transaction/src/lib/component/transaction-line-statusbar/transaction-line-statusbar.component.ts +0 -2
- package/projects/transaction/src/lib/component/transaction-quick-access/transaction-quick-access-order-delivery/transaction-quick-access-order-delivery.component.ts +10 -60
- package/projects/transaction/src/lib/component/transaction-quick-access/transaction-quick-access-order-delivery/transaction-quick-access-order-delivery.module.ts +8 -10
- package/projects/transaction/src/lib/model/extended-transaction-line-view-model.ts +0 -1
- package/projects/transaction/src/lib/service/transaction-connector-adapter.service.ts +0 -63
- package/projects/transaction/src/lib/service/transaction-connector.service.ts +0 -25
- package/projects/transaction/src/lib/service/transaction-initializer.service.ts +1 -1
- package/projects/transaction/src/lib/service/transaction-mapping.service.ts +0 -27
- package/projects/transaction/src/lib/service/transaction.service.ts +0 -33
- package/src/app/app.component.ts +7 -2
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/style/_layout.scss +0 -12
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/style/material.scss +0 -7
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/transaction-card.component.ts +0 -125
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/transaction-card.module.ts +0 -28
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/style/_layout.scss +0 -25
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/style/material.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/transaction-card-footer.component.ts +0 -59
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/transaction-card-footer.module.ts +0 -24
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/style/_layout.scss +0 -66
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/style/material.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/transaction-card-header.component.ts +0 -68
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/transaction-card-header.module.ts +0 -31
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/style/_layout.scss +0 -67
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/style/material.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/transaction-card-purchase-overview.component.ts +0 -64
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/transaction-card-purchase-overview.module.ts +0 -44
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/style/_layout.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/style/material.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/transaction-card-sales-overview.component.ts +0 -21
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/transaction-card-sales-overview.module.ts +0 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colijnit/transaction",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.79",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"ng": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng",
|
|
6
6
|
"start": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng serve --port 4202 --live-reload",
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
}
|
|
32
32
|
.transaction-tiles-wrapper {
|
|
33
33
|
display: grid;
|
|
34
|
-
grid-template-columns:
|
|
34
|
+
grid-template-columns: repeat(4, 1fr);
|
|
35
35
|
grid-column-gap: 5px;
|
|
36
36
|
grid-row-gap: 5px;
|
|
37
37
|
|
|
38
38
|
@media(max-width: 1500px) {
|
|
39
|
-
grid-template-columns:
|
|
39
|
+
grid-template-columns: repeat(3, 1fr);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
@media(max-width: 1200px) {
|
|
43
|
-
grid-template-columns:
|
|
43
|
+
grid-template-columns: repeat(2, 1fr);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@media(max-width: 900px) {
|
|
47
|
-
grid-template-columns:
|
|
47
|
+
grid-template-columns: repeat(1, 1fr);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -11,4 +11,3 @@
|
|
|
11
11
|
@import "../../view-mode-buttons/style/material";
|
|
12
12
|
@import "../../dialog/transaction-header/dialog-transaction-header-delivery-method/style/material";
|
|
13
13
|
@import "../../transaction-line-checkbox-list/style/material";
|
|
14
|
-
@import "../../transaction-card/transaction-card/style/material";
|
|
@@ -39,12 +39,13 @@ import {TransactionKind} from "@colijnit/transactionapi/build/enum/transaction-k
|
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
41
|
<div class="transaction-tiles-wrapper" *ngIf="activeViewMode === viewModes.Tiles">
|
|
42
|
-
<co-transaction-
|
|
42
|
+
<co-transaction-tile
|
|
43
43
|
*ngFor="let transactionLine of transaction.transactionLines"
|
|
44
|
-
[
|
|
45
|
-
[
|
|
44
|
+
[transactionLine]="transactionLine"
|
|
45
|
+
[transactionInfo]="transaction.transactionInfo"
|
|
46
46
|
[activeCategory]="activeCategory"
|
|
47
|
-
|
|
47
|
+
(showSidePanelClicked)="handleShowSidePanel($event)"
|
|
48
|
+
></co-transaction-tile>
|
|
48
49
|
</div>
|
|
49
50
|
<div class="transaction-lines-wrapper" *ngIf="activeViewMode === viewModes.List">
|
|
50
51
|
<co-transaction-lines
|
|
@@ -25,39 +25,37 @@ import {QuickSendButtonModule} from "../quick-send-button/quick-send-button.modu
|
|
|
25
25
|
import {
|
|
26
26
|
TransactionGoodsAllocationLineModule
|
|
27
27
|
} from "../transaction-line/transaction-goods-allocation-line/transaction-goods-allocation-line.module";
|
|
28
|
-
import {TransactionCardModule} from "../transaction-card/transaction-card/transaction-card.module";
|
|
29
28
|
|
|
30
29
|
@NgModule({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
],
|
|
30
|
+
imports: [
|
|
31
|
+
CommonModule,
|
|
32
|
+
CoreModule,
|
|
33
|
+
TransactionHeaderModule,
|
|
34
|
+
TransactionLinesModule,
|
|
35
|
+
TransactionTotalsModule,
|
|
36
|
+
ButtonModule,
|
|
37
|
+
TransactionLinesGridModule,
|
|
38
|
+
CoDialogModule,
|
|
39
|
+
FormModule,
|
|
40
|
+
InputTextModule,
|
|
41
|
+
CoSidebarModule,
|
|
42
|
+
DiscountModule,
|
|
43
|
+
TransactionQuickAccessModule,
|
|
44
|
+
TransactionButtonBarModule,
|
|
45
|
+
PipeModule,
|
|
46
|
+
TransactionLineSidePanelModule,
|
|
47
|
+
TransactionOrderConfirmationGridModule,
|
|
48
|
+
TransactionReceivedGoodsGridModule,
|
|
49
|
+
ViewModeButtonsModule,
|
|
50
|
+
TransactionGridModule,
|
|
51
|
+
TransactionTileModule,
|
|
52
|
+
TransactionOverviewLineModule,
|
|
53
|
+
TransactionOrderDeliveryLineModule,
|
|
54
|
+
TransactionReceiveGoodsLineModule,
|
|
55
|
+
TransactionPurchaseLineModule,
|
|
56
|
+
QuickSendButtonModule,
|
|
57
|
+
TransactionGoodsAllocationLineModule
|
|
58
|
+
],
|
|
61
59
|
declarations: [
|
|
62
60
|
TransactionComponent
|
|
63
61
|
],
|
|
@@ -1,70 +1,11 @@
|
|
|
1
1
|
import {Injectable} from "@angular/core";
|
|
2
|
-
import {ExtendedTransactionLineViewModel} from "../../../../model/extended-transaction-line-view-model";
|
|
3
|
-
import {EmailDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/email-delivery-note-request";
|
|
4
|
-
import {
|
|
5
|
-
TransactionLineReportingRequest
|
|
6
|
-
} from "@colijnit/transactionapi/build/model/transaction-line-reporting-request.bo";
|
|
7
|
-
import {TransactionService} from "../../../../service/transaction.service";
|
|
8
|
-
import {TransactionEventService} from "../../../../service/transaction-event.service";
|
|
9
|
-
import {PdfDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/pdf-delivery-note-request";
|
|
10
|
-
import {PrintDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/print-delivery-note-request";
|
|
11
2
|
|
|
12
3
|
@Injectable({
|
|
13
4
|
providedIn: "root"
|
|
14
5
|
})
|
|
15
6
|
export class TransactionOrderDeliveryService {
|
|
16
7
|
|
|
17
|
-
public lines: ExtendedTransactionLineViewModel[] = [];
|
|
18
8
|
public totalQuantityToDeliver: number = 0;
|
|
19
9
|
public totalAmountLeftInOrder: number = 0;
|
|
20
10
|
|
|
21
|
-
constructor(
|
|
22
|
-
private _transactionService: TransactionService,
|
|
23
|
-
private _transactionEventService: TransactionEventService
|
|
24
|
-
) { }
|
|
25
|
-
|
|
26
|
-
public async handleDeliverSelectedTransactionLines(request: EmailDeliveryNoteRequest | PrintDeliveryNoteRequest | PdfDeliveryNoteRequest): Promise<boolean> {
|
|
27
|
-
const selectedLines: ExtendedTransactionLineViewModel[] = this.lines.filter((line) => line.selected && line.quantityToDeliver > 0);
|
|
28
|
-
|
|
29
|
-
if (selectedLines.length > 0) {
|
|
30
|
-
request.transactionLines = this._createRequestLines(selectedLines);
|
|
31
|
-
let response: boolean;
|
|
32
|
-
|
|
33
|
-
if (request instanceof EmailDeliveryNoteRequest) {
|
|
34
|
-
request.parkForDigitalSignature = false;
|
|
35
|
-
response = await this._transactionService.emailDeliveryNote(request);
|
|
36
|
-
} else if (request instanceof PrintDeliveryNoteRequest) {
|
|
37
|
-
request.parkForDigitalSignature = false;
|
|
38
|
-
response = await this._transactionService.printDeliveryNote(request);
|
|
39
|
-
} else if (request instanceof PdfDeliveryNoteRequest) {
|
|
40
|
-
response = await this._transactionService.pdfDeliveryNote(request);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (response) {
|
|
44
|
-
this._handleAfterCommitDeliverOrders(selectedLines);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return !!response;
|
|
48
|
-
}
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
private _handleAfterCommitDeliverOrders(selectedLines: ExtendedTransactionLineViewModel[]): void {
|
|
53
|
-
selectedLines.forEach((line) => {
|
|
54
|
-
line.quantityDelivered += line.quantityToDeliver;
|
|
55
|
-
line.quantityToDeliver -= line.quantityToDeliver;
|
|
56
|
-
this._transactionEventService.transactionLineChanged.next(line);
|
|
57
|
-
});
|
|
58
|
-
this._transactionEventService.selectAllLines.next(false);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
private _createRequestLines(selectedLines: ExtendedTransactionLineViewModel[]): TransactionLineReportingRequest[] {
|
|
62
|
-
return selectedLines.map((line) => {
|
|
63
|
-
const transactionLineReportingRequest: TransactionLineReportingRequest = new TransactionLineReportingRequest();
|
|
64
|
-
transactionLineReportingRequest.lineNr = line.lineNr;
|
|
65
|
-
transactionLineReportingRequest.amount = line.quantityToDeliver;
|
|
66
|
-
return transactionLineReportingRequest;
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
11
|
}
|
|
@@ -7,7 +7,6 @@ import {DeliveryOrderStatus} from "@colijnit/transactionapi/build/model/delivery
|
|
|
7
7
|
import {TransactionOrderDeliveryService} from "./service/transaction-order-delivery.service";
|
|
8
8
|
import {TransactionBaseComponent} from "../../core/base/transaction-base.component";
|
|
9
9
|
import {TransactionTypeCategory} from "../../../enum/transaction-type-category.enum";
|
|
10
|
-
import {ExtendedTransactionLineViewModel} from "../../../model/extended-transaction-line-view-model";
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
@Component({
|
|
@@ -15,8 +14,6 @@ import {ExtendedTransactionLineViewModel} from "../../../model/extended-transact
|
|
|
15
14
|
template: `
|
|
16
15
|
<co-transaction-base-line [transactionInfo]="transactionInfo" [transactionLine]="transactionLine" [preview]="preview" [checkbox]="transactionInfo.allowPartialDelivery"
|
|
17
16
|
[checkboxValue]="checkboxSelected" [hideCheckbox]="deliveryOrderStatus?.quantityToDeliver === 0" [actionButtons]="false" observeVisibility (visible)="getDeliveryOrderStatus()">
|
|
18
|
-
<co-transaction-base-line *ngIf="viewModel.lineType === 'R'" [line]="line" [preview]="preview" [checkbox]="service.currentTransaction.transactionInfo.allowPartialDelivery"
|
|
19
|
-
[checkboxValue]="viewModel.selected" [hideCheckbox]="viewModel.quantityToDeliver === 0" [actionButtons]="false" observeVisibility (visible)="getDeliveryOrderStatus()">
|
|
20
17
|
<div class="transaction-line-buttons-grid">
|
|
21
18
|
<div class="row-1">
|
|
22
19
|
<co-transaction-line-warehouse-button [transactionLine]="transactionLine" [transactionInfo]="transactionInfo"></co-transaction-line-warehouse-button>
|
|
@@ -27,61 +24,43 @@ import {ExtendedTransactionLineViewModel} from "../../../model/extended-transact
|
|
|
27
24
|
<co-transaction-line-statusbar [transactionLine]="transactionLine" [transactionInfo]="transactionInfo" [activeCategory]="category.SalesOrderDeliveryNote"></co-transaction-line-statusbar>
|
|
28
25
|
</div>
|
|
29
26
|
</div>
|
|
30
|
-
<div class="transaction-line-totals-custom-grid">
|
|
27
|
+
<div class="transaction-line-totals-custom-grid" [class.hidden]="!deliveryOrderStatus">
|
|
31
28
|
<co-editable-label class="transaction-line-totals-total price"
|
|
32
29
|
[model]="(transactionLine.price + transactionLine.discountAmount) | coCurrency"
|
|
33
30
|
[crossedOut]="!!transactionLine.discountAmount"
|
|
34
31
|
[editModel]="transactionLine.displayNetLineTotal"
|
|
35
|
-
[model]="(viewModel.price + viewModel.discountAmount) | coCurrency"
|
|
36
|
-
[crossedOut]="!!viewModel.discountAmount"
|
|
37
|
-
[editModel]="viewModel.displayNetLineTotal"
|
|
38
32
|
[readonly]="true"
|
|
39
33
|
></co-editable-label>
|
|
40
34
|
<co-editable-label class="transaction-line-totals-total price"
|
|
41
35
|
[model]="transactionLine.price | coCurrency"
|
|
42
|
-
[model]="viewModel.price | coCurrency"
|
|
43
36
|
[readonly]="true"
|
|
44
37
|
></co-editable-label>
|
|
45
38
|
<co-editable-label class="transaction-line-totals-total price"
|
|
46
39
|
[model]="transactionLine.amount.toString() + 'x'"
|
|
47
|
-
[model]="viewModel.amount.toString() + 'x'"
|
|
48
40
|
[readonly]="true"
|
|
49
41
|
></co-editable-label>
|
|
50
42
|
<co-editable-label class="transaction-line-totals-total price"
|
|
51
43
|
[model]="transactionLine.displayNetLineTotal * transactionLine.amount | coCurrency"
|
|
52
|
-
[model]="viewModel.displayNetLineTotal * viewModel.amount | coCurrency"
|
|
53
44
|
[readonly]="true"
|
|
54
45
|
></co-editable-label>
|
|
55
46
|
<div class="transaction-line-totals-amount" *ngIf="deliveryOrderStatus?.quantityToDeliver !== 0 && transactionInfo.allowPartialDelivery"
|
|
56
47
|
[class.fully-delivered]="transactionLine.quantityDelivered === transactionLine.amount"
|
|
57
48
|
[class.partially-delivered]="transactionLine.quantityDelivered !== transactionLine.amount && transactionLine.quantityDelivered !== 0">
|
|
58
|
-
<div class="transaction-line-totals-amount" *ngIf="viewModel.quantityToDeliver !== 0 && service.currentTransaction.transactionInfo.allowPartialDelivery"
|
|
59
|
-
[class.fully-delivered]="viewModel.quantityDelivered === viewModel.amount"
|
|
60
|
-
[class.partially-delivered]="viewModel.quantityDelivered !== viewModel.amount && viewModel.quantityDelivered !== 0">
|
|
61
49
|
<co-input-number-picker class="amount-number-picker"
|
|
62
50
|
[(model)]="localAmount"
|
|
63
51
|
[min]="!transactionInfo.allowPartialDelivery ? transactionLine.amount : 1"
|
|
64
52
|
[max]="transactionLine.amount"
|
|
65
53
|
[readonly]="readonly || !transactionInfo.allowPartialDelivery">
|
|
66
|
-
[(model)]="viewModel.quantityToDeliver"
|
|
67
|
-
[min]="!service.currentTransaction.transactionInfo.allowPartialDelivery ? viewModel.amount : 1"
|
|
68
|
-
[max]="viewModel.amount"
|
|
69
|
-
[readonly]="readonly || !service.currentTransaction.transactionInfo.allowPartialDelivery">
|
|
70
54
|
</co-input-number-picker>
|
|
71
55
|
</div>
|
|
72
56
|
<co-editable-label class="transaction-line-totals-total price" *ngIf="deliveryOrderStatus?.quantityToDeliver === 0 || !transactionInfo.allowPartialDelivery"
|
|
73
57
|
[class.fully-delivered]="transactionLine.quantityDelivered === transactionLine.amount"
|
|
74
58
|
[class.partially-delivered]="transactionLine.quantityDelivered !== transactionLine.amount && transactionLine.quantityDelivered !== 0"
|
|
75
59
|
[model]="deliveryOrderStatus?.quantityToDeliver.toString()"
|
|
76
|
-
<co-editable-label class="transaction-line-totals-total price" *ngIf="viewModel.quantityToDeliver === 0 || !service.currentTransaction.transactionInfo.allowPartialDelivery"
|
|
77
|
-
[class.fully-delivered]="viewModel.quantityDelivered === viewModel.amount"
|
|
78
|
-
[class.partially-delivered]="viewModel.quantityDelivered !== viewModel.amount && viewModel.quantityDelivered !== 0"
|
|
79
|
-
[model]="viewModel.quantityToDeliver.toString()"
|
|
80
60
|
[readonly]="true"
|
|
81
61
|
></co-editable-label>
|
|
82
62
|
<co-editable-label class="transaction-line-totals-total price discount"
|
|
83
63
|
[model]="'-' + (transactionLine.discountAmount | coCurrency)"
|
|
84
|
-
[model]="'-' + (viewModel.discountAmount | coCurrency)"
|
|
85
64
|
[readonly]="true"
|
|
86
65
|
></co-editable-label>
|
|
87
66
|
</div>
|
|
@@ -92,10 +71,12 @@ import {ExtendedTransactionLineViewModel} from "../../../model/extended-transact
|
|
|
92
71
|
export class TransactionOrderDeliveryLineComponent extends TransactionBaseComponent implements OnInit, OnDestroy {
|
|
93
72
|
public readonly category: typeof TransactionTypeCategory = TransactionTypeCategory;
|
|
94
73
|
|
|
74
|
+
public localAmount: number = 1;
|
|
95
75
|
public splitDelivery: boolean = false;
|
|
76
|
+
public deliveryOrderStatus: DeliveryOrderStatus;
|
|
96
77
|
|
|
78
|
+
public checkboxSelected: boolean = false;
|
|
97
79
|
public transactionKind: TransactionKind;
|
|
98
|
-
public viewModel: ExtendedTransactionLineViewModel = new ExtendedTransactionLineViewModel();
|
|
99
80
|
|
|
100
81
|
private _subscriptions: Subscription[] = [];
|
|
101
82
|
|
|
@@ -113,18 +94,10 @@ export class TransactionOrderDeliveryLineComponent extends TransactionBaseCompon
|
|
|
113
94
|
}
|
|
114
95
|
|
|
115
96
|
public ngOnInit(): void {
|
|
116
|
-
this._initViewModel();
|
|
117
|
-
|
|
118
97
|
this._subscriptions.push(
|
|
119
98
|
this._transactionEventService.selectAllLines.subscribe((value) => {
|
|
120
|
-
if (this.
|
|
121
|
-
this.
|
|
122
|
-
}
|
|
123
|
-
}),
|
|
124
|
-
this._transactionEventService.transactionLineChanged.subscribe((line) => {
|
|
125
|
-
if (line.lineNr === this.viewModel.lineNr) {
|
|
126
|
-
this.viewModel.quantityToDeliver = line.quantityToDeliver;
|
|
127
|
-
this.viewModel.quantityDelivered = line.quantityDelivered;
|
|
99
|
+
if (this.deliveryOrderStatus.quantityToDeliver > 0) {
|
|
100
|
+
this.checkboxSelected = value
|
|
128
101
|
}
|
|
129
102
|
}),
|
|
130
103
|
this._transactionEventService.allowPartialDeliveryChanged.subscribe(() => this._handleOrderStatusUpdated())
|
|
@@ -136,7 +109,6 @@ export class TransactionOrderDeliveryLineComponent extends TransactionBaseCompon
|
|
|
136
109
|
this._subscriptions.forEach(s => s.unsubscribe());
|
|
137
110
|
this._transactionOrderDeliveryService.totalQuantityToDeliver = 0;
|
|
138
111
|
this._transactionOrderDeliveryService.totalAmountLeftInOrder = 0;
|
|
139
|
-
this._transactionOrderDeliveryService.lines = [];
|
|
140
112
|
}
|
|
141
113
|
|
|
142
114
|
public getDeliveryOrderStatus(): void {
|
|
@@ -145,12 +117,6 @@ export class TransactionOrderDeliveryLineComponent extends TransactionBaseCompon
|
|
|
145
117
|
this.deliveryOrderStatus = result;
|
|
146
118
|
this._transactionOrderDeliveryService.totalQuantityToDeliver += this.deliveryOrderStatus.quantityToDeliver;
|
|
147
119
|
this._transactionOrderDeliveryService.totalAmountLeftInOrder += this.transactionLine.amount - this.transactionLine.quantityDelivered;
|
|
148
|
-
if (!this.viewModel.quantityToDeliver) {
|
|
149
|
-
this.service.getDeliveryOrderStatus(this.transactionId, this.line.lineNr).then((result: DeliveryOrderStatus) => {
|
|
150
|
-
this.viewModel.quantityToDeliver = result.quantityToDeliver;
|
|
151
|
-
this._transactionOrderDeliveryService.totalQuantityToDeliver += this.viewModel.quantityToDeliver;
|
|
152
|
-
this._transactionOrderDeliveryService.totalAmountLeftInOrder += this.line.amount - this.viewModel.quantityDelivered;
|
|
153
|
-
this._transactionOrderDeliveryService.lines.push(this.viewModel);
|
|
154
120
|
this._handleOrderStatusUpdated();
|
|
155
121
|
})
|
|
156
122
|
}
|
|
@@ -158,21 +124,11 @@ export class TransactionOrderDeliveryLineComponent extends TransactionBaseCompon
|
|
|
158
124
|
|
|
159
125
|
public showNumberPicker(): boolean {
|
|
160
126
|
return this.transactionService.currentTransaction.transactionInfo.allowPartialDelivery && this.deliveryOrderStatus?.quantityToDeliver !== 0;
|
|
161
|
-
return this.service.currentTransaction.transactionInfo.allowPartialDelivery && this.viewModel.quantityToDeliver !== 0;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
private _initViewModel(): void {
|
|
165
|
-
Object.assign(this.viewModel, this.line);
|
|
166
|
-
this.viewModel.quantityToDeliver = 0;
|
|
167
|
-
this.viewModel.lineNr = this.line.lineNr;
|
|
168
|
-
this.viewModel.transId = this.transactionId;
|
|
169
127
|
}
|
|
170
128
|
|
|
171
129
|
private _handleOrderStatusUpdated(): void {
|
|
172
130
|
this.checkboxSelected = this.transactionService.currentTransaction.transactionInfo.allowPartialDelivery ?
|
|
173
131
|
this.deliveryOrderStatus.quantityToDeliver > 0 : this.deliveryOrderStatus.quantityToDeliver === this.transactionLine.amount - this.transactionLine.quantityDelivered;
|
|
174
132
|
this.localAmount = this.deliveryOrderStatus.quantityToDeliver;
|
|
175
|
-
this.viewModel.selected = this.service.currentTransaction.transactionInfo.allowPartialDelivery ?
|
|
176
|
-
this.viewModel.quantityToDeliver > 0 : this.viewModel.quantityToDeliver === this.line.amount - this.viewModel.quantityDelivered;
|
|
177
133
|
}
|
|
178
134
|
}
|
|
@@ -43,8 +43,6 @@ export class TransactionLineStatusbarComponent extends TransactionBaseComponent
|
|
|
43
43
|
this._transactionEventService.transactionLineChanged.subscribe((line) => {
|
|
44
44
|
if (line.lineNr === this.transactionLine.lineNr) {
|
|
45
45
|
this.transactionLine.quantityAllocatedFromStock = line.quantityAllocated;
|
|
46
|
-
this.transactionLine.quantityDelivered = line.quantityDelivered;
|
|
47
|
-
this.transactionLine.quantityItemAccepted = line.quantityItemAccepted;
|
|
48
46
|
this.setStatusbarData();
|
|
49
47
|
}
|
|
50
48
|
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {Component, HostBinding, OnDestroy, ViewEncapsulation} from "@angular/core";
|
|
1
|
+
import {Component, ElementRef, HostBinding, OnDestroy, ViewChild, ViewEncapsulation} from "@angular/core";
|
|
2
|
+
import {TransactionBaseComponent} from "../../core/base/transaction-base.component";
|
|
2
3
|
import {IconCacheService} from "../../../service/icon-cache.service";
|
|
3
4
|
import {TransactionService} from "../../../service/transaction.service";
|
|
4
5
|
import {TransactionEventService} from "../../../service/transaction-event.service";
|
|
@@ -6,12 +7,8 @@ import {Subscription} from "rxjs";
|
|
|
6
7
|
import {
|
|
7
8
|
TransactionOrderDeliveryService
|
|
8
9
|
} from "../../transaction-line/transaction-order-delivery-line/service/transaction-order-delivery.service";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
import {ReportLayoutSelectionEmail} from "@colijnit/mainapi/build/model/report-layout-selection-email.bo";
|
|
12
|
-
import {EmailDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/email-delivery-note-request";
|
|
13
|
-
import {PrintDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/print-delivery-note-request";
|
|
14
|
-
import {PdfDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/pdf-delivery-note-request";
|
|
10
|
+
import {InputCheckboxComponent} from "@colijnit/corecomponents_v12";
|
|
11
|
+
|
|
15
12
|
|
|
16
13
|
@Component({
|
|
17
14
|
selector: "co-transaction-quick-access-order-delivery",
|
|
@@ -23,40 +20,21 @@ import {PdfDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/pdf-d
|
|
|
23
20
|
(modelChange)="handleSelectAllLines($event)"
|
|
24
21
|
></co-input-checkbox>
|
|
25
22
|
</div>
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
></co-quick-send-button>
|
|
23
|
+
<div class="send-button-wrapper" [class.hidden]="!allowDelivery">
|
|
24
|
+
<!--
|
|
25
|
+
<co-transaction-send-button-dialog></co-transaction-send-button-dialog>
|
|
26
|
+
-->
|
|
27
|
+
</div>
|
|
32
28
|
</div>
|
|
33
|
-
<co-send-method-dialog *ngIf="showSendMethodDialog"
|
|
34
|
-
[headerTitle]="'Verzendmethode'"
|
|
35
|
-
[defaultSendMethod]="defaultSendMethod"
|
|
36
|
-
[visibleMethods]="[sendMethodType.Print, sendMethodType.Email]"
|
|
37
|
-
[emailAddresses]="emailAddresses"
|
|
38
|
-
[emailLayouts]="emailLayouts"
|
|
39
|
-
[printLayouts]="printLayouts"
|
|
40
|
-
[isDocSignEnabled]="true"
|
|
41
|
-
[(reportingDocumentEmailRequest)]="reportDocumentEmailRequest"
|
|
42
|
-
[(reportingDocumentPrintRequest)]="reportDocumentPrintRequest"
|
|
43
|
-
[(reportingDocumentPdfRequest)]="reportDocumentPdfRequest"
|
|
44
|
-
(closeClick)="showSendMethodDialog = false"
|
|
45
|
-
(okClick)="handleSendMethodOkClick($event)"
|
|
46
|
-
></co-send-method-dialog>
|
|
47
29
|
`,
|
|
48
30
|
encapsulation: ViewEncapsulation.None
|
|
49
31
|
})
|
|
50
|
-
export class TransactionQuickAccessOrderDeliveryComponent
|
|
32
|
+
export class TransactionQuickAccessOrderDeliveryComponent extends TransactionBaseComponent implements OnDestroy {
|
|
51
33
|
@HostBinding("class.co-transaction-quick-access-order-delivery")
|
|
52
34
|
public showClass() {
|
|
53
35
|
return true;
|
|
54
36
|
}
|
|
55
37
|
|
|
56
|
-
public reportDocumentEmailRequest: EmailDeliveryNoteRequest = new EmailDeliveryNoteRequest();
|
|
57
|
-
public reportDocumentPrintRequest: PrintDeliveryNoteRequest = new PrintDeliveryNoteRequest();
|
|
58
|
-
public reportDocumentPdfRequest: PdfDeliveryNoteRequest = new PdfDeliveryNoteRequest();
|
|
59
|
-
|
|
60
38
|
public allowDelivery: boolean = false;
|
|
61
39
|
|
|
62
40
|
private _subscriptions: Subscription[] = [];
|
|
@@ -89,32 +67,4 @@ export class TransactionQuickAccessOrderDeliveryComponent extends TransactionQu
|
|
|
89
67
|
public handleSelectAllLines(value: boolean): void {
|
|
90
68
|
this._transactionEventService.selectAllLines.next(value);
|
|
91
69
|
}
|
|
92
|
-
|
|
93
|
-
protected getDefaultEmailAddressList(): Promise<string[]> {
|
|
94
|
-
return Promise.resolve([]); // Not yet provided by middle tier
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
protected getDefaultSendMethod(): Promise<number> {
|
|
98
|
-
return this.service.getDeliveryNoteDefaultSendMethod(this.transactionInfo.relation.relationId);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
protected getEmailLayouts(): Promise<ReportLayoutSelectionEmail[]> {
|
|
102
|
-
return this.service.getDeliveryNoteEmailLayouts(this.transactionInfo.uuid);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
protected getPrintLayouts(): Promise<ReportLayoutSelectionPrint[]> {
|
|
106
|
-
return this.service.getDeliveryNotePrintLayouts(this.transactionInfo.uuid);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
protected pdfDocument(pdfDeliveryNoteRequest: PdfDeliveryNoteRequest) {
|
|
110
|
-
this._orderDeliveryService.handleDeliverSelectedTransactionLines(pdfDeliveryNoteRequest);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
protected printDocument(printDeliveryNoteRequest: PrintDeliveryNoteRequest) {
|
|
114
|
-
this._orderDeliveryService.handleDeliverSelectedTransactionLines(printDeliveryNoteRequest);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
protected emailDocument(request: EmailDeliveryNoteRequest): void {
|
|
118
|
-
this._orderDeliveryService.handleDeliverSelectedTransactionLines(request);
|
|
119
|
-
}
|
|
120
70
|
}
|
|
@@ -5,18 +5,16 @@ import {TransactionButtonBarModule} from "../../transaction-button-bar/transacti
|
|
|
5
5
|
import {IconModule, InputCheckboxModule} from "@colijnit/corecomponents_v12";
|
|
6
6
|
import {PipeModule} from "../../../pipe/pipe.module";
|
|
7
7
|
import {SendMethodDialogModule} from "@colijnit/sharedcomponents";
|
|
8
|
-
import {QuickSendButtonModule} from "../../quick-send-button/quick-send-button.module";
|
|
9
8
|
|
|
10
9
|
@NgModule({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
],
|
|
10
|
+
imports: [
|
|
11
|
+
CommonModule,
|
|
12
|
+
TransactionButtonBarModule,
|
|
13
|
+
IconModule,
|
|
14
|
+
PipeModule,
|
|
15
|
+
InputCheckboxModule,
|
|
16
|
+
SendMethodDialogModule
|
|
17
|
+
],
|
|
20
18
|
declarations: [
|
|
21
19
|
TransactionQuickAccessOrderDeliveryComponent
|
|
22
20
|
],
|
|
@@ -6,7 +6,6 @@ export class ExtendedTransactionLineViewModel extends TransactionLineInfo {
|
|
|
6
6
|
public quantityReceived: number;
|
|
7
7
|
public quantityToAllocate: number;
|
|
8
8
|
public quantityAllocated: number;
|
|
9
|
-
public quantityToDeliver: number;
|
|
10
9
|
public lineNr: number;
|
|
11
10
|
public transId: number;
|
|
12
11
|
}
|
|
@@ -75,9 +75,6 @@ import {CreateServiceOrderRequest} from "@colijnit/transactionapi/build/model/cr
|
|
|
75
75
|
import {CreateSalesQuotationRequest} from "@colijnit/transactionapi/build/model/create-sales-quotation-request";
|
|
76
76
|
import {PurchaseAdviceLine} from "@colijnit/transactionapi/build/model/purchase-advice-line.bo";
|
|
77
77
|
import {PurchaseAdviceFilters} from "@colijnit/transactionapi/build/model/purchase-advice-filters";
|
|
78
|
-
import {EmailDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/email-delivery-note-request";
|
|
79
|
-
import {PdfDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/pdf-delivery-note-request";
|
|
80
|
-
import {PrintDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/print-delivery-note-request";
|
|
81
78
|
|
|
82
79
|
@Injectable({
|
|
83
80
|
providedIn: "root"
|
|
@@ -1629,66 +1626,6 @@ export class TransactionConnectorAdapterService {
|
|
|
1629
1626
|
}
|
|
1630
1627
|
}
|
|
1631
1628
|
|
|
1632
|
-
public async emailDeliveryNote(emailDeliveryNoteRequest: EmailDeliveryNoteRequest): Promise<boolean> {
|
|
1633
|
-
const response: DataServiceResponseData = await this.connector.emailDeliveryNote(emailDeliveryNoteRequest);
|
|
1634
|
-
if (response && response.validationResult && response.validationResult.success) {
|
|
1635
|
-
return true;
|
|
1636
|
-
} else {
|
|
1637
|
-
this._handleExceptionFromResponse(response);
|
|
1638
|
-
return null;
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
public async pdfDeliveryNote(pdfDeliveryNoteRequest: PdfDeliveryNoteRequest): Promise<boolean> {
|
|
1643
|
-
const response: DataServiceResponseData = await this.connector.pdfDeliveryNote(pdfDeliveryNoteRequest);
|
|
1644
|
-
if (response && response.validationResult && response.validationResult.success) {
|
|
1645
|
-
return true;
|
|
1646
|
-
} else {
|
|
1647
|
-
this._handleExceptionFromResponse(response);
|
|
1648
|
-
return null;
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
public async printDeliveryNote(printDeliveryNoteRequest: PrintDeliveryNoteRequest): Promise<boolean> {
|
|
1653
|
-
const response: DataServiceResponseData = await this.connector.printDeliveryNote(printDeliveryNoteRequest);
|
|
1654
|
-
if (response && response.validationResult && response.validationResult.success) {
|
|
1655
|
-
return true;
|
|
1656
|
-
} else {
|
|
1657
|
-
this._handleExceptionFromResponse(response);
|
|
1658
|
-
return null;
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
public async getDeliveryNoteDefaultSendMethod(relationId: number): Promise<number> {
|
|
1663
|
-
const response: DataServiceResponseData = await this.connector.getDeliveryNoteDefaultSendMethod(relationId);
|
|
1664
|
-
if (response && response.validationResult && response.validationResult.success) {
|
|
1665
|
-
return response.resultObject;
|
|
1666
|
-
} else {
|
|
1667
|
-
this._handleExceptionFromResponse(response);
|
|
1668
|
-
return null;
|
|
1669
|
-
}
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
public async getDeliveryNoteEmailLayouts(transactionUUID: string): Promise<ReportLayoutSelectionEmail[]> {
|
|
1673
|
-
const response: DataServiceResponseData = await this.connector.getDeliveryNoteEmailLayouts(transactionUUID);
|
|
1674
|
-
if (response && response.resultObject && response.resultObject.length > 0) {
|
|
1675
|
-
return <ReportLayoutSelectionEmail[]><unknown>this._boFactory.makeBOArrayFromRawBackendDataArray(ReportLayoutSelectionEmail, response.resultObject);
|
|
1676
|
-
} else {
|
|
1677
|
-
this._handleExceptionFromResponse(response);
|
|
1678
|
-
return [];
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
public async getDeliveryNotePrintLayouts(transactionUUID: string): Promise<ReportLayoutSelectionPrint[]> {
|
|
1683
|
-
const response: DataServiceResponseData = await this.connector.getDeliveryNotePrintLayouts(transactionUUID);
|
|
1684
|
-
if (response && response.resultObject && response.resultObject.length > 0) {
|
|
1685
|
-
return <ReportLayoutSelectionPrint[]><unknown>this._boFactory.makeBOArrayFromRawBackendDataArray(ReportLayoutSelectionPrint, response.resultObject);
|
|
1686
|
-
} else {
|
|
1687
|
-
this._handleExceptionFromResponse(response);
|
|
1688
|
-
return [];
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
1629
|
private _handleExceptionFromResponse(result: DataServiceResponseData): void {
|
|
1693
1630
|
this._errorService.showValidationError(result);
|
|
1694
1631
|
}
|
|
@@ -68,9 +68,6 @@ import {CreateServiceOrderRequest} from "@colijnit/transactionapi/build/model/cr
|
|
|
68
68
|
import {CreateSalesQuotationRequest} from "@colijnit/transactionapi/build/model/create-sales-quotation-request";
|
|
69
69
|
import {PurchaseAdviceFilters} from "@colijnit/transactionapi/build/model/purchase-advice-filters";
|
|
70
70
|
import {PurchaseAdviceLine} from "@colijnit/transactionapi/build/model/purchase-advice-line.bo";
|
|
71
|
-
import {EmailDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/email-delivery-note-request";
|
|
72
|
-
import {PdfDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/pdf-delivery-note-request";
|
|
73
|
-
import {PrintDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/print-delivery-note-request";
|
|
74
71
|
|
|
75
72
|
@Injectable({
|
|
76
73
|
providedIn: "root"
|
|
@@ -622,27 +619,5 @@ export class TransactionConnectorService {
|
|
|
622
619
|
return await this._adapterService.generateAndSendPurchaseOrders(purchaseAdviceLines);
|
|
623
620
|
}
|
|
624
621
|
|
|
625
|
-
public async emailDeliveryNote(emailDeliveryNoteRequest: EmailDeliveryNoteRequest): Promise<boolean> {
|
|
626
|
-
return await this._adapterService.emailDeliveryNote(emailDeliveryNoteRequest);
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
public async pdfDeliveryNote(pdfDeliveryNoteRequest: PdfDeliveryNoteRequest): Promise<boolean> {
|
|
630
|
-
return await this._adapterService.pdfDeliveryNote(pdfDeliveryNoteRequest);
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
public async printDeliveryNote(printDeliveryNoteRequest: PrintDeliveryNoteRequest): Promise<boolean> {
|
|
634
|
-
return await this._adapterService.printDeliveryNote(printDeliveryNoteRequest);
|
|
635
|
-
}
|
|
636
622
|
|
|
637
|
-
public async getDeliveryNoteDefaultSendMethod(relationId: number): Promise<number> {
|
|
638
|
-
return await this._adapterService.getDeliveryNoteDefaultSendMethod(relationId);
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
public async getDeliveryNoteEmailLayouts(transactionUUID: string): Promise<ReportLayoutSelectionEmail[]> {
|
|
642
|
-
return await this._adapterService.getDeliveryNoteEmailLayouts(transactionUUID);
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
public async getDeliveryNotePrintLayouts(transactionUUID: string): Promise<ReportLayoutSelectionPrint[]> {
|
|
646
|
-
return await this._adapterService.getDeliveryNotePrintLayouts(transactionUUID);
|
|
647
|
-
}
|
|
648
623
|
}
|
|
@@ -11,7 +11,7 @@ export class TransactionInitializerService {
|
|
|
11
11
|
|
|
12
12
|
public async initializeApp(): Promise<void> {
|
|
13
13
|
const options = {
|
|
14
|
-
url: "http://
|
|
14
|
+
url: "http://localhost:8080/ione/",
|
|
15
15
|
schema: "815",
|
|
16
16
|
version: "252",
|
|
17
17
|
useLoginEncryption: true,
|