-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathKnOrg-embedded-insert.txt
More file actions
136 lines (136 loc) · 4.27 KB
/
KnOrg-embedded-insert.txt
File metadata and controls
136 lines (136 loc) · 4.27 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
; We need to specify DEFAULT_CHANGE | ALLOW_CHANGES | ALLOW_REFORMAT_PHONE_NR
; to get In & SeNm populated, split the house number off the street field and
; reformat the Dutch phone number.
KnOrganisation:insert:1079
[
'name' => 'Wyz',
'address' => [
'street' => 'Govert Flinckstraat 168A',
; My old notes imply that AFAS itself normalizes zipcode to insert a space
; between numbers and letters, and convert letters to uppercase. So this library
; does not (need to) do that. If this is not true, someone please tell me.
'zip_code' => '1072EP',
'town' => 'Amsterdam',
; This is an ISO country code, not an AFAS code (though in the case of 'NL'
; these are the same). The ObjectWithCountry class converts it to an AFAS code.
'country_iso' => 'NL',
],
'contact' => [
'email' => 'rm@wyz.biz',
'phone' => '+31622517218',
'person' => [
'first_name' => 'Roderik',
'last_name' => 'Muit',
],
],
]
--
{
"KnOrganisation": {
"Element": {
"Fields": {
"Nm": "Wyz",
"PbAd": true,
"AutoNum": true,
; MatchOga has a default of 6 (for inserts).
"MatchOga": 6
},
"Objects": {
"KnBasicAddressAdr": {
"Element": {
"Fields": {
"Ad": "Govert Flinckstraat",
"ZpCd": "1072EP",
"Rs": "Amsterdam",
"CoId": "NL",
"HmNr": 168,
"HmAd": "A",
"PbAd": false,
"ResZip": false
}
}
},
"KnContact": {
"Element": {
"Fields": {
"TeNr": "06-22517218",
"EmAd": "rm@wyz.biz",
"ViKc": "PRS"
},
"Objects": {
"KnPerson": {
"Element": {
"Fields": {
"FiNm": "Roderik",
"LaNm": "Muit",
"In": "R.",
"SeNm": "MUIT",
"SpNm": false,
"ViGe": "O",
"Corr": false,
"AutoNum": true,
; MatchPer has a default of 7 (for inserts).
"MatchPer": 7
}
}
}
}
}
}
}
}
}
}
--
<KnOrganisation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Element>
<Fields Action="insert">
<Nm>Wyz</Nm>
<PbAd>1</PbAd>
<AutoNum>1</AutoNum>
<MatchOga>6</MatchOga>
</Fields>
<Objects>
<KnBasicAddressAdr>
<Element>
<Fields Action="insert">
<Ad>Govert Flinckstraat</Ad>
<ZpCd>1072EP</ZpCd>
<Rs>Amsterdam</Rs>
<CoId>NL</CoId>
<HmNr>168</HmNr>
<HmAd>A</HmAd>
<PbAd>0</PbAd>
<ResZip>0</ResZip>
</Fields>
</Element>
</KnBasicAddressAdr>
<KnContact>
<Element>
<Fields Action="insert">
<TeNr>06-22517218</TeNr>
<EmAd>rm@wyz.biz</EmAd>
<ViKc>PRS</ViKc>
</Fields>
<Objects>
<KnPerson>
<Element>
<Fields Action="insert">
<FiNm>Roderik</FiNm>
<LaNm>Muit</LaNm>
<In>R.</In>
<SeNm>MUIT</SeNm>
<SpNm>0</SpNm>
<ViGe>O</ViGe>
<Corr>0</Corr>
<AutoNum>1</AutoNum>
<MatchPer>7</MatchPer>
</Fields>
</Element>
</KnPerson>
</Objects>
</Element>
</KnContact>
</Objects>
</Element>
</KnOrganisation>