@@ -26,6 +26,12 @@ class Orders extends Message
26
26
/** @var array */
27
27
protected $ orderDate ;
28
28
29
+ /** @var array */
30
+ protected $ orderContact ;
31
+
32
+ /** @var array */
33
+ protected $ purchasingContact ;
34
+
29
35
/** @var array */
30
36
protected $ documentDate ;
31
37
@@ -38,6 +44,9 @@ class Orders extends Message
38
44
/** @var array */
39
45
protected $ deliveryDateEarliest ;
40
46
47
+ /** @var array */
48
+ protected $ accountNumber ;
49
+
41
50
/** @var array */
42
51
protected $ collectiveOrderNumber ;
43
52
@@ -73,6 +82,11 @@ class Orders extends Message
73
82
'deliveryDate ' ,
74
83
'deliveryDateLatest ' ,
75
84
'deliveryDateEarliest ' ,
85
+ 'orderDescription ' ,
86
+ 'orderNotification ' ,
87
+ 'accountNumber ' ,
88
+ 'orderContact ' ,
89
+ 'purchasingContact ' ,
76
90
'buyerAddress ' ,
77
91
'consigneeAddress ' ,
78
92
'deliveryPartyAddress ' ,
@@ -81,8 +95,6 @@ class Orders extends Message
81
95
'storeKeeperAddress ' ,
82
96
'invoiceAddress ' ,
83
97
'supplierAddress ' ,
84
- 'orderDescription ' ,
85
- 'orderNotification ' ,
86
98
'internalIdentifier ' ,
87
99
'objectNumber ' ,
88
100
'objectDescription1 ' ,
@@ -212,6 +224,44 @@ public function setOrderDate($orderDate)
212
224
return $ this ;
213
225
}
214
226
227
+ /**
228
+ * @return array
229
+ */
230
+ public function getOrderContact ()
231
+ {
232
+ return $ this ->orderContact ;
233
+ }
234
+
235
+ /**
236
+ * @param string $name
237
+ * @param string $identifier
238
+ * @return Orders
239
+ */
240
+ public function setOrderContact ($ name , $ identifier = '' )
241
+ {
242
+ $ this ->orderContact = ['CTA ' , 'OC ' , [$ identifier , $ name ]];
243
+ return $ this ;
244
+ }
245
+
246
+ /**
247
+ * @return array
248
+ */
249
+ public function getPurchasingContact ()
250
+ {
251
+ return $ this ->purchasingContact ;
252
+ }
253
+
254
+ /**
255
+ * @param string $name
256
+ * @param string $identifier
257
+ * @return Orders
258
+ */
259
+ public function setPurchasingContact ($ name , $ identifier = '' )
260
+ {
261
+ $ this ->purchasingContact = ['CTA ' , 'PD ' , [$ identifier , $ name ]];
262
+ return $ this ;
263
+ }
264
+
215
265
/**
216
266
* @return array
217
267
*/
@@ -292,7 +342,24 @@ public function setDeliveryDateEarliest($deliveryDateEarliest, $formatQuantifier
292
342
return $ this ;
293
343
}
294
344
345
+ /**
346
+ * @param $accountNumber
347
+ * @return Orders
348
+ * @throws \EDI\Generator\EdifactException
349
+ */
350
+ public function setAccountNumber ($ accountNumber )
351
+ {
352
+ $ this ->accountNumber = $ this ->addRFFSegment ('ADE ' , $ accountNumber );
353
+ return $ this ;
354
+ }
295
355
356
+ /**
357
+ * @return array
358
+ */
359
+ public function getAccountNumber ()
360
+ {
361
+ return $ this ->accountNumber ;
362
+ }
296
363
297
364
/**
298
365
* @return array
@@ -442,7 +509,7 @@ public function setDeliveryTerms($deliveryTerms)
442
509
{
443
510
$ this ->isAllowed (
444
511
$ deliveryTerms ,
445
- ['CAF ' , 'DDP ' , 'DAF ' , 'FCA ' , 'CAI ' , 'ZZZ ' ]
512
+ ['CAF ' , 'CIP ' , ' CPT ' , ' DDP ' , 'DAF ' , 'FCA ' , 'CAI ' , 'ZZZ ' ]
446
513
);
447
514
$ this ->deliveryTerms = ['TOD ' , '6 ' , '' , $ deliveryTerms ];
448
515
return $ this ;
0 commit comments