()
| 2604 | } |
| 2605 | } |
| 2606 | async function onDeleteAndMoveNCH() { |
| 2607 | const pk = getPKFromSelection(); |
| 2608 | if (pk === null) { |
| 2609 | return; |
| 2610 | } |
| 2611 | const ok = await confirmDialog(TC.confirmationDeleteAndMoveNCH); |
| 2612 | if (ok) { |
| 2613 | const data = { |
| 2614 | jobID: pk.jobId, |
| 2615 | headerType: pk.headerType, |
| 2616 | listPosNos: pk.listPosNos, |
| 2617 | subPosNo: pk.subPosNo |
| 2618 | }; |
| 2619 | let setNchData = {}; |
| 2620 | const infoForDelete = await servicesData.getInfoForDeleteCiPosList(data); |
| 2621 | if (infoForDelete.doShowNCHInfo) { |
| 2622 | const { nchAccount, nchCostCentre } = infoForDelete; |
| 2623 | setNchData = await showNchInfoDialog( |
| 2624 | { nchAccount, nchCostCentre }, |
| 2625 | _staticData |
| 2626 | ); |
| 2627 | } |
| 2628 | if (setNchData !== null) { |
| 2629 | const setDeleteData = { |
| 2630 | ...data, |
| 2631 | ...setNchData, |
| 2632 | lockTimestamp: _formData.settings.lockTimestamp, |
| 2633 | showWarnings: true |
| 2634 | }; |
| 2635 | const result = await servicesData.setDeleteCiPosList(setDeleteData); |
| 2636 | if (result) { |
| 2637 | |
| 2638 | _tableSelectionPosNo = null; |
| 2639 | await _updateTableContent(); |
| 2640 | } |
| 2641 | } |
| 2642 | } |
| 2643 | } |
| 2644 | function _buttonDeleteCiPositions() { |
| 2645 | return new UiSelectButton( |
| 2646 | TC.buttonDelete, |
nothing calls this directly
no test coverage detected