Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/extmag/dhlshipping2/Model/Source/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/extmag/dhlshipping2/Model/Source/DataSet.php
<?php
/**
 * Copyright © Extmag. All rights reserved.
 */

namespace Extmag\DhlShipping\Model\Source;

class DataSet
{
    /**
     * Get configuration data
     *
     * @param string $type
     * @param string $code
     *
     * @return array|false
     */
    public function getCode($type, $code = '')
    {
        $codes = [
            'packaging_code'              => [
                "YP" => "Your packaging",
                "BD" => "Jumbo Document",
                "BP" => "Jumbo Parcel",
                "CP" => "Customer-provided",
                "DC" => "Document",
                "DF" => "DHL Flyer",
                "DM" => "Domestic",
                "ED" => "Express Document",
                "EE" => "DHL Express Envelope",
                "FR" => "Freight",
                "JB" => "Jumbo box",
                "JD" => "Jumbo Junior Document",
                "JJ" => "Junior jumbo Box",
                "JP" => "Jumbo Junior Parcel",
                "OD" => "Other DHL Packaging",
                "PA" => "Parcel",
            ],
            'delivery_confirmation'       => [
                ""   => __("Please select"),
                "SX" => __("No Signature Required"),
                "SA" => __("Delivery Signature"),
                "SF" => __("Direct Signature"),
                "SD" => __("Adult Signature"),
                "SW" => __("Alternative Signature"),
                "SB" => __("Content Signature"),
                "SC" => __("Named Signature"),
                "SE" => __("Contract Signature"),
            ],
            'print_type'                  => [
                "PDF"  => "PDF",
                "ZPL2" => "ZPL2",
                "EPL2" => "EPL2",
            ],
            'print_label_size'            => [
                "8X4_A4_PDF"     => "8X4 A4 PDF",
                "8X4_thermal"    => "8X4 thermal",
                "8X4_A4_TC_PDF"  => "8X4 A4 TC PDF",
                "8X4_CI_PDF"     => "8X4 CI PDF",
                "8X4_CI_thermal" => "8X4 CI thermal",
                "6X4_A4_PDF"     => "6X4 A4 PDF",
                "6X4_thermal"    => "6X4 thermal",
                "6X4_PDF"        => "6X4 PDF",
                "8X4_PDF"        => "8X4 PDF",
            ],
            'terms_of_trade'              => [
                "CFR" => __("Cost and Freight"),
                "CIF" => __("Cost, Insurance and Freight"),
                "CIP" => __("Carriage and Insurance Paid To"),
                "CPT" => __("Carriage Paid To"),
                "DAF" => __("Delivered at Frontier"),
                "DAP" => __("Delivered At Place"),
                "DAT" => __("Delivered At Terminal"),
                "DDP" => __("Delivered Duty Paid"),
                "DDU" => __("Delivered Duty Unpaid"),
                "DEQ" => __("Delivered Ex Quay"),
                "DES" => __("DES"),
                "DVU" => __("DVU"),
                "EXW" => __("Ex Works"),
                "FAS" => __("Free Alongside Ship"),
                "FCA" => __("Free Carrier"),
                "FOB" => __("Free On Board"),
            ],
            'invoice_type'                => [
                "CMI" => __("Commercial Invoice"),
                "PFI" => __("Proforma Invoice"),
            ],
            'product_unit_of_measurement' => [
                "UOM" => __("Description"),
                "BOX" => __("Boxes"),
                "2GM" => __("Centigram"),
                "2M"  => __("Centimeters"),
                "2M3" => __("Cubic Centimeters"),
                "3M3" => __("Cubic Feet"),
                "M3"  => __("Cubic Meters"),
                "DPR" => __("Dozen Pairs"),
                "DOZ" => __("Dozen"),
                "2NO" => __("Each"),
                "PCS" => __("Pieces"),
                "GM"  => __("Grams"),
                "GRS" => __("Gross"),
                "KG"  => __("Kilograms"),
                "L"   => __("Liters"),
                "M"   => __("Meters"),
                "3GM" => __("Milligrams"),
                "3L"  => __("Milliliters"),
                "X"   => __("No Unit Required"),
                "NO"  => __("Number"),
                "2KG" => __("Ounces"),
                "PRS" => __("Pairs"),
                "2L"  => __("Gallons"),
                "3KG" => __("Pounds"),
                "CM2" => __("Square Centimeters"),
                "2M2" => __("Square Feet"),
                "3M2" => __("Square Inches"),
                "M2"  => __("Square Meters"),
                "4M2" => __("Square Yards"),
                "3M"  => __("Yards"),
            ],
            'service_code'                => [
                'Doc'     => [
                    '1' => __('DOMESTIC EXPRESS 12:00'),
                    '2' => __('B2C'),
                    '5' => __('SPRINTLINE'),
                    '7' => __('EXPRESS EASY'),
                    '9' => __('EUROPACK'),
                    'B' => __('BREAKBULK EXPRESS'),
                    'C' => __('MEDICAL EXPRESS'),
                    'D' => __('EXPRESS WORLDWIDE'),
                    'G' => __('DOMESTIC ECONOMY SELECT'),
                    'I' => __('DOMESTIC EXPRESS 9:00'),
                    'K' => __('EXPRESS 9:00'),
                    'L' => __('EXPRESS 10:30'),
                    'N' => __('DOMESTIC EXPRESS'),
                    'O' => __('DOMESTIC EXPRESS 10:30'),
                    'R' => __('GLOBALMAIL BUSINESS'),
                    'S' => __('SAME DAY'),
                    'T' => __('EXPRESS 12:00'),
                    'U' => __('EXPRESS WORLDWIDE'),
                    'W' => __('ECONOMY SELECT'),
                    'X' => __('EXPRESS ENVELOPE'),
                ],
                'Non-Doc' => [
                    '3' => __('B2C'),
                    '4' => __('JETLINE'),
                    '8' => __('EXPRESS EASY'),
                    'E' => __('EXPRESS 9:00'),
                    'F' => __('FREIGHT WORLDWIDE'),
                    'H' => __('ECONOMY SELECT'),
                    'J' => __('JUMBO BOX'),
                    'M' => __('EXPRESS 10:30'),
                    'P' => __('EXPRESS WORLDWIDE'),
                    'Q' => __('MEDICAL EXPRESS'),
                    'V' => __('EUROPACK'),
                    'Y' => __('EXPRESS 12:00'),
                ],
            ],
        ];

        if (!isset($codes[$type])) {
            return false;
        } elseif ('' === $code) {
            return $codes[$type];
        }

        if (!isset($codes[$type][$code])) {
            return false;
        } else {
            return $codes[$type][$code];
        }
    }
}

Spamworldpro Mini