Skip to content

Commit 9054456

Browse files
authored
Merge pull request #47 from rshkabko/patch-2
Bug VolumeGeneral and VolumeWeight must be empty when CargoType is Document
2 parents dfb37c9 + 58c2ffc commit 9054456

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Delivery/NovaPoshtaApi2.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -918,8 +918,10 @@ protected function checkInternetDocumentParams(array &$params)
918918
empty($params['PayerType']) and $params['PayerType'] = 'Recipient';
919919
empty($params['SeatsAmount']) and $params['SeatsAmount'] = '1';
920920
empty($params['CargoType']) and $params['CargoType'] = 'Cargo';
921-
empty($params['VolumeGeneral']) and $params['VolumeGeneral'] = '0.0004';
922-
empty($params['VolumeWeight']) and $params['VolumeWeight'] = $params['Weight'];
921+
if($params['CargoType'] != 'Documents') {
922+
empty($params['VolumeGeneral']) and $params['VolumeGeneral'] = '0.0004';
923+
empty($params['VolumeWeight']) and $params['VolumeWeight'] = $params['Weight'];
924+
}
923925
}
924926

925927
/**

0 commit comments

Comments
 (0)