mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
DHL: First test candidate ;-)
This commit is contained in:
parent
8ad45ed723
commit
c37f0d3847
@ -5,7 +5,7 @@ namespace Xentral\Carrier\Dhl\Data;
|
|||||||
class Receiver
|
class Receiver
|
||||||
{
|
{
|
||||||
public string $name1;
|
public string $name1;
|
||||||
public ?NativeAddress $Address;
|
public ?ReceiverNativeAddress $Address;
|
||||||
public ?PackStation $Packstation;
|
public ?PackStation $Packstation;
|
||||||
public ?Postfiliale $Postfiliale;
|
public ?Postfiliale $Postfiliale;
|
||||||
public ?Communication $Communication;
|
public ?Communication $Communication;
|
||||||
|
17
classes/Carrier/Dhl/Data/ReceiverNativeAddress.php
Normal file
17
classes/Carrier/Dhl/Data/ReceiverNativeAddress.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class ReceiverNativeAddress
|
||||||
|
{
|
||||||
|
public ?string $name2;
|
||||||
|
public ?string $name3;
|
||||||
|
public string $streetName;
|
||||||
|
public ?string $streetNumber;
|
||||||
|
public array|string|null $addressAddition;
|
||||||
|
public ?string $dispatchingInformation;
|
||||||
|
public string $zip;
|
||||||
|
public string $city;
|
||||||
|
public ?string $province;
|
||||||
|
public ?Country $Origin;
|
||||||
|
}
|
@ -24,9 +24,9 @@ class DhlApi
|
|||||||
public function __construct(string $user, string $signature)
|
public function __construct(string $user, string $signature)
|
||||||
{
|
{
|
||||||
$this->soapClient = new SoapClient(__DIR__ . '/Wsdl/geschaeftskundenversand-api-3.4.0.wsdl', [
|
$this->soapClient = new SoapClient(__DIR__ . '/Wsdl/geschaeftskundenversand-api-3.4.0.wsdl', [
|
||||||
'login' => 'ewsp',
|
'login' => 'OpenXE_1',
|
||||||
'password' => 'rZ*twrzJ5@wr&$',
|
'password' => 'cjzNEpGXxbbnRwcYLISX3ZTTcQrQrz',
|
||||||
'location' => self::SANDBOX_URL,
|
'location' => self::PRODUCTION_URL,
|
||||||
'trace' => 1,
|
'trace' => 1,
|
||||||
'connection_timeout' => 30,
|
'connection_timeout' => 30,
|
||||||
'classmap' => [
|
'classmap' => [
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
340
classes/Carrier/Dhl/Wsdl/geschaeftskundenversand-api-3.4.0.wsdl
Normal file
340
classes/Carrier/Dhl/Wsdl/geschaeftskundenversand-api-3.4.0.wsdl
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Version: 3.4.0
|
||||||
|
Date: 2022-08-01T22:00:51Z
|
||||||
|
--><wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
||||||
|
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
|
||||||
|
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||||
|
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
|
||||||
|
xmlns:cis="http://dhl.de/webservice/cisbase"
|
||||||
|
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||||
|
xmlns:bcs="http://dhl.de/webservices/businesscustomershipping/3.0"
|
||||||
|
targetNamespace="http://dhl.de/webservices/businesscustomershipping/3.0">
|
||||||
|
<wsdl:types>
|
||||||
|
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
|
||||||
|
<xs:import namespace="http://dhl.de/webservice/cisbase"
|
||||||
|
schemaLocation="geschaeftskundenversand-api-3.4.0-schema-cis_base.xsd"/>
|
||||||
|
<xs:import namespace="http://dhl.de/webservices/businesscustomershipping/3.0"
|
||||||
|
schemaLocation="geschaeftskundenversand-api-3.4.0-schema-bcs_base.xsd"/>
|
||||||
|
</xs:schema>
|
||||||
|
</wsdl:types>
|
||||||
|
<wsdl:message name="AuthentificationHeaderMessage">
|
||||||
|
<wsdl:documentation>The authentication data.</wsdl:documentation>
|
||||||
|
<wsdl:part name="header" element="cis:Authentification"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="createShipmentOrderMessage">
|
||||||
|
<wsdl:documentation>The shipmentdata for creating a shipment.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:CreateShipmentOrderRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="createShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the createShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:CreateShipmentOrderResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="validateShipmentMessage">
|
||||||
|
<wsdl:documentation>The shipmentdata for validating a shipment.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:ValidateShipmentOrderRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="validateShipmentResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the validateShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:ValidateShipmentResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="deleteShipmentOrderMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment which should be
|
||||||
|
deleted.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:DeleteShipmentOrderRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="deleteShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the deletion operation.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:DeleteShipmentOrderResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="doManifestMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment which should be
|
||||||
|
manifested.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:DoManifestRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="doManifestResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the manifest operation.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:DoManifestResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getLabelMessage">
|
||||||
|
<wsdl:documentation>The identifier for the DD shipment for which the label url is
|
||||||
|
requested.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetLabelRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getLabelResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the label url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetLabelResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getVersionRequestMessage">
|
||||||
|
<wsdl:documentation>The version of webservice implementation.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:Version"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getVersionResponseMessage">
|
||||||
|
<wsdl:documentation>The version of webservice implementation.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetVersionResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getExportDocMessage">
|
||||||
|
<wsdl:documentation>The identifier for the DD shipment for which the label url is
|
||||||
|
requested.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetExportDocRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getExportDocResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the label url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetExportDocResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getManifestRequestMessage">
|
||||||
|
<wsdl:documentation>Request a manifest of the given date / date range.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetManifestRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getManifestResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the manifest url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetManifestResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="updateShipmentOrderRequestMessage">
|
||||||
|
<wsdl:documentation>Request a manifest of the given date / date range.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:UpdateShipmentOrderRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="updateShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the manifest url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:UpdateShipmentOrderResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="readShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the manifest url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:ReadShipmentOrderResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:portType name="GKV3XAPIServicePortType">
|
||||||
|
<wsdl:operation name="createShipmentOrder">
|
||||||
|
<wsdl:documentation>Creates shipments.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:createShipmentOrderMessage">
|
||||||
|
<wsdl:documentation>The shipment data.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:createShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the createShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="validateShipment">
|
||||||
|
<wsdl:documentation>Creates shipments.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:validateShipmentMessage">
|
||||||
|
<wsdl:documentation>The shipment data.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:validateShipmentResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the validateShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="deleteShipmentOrder">
|
||||||
|
<wsdl:documentation>Deletes the requested shipments.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:deleteShipmentOrderMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment which should be
|
||||||
|
deleted.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:deleteShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the deletion operation.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="doManifest">
|
||||||
|
<wsdl:documentation>Manifest the requested DD shipments.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:doManifestMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment which should be
|
||||||
|
manifested.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:doManifestResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the manifest operation.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getLabel">
|
||||||
|
<wsdl:documentation>Returns the request-url for getting a label.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:getLabelMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment for which the label url is
|
||||||
|
requested.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:getLabelResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the label url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getVersion">
|
||||||
|
<wsdl:documentation>Returns the actual version of the implementation of the whole ISService
|
||||||
|
webservice.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:getVersionRequestMessage"/>
|
||||||
|
<wsdl:output message="bcs:getVersionResponseMessage">
|
||||||
|
<wsdl:documentation>The version of webservice implementation.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getExportDoc">
|
||||||
|
<wsdl:documentation>Returns the request-url for getting a export
|
||||||
|
document.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:getExportDocMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment for which the export document url is
|
||||||
|
requested.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:getExportDocResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the export document url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getManifest">
|
||||||
|
<wsdl:documentation>Request the manifest.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:getManifestRequestMessage">
|
||||||
|
<wsdl:documentation>The request data.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:getManifestResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the getManifest operation and the manifest
|
||||||
|
url.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="updateShipmentOrder">
|
||||||
|
<wsdl:documentation>Updates a shipment order.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:updateShipmentOrderRequestMessage">
|
||||||
|
<wsdl:documentation>The shipment data.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:updateShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the updateShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:portType>
|
||||||
|
<wsdl:binding name="GKV3XAPISOAP11Binding" type="bcs:GKV3XAPIServicePortType">
|
||||||
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<wsdl:operation name="createShipmentOrder">
|
||||||
|
<wsdl:documentation>Creates shipments.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:createShipmentOrder" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment data.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="validateShipment">
|
||||||
|
<wsdl:documentation>Validates shipments.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:validateShipment" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment data.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="deleteShipmentOrder">
|
||||||
|
<wsdl:documentation>Deletes the requested shipments.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:deleteShipmentOrder" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="doManifest">
|
||||||
|
<wsdl:documentation>Manifest the requested shipments.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:doManifest" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getLabel">
|
||||||
|
<wsdl:documentation>Returns the request-url for getting a label.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:getLabel" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the url for requesting the
|
||||||
|
label.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getVersion">
|
||||||
|
<wsdl:documentation>Returns the actual version of the implementation of the whole ISService
|
||||||
|
webservice.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:getVersion" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The version of the implementation.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getExportDoc">
|
||||||
|
<wsdl:documentation>Returns the request-url for getting a export
|
||||||
|
document.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:getExportDoc" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the url for requesting the export
|
||||||
|
document.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getManifest">
|
||||||
|
<wsdl:documentation>Requests the manifest.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:getManifest" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment data.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the manifest url.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="updateShipmentOrder">
|
||||||
|
<wsdl:documentation>Updates a shipment order.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:updateShipmentOrder" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment data.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:binding>
|
||||||
|
<wsdl:service name="GVAPI_2_0_de">
|
||||||
|
<wsdl:port name="GKVAPISOAP11port0" binding="bcs:GKV3XAPISOAP11Binding">
|
||||||
|
<soap:address location="https://cig.dhl.de/services/production/soap"/>
|
||||||
|
</wsdl:port>
|
||||||
|
</wsdl:service>
|
||||||
|
</wsdl:definitions>
|
@ -73,19 +73,19 @@ abstract class Versanddienstleister
|
|||||||
$ret['original'] = array_filter($docArr, fn($key) => in_array($key, $addressfields), ARRAY_FILTER_USE_KEY);
|
$ret['original'] = array_filter($docArr, fn($key) => in_array($key, $addressfields), ARRAY_FILTER_USE_KEY);
|
||||||
|
|
||||||
$ret['name'] = empty(trim($docArr['ansprechpartner'])) ? trim($docArr['name']) : trim($docArr['ansprechpartner']);
|
$ret['name'] = empty(trim($docArr['ansprechpartner'])) ? trim($docArr['name']) : trim($docArr['ansprechpartner']);
|
||||||
$ret['companyname'] = !empty(trim($docArr['ansprechpartner'])) ? trim($docArr['name']) : '';
|
$ret['name2'] = !empty(trim($docArr['ansprechpartner'])) ? trim($docArr['name']) : '';
|
||||||
$ret['address2'] = join(';', array_filter([
|
$ret['name3'] = join(';', array_filter([
|
||||||
$docArr['abteilung'],
|
$docArr['abteilung'],
|
||||||
$docArr['unterabteilung'],
|
$docArr['unterabteilung']
|
||||||
$docArr['adresszusatz']
|
|
||||||
], fn(string $item) => !empty(trim($item))));
|
], fn(string $item) => !empty(trim($item))));
|
||||||
|
$ret['address2'] = $docArr['adresszusatz'];
|
||||||
|
|
||||||
$ret['city'] = $docArr['ort'];
|
$ret['city'] = $docArr['ort'];
|
||||||
$ret['zip'] = $docArr['plz'];
|
$ret['zip'] = $docArr['plz'];
|
||||||
$ret['country'] = $docArr['land'];
|
$ret['country'] = $docArr['land'];
|
||||||
$ret['phone'] = $docArr['telefon'];
|
$ret['phone'] = $docArr['telefon'];
|
||||||
$ret['email'] = $docArr['email'];
|
$ret['email'] = $docArr['email'];
|
||||||
|
$ret['addresstype'] = 0;
|
||||||
|
|
||||||
$strasse = trim($docArr['strasse']);
|
$strasse = trim($docArr['strasse']);
|
||||||
$ret['streetwithnumber'] = $strasse;
|
$ret['streetwithnumber'] = $strasse;
|
||||||
@ -99,6 +99,20 @@ abstract class Versanddienstleister
|
|||||||
}
|
}
|
||||||
$ret['street'] = $strasse;
|
$ret['street'] = $strasse;
|
||||||
$ret['streetnumber'] = $hausnummer;
|
$ret['streetnumber'] = $hausnummer;
|
||||||
|
|
||||||
|
if (str_contains($docArr['strasse'], 'Packstation')) {
|
||||||
|
$ret['addresstype'] = 1;
|
||||||
|
$ret['parcelstationNumber'] = $hausnummer;
|
||||||
|
} else if (str_contains($docArr['strasse'], 'Postfiliale')) {
|
||||||
|
$ret['addresstype'] = 2;
|
||||||
|
$ret['postofficeNumber'] = $hausnummer;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tmp = join(' ', [$docArr['ansprechpartner'], $docArr['abteilung'], $docArr['unterabteilung']]);
|
||||||
|
if (preg_match("/\d{6,10}/", $tmp, $match)) {
|
||||||
|
$ret['postnumber'] = $match[0];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// wenn rechnung im spiel entweder durch versand oder direkt rechnung
|
// wenn rechnung im spiel entweder durch versand oder direkt rechnung
|
||||||
@ -350,7 +364,6 @@ abstract class Versanddienstleister
|
|||||||
VALUES
|
VALUES
|
||||||
({$address['addressId']}, {$address['lieferscheinId']}, '$this->type',
|
({$address['addressId']}, {$address['lieferscheinId']}, '$this->type',
|
||||||
'$json->weight', '$result->TrackingNumber', '$result->TrackingUrl', 1)";
|
'$json->weight', '$result->TrackingNumber', '$result->TrackingUrl', 1)";
|
||||||
print_r($sql);
|
|
||||||
$this->app->DB->Insert($sql);
|
$this->app->DB->Insert($sql);
|
||||||
|
|
||||||
$filename = $this->app->erp->GetTMP() . join('_', [$this->type, 'Label', $result->TrackingNumber]) . '.pdf';
|
$filename = $this->app->erp->GetTMP() . join('_', [$this->type, 'Label', $result->TrackingNumber]) . '.pdf';
|
||||||
|
@ -9,21 +9,47 @@
|
|||||||
<h2>{|Empfänger|}</h2>
|
<h2>{|Empfänger|}</h2>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Name|}:</td>
|
<td>{|Adresstyp|}:</td>
|
||||||
|
<td>
|
||||||
|
<select v-model.number="form.addresstype">
|
||||||
|
<option value="0">Haus</option>
|
||||||
|
<option value="1">Packstation</option>
|
||||||
|
<option value="2">Filiale</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Name / Zeile 1|}:</td>
|
||||||
<td><input type="text" size="36" v-model.trim="form.name"></td>
|
<td><input type="text" size="36" v-model.trim="form.name"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr v-if="form.addresstype === 0">
|
||||||
<td>{|Firmenname|}:</td>
|
<td>{|Firmenname / Zeile 2|}:</td>
|
||||||
<td><input type="text" size="36" v-model.trim="form.companyname"></td>
|
<td><input type="text" size="36" v-model.trim="form.name2"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr v-if="form.addresstype === 1 || form.addresstype === 2">
|
||||||
|
<td>{|Postnummer|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model.trim="form.postnumber"></td>
|
||||||
|
</tr>
|
||||||
|
<tr v-if="form.addresstype === 0">
|
||||||
|
<td>{|Firmenname / Zeile 3|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model.trim="form.name3"></td>
|
||||||
|
</tr>
|
||||||
|
<tr v-if="form.addresstype === 0">
|
||||||
<td>{|Strasse/Hausnummer|}:</td>
|
<td>{|Strasse/Hausnummer|}:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" size="30" v-model.trim="form.street">
|
<input type="text" size="30" v-model.trim="form.street">
|
||||||
<input type="text" size="5" v-model.trim="form.streetnumber">
|
<input type="text" size="5" v-model.trim="form.streetnumber">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr v-if="form.addresstype === 1">
|
||||||
|
<td>{|Packstationsnummer|}:</td>
|
||||||
|
<td><input type="text" size="10" v-model.trim="form.parcelstationNumber"></td>
|
||||||
|
</tr>
|
||||||
|
<tr v-if="form.addresstype === 2">
|
||||||
|
<td>{|Postfilialnummer|}:</td>
|
||||||
|
<td><input type="text" size="10" v-model.trim="form.postofficeNumber"></td>
|
||||||
|
</tr>
|
||||||
|
<tr v-if="form.addresstype === 0">
|
||||||
<td>{|Adresszeile 2|}:</td>
|
<td>{|Adresszeile 2|}:</td>
|
||||||
<td><input type="text" size="36" v-model.trim="form.address2"></td>
|
<td><input type="text" size="36" v-model.trim="form.address2"></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -45,6 +71,10 @@
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Ansprechpartner|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model="form.contactperson"></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|E-Mail|}:</td>
|
<td>{|E-Mail|}:</td>
|
||||||
<td><input type="text" size="36" v-model.trim="form.email"></td>
|
<td><input type="text" size="36" v-model.trim="form.email"></td>
|
||||||
@ -119,7 +149,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{|Produkt|}:</td>
|
<td>{|Produkt|}:</td>
|
||||||
<td>
|
<td>
|
||||||
<select v-model="form.product">
|
<select v-model="form.product" required>
|
||||||
<option v-for="prod in products" :value="prod.Id">{{prod.Name}}</option>
|
<option v-for="prod in products" :value="prod.Id">{{prod.Name}}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
@ -167,15 +197,16 @@
|
|||||||
<th>{|Einzelgewicht|}</th>
|
<th>{|Einzelgewicht|}</th>
|
||||||
<th>{|Gesamtwert|}</th>
|
<th>{|Gesamtwert|}</th>
|
||||||
<th>{|Gesamtgewicht|}</th>
|
<th>{|Gesamtgewicht|}</th>
|
||||||
<th><a v-on:click="addPosition"><img src="themes/new/images/add.png"></a></</th>
|
<th><a v-on:click="addPosition"><img src="themes/new/images/add.png"></a></
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="(pos, index) in form.positions">
|
<tr v-for="(pos, index) in form.positions">
|
||||||
<td><input type="text" v-model.trim="pos.bezeichnung" required></td>
|
<td><input type="text" v-model.trim="pos.bezeichnung" required></td>
|
||||||
<td><input type="text" v-model.number="pos.menge" required></td>
|
<td><input type="text" v-model.number="pos.menge" required></td>
|
||||||
<td><input type="text" v-model.trim="pos.zolltarifnummer" required></td>
|
<td><input type="text" v-model.trim="pos.zolltarifnummer"></td>
|
||||||
<td><input type="text" v-model.trim="pos.herkunftsland" required></td>
|
<td><input type="text" v-model.trim="pos.herkunftsland"></td>
|
||||||
<td><input type="text" v-model.number="pos.zolleinzelwert" required></td>
|
<td><input type="text" v-model.number="pos.zolleinzelwert"></td>
|
||||||
<td><input type="text" v-model.number="pos.zolleinzelgewicht" required></td>
|
<td><input type="text" v-model.number="pos.zolleinzelgewicht"></td>
|
||||||
<td>{{Number(pos.menge*pos.zolleinzelwert || 0).toFixed(2)}}</td>
|
<td>{{Number(pos.menge*pos.zolleinzelwert || 0).toFixed(2)}}</td>
|
||||||
<td>{{Number(pos.menge*pos.zolleinzelgewicht || 0).toFixed(3)}}</td>
|
<td>{{Number(pos.menge*pos.zolleinzelgewicht || 0).toFixed(3)}}</td>
|
||||||
<td><a v-on:click="deletePosition(index)"><img src="themes/new/images/delete.svg"></a></td>
|
<td><a v-on:click="deletePosition(index)"><img src="themes/new/images/delete.svg"></a></td>
|
||||||
@ -201,21 +232,21 @@
|
|||||||
computed: {
|
computed: {
|
||||||
total_value() {
|
total_value() {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
for(const pos of this.form.positions) {
|
for (const pos of this.form.positions) {
|
||||||
sum += (pos.menge * pos.zolleinzelwert) || 0;
|
sum += (pos.menge * pos.zolleinzelwert) || 0;
|
||||||
}
|
}
|
||||||
return sum;
|
return sum;
|
||||||
},
|
},
|
||||||
total_weight() {
|
total_weight() {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
for(const pos of this.form.positions) {
|
for (const pos of this.form.positions) {
|
||||||
sum += (pos.menge * pos.zolleinzelgewicht) || 0;
|
sum += (pos.menge * pos.zolleinzelgewicht) || 0;
|
||||||
}
|
}
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit: function() {
|
submit: function () {
|
||||||
let app = this;
|
let app = this;
|
||||||
let xhr = new XMLHttpRequest();
|
let xhr = new XMLHttpRequest();
|
||||||
xhr.open('POST', location.href, true);
|
xhr.open('POST', location.href, true);
|
||||||
@ -226,13 +257,13 @@
|
|||||||
}
|
}
|
||||||
xhr.send(JSON.stringify($.extend({submit:'print'}, this.form)));
|
xhr.send(JSON.stringify($.extend({submit:'print'}, this.form)));
|
||||||
},
|
},
|
||||||
addPosition: function() {
|
addPosition: function () {
|
||||||
this.form.positions.push({ });
|
this.form.positions.push({});
|
||||||
},
|
},
|
||||||
deletePosition: function(index) {
|
deletePosition: function (index) {
|
||||||
this.form.positions.splice(index, 1);
|
this.form.positions.splice(index, 1);
|
||||||
},
|
},
|
||||||
serviceAvailable: function(service) {
|
serviceAvailable: function (service) {
|
||||||
if (!this.products.hasOwnProperty(this.form.product))
|
if (!this.products.hasOwnProperty(this.form.product))
|
||||||
return false;
|
return false;
|
||||||
return this.products[this.form.product].AvailableServices.indexOf(service) >= 0;
|
return this.products[this.form.product].AvailableServices.indexOf(service) >= 0;
|
||||||
|
@ -1,84 +1,249 @@
|
|||||||
<br><br><table id="paketmarketab" align="center">
|
<div class="container-fluid" id="sendcloudapp">
|
||||||
<tr>
|
<form action="" method="post" v-on:submit.prevent="submit">
|
||||||
<td align="center">
|
<div class="row">
|
||||||
<br>
|
<div v-for="msg in messages" :class="msg.class">{{msg.text}}</div>
|
||||||
<form action="" method="post">
|
<div>
|
||||||
[ERROR]
|
<h1>{|Paketmarken Drucker für|} SendCloud</h1>
|
||||||
<h1>Paketmarken Drucker für [ZUSATZ]</h1>
|
</div>
|
||||||
<br>
|
<div class="col-md-4">
|
||||||
<b>Empfänger</b>
|
<h2>{|Empfänger|}</h2>
|
||||||
<br>
|
<table>
|
||||||
<br>
|
<tr>
|
||||||
<table>
|
<td>{|Name|}:</td>
|
||||||
<tr><td>
|
<td><input type="text" size="36" v-model="form.name"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Name 2|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model="form.name2"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Name 3|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model="form.name3"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Strasse/Hausnummer|}:</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" size="30" v-model="form.strasse">
|
||||||
|
<input type="text" size="5" v-model="form.hausnummer">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|PLZ/Ort|}:</td>
|
||||||
|
<td><input type="text" size="5" v-model="form.plz">
|
||||||
|
<input type="text" size="30" v-model="form.ort">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Bundesland|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model="form.bundesland"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Land|}:</td>
|
||||||
|
<td>
|
||||||
|
<select v-model="form.land">
|
||||||
|
<option v-for="(value, key) in countries" :value="key">{{value}}</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|E-Mail|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model="form.email"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Telefon|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model="form.telefon"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
<table style="float:left;">
|
</div>
|
||||||
<tr><td>Name:</td><td><input type="text" size="36" value="[NAME]" name="name" id="name"><script type="text/javascript">document.getElementById("name").focus(); </script></td></tr>
|
<div class="col-md-4" v-once>
|
||||||
<tr><td>Name 2:</td><td><input type="text" size="36" value="[NAME2]" name="name2"></td></tr>
|
<h2>vollst. Adresse</h2>
|
||||||
<tr><td>Name 3:</td><td><input type="text" size="36" value="[NAME3]" name="name3"></td></tr>
|
<table>
|
||||||
<tr><td>Land:</td><td>[EPROO_SELECT_LAND]</td></tr>
|
<tr>
|
||||||
<tr><td>PLZ/ort:</td><td><input type="text" name="plz" size="5" value="[PLZ]"> <input type="text" size="30" name="ort" value="[ORT]"></td></tr>
|
<td>{|Name|}</td>
|
||||||
<tr><td>Strasse/Hausnummer:</td><td><input type="text" size="30" value="[STRASSE]" name="strasse"> <input type="text" size="5" name="hausnummer" value="[HAUSNUMMER]"></td></tr>
|
<td>{{form.name}}</td>
|
||||||
<tr><td>E-Mail:</td><td><input type="text" size="36" value="[EMAIL]" name="email"></td></tr>
|
</tr>
|
||||||
<tr><td>Telefon:</td><td><input type="text" size="36" value="[TELEFON]" name="telefon"></td></tr>
|
<tr>
|
||||||
</table>
|
<td>{|Ansprechpartner|}</td>
|
||||||
|
<td>{{form.ansprechpartner}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<table style="float:left;">
|
<td>{|Abteilung|}</td>
|
||||||
<!--<tr><td width="180">Anzahl Pakete:</td><td nowrap><input type="text" name="anzahl" size="5" value="[ANZAHL]" id="anzahl"> <input type="button" onclick=window.location.href="index.php?module=versanderzeugen&action=frankieren&id=[ID]&land=[LAND]&anzahl="+document.getElementById('anzahl').value value="erstellen"></td></tr>-->
|
<td>{{form.abteilung}}</td>
|
||||||
[GEWICHT]
|
</tr>
|
||||||
<!--<tr><td>Foto:</td><td><img src="http://t3.gstatic.com/images?q=tbn:QTV_X4YJEI2p7M:http://notebook.pege.org/2005-inode/paket.jpg"></td></tr>
|
<tr>
|
||||||
<tr><td></td><td><input type="button" value="Nochmal Wiegen+Foto"></td></tr>-->
|
<td>{|Unterabteilung|}</td>
|
||||||
</table>
|
<td>{{form.unterabteilung}}</td>
|
||||||
<!--
|
</tr>
|
||||||
<table>
|
<tr>
|
||||||
<tr><td>Gewicht:</td><td><input type="text" size="5"></td></tr>
|
<td>{|Adresszusatz|}</td>
|
||||||
<tr><td>Foto:</td><td><img src="http://t3.gstatic.com/images?q=tbn:QTV_X4YJEI2p7M:http://notebook.pege.org/2005-inode/paket.jpg"></td></tr>
|
<td>{{form.adresszusatz}}</td>
|
||||||
<tr><td></td><td><input type="button" value="Nochmal Wiegen+Foto"></td></tr>
|
</tr>
|
||||||
</table>
|
<tr>
|
||||||
-->
|
<td>{|Strasse|}</td>
|
||||||
</tr>
|
<td>{{form.streetwithnumber}}</td>
|
||||||
</table>
|
</tr>
|
||||||
<br><br>
|
<tr>
|
||||||
|
<td>{|PLZ/Ort|}</td>
|
||||||
<table align="center">
|
<td>{{form.plz}} {{form.ort}}</td>
|
||||||
<tr><td colspan="2"><b>Service</b></td></tr>
|
</tr>
|
||||||
<tr><td>Nachnahme:</td><td style="min-width:200px;"><input type="checkbox" name="nachnahme" value="1" [NACHNAHME]> (Betrag: [BETRAG] EUR)<input type="hidden" name="betrag" value="[BETRAG]"></td></tr>
|
<tr>
|
||||||
<!--<tr><td>Versichert 2500 EUR:</td><td><input type="checkbox" name="versichert" value="1" [VERSICHERT]></td></tr>
|
<td>{|Bundesland|}</td>
|
||||||
<tr><td>Versichert 25000 EUR:</td><td><input type="checkbox" name="extraversichert" value="1" [EXTRAVERSICHERT]></td></tr>-->
|
<td>{{form.bundesland}}</td>
|
||||||
<tr><td nowrap>Extra Versicherung:</td><td><input type="checkbox" name="versichert" value="1" [VERSICHERT] /></td></tr>
|
</tr>
|
||||||
<tr class="versicherung"><td>Versicherungssumme:</td><td><input type="text" size="10" id="versicherungssumme" name="versicherungssumme" value="[VERSICHERUNGSSUMME]" /></td></tr>
|
<tr>
|
||||||
<tr><td>Leitcodierung:</td><td style="min-width:200px;"><input type="checkbox" name="leitcodierung" value="1" [LEITCODIERUNG]> <i>ohne Leitcodierung können extra Kosten entstehen</i></td></tr>
|
<td>{|Land|}</td>
|
||||||
<tr><td>Abholdatum:</td><td><input type="text" size="10" id="abholdatum" name="abholdatum" value="[ABHOLDATUM]" /></td></tr>
|
<td>{{form.land}}</td>
|
||||||
<tr><td>Wunschtermin:</td><td><input type="checkbox" name="wunschtermin" value="1" [WUNSCHTERMIN] /></td></tr>
|
</tr>
|
||||||
<tr class="wunschzeitraum"><td>Wunschlieferdatum:</td><td><input type="text" size="10" id="wunschlieferdatum" name="wunschlieferdatum" value="[WUNSCHLIEFERDATUM]" /></td></tr>
|
</table>
|
||||||
<tr class="wunschzeitraum"><td>Wunschlieferzeitraum:</td>
|
</div>
|
||||||
<td><!--<input type="radio" name="wunschzeitraum" id="wunsch10001200" value="10001200" [WUNSCH10001200] /> 10:00 - 12:00
|
<div class="col-md-4">
|
||||||
<input type="radio" name="wunschzeitraum" id="wunsch12001400" value="12001400" [WUNSCH12001400] /> 12:00 - 14:00
|
<h2>{|Paket|}</h2>
|
||||||
<input type="radio" name="wunschzeitraum" id="wunsch14001600" value="14001600" [WUNSCH14001600] /> 14:00 - 16:00
|
<table>
|
||||||
<input type="radio" name="wunschzeitraum" id="wunsch16001800" value="16001800" [WUNSCH16001800] /> 16:00 - 18:00 -->
|
<tr>
|
||||||
<input type="radio" name="wunschzeitraum" id="wunsch18002000" value="18002000" [WUNSCH18002000] /> 18:00 - 20:00
|
<td>{|Gewicht (in kg)|}:</td>
|
||||||
<input type="radio" name="wunschzeitraum" id="wunsch19002100" value="19002100" [WUNSCH19002100] /> 19:00 - 21:00
|
<td><input type="text" v-model="form.weight"></td>
|
||||||
</td></tr>
|
</tr>
|
||||||
[VORRETOURENLABEL]<tr><td nowrap>Retourenlabel drucken:</td><td><input type="checkbox" value="1" id="retourenlabel" name="retourenlabel" [RETOURENLABEL] /></td></tr>[NACHRETOURENLABEL]
|
<tr>
|
||||||
[VORALTERSFREIGABE]<tr><td nowrap>Altersfreigabe notwendig:</td><td><input type="checkbox" name="altersfreigabe" value="1" [ALTERSFREIGABE]></td></tr>[NACHALTERSFREIGABE]
|
<td>{|Höhe (in cm)|}:</td>
|
||||||
</table>
|
<td><input type="text" size="10" v-model="form.height"></td>
|
||||||
<br><br>
|
</tr>
|
||||||
<center><input class="btnGreen" type="submit" value="Paketmarke drucken" name="drucken">
|
<tr>
|
||||||
|
<td>{|Breite (in cm)|}:</td>
|
||||||
[TRACKINGMANUELL]
|
<td><input type="text" size="10" v-model="form.width"></td>
|
||||||
<input type="button" value="{|Andere Versandart auswählen|}" onclick="window.location.href='index.php?module=versanderzeugen&action=wechsel&id=[ID]'" name="anders">
|
</tr>
|
||||||
<!--<input type="button" value="Abbrechen">--></center>
|
<tr>
|
||||||
</form>
|
<td>{|Länge (in cm)|}:</td>
|
||||||
</td></tr></table>
|
<td><input type="text" size="10" v-model="form.length"></td>
|
||||||
<br><br>
|
</tr>
|
||||||
|
<tr>
|
||||||
<script type="text/JavaScript" language="javascript">
|
<td>{|Produkt|}:</td>
|
||||||
$(document).ready(function() {
|
<td>
|
||||||
$( "#abholdatum" ).datepicker({ dateFormat: 'dd.mm.yy',dayNamesMin: ['SO', 'MO', 'DI', 'MI', 'DO', 'FR', 'SA'], firstDay:1,
|
<select v-model="form.method">
|
||||||
showWeek: true, monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai',
|
<option v-for="(value, key, index) in methods" :value="key">{{value}}</option>
|
||||||
'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], });
|
</select>
|
||||||
});
|
</td>
|
||||||
</script>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Nachnahme|}:</td>
|
||||||
|
<td><input type="checkbox" v-model="form.cashOnDelivery"> (Betrag: {{ form.codvalue }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Wunschtermin|}:</td>
|
||||||
|
<td><input type="date" v-model="form.preferredDay"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<h2>{|Bestellung|}</h2>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>{|Bestellnummer|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model="form.order_number"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Rechnungsnummer|}:</td>
|
||||||
|
<td><input type="text" size="36" v-model="form.invoice_number"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Sendungsart|}:</td>
|
||||||
|
<td>
|
||||||
|
<select v-model="form.sendungsart">
|
||||||
|
<option v-for="(value, key) in customs_shipment_types" :value="key">{{value}}</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{|Versicherungssumme|}:</td>
|
||||||
|
<td><input type="text" size="10" v-model="form.total_insured_value"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>{|Bezeichnung|}</th>
|
||||||
|
<th>{|Menge|}</th>
|
||||||
|
<th>{|HSCode|}</th>
|
||||||
|
<th>{|Herkunftsland|}</th>
|
||||||
|
<th>{|Einzelwert|}</th>
|
||||||
|
<th>{|Einzelgewicht|}</th>
|
||||||
|
<th>{|Währung|}</th>
|
||||||
|
<th>{|Gesamtwert|}</th>
|
||||||
|
<th>{|Gesamtgewicht|}</th>
|
||||||
|
<th><a v-on:click="addPosition"><img src="themes/new/images/add.png"></a></</th>
|
||||||
|
</tr>
|
||||||
|
<tr v-for="(pos, index) in form.positions">
|
||||||
|
<td><input type="text" v-model="pos.bezeichnung" required></td>
|
||||||
|
<td><input type="text" v-model="pos.menge" required></td>
|
||||||
|
<td><input type="text" v-model="pos.zolltarifnummer" required></td>
|
||||||
|
<td><input type="text" v-model="pos.herkunftsland" required></td>
|
||||||
|
<td><input type="text" v-model="pos.zolleinzelwert" required></td>
|
||||||
|
<td><input type="text" v-model="pos.zolleinzelgewicht" required></td>
|
||||||
|
<td><input type="text" v-model="pos.zollwaehrung" required></td>
|
||||||
|
<td>{{Number(pos.menge*pos.zolleinzelwert || 0).toFixed(2)}}</td>
|
||||||
|
<td>{{Number(pos.menge*pos.zolleinzelgewicht || 0).toFixed(3)}}</td>
|
||||||
|
<td><a v-on:click="deletePosition(index)"><img src="themes/new/images/delete.svg"></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="7"></td>
|
||||||
|
<td>{{total_value.toFixed(2)}}</td>
|
||||||
|
<td>{{total_weight.toFixed(3)}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input class="btnGreen" type="submit" value="{|Paketmarke drucken|}" name="drucken">
|
||||||
|
<input type="button" value="{|Andere Versandart auswählen|}" name="anders">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
const sendcloudApp = new Vue({
|
||||||
|
el: '#sendcloudapp',
|
||||||
|
data: {
|
||||||
|
form: [JSON],
|
||||||
|
countries: [JSON_COUNTRIES],
|
||||||
|
methods: [JSON_METHODS],
|
||||||
|
customs_shipment_types: [JSON_CUSTOMS_SHIPMENT_TYPES],
|
||||||
|
messages: []
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
total_value() {
|
||||||
|
let sum = 0;
|
||||||
|
for(const pos of this.form.positions) {
|
||||||
|
sum += pos.menge * pos.zolleinzelwert;
|
||||||
|
}
|
||||||
|
return sum;
|
||||||
|
},
|
||||||
|
total_weight() {
|
||||||
|
let sum = 0;
|
||||||
|
for(const pos of this.form.positions) {
|
||||||
|
sum += pos.menge * pos.zolleinzelgewicht;
|
||||||
|
}
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submit: function() {
|
||||||
|
let app = this;
|
||||||
|
let xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('POST', location.href, true);
|
||||||
|
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
xhr.onload = function () {
|
||||||
|
let json = JSON.parse(this.response);
|
||||||
|
app.messages = json.messages;
|
||||||
|
}
|
||||||
|
xhr.send(JSON.stringify($.extend({submit:'print'}, this.form)));
|
||||||
|
},
|
||||||
|
addPosition: function() {
|
||||||
|
this.form.positions.push({ });
|
||||||
|
},
|
||||||
|
deletePosition: function(index) {
|
||||||
|
this.form.positions.splice(index, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
@ -7,7 +7,9 @@
|
|||||||
use Xentral\Carrier\Dhl\Data\Communication;
|
use Xentral\Carrier\Dhl\Data\Communication;
|
||||||
use Xentral\Carrier\Dhl\Data\Country;
|
use Xentral\Carrier\Dhl\Data\Country;
|
||||||
use Xentral\Carrier\Dhl\Data\CreateShipmentOrderResponse;
|
use Xentral\Carrier\Dhl\Data\CreateShipmentOrderResponse;
|
||||||
use Xentral\Carrier\Dhl\Data\NativeAddress;
|
use Xentral\Carrier\Dhl\Data\PackStation;
|
||||||
|
use Xentral\Carrier\Dhl\Data\Postfiliale;
|
||||||
|
use Xentral\Carrier\Dhl\Data\ReceiverNativeAddress;
|
||||||
use Xentral\Carrier\Dhl\Data\Shipment;
|
use Xentral\Carrier\Dhl\Data\Shipment;
|
||||||
use Xentral\Carrier\Dhl\Data\ShipmentItem;
|
use Xentral\Carrier\Dhl\Data\ShipmentItem;
|
||||||
use Xentral\Carrier\Dhl\DhlApi;
|
use Xentral\Carrier\Dhl\DhlApi;
|
||||||
@ -77,7 +79,7 @@ class Versandart_dhl extends Versanddienstleister{
|
|||||||
{
|
{
|
||||||
$shipment = new Shipment();
|
$shipment = new Shipment();
|
||||||
$shipment->ShipmentDetails->product = $json->product;
|
$shipment->ShipmentDetails->product = $json->product;
|
||||||
$shipment->ShipmentDetails->accountNumber = '22222222220101';
|
$shipment->ShipmentDetails->accountNumber = $this->GetAccountNumber($json->product);
|
||||||
$shipment->ShipmentDetails->SetShipmentDate(new DateTimeImmutable('today'));
|
$shipment->ShipmentDetails->SetShipmentDate(new DateTimeImmutable('today'));
|
||||||
$shipment->ShipmentDetails->ShipmentItem = new ShipmentItem();
|
$shipment->ShipmentDetails->ShipmentItem = new ShipmentItem();
|
||||||
$shipment->ShipmentDetails->ShipmentItem->weightInKG = $json->weight ?? 0;
|
$shipment->ShipmentDetails->ShipmentItem->weightInKG = $json->weight ?? 0;
|
||||||
@ -95,12 +97,35 @@ class Versandart_dhl extends Versanddienstleister{
|
|||||||
$shipment->Shipper->Communication->email = $this->settings->sender_email;
|
$shipment->Shipper->Communication->email = $this->settings->sender_email;
|
||||||
$shipment->Shipper->Communication->contactPerson = $this->settings->sender_contact_person;
|
$shipment->Shipper->Communication->contactPerson = $this->settings->sender_contact_person;
|
||||||
$shipment->Receiver->name1 = $json->name;
|
$shipment->Receiver->name1 = $json->name;
|
||||||
$shipment->Receiver->Address = new NativeAddress();
|
switch ($json->addresstype) {
|
||||||
$shipment->Receiver->Address->streetName = $json->street ?? '';
|
case 0:
|
||||||
$shipment->Receiver->Address->streetNumber = $json->streetnumber ?? '';
|
$shipment->Receiver->Address = new ReceiverNativeAddress();
|
||||||
$shipment->Receiver->Address->city = $json->city ?? '';
|
$shipment->Receiver->Address->name2 = $json->name2;
|
||||||
$shipment->Receiver->Address->zip = $json->zip ?? '';
|
$shipment->Receiver->Address->streetName = $json->street ?? '';
|
||||||
$shipment->Receiver->Address->Origin = Country::Create($json->country ?? 'DE', $json->state);
|
$shipment->Receiver->Address->streetNumber = $json->streetnumber;
|
||||||
|
$shipment->Receiver->Address->city = $json->city ?? '';
|
||||||
|
$shipment->Receiver->Address->zip = $json->zip ?? '';
|
||||||
|
$shipment->Receiver->Address->Origin = Country::Create($json->country ?? 'DE', $json->state);
|
||||||
|
if (isset($json->address2) && !empty($json->address2))
|
||||||
|
$shipment->Receiver->Address->addressAddition[] = $json->address2;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$shipment->Receiver->Packstation = new PackStation();
|
||||||
|
$shipment->Receiver->Packstation->postNumber = $json->postnumber;
|
||||||
|
$shipment->Receiver->Packstation->packstationNumber = $json->parcelstationNumber;
|
||||||
|
$shipment->Receiver->Packstation->city = $json->city ?? '';
|
||||||
|
$shipment->Receiver->Packstation->zip = $json->zip ?? '';
|
||||||
|
$shipment->Receiver->Packstation->Origin = Country::Create($json->country ?? 'DE', $json->state);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$shipment->Receiver->Postfiliale = new Postfiliale();
|
||||||
|
$shipment->Receiver->Postfiliale->postNumber = $json->postnumber;
|
||||||
|
$shipment->Receiver->Postfiliale->postfilialeNumber = $json->postofficeNumber;
|
||||||
|
$shipment->Receiver->Postfiliale->city = $json->city ?? '';
|
||||||
|
$shipment->Receiver->Postfiliale->zip = $json->zip ?? '';
|
||||||
|
$shipment->Receiver->Postfiliale->Origin = Country::Create($json->country ?? 'DE', $json->state);
|
||||||
|
break;
|
||||||
|
}
|
||||||
$shipment->Receiver->Communication = new Communication();
|
$shipment->Receiver->Communication = new Communication();
|
||||||
$shipment->Receiver->Communication->email = $json->email;
|
$shipment->Receiver->Communication->email = $json->email;
|
||||||
$shipment->Receiver->Communication->phone = $json->phone;
|
$shipment->Receiver->Communication->phone = $json->phone;
|
||||||
@ -120,11 +145,13 @@ class Versandart_dhl extends Versanddienstleister{
|
|||||||
$ret->Label = base64_decode($result->CreationState->LabelData->labelData);
|
$ret->Label = base64_decode($result->CreationState->LabelData->labelData);
|
||||||
if (isset($result->CreationState->LabelData->exportLabelData))
|
if (isset($result->CreationState->LabelData->exportLabelData))
|
||||||
$ret->ExportDocuments = base64_decode($result->CreationState->LabelData->exportLabelData);
|
$ret->ExportDocuments = base64_decode($result->CreationState->LabelData->exportLabelData);
|
||||||
} else {
|
} else if (isset($result->CreationState)) {
|
||||||
if (is_array($result->CreationState->LabelData->Status->statusMessage))
|
if (is_array($result->CreationState->LabelData->Status->statusMessage))
|
||||||
$ret->Errors = $result->CreationState->LabelData->Status->statusMessage;
|
$ret->Errors = $result->CreationState->LabelData->Status->statusMessage;
|
||||||
else
|
else
|
||||||
$ret->Errors[] = $result->CreationState->LabelData->Status->statusMessage;
|
$ret->Errors[] = $result->CreationState->LabelData->Status->statusMessage;
|
||||||
|
} else {
|
||||||
|
$ret->Errors[] = $result->Status->statusText;
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
@ -132,38 +159,62 @@ class Versandart_dhl extends Versanddienstleister{
|
|||||||
public function GetShippingProducts(): array
|
public function GetShippingProducts(): array
|
||||||
{
|
{
|
||||||
$result = [];
|
$result = [];
|
||||||
$result[] = Product::Create('V01PAK', 'DHL Paket')
|
if ($this->settings->accountnumber) {
|
||||||
->WithLength(15, 120)
|
$result[] = Product::Create('V01PAK', 'DHL Paket')
|
||||||
->WithWidth(11, 60)
|
->WithLength(15, 120)
|
||||||
->WithHeight(1, 60)
|
->WithWidth(11, 60)
|
||||||
->WithWeight(0.01, 31.5);
|
->WithHeight(1, 60)
|
||||||
$result[] = Product::Create('V53WPAK', 'DHL Paket International')
|
->WithWeight(0.01, 31.5);
|
||||||
->WithLength(15, 120)
|
}
|
||||||
->WithWidth(11, 60)
|
if ($this->settings->accountnumber_int) {
|
||||||
->WithHeight(1, 60)
|
$result[] = Product::Create('V53WPAK', 'DHL Paket International')
|
||||||
->WithWeight(0.01, 31.5)
|
->WithLength(15, 120)
|
||||||
->WithServices([Product::SERVICE_PREMIUM]);
|
->WithWidth(11, 60)
|
||||||
$result[] = Product::Create('V54EPAK', 'DHL Europaket')
|
->WithHeight(1, 60)
|
||||||
->WithLength(15, 120)
|
->WithWeight(0.01, 31.5)
|
||||||
->WithWidth(11, 60)
|
->WithServices([Product::SERVICE_PREMIUM]);
|
||||||
->WithHeight(3.5, 60)
|
}
|
||||||
->WithWeight(0.01, 31.5);
|
if ($this->settings->accountnumber_euro) {
|
||||||
$result[] = Product::Create('V55PAK', 'DHL Paket Connect')
|
$result[] = Product::Create('V54EPAK', 'DHL Europaket')
|
||||||
->WithLength(15, 120)
|
->WithLength(15, 120)
|
||||||
->WithWidth(11, 60)
|
->WithWidth(11, 60)
|
||||||
->WithHeight(3.5, 60)
|
->WithHeight(3.5, 60)
|
||||||
->WithWeight(0.01, 31.5);
|
->WithWeight(0.01, 31.5);
|
||||||
$result[] = Product::Create('V62WP', 'DHL Warenpost')
|
}
|
||||||
->WithLength(10, 35)
|
if ($this->settings->accountnumber_connect) {
|
||||||
->WithWidth(7, 25)
|
$result[] = Product::Create('V55PAK', 'DHL Paket Connect')
|
||||||
->WithHeight(0.1, 5)
|
->WithLength(15, 120)
|
||||||
->WithWeight(0.01, 1);
|
->WithWidth(11, 60)
|
||||||
$result[] = Product::Create('V66WPI', 'DHL Warenpost International')
|
->WithHeight(3.5, 60)
|
||||||
->WithLength(10, 35)
|
->WithWeight(0.01, 31.5);
|
||||||
->WithWidth(7, 25)
|
}
|
||||||
->WithHeight(0.1, 10)
|
if ($this->settings->accountnumber_wp) {
|
||||||
->WithWeight(0.01, 1)
|
$result[] = Product::Create('V62WP', 'DHL Warenpost')
|
||||||
->WithServices([Product::SERVICE_PREMIUM]);
|
->WithLength(10, 35)
|
||||||
|
->WithWidth(7, 25)
|
||||||
|
->WithHeight(0.1, 5)
|
||||||
|
->WithWeight(0.01, 1);
|
||||||
|
}
|
||||||
|
if ($this->settings->accountnumber_wpint) {
|
||||||
|
$result[] = Product::Create('V66WPI', 'DHL Warenpost International')
|
||||||
|
->WithLength(10, 35)
|
||||||
|
->WithWidth(7, 25)
|
||||||
|
->WithHeight(0.1, 10)
|
||||||
|
->WithWeight(0.01, 1)
|
||||||
|
->WithServices([Product::SERVICE_PREMIUM]);
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function GetAccountNumber(string $product):?string {
|
||||||
|
switch ($product) {
|
||||||
|
case 'V01PAK': return $this->settings->accountnumber;
|
||||||
|
case 'V53WPAK': return $this->settings->accountnumber_int;
|
||||||
|
case 'V54EPAK': return $this->settings->accountnumber_euro;
|
||||||
|
case 'V55PAK': return $this->settings->accountnumber_connect;
|
||||||
|
case 'V62WP': return $this->settings->accountnumber_wp;
|
||||||
|
case 'V66WPI': return $this->settings->accountnumber_wpint;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,13 +75,27 @@ class Versandart_sendcloud extends Versanddienstleister
|
|||||||
$parcel->SenderAddressId = $this->settings->sender_address;
|
$parcel->SenderAddressId = $this->settings->sender_address;
|
||||||
$parcel->ShippingMethodId = $json->product;
|
$parcel->ShippingMethodId = $json->product;
|
||||||
$parcel->Name = $json->name;
|
$parcel->Name = $json->name;
|
||||||
$parcel->CompanyName = $json->companyname;
|
switch ($json->addresstype) {
|
||||||
|
case 0:
|
||||||
|
$parcel->CompanyName = trim("$json->name2 $json->name3");
|
||||||
|
$parcel->Address = $json->street;
|
||||||
|
$parcel->Address2 = $json->address2;
|
||||||
|
$parcel->HouseNumber = $json->streetnumber;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$parcel->CompanyName = $json->postnumber;
|
||||||
|
$parcel->Address = "Packstation";
|
||||||
|
$parcel->HouseNumber = $json->parcelstationNumber;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$parcel->CompanyName = $json->postnumber;
|
||||||
|
$parcel->Address = "Postfiliale";
|
||||||
|
$parcel->HouseNumber = $json->postofficeNumber;
|
||||||
|
break;
|
||||||
|
}
|
||||||
$parcel->Country = $json->country;
|
$parcel->Country = $json->country;
|
||||||
$parcel->PostalCode = $json->zip;
|
$parcel->PostalCode = $json->zip;
|
||||||
$parcel->City = $json->city;
|
$parcel->City = $json->city;
|
||||||
$parcel->Address = $json->street;
|
|
||||||
$parcel->Address2 = $json->address2;
|
|
||||||
$parcel->HouseNumber = $json->streetnumber;
|
|
||||||
$parcel->EMail = $json->email;
|
$parcel->EMail = $json->email;
|
||||||
$parcel->Telephone = $json->phone;
|
$parcel->Telephone = $json->phone;
|
||||||
$parcel->CountryState = $json->state;
|
$parcel->CountryState = $json->state;
|
||||||
|
Loading…
Reference in New Issue
Block a user