1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import commonFunctions from '~/mixin/commonFunctions.js';
import commonDepend from "~/mixin/commonDepend";
import BigNumber from "bignumber.js";
export default {
mixins: [commonFunctions, commonDepend],
methods: {
addamtflg() {
if ((this.model.bedgrp.cbs.max2.amt==null||(this.model.bedgrp.cbs.max2.amt != "" && new BigNumber(this.model.bedgrp.cbs.max2.amt).comparedTo(0) == 0))
&& (this.model.bedgrp.cbs.opn2.amt==null||(this.model.bedgrp.cbs.opn2.amt != "" && new BigNumber(this.model.bedgrp.cbs.opn2.amt).comparedTo(0) == 0))) {
this.model.betp.addamtflg = "";
} else {
this.model.betp.addamtflg = "X";
}
},
defaultDocsta() {
// If `Documents habe been refused and returned already` no other DOCSTA is possible
// Only in BETDCR DOCSTA R could be changed, in other BE-transactions ADVDOCFLG is not used
if (this.model.bedgrp.rec.docsta === 'R') {
if ((!this.model.bedgrp.rec.modifySet || this.model.bedgrp.rec.modifySet === null || this.model.bedgrp.rec.modifySet != null && !this.model.bedgrp.rec.modifySet.includes('advdocflg'))) {
// if not "BETDCR" exit, no nothing
// return;
}
}
// # Advice of Payment?
if (this.model.bedgrp.rec.advdat != null && this.model.bedgrp.rec.advdat != '' && this.model.bedgrp.rec.advtyp === '754') {
if (this.model.bedgrp.rec.rcvdat === null || this.model.bedgrp.rec.rcvdat === '') {
//Advice of Payment received, wait for documents
this.model.bedgrp.rec.docsta = 'A';
} else {
//Advice of Payment received, documents received
this.model.bedgrp.rec.docsta = 'B';
}
}
// # Advice of Discrepancy?
if (this.model.bedgrp.rec.disdat != null && this.model.bedgrp.rec.disdat != '' && this.model.bedgrp.rec.advtyp === '750') {
if (this.model.bedgrp.rec.rcvdat === null || this.model.bedgrp.rec.rcvdat === '') {
//Advice of Discrepancy received, wait for documents
this.model.bedgrp.rec.docsta = 'C';
} else {
//Advice of Discrepancy received, documents received
this.model.bedgrp.rec.docsta = 'D';
}
}
//# Documents are received, no discrepancies
if (this.model.bedgrp.rec.rcvdat != null && this.model.bedgrp.rec.rcvdat != '' && (this.model.bedgrp.blk.docdis === '' || this.model.bedgrp.blk.docdis === null)) {
// Clean documents received
this.model.bedgrp.rec.docsta = "E";
}
// # Documents are received with discrepancies
if (this.model.bedgrp.rec.rcvdat != null && this.model.bedgrp.rec.rcvdat != '' && (this.model.bedgrp.blk.docdis != '' && this.model.bedgrp.blk.docdis != null)) {
// Discrepant documents received
this.model.bedgrp.rec.docsta = "F";
}
//# Documents taken up?
if (this.model.bedgrp.rec.acpnowflg != null && this.model.bedgrp.rec.acpnowflg != '') {
// Documents taken up
this.model.bedgrp.rec.docsta = "I";
}
//# Free of Payment?
if (this.model.bedgrp.rec.frepayflg != null && this.model.bedgrp.rec.frepayflg != '') {
// Documents settled free of payment
this.model.bedgrp.rec.docsta = "J";
}
if (this.model.bedgrp.rec.advdocflg != null && this.model.bedgrp.rec.advdocflg != '') {
// Documents have been refused and returned
this.model.bedgrp.rec.docsta = "R";
}
},
defaultClsflg(){
if(this.model.rejpenins!='X'){
this.model.mtabut.clsflg = 'C';
}else{
this.model.mtabut.clsflg = 'O';
}
},
defaultRejpenins(){
if(!this.model.modifySet||this.model.modifySet==null||(this.model.modifySet!=null&&!this.model.modifySet.includes('rejpenins'))){
if(this.model.bedgrp.rec.advdocflg!=''){
this.model.rejpenins = '';
}else{
this.model.rejpenins = 'X';
}
}
},
},
}