@@ -12,7 +12,7 @@ class SoapClient
12
12
protected $ secret ;
13
13
protected $ agreement ;
14
14
15
- public function __construct ($ agreement = '' , $ secret = null )
15
+ public function __construct ($ agreement = null , $ secret = null )
16
16
{
17
17
$ this ->agreement = $ agreement ?? config ('economic.agreement ' );
18
18
$ this ->secret = $ secret ?? config ('economic.secret_token ' );
@@ -145,7 +145,7 @@ public function getAllCashbooksEntries()
145
145
return $ entries ;
146
146
}
147
147
148
- public function createCashBookEntryFromData ( $ data )
148
+ public function createCashBookEntryFromData ($ data )
149
149
{
150
150
return $ this ->soap ->call ('economic.CashBookEntry_CreateFromData ' , [
151
151
'CashBookEntry_CreateFromData ' => [
@@ -172,26 +172,26 @@ public function createProjectsFromArray($data)
172
172
])->Project_CreateFromDataArrayResult ;
173
173
}
174
174
175
- public function registerPdfVoucher ( $ file , $ entry_number , $ entry_date )
175
+ public function registerPdfVoucher ($ file , $ entry_number , $ entry_date )
176
176
{
177
- $ this ->soap ->call ( 'economic.CashBook_RegisterPdfVoucher ' , [
177
+ $ this ->soap ->call ('economic.CashBook_RegisterPdfVoucher ' , [
178
178
'CashBook_RegisterPdfVoucher ' => [
179
179
'data ' => $ file ,
180
180
'voucherNumber ' => (int ) $ entry_number ,
181
181
'entryDate ' => $ entry_date ,
182
182
],
183
- ] );
183
+ ]);
184
184
185
185
return true ;
186
186
}
187
187
188
- public function createProductGroupFromData ( $ data )
188
+ public function createProductGroupFromData ($ data )
189
189
{
190
- return $ this ->soap ->call ( 'economic.ProductGroup_CreateFromData ' , [
190
+ return $ this ->soap ->call ('economic.ProductGroup_CreateFromData ' , [
191
191
'ProductGroup_CreateFromData ' => [
192
192
'data ' => $ data ,
193
193
],
194
- ] )->ProductGroup_CreateFromDataResult ;
194
+ ])->ProductGroup_CreateFromDataResult ;
195
195
}
196
196
197
197
public function createQuotationsFromArray ($ data )
@@ -242,40 +242,36 @@ public function getProjectCosts()
242
242
return $ entries ;
243
243
}
244
244
245
- public function deleteProductGroup ( $ number )
245
+ public function deleteProductGroup ($ number )
246
246
{
247
- return $ this ->soap ->call ( 'economic.ProductGroup_Delete ' , [
247
+ return $ this ->soap ->call ('economic.ProductGroup_Delete ' , [
248
248
'productGroupHandle ' => [
249
249
'Number ' => $ number ,
250
250
],
251
- ] )->ProductGroup_DeleteResponse ;
251
+ ])->ProductGroup_DeleteResponse ;
252
252
}
253
253
254
254
/**
255
255
* @param $ids integer|array
256
256
*
257
257
* @return mixed
258
258
*/
259
- public function orderGetDataByArray ( $ ids )
259
+ public function orderGetDataByArray ($ ids )
260
260
{
261
261
$ handles = [];
262
262
263
- if ( is_array ( $ ids ) ) {
264
-
265
- foreach ( $ ids as $ id ) {
266
-
267
- $ handles [] = [ 'Id ' => $ id ];
263
+ if (is_array ($ ids )) {
264
+ foreach ($ ids as $ id ) {
265
+ $ handles [] = ['Id ' => $ id ];
268
266
}
269
267
} else {
270
-
271
- $ handles [] = [ 'Id ' => $ ids ];
268
+ $ handles [] = ['Id ' => $ ids ];
272
269
}
273
270
274
- return $ this ->soap ->call ( 'economic.Order_GetDataArray ' , [
275
-
271
+ return $ this ->soap ->call ('economic.Order_GetDataArray ' , [
276
272
'Order_GetDataArray ' => [
277
273
'entityHandles ' => $ handles ,
278
274
],
279
- ] )->Order_GetDataArrayResult ;
275
+ ])->Order_GetDataArrayResult ;
280
276
}
281
277
}
0 commit comments