forked from GSDgit/PracticalAfas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFbSales-not-flattened.txt
101 lines (101 loc) · 2.85 KB
/
FbSales-not-flattened.txt
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
; As a comparison to FbSales.txt (and a test for the argument), we specify
; DEFAULT_CHANGE & ^FLATTEN_SINGLE_ELEMENT which has effect on JSON output.
; The non-flattened version (with "Element" being an array) is also how output
; always looks if there is more than a single element; see e.g. KnSubject.txt.
FbSales:insert:22
[
'reference' => 'Weborder 123',
'order_date' => '2018-12-08',
'debtor_id' => 25000,
'currency_code' => 'EUR',
'warehouse' => '*** - ******',
; We just made "unit" an alias for "Unit", to prevent confusion...
'Unit' => '1',
'line_items' => [
[
'item_code' => 'xxxxx',
'quantity' => '5',
'unit_price' => 25,
],
[
'item_code' => 'xxxxx-xxx',
'unit_price' => 1.20,
]
]
]
--
{
"FbSales": {
"Element": [
{
"Fields": {
"RfCs": "Weborder 123",
"OrDa": "2018-12-08",
"DbId": 25000,
"CuId": "EUR",
"Unit": 1,
"War": "*** - ******"
},
"Objects": {
"FbSalesLines": {
"Element": [
{
"Fields": {
"ItCd": "xxxxx",
"QuUn": 5,
"Upri": 25,
"VaIt": 2,
"BiUn": "Stk"
}
},
{
"Fields": {
"ItCd": "xxxxx-xxx",
"Upri": 1.2,
"VaIt": 2,
"BiUn": "Stk",
"QuUn": 1
}
}
]
}
}
}
]
}
}
--
<FbSales xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Element>
<Fields Action="insert">
<RfCs>Weborder 123</RfCs>
<OrDa>2018-12-08</OrDa>
<DbId>25000</DbId>
<CuId>EUR</CuId>
<Unit>1</Unit>
<War>*** - ******</War>
</Fields>
<Objects>
<FbSalesLines>
<Element>
<Fields Action="insert">
<ItCd>xxxxx</ItCd>
<QuUn>5</QuUn>
<Upri>25</Upri>
<VaIt>2</VaIt>
<BiUn>Stk</BiUn>
</Fields>
</Element>
<Element>
<Fields Action="insert">
<ItCd>xxxxx-xxx</ItCd>
<Upri>1.2</Upri>
<VaIt>2</VaIt>
<BiUn>Stk</BiUn>
<QuUn>1</QuUn>
</Fields>
</Element>
</FbSalesLines>
</Objects>
</Element>
</FbSales>