Plugin Directory

Changeset 3177316


Ignore:
Timestamp:
10/28/2024 03:38:30 PM (17 months ago)
Author:
channelengine
Message:

Release version 3.8.14

Location:
channelengine-integration
Files:
585 added
20 edited

Legend:

Unmodified
Added
Removed
  • channelengine-integration/trunk/changelog.txt

    r3174185 r3177316  
    11*** ChannelEngine WooCommerce Integration ***
     2
     3= 2024-10-28 - version 3.8.14 =
     4* Added: Add option to synchronize orders with prices that exclude VAT
     5* Added: Add option to enable recalculation of taxes using WooCommerce settings during order synchronization
    26
    37= 2024-10-23 - version 3.8.13 =
  • channelengine-integration/trunk/channelengine-wc.php

    r3174185 r3177316  
    44Plugin URI: https://wordpress.org/plugins/channelengine-integration/
    55Description: ChannelEngine plugin for WooCommerce
    6 Version: 3.8.13
     6Version: 3.8.14
    77Text Domain: channelengine-integration
    88Domain Path: /i18n/languages
  • channelengine-integration/trunk/composer.lock

    r3174185 r3177316  
    1313                "type": "git",
    1414                "url": "git@github.com:channelengine/logeecom-core.git",
    15                 "reference": "88799f4d2647738abcf89185e51771e44c156f4f"
    16             },
    17             "dist": {
    18                 "type": "zip",
    19                 "url": "https://api.github.com/repos/channelengine/logeecom-core/zipball/88799f4d2647738abcf89185e51771e44c156f4f",
    20                 "reference": "88799f4d2647738abcf89185e51771e44c156f4f",
     15                "reference": "e24d15d979f5bf86d39bf27b73136c35faf384a1"
     16            },
     17            "dist": {
     18                "type": "zip",
     19                "url": "https://api.github.com/repos/channelengine/logeecom-core/zipball/e24d15d979f5bf86d39bf27b73136c35faf384a1",
     20                "reference": "e24d15d979f5bf86d39bf27b73136c35faf384a1",
    2121                "shasum": ""
    2222            },
     
    4545            ],
    4646            "description": "ChannelEngine integrations core library",
    47             "time": "2024-07-22T13:32:48+00:00"
     47            "time": "2024-10-28T13:19:14+00:00"
    4848        }
    4949    ],
     
    5151        {
    5252            "name": "doctrine/deprecations",
    53             "version": "1.1.2",
     53            "version": "1.1.3",
    5454            "source": {
    5555                "type": "git",
    5656                "url": "https://github.com/doctrine/deprecations.git",
    57                 "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931"
    58             },
    59             "dist": {
    60                 "type": "zip",
    61                 "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
    62                 "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
     57                "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab"
     58            },
     59            "dist": {
     60                "type": "zip",
     61                "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab",
     62                "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab",
    6363                "shasum": ""
    6464            },
     
    9292            "support": {
    9393                "issues": "https://github.com/doctrine/deprecations/issues",
    94                 "source": "https://github.com/doctrine/deprecations/tree/1.1.2"
    95             },
    96             "time": "2023-09-27T20:04:15+00:00"
     94                "source": "https://github.com/doctrine/deprecations/tree/1.1.3"
     95            },
     96            "time": "2024-01-30T19:34:25+00:00"
    9797        },
    9898        {
     
    168168        {
    169169            "name": "myclabs/deep-copy",
    170             "version": "1.11.1",
     170            "version": "1.12.0",
    171171            "source": {
    172172                "type": "git",
    173173                "url": "https://github.com/myclabs/DeepCopy.git",
    174                 "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
    175             },
    176             "dist": {
    177                 "type": "zip",
    178                 "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
    179                 "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
     174                "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c"
     175            },
     176            "dist": {
     177                "type": "zip",
     178                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
     179                "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
    180180                "shasum": ""
    181181            },
     
    185185            "conflict": {
    186186                "doctrine/collections": "<1.6.8",
    187                 "doctrine/common": "<2.13.3 || >=3,<3.2.2"
     187                "doctrine/common": "<2.13.3 || >=3 <3.2.2"
    188188            },
    189189            "require-dev": {
    190190                "doctrine/collections": "^1.6.8",
    191191                "doctrine/common": "^2.13.3 || ^3.2.2",
     192                "phpspec/prophecy": "^1.10",
    192193                "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
    193194            },
     
    215216            "support": {
    216217                "issues": "https://github.com/myclabs/DeepCopy/issues",
    217                 "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
     218                "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0"
    218219            },
    219220            "funding": [
     
    223224                }
    224225            ],
    225             "time": "2023-03-08T13:26:56+00:00"
     226            "time": "2024-06-12T14:39:25+00:00"
    226227        },
    227228        {
     
    280281        {
    281282            "name": "phpdocumentor/reflection-docblock",
    282             "version": "5.3.0",
     283            "version": "5.4.1",
    283284            "source": {
    284285                "type": "git",
    285286                "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
    286                 "reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
    287             },
    288             "dist": {
    289                 "type": "zip",
    290                 "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
    291                 "reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
    292                 "shasum": ""
    293             },
    294             "require": {
     287                "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c"
     288            },
     289            "dist": {
     290                "type": "zip",
     291                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c",
     292                "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c",
     293                "shasum": ""
     294            },
     295            "require": {
     296                "doctrine/deprecations": "^1.1",
    295297                "ext-filter": "*",
    296                 "php": "^7.2 || ^8.0",
     298                "php": "^7.4 || ^8.0",
    297299                "phpdocumentor/reflection-common": "^2.2",
    298                 "phpdocumentor/type-resolver": "^1.3",
     300                "phpdocumentor/type-resolver": "^1.7",
     301                "phpstan/phpdoc-parser": "^1.7",
    299302                "webmozart/assert": "^1.9.1"
    300303            },
    301304            "require-dev": {
    302                 "mockery/mockery": "~1.3.2",
    303                 "psalm/phar": "^4.8"
     305                "mockery/mockery": "~1.3.5",
     306                "phpstan/extension-installer": "^1.1",
     307                "phpstan/phpstan": "^1.8",
     308                "phpstan/phpstan-mockery": "^1.1",
     309                "phpstan/phpstan-webmozart-assert": "^1.2",
     310                "phpunit/phpunit": "^9.5",
     311                "vimeo/psalm": "^5.13"
    304312            },
    305313            "type": "library",
     
    325333                {
    326334                    "name": "Jaap van Otterdijk",
    327                     "email": "account@ijaap.nl"
     335                    "email": "opensource@ijaap.nl"
    328336                }
    329337            ],
     
    331339            "support": {
    332340                "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
    333                 "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
    334             },
    335             "time": "2021-10-19T17:43:47+00:00"
     341                "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1"
     342            },
     343            "time": "2024-05-21T05:55:05+00:00"
    336344        },
    337345        {
    338346            "name": "phpdocumentor/type-resolver",
    339             "version": "1.7.3",
     347            "version": "1.8.2",
    340348            "source": {
    341349                "type": "git",
    342350                "url": "https://github.com/phpDocumentor/TypeResolver.git",
    343                 "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419"
    344             },
    345             "dist": {
    346                 "type": "zip",
    347                 "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419",
    348                 "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419",
     351                "reference": "153ae662783729388a584b4361f2545e4d841e3c"
     352            },
     353            "dist": {
     354                "type": "zip",
     355                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c",
     356                "reference": "153ae662783729388a584b4361f2545e4d841e3c",
    349357                "shasum": ""
    350358            },
    351359            "require": {
    352360                "doctrine/deprecations": "^1.0",
    353                 "php": "^7.4 || ^8.0",
     361                "php": "^7.3 || ^8.0",
    354362                "phpdocumentor/reflection-common": "^2.0",
    355363                "phpstan/phpdoc-parser": "^1.13"
     
    389397            "support": {
    390398                "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
    391                 "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3"
    392             },
    393             "time": "2023-08-12T11:01:26+00:00"
     399                "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2"
     400            },
     401            "time": "2024-02-23T11:10:43+00:00"
    394402        },
    395403        {
     
    462470        {
    463471            "name": "phpstan/phpdoc-parser",
    464             "version": "1.24.2",
     472            "version": "1.33.0",
    465473            "source": {
    466474                "type": "git",
    467475                "url": "https://github.com/phpstan/phpdoc-parser.git",
    468                 "reference": "bcad8d995980440892759db0c32acae7c8e79442"
    469             },
    470             "dist": {
    471                 "type": "zip",
    472                 "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442",
    473                 "reference": "bcad8d995980440892759db0c32acae7c8e79442",
     476                "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140"
     477            },
     478            "dist": {
     479                "type": "zip",
     480                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140",
     481                "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140",
    474482                "shasum": ""
    475483            },
     
    503511            "support": {
    504512                "issues": "https://github.com/phpstan/phpdoc-parser/issues",
    505                 "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2"
    506             },
    507             "time": "2023-09-26T12:28:12+00:00"
     513                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0"
     514            },
     515            "time": "2024-10-13T11:25:22+00:00"
    508516        },
    509517        {
     
    932940        {
    933941            "name": "sebastian/code-unit-reverse-lookup",
    934             "version": "1.0.2",
     942            "version": "1.0.3",
    935943            "source": {
    936944                "type": "git",
    937945                "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
    938                 "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619"
    939             },
    940             "dist": {
    941                 "type": "zip",
    942                 "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619",
    943                 "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619",
     946                "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54"
     947            },
     948            "dist": {
     949                "type": "zip",
     950                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54",
     951                "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54",
    944952                "shasum": ""
    945953            },
     
    975983            "support": {
    976984                "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
    977                 "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2"
     985                "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.3"
    978986            },
    979987            "funding": [
     
    983991                }
    984992            ],
    985             "time": "2020-11-30T08:15:22+00:00"
     993            "time": "2024-03-01T13:45:45+00:00"
    986994        },
    987995        {
     
    14911499        {
    14921500            "name": "symfony/polyfill-ctype",
    1493             "version": "v1.28.0",
     1501            "version": "v1.31.0",
    14941502            "source": {
    14951503                "type": "git",
    14961504                "url": "https://github.com/symfony/polyfill-ctype.git",
    1497                 "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
    1498             },
    1499             "dist": {
    1500                 "type": "zip",
    1501                 "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
    1502                 "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
    1503                 "shasum": ""
    1504             },
    1505             "require": {
    1506                 "php": ">=7.1"
     1505                "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
     1506            },
     1507            "dist": {
     1508                "type": "zip",
     1509                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
     1510                "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
     1511                "shasum": ""
     1512            },
     1513            "require": {
     1514                "php": ">=7.2"
    15071515            },
    15081516            "provide": {
     
    15141522            "type": "library",
    15151523            "extra": {
    1516                 "branch-alias": {
    1517                     "dev-main": "1.28-dev"
    1518                 },
    15191524                "thanks": {
    15201525                    "name": "symfony/polyfill",
     
    15531558            ],
    15541559            "support": {
    1555                 "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
     1560                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
    15561561            },
    15571562            "funding": [
     
    15691574                }
    15701575            ],
    1571             "time": "2023-01-26T09:26:14+00:00"
     1576            "time": "2024-09-09T11:45:10+00:00"
    15721577        },
    15731578        {
  • channelengine-integration/trunk/includes/Components/Services/class-order-config-service.php

    r3174185 r3177316  
    3939            $sync_config['enableOrderCancellationSync'],
    4040            $sync_config['enableOrdersByMerchantSync'],
    41             $sync_config['enableOrdersByMarketplaceSync']
    42         );
     41            $sync_config['enableOrdersByMarketplaceSync'],
     42            $sync_config['enableVatExcludedPrices'],
     43            $sync_config['enableWCTaxCalculation']
     44        );
    4345    }
    4446}
  • channelengine-integration/trunk/includes/Components/Services/class-orders-service.php

    r3174185 r3177316  
    1717use WC_Order_Item_Tax;
    1818use WC_Product;
     19use WC_Tax;
    1920use WP_Error;
    2021
     
    2425 * @package ChannelEngine\Components\Services
    2526 */
    26 class Orders_Service extends OrdersService {
    27 
    28     /**
    29      * @const string
    30      */
    31     const MARKETPLACE_TYPE_OF_FULFILLMENT = 'Marketplace';
    32 
    33     /**
    34      * Creation of order with taxes requires integer value for the tax rate id. We do not want to introduce new custom tax rate,
    35      * but we do want to create order with taxes, therefore we use max integer value as a custom fake rate id.
    36      */
    37     const CUSTOM_TAX_RATE_ID = PHP_INT_MAX;
    38 
    39     /**
    40      * @var Order_Config_Service
    41      */
    42     protected $order_config_service;
    43     /**
    44      * @var ProductsSyncConfigService
    45      */
    46     protected $product_sync_config_service;
    47 
    48     /**
    49      * Creates new orders in the shop system and
    50      * returns CreateResponse.
    51      *
    52      * @param Order $order
    53      *
    54      * @return CreateResponse
    55      */
    56     public function create( Order $order ) {
    57         try {
    58             if ( $this->orderFromChannelEngineAlreadyExists( $order ) ) {
    59                 return $this->create_response( false, '', 'Order already created' );
    60             }
    61 
    62             $wc_products = $this->fetch_products( $order );
    63             $order_data  = $this->format_order_data( $order );
    64             $wc_order    = wc_create_order( $order_data );
    65 
    66             if ( $wc_order instanceof WP_Error ) {
    67                 return $this->create_response( false, '', 'Failed to create a new order.' );
    68             }
    69 
    70             $wc_order->set_date_created( $order->getOrderDate()->format( DATE_ATOM ) );
    71             $wc_order->set_total( $order->getTotalInclVat() );
    72             $wc_order->set_shipping_total( $order->getShippingCostsInclVat() );
    73             $wc_order->set_shipping_address( $this->format_address_data( $order->getShippingAddress(), $order->getEmail(), $order->getPhone() ) );
    74             $wc_order->set_billing_address( $this->format_address_data( $order->getBillingAddress(), $order->getEmail(), $order->getPhone() ) );
    75 
    76             $this->add_items( $wc_products, $wc_order );
    77             $wc_order->add_item( $this->get_shipping_item( $order ) );
    78             if ( wc_tax_enabled() ) {
    79                 $wc_order->set_shipping_total( $order->getShippingCostsInclVat() - $order->getShippingCostsVat() );
    80                 $wc_order->set_shipping_tax( $order->getShippingCostsVat() );
    81                 $wc_order->set_cart_tax( $order->getTotalVat() - $order->getShippingCostsVat() );
    82                 $wc_order->add_item( $this->get_tax_subtotal_item( $order ) );
    83             }
    84 
    85             $wc_order->add_meta_data( '_channel_engine_order_id', $order->getId() );
    86             $wc_order->add_meta_data( '_channel_engine_channel_name', $order->getChannelName() );
    87             $wc_order->add_meta_data( '_channel_engine_channel_order_no', $order->getChannelOrderNo() );
    88             $wc_order->add_meta_data( '_channel_engine_type_of_fulfillment', $order->getTypeOfFulfillment() );
    89             $wc_order->add_meta_data( '_channel_engine_payment_method', $order->getPaymentMethod() );
    90 
    91             if ( $order->getTypeOfFulfillment() === self::MARKETPLACE_TYPE_OF_FULFILLMENT ) {
    92                 $wc_order->add_meta_data( '_ce_order_shipped', true );
    93             }
    94 
    95             $wc_order->save();
    96             if ( $this->get_product_sync_config_service()->get()->isEnabledStockSync()
    97                  && $this->get_order_config_service()->getOrderSyncConfig()->isEnableReduceStock() ) {
    98                 wc_reduce_stock_levels( $wc_order->get_id() );
    99             }
    100         } catch ( BaseException $e ) {
    101             return $this->create_response( false, '', $e->getMessage() );
    102         } catch ( WC_Data_Exception $e ) {
    103             return $this->create_response( false, '', 'Failed to sync order because: ' . $e->getMessage() );
    104         }
    105 
    106         return $this->create_response( true, $wc_order->get_id(), 'Successfully created order.' );
    107     }
    108 
    109     /**
    110      * Formats order data for WooCommerce order creation.
    111      *
    112      * @param Order $order
    113      *
    114      * @return array
    115      */
    116     protected function format_order_data( Order $order ) {
    117         $config = $this->get_order_config_service()->getOrderSyncConfig();
    118 
    119         switch ( $order->getStatus() ) {
    120             case 'NEW':
    121                 $status = $config ? $config->getIncomingOrders() : $order->getStatus();
    122                 break;
    123             case 'CLOSED':
    124             case 'SHIPPED':
    125                 $status = $config ? $config->getFulfilledOrders() : $order->getStatus();
    126                 break;
    127             default:
    128                 $status = $order->getStatus();
    129         }
    130 
    131         return array(
    132             'status'      => $status,
    133             'customer_id' => null,
    134         );
    135     }
    136 
    137     /**
    138      * Formats order address data.
    139      *
    140      * @param Address $address
    141      * @param string $email
    142      * @param string $phone
    143      *
    144      * @return array
    145      */
    146     protected function format_address_data( Address $address, $email, $phone ) {
    147         return array(
    148             'first_name' => $address->getFirstName(),
    149             'last_name'  => $address->getLastName(),
    150             'company'    => $address->getCompanyName(),
    151             'address_1'  => $address->getStreetName() . ' ' .
    152                             $address->getHouseNumber() . ' ' . $address->getHouseNumberAddition(),
    153             'address_2'  => '',
    154             'city'       => $address->getCity(),
    155             'postcode'   => $address->getZipCode(),
    156             'country'    => strtoupper( $address->getCountryIso() ),
    157             'state'      => $address->getRegion(),
    158             'email'      => $email,
    159             'phone'      => $phone,
    160         );
    161     }
    162 
    163     /**
    164      * Fetches products for given order.
    165      *
    166      * @param Order $order
    167      *
    168      * @return array
    169      *
    170      * @throws ProductNotAvailableException
    171      */
    172     protected function fetch_products( Order $order ) {
    173         $result = array();
    174 
    175         $product_ids_batch = $this->get_product_ids( $order );
    176         $products          = wc_get_products( array( 'include' => $product_ids_batch ) );
    177         $variations        = wc_get_products(
    178             array(
    179                 'type'    => 'variation',
    180                 'include' => $product_ids_batch,
    181             )
    182         );
    183         $products          = array_merge( $products, $variations );
    184 
    185         foreach ( $order->getLines() as $order_line ) {
    186             $product = $this->get_product( $products, (int) $order_line->getMerchantProductNo() );
    187 
    188             $product_data = array(
    189                 'name'         => $product->get_name(),
    190                 'sku'          => $product->get_sku(),
    191                 'variation_id' => $product->is_type( 'variation' ) ? $order_line->getMerchantProductNo() : 0,
    192                 'subtotal'     => $order_line->getUnitPriceInclVat(),
    193                 'quantity'     => $order_line->getQuantity(),
    194                 'total'        => $order_line->getLineTotalInclVat(),
    195                 'total_tax'    => 0,
    196                 'subtotal_tax' => 0,
    197                 'taxes'        => array(
    198                     'total'    => array(),
    199                     'subtotal' => array(),
    200                 ),
    201             );
    202 
    203             if ( wc_tax_enabled() ) {
    204                 $product_data['subtotal']     -= $order_line->getUnitVat();
    205                 $product_data['total']        -= $order_line->getLineVat();
    206                 $product_data['total_tax']    = $order_line->getLineVat();
    207                 $product_data['subtotal_tax'] = $order_line->getLineVat();
    208                 $product_data['taxes']        = array(
    209                     'total'    => array( self::CUSTOM_TAX_RATE_ID => $order_line->getLineVat() ),
    210                     'subtotal' => array( self::CUSTOM_TAX_RATE_ID => $order_line->getLineVat() ),
    211                 );
    212             }
    213 
    214             $result[] = array(
    215                 'product'      => $product,
    216                 'product_data' => $product_data,
    217             );
    218         }
    219 
    220         return $result;
    221     }
    222 
    223     /**
    224      * Retrieves product.
    225      *
    226      * @param WC_Product[] $products
    227      * @param $id
    228      *
    229      * @return WC_Product
    230      *
    231      * @throws ProductNotAvailableException
    232      */
    233     protected function get_product( $products, $id ) {
    234         foreach ( $products as $product ) {
    235             if ( $product->get_id() === $id ) {
    236                 return $product;
    237             }
    238         }
    239 
    240         throw new ProductNotAvailableException( esc_html("Product with id $id does not exist." ) );
    241     }
    242 
    243     /**
    244      * Retrieves product ids.
    245      *
    246      * @param Order $order
    247      *
    248      * @return array
    249      */
    250     protected function get_product_ids( Order $order ) {
    251         $result = array();
    252 
    253         foreach ( $order->getLines() as $order_line ) {
    254             $result[] = $order_line->getMerchantProductNo();
    255         }
    256 
    257         return $result;
    258     }
    259 
    260     /**
    261      * Adds product items to order.
    262      *
    263      * @param array $wc_products
    264      * @param WC_Order $wc_order
    265      *
    266      * @throws WC_Data_Exception
    267      */
    268     protected function add_items( array $wc_products, WC_Order $wc_order ) {
    269         foreach ( $wc_products as $wc_product ) {
    270             $wc_order->add_product(
    271                 $wc_product['product'],
    272                 $wc_product['product_data']['quantity'],
    273                 $wc_product['product_data']
    274             );
    275         }
    276     }
    277 
    278     /**
    279      * Gets order shipping item.
    280      *
    281      * @throws WC_Data_Exception
    282      */
    283     protected function get_shipping_item( Order $order ) {
    284         $shipping_item = new WC_Order_Item_Shipping();
    285         $shipping_item->set_name( 'Shipping' );
    286         $shipping_item->set_total( $order->getShippingCostsInclVat() );
    287 
    288         if ( wc_tax_enabled() ) {
    289             $shipping_item->set_total( $order->getShippingCostsInclVat() - $order->getShippingCostsVat() );
    290             $shipping_item->set_taxes( array( 'total' => array( self::CUSTOM_TAX_RATE_ID => $order->getShippingCostsVat() ) ) );
    291         }
    292 
    293         return $shipping_item;
    294     }
    295 
    296     /**
    297      * Gets order tax subtotal item.
    298      *
    299      * @param Order $order
    300      *
    301      * @return WC_Order_Item_Tax
    302      */
    303     protected function get_tax_subtotal_item( Order $order ) {
    304         $tax_subtotal = new WC_Order_Item_Tax();
    305         $tax_subtotal->set_rate_id( self::CUSTOM_TAX_RATE_ID );
    306         $tax_subtotal->set_label( 'Tax' );
    307         $tax_subtotal->set_rate_percent(
    308             ( 100 * $order->getTotalVat() ) / ( $order->getTotalInclVat() - $order->getTotalVat() )
    309         );
    310         $tax_subtotal->set_tax_total( $order->getTotalVat() - $order->getShippingCostsVat() );
    311         $tax_subtotal->set_shipping_tax_total( $order->getShippingCostsVat() );
    312 
    313         return $tax_subtotal;
    314     }
    315 
    316     /**
    317      * Creates CreateResponse.
    318      *
    319      * @param bool $status
    320      * @param string $shopOrderId
    321      * @param string $message
    322      *
    323      * @return CreateResponse
    324      */
    325     protected function create_response( $status, $shopOrderId = '', $message = '' ) {
    326         $response = new CreateResponse();
    327         $response->setSuccess( $status );
    328         $response->setShopOrderId( $shopOrderId );
    329         $response->setMessage( $message );
    330 
    331         return $response;
    332     }
    333 
    334     /**
    335      * Retrieves an instance of Order_Config_Service.
    336      *
    337      * @return Order_Config_Service
    338      */
    339     protected function get_order_config_service() {
    340         if ( null === $this->order_config_service ) {
    341             $this->order_config_service = ServiceRegister::getService( OrdersConfigurationService::class );
    342         }
    343 
    344         return $this->order_config_service;
    345     }
    346 
    347     /**
    348      * Retrieves an instance of ProductsSyncConfigService.
    349      *
    350      * @return ProductsSyncConfigService
    351      */
    352     protected function get_product_sync_config_service() {
    353         if ( null === $this->product_sync_config_service ) {
    354             $this->product_sync_config_service = ServiceRegister::getService( ProductsSyncConfigService::class );
    355         }
    356 
    357         return $this->product_sync_config_service;
    358     }
    359 
    360     /**
    361      * Checks if order from ChannelEngine already exist in WooCommerce.
    362      *
    363      * @param Order $order
    364      *
    365      * @return bool
    366      */
    367     private function orderFromChannelEngineAlreadyExists( Order $order ): bool {
    368         $wc_orders = wc_get_orders(
    369             array(
    370                 'meta_key'   => '_channel_engine_order_id', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key -- Empty.
    371                 'meta_value' => $order->getId(), // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value -- Empty.
    372             )
    373         );
    374 
    375         return ! empty( $wc_orders );
    376     }
     27class Orders_Service extends OrdersService
     28{
     29
     30    /**
     31     * @const string
     32     */
     33    const MARKETPLACE_TYPE_OF_FULFILLMENT = 'Marketplace';
     34
     35    /**
     36     * Creation of order with taxes requires integer value for the tax rate id. We do not want to introduce new custom tax rate,
     37     * but we do want to create order with taxes, therefore we use max integer value as a custom fake rate id.
     38     */
     39    const CUSTOM_TAX_RATE_ID = PHP_INT_MAX;
     40
     41    /**
     42     * @var Order_Config_Service
     43     */
     44    protected $order_config_service;
     45    /**
     46     * @var ProductsSyncConfigService
     47     */
     48    protected $product_sync_config_service;
     49
     50    /**
     51     * Creates new orders in the shop system and
     52     * returns CreateResponse.
     53     *
     54     * @param Order $order
     55     *
     56     * @return CreateResponse
     57     */
     58    public function create(Order $order)
     59    {
     60        try {
     61            if ($this->orderFromChannelEngineAlreadyExists($order)) {
     62                return $this->create_response(false, '', 'Order already created');
     63            }
     64
     65            $wc_products = $this->fetch_products($order);
     66            $order_data = $this->format_order_data($order);
     67            $wc_order = wc_create_order($order_data);
     68
     69            if ($wc_order instanceof WP_Error) {
     70                return $this->create_response(false, '', 'Failed to create a new order.');
     71            }
     72
     73            $wc_order->set_date_created($order->getOrderDate()->format(DATE_ATOM));
     74
     75            $config = $this->get_order_config_service()->getOrderSyncConfig();
     76            if ($config->isEnableVatExcludedPrices()) {
     77                $wc_order->set_total($order->getTotalExclVat());
     78                $wc_order->set_shipping_total($order->getShippingCostsExclVat());
     79            } else {
     80                $wc_order->set_total($order->getTotalInclVat());
     81                $wc_order->set_shipping_total($order->getShippingCostsInclVat());
     82            }
     83
     84            $wc_order->set_shipping_address(
     85                $this->format_address_data(
     86                    $order->getShippingAddress(),
     87                    $order->getEmail(),
     88                    $order->getPhone()
     89                )
     90            );
     91            $wc_order->set_billing_address(
     92                $this->format_address_data(
     93                    $order->getBillingAddress(),
     94                    $order->getEmail(),
     95                    $order->getPhone()
     96                )
     97            );
     98
     99            $this->add_items($wc_products, $wc_order);
     100            $wc_order->add_item($this->get_shipping_item($order));
     101            if (wc_tax_enabled() && !$config->isEnableVatExcludedPrices()) {
     102                if ($config->isEnableWCTaxCalculation() && $this->get_tax_percentage_by_address($wc_order->get_taxable_location())) {
     103                    $wc_order->calculate_taxes();
     104                } else {
     105                    $wc_order->set_shipping_total($order->getShippingCostsInclVat() - $order->getShippingCostsVat());
     106                    $wc_order->set_shipping_tax($order->getShippingCostsVat());
     107                    $wc_order->set_cart_tax($order->getTotalVat() - $order->getShippingCostsVat());
     108                    $wc_order->add_item($this->get_tax_subtotal_item($order));
     109                }
     110            }
     111
     112            $wc_order->add_meta_data('_channel_engine_order_id', $order->getId());
     113            $wc_order->add_meta_data('_channel_engine_channel_name', $order->getChannelName());
     114            $wc_order->add_meta_data('_channel_engine_channel_order_no', $order->getChannelOrderNo());
     115            $wc_order->add_meta_data('_channel_engine_type_of_fulfillment', $order->getTypeOfFulfillment());
     116            $wc_order->add_meta_data('_channel_engine_payment_method', $order->getPaymentMethod());
     117
     118            if ($order->getTypeOfFulfillment() === self::MARKETPLACE_TYPE_OF_FULFILLMENT) {
     119                $wc_order->add_meta_data('_ce_order_shipped', true);
     120            }
     121
     122            $wc_order->save();
     123            if ($this->get_product_sync_config_service()->get()->isEnabledStockSync()
     124                && $this->get_order_config_service()->getOrderSyncConfig()->isEnableReduceStock()) {
     125                wc_reduce_stock_levels($wc_order->get_id());
     126            }
     127        } catch (BaseException $e) {
     128            return $this->create_response(false, '', $e->getMessage());
     129        } catch (WC_Data_Exception $e) {
     130            return $this->create_response(false, '', 'Failed to sync order because: ' . $e->getMessage());
     131        }
     132
     133        return $this->create_response(true, $wc_order->get_id(), 'Successfully created order.');
     134    }
     135
     136    /**
     137     * Get tax rate for taxable address.
     138     *
     139     * @param $address
     140     *
     141     * @return int
     142     */
     143    private function get_tax_percentage_by_address($address)
     144    {
     145        $tax_rates = WC_Tax::find_rates($address);
     146
     147        $tax_rate = reset($tax_rates);
     148
     149        if ($tax_rate && isset($tax_rate['rate'])) {
     150            return $tax_rate['rate'];
     151        }
     152
     153        return 0;
     154    }
     155
     156    /**
     157     * Formats order data for WooCommerce order creation.
     158     *
     159     * @param Order $order
     160     *
     161     * @return array
     162     */
     163    protected function format_order_data(Order $order)
     164    {
     165        $config = $this->get_order_config_service()->getOrderSyncConfig();
     166
     167        switch ($order->getStatus()) {
     168            case 'NEW':
     169                $status = $config ? $config->getIncomingOrders() : $order->getStatus();
     170                break;
     171            case 'CLOSED':
     172            case 'SHIPPED':
     173                $status = $config ? $config->getFulfilledOrders() : $order->getStatus();
     174                break;
     175            default:
     176                $status = $order->getStatus();
     177        }
     178
     179        return array(
     180            'status' => $status,
     181            'customer_id' => null,
     182        );
     183    }
     184
     185    /**
     186     * Formats order address data.
     187     *
     188     * @param Address $address
     189     * @param string $email
     190     * @param string $phone
     191     *
     192     * @return array
     193     */
     194    protected function format_address_data(Address $address, $email, $phone)
     195    {
     196        return array(
     197            'first_name' => $address->getFirstName(),
     198            'last_name' => $address->getLastName(),
     199            'company' => $address->getCompanyName(),
     200            'address_1' => $address->getStreetName() . ' ' .
     201                $address->getHouseNumber() . ' ' . $address->getHouseNumberAddition(),
     202            'address_2' => '',
     203            'city' => $address->getCity(),
     204            'postcode' => $address->getZipCode(),
     205            'country' => strtoupper($address->getCountryIso()),
     206            'state' => $address->getRegion(),
     207            'email' => $email,
     208            'phone' => $phone,
     209        );
     210    }
     211
     212    /**
     213     * Fetches products for given order.
     214     *
     215     * @param Order $order
     216     *
     217     * @return array
     218     *
     219     * @throws ProductNotAvailableException
     220     */
     221    protected function fetch_products(Order $order)
     222    {
     223        $result = array();
     224
     225        $product_ids_batch = $this->get_product_ids($order);
     226        $products = wc_get_products(array('include' => $product_ids_batch));
     227        $variations = wc_get_products(
     228            array(
     229                'type' => 'variation',
     230                'include' => $product_ids_batch,
     231            )
     232        );
     233        $products = array_merge($products, $variations);
     234
     235        $config = $this->get_order_config_service()->getOrderSyncConfig();
     236
     237        foreach ($order->getLines() as $order_line) {
     238            $product = $this->get_product($products, (int)$order_line->getMerchantProductNo());
     239
     240            $product_data = array(
     241                'name' => $product->get_name(),
     242                'sku' => $product->get_sku(),
     243                'variation_id' => $product->is_type('variation') ? $order_line->getMerchantProductNo() : 0,
     244                'subtotal' => $config && $config->isEnableVatExcludedPrices()
     245                    ? $order_line->getUnitPriceExclVat()
     246                    : $order_line->getUnitPriceInclVat(),
     247                'quantity' => $order_line->getQuantity(),
     248                'total' => $config && $config->isEnableVatExcludedPrices()
     249                    ? $order_line->getLineTotalExclVat()
     250                    : $order_line->getLineTotalInclVat(),
     251                'total_tax' => 0,
     252                'subtotal_tax' => 0,
     253                'taxes' => array(
     254                    'total' => array(),
     255                    'subtotal' => array(),
     256                ),
     257            );
     258
     259            if (wc_tax_enabled() && !$config->isEnableVatExcludedPrices()) {
     260                $product_data['total_tax'] = $order_line->getLineVat();
     261                $product_data['subtotal_tax'] = $order_line->getUnitVat();
     262                $product_data['taxes'] = array(
     263                    'total' => array(self::CUSTOM_TAX_RATE_ID => $order_line->getLineVat()),
     264                    'subtotal' => array(self::CUSTOM_TAX_RATE_ID => $order_line->getUnitVat()),
     265                );
     266            }
     267
     268            $result[] = array(
     269                'product' => $product,
     270                'product_data' => $product_data,
     271            );
     272        }
     273
     274        return $result;
     275    }
     276
     277    /**
     278     * Retrieves product.
     279     *
     280     * @param WC_Product[] $products
     281     * @param $id
     282     *
     283     * @return WC_Product
     284     *
     285     * @throws ProductNotAvailableException
     286     */
     287    protected function get_product($products, $id)
     288    {
     289        foreach ($products as $product) {
     290            if ($product->get_id() === $id) {
     291                return $product;
     292            }
     293        }
     294
     295        throw new ProductNotAvailableException(esc_html("Product with id $id does not exist."));
     296    }
     297
     298    /**
     299     * Retrieves product ids.
     300     *
     301     * @param Order $order
     302     *
     303     * @return array
     304     */
     305    protected function get_product_ids(Order $order)
     306    {
     307        $result = array();
     308
     309        foreach ($order->getLines() as $order_line) {
     310            $result[] = $order_line->getMerchantProductNo();
     311        }
     312
     313        return $result;
     314    }
     315
     316    /**
     317     * Adds product items to order.
     318     *
     319     * @param array $wc_products
     320     * @param WC_Order $wc_order
     321     *
     322     * @throws WC_Data_Exception
     323     */
     324    protected function add_items(array $wc_products, WC_Order $wc_order)
     325    {
     326        foreach ($wc_products as $wc_product) {
     327            $wc_order->add_product(
     328                $wc_product['product'],
     329                $wc_product['product_data']['quantity'],
     330                $wc_product['product_data']
     331            );
     332        }
     333    }
     334
     335    /**
     336     * Gets order shipping item.
     337     *
     338     * @throws WC_Data_Exception
     339     */
     340    protected function get_shipping_item(Order $order)
     341    {
     342        $config = $this->get_order_config_service()->getOrderSyncConfig();
     343
     344        $shipping_item = new WC_Order_Item_Shipping();
     345        $shipping_item->set_name('Shipping');
     346        $shipping_item->set_total($config && $config->isEnableVatExcludedPrices()
     347            ? $order->getShippingCostsExclVat()
     348            : $order->getShippingCostsInclVat());
     349
     350        if (wc_tax_enabled() && !$config->isEnableVatExcludedPrices()) {
     351            $shipping_item->set_taxes(array('total' => array(self::CUSTOM_TAX_RATE_ID => $order->getShippingCostsVat())));
     352        }
     353
     354        return $shipping_item;
     355    }
     356
     357    /**
     358     * Gets order tax subtotal item.
     359     *
     360     * @param Order $order
     361     *
     362     * @return WC_Order_Item_Tax
     363     */
     364    protected function get_tax_subtotal_item(Order $order)
     365    {
     366        $tax_subtotal = new WC_Order_Item_Tax();
     367        $tax_subtotal->set_rate_id(self::CUSTOM_TAX_RATE_ID);
     368        $tax_subtotal->set_label('Tax');
     369        $tax_subtotal->set_rate_percent(
     370            (100 * $order->getTotalVat()) / ($order->getTotalInclVat() - $order->getTotalVat())
     371        );
     372        $tax_subtotal->set_tax_total($order->getTotalVat() - $order->getShippingCostsVat());
     373        $tax_subtotal->set_shipping_tax_total($order->getShippingCostsVat());
     374
     375        return $tax_subtotal;
     376    }
     377
     378    /**
     379     * Creates CreateResponse.
     380     *
     381     * @param bool $status
     382     * @param string $shopOrderId
     383     * @param string $message
     384     *
     385     * @return CreateResponse
     386     */
     387    protected function create_response($status, $shopOrderId = '', $message = '')
     388    {
     389        $response = new CreateResponse();
     390        $response->setSuccess($status);
     391        $response->setShopOrderId($shopOrderId);
     392        $response->setMessage($message);
     393
     394        return $response;
     395    }
     396
     397    /**
     398     * Retrieves an instance of Order_Config_Service.
     399     *
     400     * @return Order_Config_Service
     401     */
     402    protected function get_order_config_service()
     403    {
     404        if (null === $this->order_config_service) {
     405            $this->order_config_service = ServiceRegister::getService(OrdersConfigurationService::class);
     406        }
     407
     408        return $this->order_config_service;
     409    }
     410
     411    /**
     412     * Retrieves an instance of ProductsSyncConfigService.
     413     *
     414     * @return ProductsSyncConfigService
     415     */
     416    protected function get_product_sync_config_service()
     417    {
     418        if (null === $this->product_sync_config_service) {
     419            $this->product_sync_config_service = ServiceRegister::getService(ProductsSyncConfigService::class);
     420        }
     421
     422        return $this->product_sync_config_service;
     423    }
     424
     425    /**
     426     * Checks if order from ChannelEngine already exist in WooCommerce.
     427     *
     428     * @param Order $order
     429     *
     430     * @return bool
     431     */
     432    private function orderFromChannelEngineAlreadyExists(Order $order): bool
     433    {
     434        $wc_orders = wc_get_orders(
     435            array(
     436                'meta_key' => '_channel_engine_order_id',
     437                // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key -- Empty.
     438                'meta_value' => $order->getId(),
     439                // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value -- Empty.
     440            )
     441        );
     442
     443        return !empty($wc_orders);
     444    }
    377445}
  • channelengine-integration/trunk/includes/Controllers/class-channel-engine-config-controller.php

    r3174185 r3177316  
    484484        $orderSyncConfig->setEnableOrdersByMarketplaceSync( $order_sync_config['enableOrdersByMarketplaceSync'] );
    485485        $orderSyncConfig->setEnableReduceStock( $enable_reduce_stock );
    486 
    487         $this->get_order_config_service()->saveOrderSyncConfig( $orderSyncConfig );
     486        $orderSyncConfig->setEnableVatExcludedPrices($order_sync_config['enableVatExcludedPrices']);
     487        $orderSyncConfig->setEnableWCTaxCalculation($order_sync_config['enableWCTaxCalculation']);
     488
     489        $this->get_order_config_service()->saveOrderSyncConfig( $orderSyncConfig );
    488490    }
    489491
  • channelengine-integration/trunk/includes/Controllers/class-channel-engine-order-status-controller.php

    r3174185 r3177316  
    7575                    ! ( $mappings && $mappings->isEnableReduceStock() !== null ) || $mappings->isEnableReduceStock(),
    7676                'displayTheDateFromWhichOrdersFBMAreImported' => null != $order_by_marketplace_time_from && 0 !== $order_by_marketplace_time_from->getTimestamp(),
    77             )
     77                'enableVatExcludedPrices' => $mappings ? $mappings->isEnableVatExcludedPrices() : false,
     78                'enableWCTaxCalculation' => $mappings ? $mappings->isEnableWCTaxCalculation() : false,
     79            )
    7880        );
    7981    }
     
    115117        $orderSyncConfig->setEnableOrdersByMarketplaceSync( rest_sanitize_boolean( $payload['enableOrdersByMarketplaceSync'] ) );
    116118        $orderSyncConfig->setEnableReduceStock( rest_sanitize_boolean( $payload['enableReduceStock'] ) );
     119        $orderSyncConfig->setEnableVatExcludedPrices(rest_sanitize_boolean($payload['enableVatExcludedPrices']));
     120        $orderSyncConfig->setEnableWCTaxCalculation(rest_sanitize_boolean($payload['enableWCTaxCalculation']));
    117121
    118         $this->get_order_config_service()->saveOrderSyncConfig( $orderSyncConfig );
     122        $this->get_order_config_service()->saveOrderSyncConfig( $orderSyncConfig );
    119123        $this->get_order_config_service()->setClosedOrdersSyncTime( new DateTime( sanitize_text_field( $payload['startSyncDate'] ) ) );
    120124
  • channelengine-integration/trunk/readme.txt

    r3174185 r3177316  
    55Requires at least: 4.9
    66Tested up to: 6.6.2
    7 Stable tag: 3.8.13
     7Stable tag: 3.8.14
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4444
    4545== Changelog ==
     46
     47= 3.8.14 =
     48* Add option to synchronize orders with prices that exclude VAT
     49* Add option to enable recalculation of taxes using WooCommerce settings during order synchronization
    4650
    4751= 3.8.13 =
  • channelengine-integration/trunk/resources/js/Config.js

    r3174185 r3177316  
    2626            enableOrdersByMerchantSync = document.getElementById('enableOrdersByMerchantSync'),
    2727            enableOrdersByMarketplaceSync = document.getElementById('enableOrdersByMarketplaceSync'),
     28            enableVatExcludedPrices = document.getElementById('enableVatExcludedPrices'),
     29            enableWCTaxCalculation = document.getElementById('enableWCTaxCalculation'),
     30            vatExcludedPricesMessage = document.getElementById('vatExcludedPricesMessage'),
    2831            productAttributesUrl = document.getElementById('ceProductAttributes'),
    2932            brandMapping = document.getElementById('ceBrand'),
     
    4851        document.getElementById('displayOrderFulfilledDateDiv').removeAttribute('hidden');
    4952
    50         startSyncDate ? startSyncDate.remove(): false;
     53        startSyncDate ? startSyncDate.remove() : false;
    5154        ChannelEngine.productService.get(stockUrl.value);
    5255        ChannelEngine.productService.getProductAttributes(productAttributesUrl.value);
     
    5760        ChannelEngine.productService.getExportProductsEnabled(exportProductsUrl.value);
    5861
    59         if( ! ( enableStockSync.checked || ( enableOrdersByMerchantSync.checked && enableOrdersByMarketplaceSync.checked ) ) ) {
     62        if (!(enableStockSync.checked || (enableOrdersByMerchantSync.checked && enableOrdersByMarketplaceSync.checked))) {
    6063            enableReduceStock.setAttribute('disabled', 'true');
    6164        }
     
    137140
    138141            extraDataMapping.forEach(mapping => {
    139                 if( mapping.id === 'hidden' ) {
     142                if (mapping.id === 'hidden') {
    140143                    return;
    141144                }
     
    147150                    ChannelEngine.modalService.showModal(duplicatesHeaderText,
    148151                        '<div>' +
    149                         '<label>'+duplicatesText+'</label>' +
     152                        '<label>' + duplicatesText + '</label>' +
    150153                        '</div>',
    151154                        null,
     
    179182                        enableOrderCancellationSync: enableOrderCancellationSync.checked,
    180183                        enableOrdersByMerchantSync: enableOrdersByMerchantSync.checked,
    181                         enableOrdersByMarketplaceSync: enableOrdersByMarketplaceSync.checked
     184                        enableOrdersByMarketplaceSync: enableOrdersByMarketplaceSync.checked,
     185                        enableVatExcludedPrices: enableVatExcludedPrices.checked,
     186                        enableWCTaxCalculation: enableWCTaxCalculation.checked,
    182187                    },
    183188                    attributeMappings: {
     
    221226            if (quantity.hasAttribute('disabled')) {
    222227                quantity.removeAttribute('disabled');
    223                 if ( enableOrdersByMerchantSync.checked || enableOrdersByMarketplaceSync.checked ) {
     228                if (enableOrdersByMerchantSync.checked || enableOrdersByMarketplaceSync.checked) {
    224229                    reduceStock.removeAttribute('disabled');
    225230                }
     
    235240        enableOrdersByMerchantSync.onchange = function () {
    236241            changeReduceStockVisibility();
    237             if ( ! enableOrdersByMerchantSync.checked ) {
     242            if (!enableOrdersByMerchantSync.checked) {
    238243                enableShipmentInfoSync.setAttribute('disabled', 'true');
    239244                enableShipmentInfoSync.checked = false
     
    250255        }
    251256
     257        enableVatExcludedPrices.onchange = () => {
     258            if(enableVatExcludedPrices.checked) {
     259                vatExcludedPricesMessage.classList.remove('ce-hidden');
     260                enableWCTaxCalculation.setAttribute('disabled', 'true');
     261            } else {
     262                vatExcludedPricesMessage.classList.add('ce-hidden');
     263                enableWCTaxCalculation.removeAttribute('disabled',);
     264            }
     265        }
     266
    252267        let changeReduceStockVisibility = function () {
    253             if (!(enableOrdersByMerchantSync.checked || enableOrdersByMarketplaceSync.checked )) {
     268            if (!(enableOrdersByMerchantSync.checked || enableOrdersByMarketplaceSync.checked)) {
    254269                enableReduceStock.setAttribute('disabled', 'true');
    255270            }
    256271
    257             if ( enableStockSync.checked && (enableOrdersByMerchantSync.checked || enableOrdersByMarketplaceSync.checked )) {
     272            if (enableStockSync.checked && (enableOrdersByMerchantSync.checked || enableOrdersByMarketplaceSync.checked)) {
    258273                enableReduceStock.removeAttribute('disabled');
    259274            }
     
    264279            'change',
    265280            function () {
    266                 if(enabledExportProducts.checked) {
     281                if (enabledExportProducts.checked) {
    267282                    ChannelEngine.productService.enableProductSynchronizationFields();
    268283                } else {
  • channelengine-integration/trunk/resources/js/OrderService.js

    r3174185 r3177316  
    2020                        enableOrdersByMarketplaceSync = document.getElementById('enableOrdersByMarketplaceSync'),
    2121                        enableReduceStock = document.getElementById('enableReduceStock'),
     22                        enableVatExcludedPrices = document.getElementById('enableVatExcludedPrices'),
     23                        enableWCTaxCalculation = document.getElementById('enableWCTaxCalculation'),
     24                        vatExcludedPricesMessage = document.getElementById('vatExcludedPricesMessage'),
    2225                        marketplaceOrdersFromDate = document.getElementById('startSyncDate'),
    2326                        mappings = response.order_statuses,
     
    2528                        displayDate = document.getElementById('displayDate');
    2629
    27                     if(response.enableOrdersByMarketplaceSync && !document.getElementById('displayOrderFulfilledDateDiv').getAttribute('disabled')) {
     30                    if (response.enableOrdersByMarketplaceSync && !document.getElementById('displayOrderFulfilledDateDiv').getAttribute('disabled')) {
    2831                        displayDate.innerHTML = response.ordersByMarketplaceFromDate;
    2932                        displayDate.removeAttribute('hidden');
     
    4346                    enableOrdersByMarketplaceSync.checked = response.enableOrdersByMarketplaceSync;
    4447                    enableReduceStock.checked = response.enableReduceStock;
     48                    enableVatExcludedPrices.checked = response.enableVatExcludedPrices;
     49                    enableWCTaxCalculation.checked = response.enableWCTaxCalculation;
    4550
    46                     if ( marketplaceOrdersFromDate ) {
     51                    if (marketplaceOrdersFromDate) {
    4752                        marketplaceOrdersFromDate.value = response.ordersByMarketplaceFromDate;
    4853
    49                         if ( ! response.enableOrdersByMarketplaceSync ) {
     54                        if (!response.enableOrdersByMarketplaceSync) {
    5055                            marketplaceOrdersFromDate.setAttribute('disabled', 'true');
    5156                        }
    5257                    }
    5358
    54                     if ( ! response.enableOrdersByMerchantSync ) {
     59                    if (enableVatExcludedPrices.checked) {
     60                        vatExcludedPricesMessage.classList.remove('ce-hidden');
     61                        enableWCTaxCalculation.setAttribute('disabled', 'true');
     62                    }
     63
     64                    if (!response.enableOrdersByMerchantSync) {
    5565                        enableShipmentInfoSync.setAttribute('disabled', 'true');
    5666                        enableOrderCancellationSync.setAttribute('disabled', 'true');
     
    6878            );
    6979
    70             function addMappings (item, parent, mapping) {
     80            function addMappings(item, parent, mapping) {
    7181                const option = document.createElement('OPTION');
    7282
  • channelengine-integration/trunk/resources/js/OrderStatuses.js

    r3174185 r3177316  
    2020            enableReduceStock = document.getElementById('enableReduceStock'),
    2121            startSyncDate = document.getElementById('startSyncDate'),
    22             getAccountUrl = document.getElementById('ceGetAccountName');
     22            getAccountUrl = document.getElementById('ceGetAccountName'),
     23            enableVatExcludedPrices = document.getElementById('enableVatExcludedPrices'),
     24            enableWCTaxCalculation = document.getElementById('enableWCTaxCalculation'),
     25            vatExcludedPricesMessage = document.getElementById('vatExcludedPricesMessage');
    2326
    24         ChannelEngine.disconnectService.getAccountName(getAccountUrl);
     27            ChannelEngine.disconnectService.getAccountName(getAccountUrl);
    2528
    2629        enableReduceStock.checked = true;
     
    5154                    enableOrdersByMarketplaceSync: enableOrdersByMarketplaceSync.checked,
    5255                    enableReduceStock: enableReduceStock.checked,
    53                     startSyncDate: startSyncDate.value
     56                    startSyncDate: startSyncDate.value,
     57                    enableVatExcludedPrices: enableVatExcludedPrices.checked,
     58                    enableWCTaxCalculation: enableWCTaxCalculation.checked,
    5459                }
    5560            );
     
    9499        }
    95100
     101        enableVatExcludedPrices.onchange = () => {
     102            if(enableVatExcludedPrices.checked) {
     103                vatExcludedPricesMessage.classList.remove('ce-hidden');
     104                enableWCTaxCalculation.setAttribute('disabled', 'true');
     105            } else {
     106                vatExcludedPricesMessage.classList.add('ce-hidden');
     107                enableWCTaxCalculation.removeAttribute('disabled',);
     108            }
     109        }
     110
    96111        document.getElementById('displayOrderFulfilledDateDiv').setAttribute('hidden', 'true');
    97112        ChannelEngine.orderService.get(getUrl.value);
     
    121136                        enableOrdersByMarketplaceSync = document.getElementById('enableOrdersByMarketplaceSync'),
    122137                        enableReduceStock = document.getElementById('enableReduceStock'),
    123                         startSyncDate = document.getElementById('startSyncDate');
     138                        startSyncDate = document.getElementById('startSyncDate'),
     139                        enableVatExcludedPrices = document.getElementById('enableVatExcludedPrices'),
     140                        enableWCTaxCalculation = document.getElementById('enableWCTaxCalculation');
    124141                    ChannelEngine.notificationService.removeNotifications();
    125142
     
    134151                            enableOrdersByMerchantSync: enableOrdersByMerchantSync.checked,
    135152                            enableOrdersByMarketplaceSync: enableOrdersByMarketplaceSync.checked,
     153                            enableVatExcludedPrices: enableVatExcludedPrices.checked,
     154                            enableWCTaxCalculation: enableWCTaxCalculation.checked,
    136155                            enableReduceStock: enableReduceStock.checked,
    137156                            startSyncDate: startSyncDate.value
  • channelengine-integration/trunk/resources/views/partials/order_status_mapping.php

    r3174185 r3177316  
    7777        <span id="displayDate" class="label"></span>
    7878    </div>
     79    <?php require plugin_dir_path( __FILE__ ) . 'tax_configuration.php'; ?>
    7980</form>
     81<div class="ce-extra-data-heading">
     82    <h3 style="width: 200px"><?php esc_html_e( 'Order status mapping', 'channelengine-integration' ); ?></h3>
     83</div>
    8084<p><?php esc_html_e( 'Map WooCommerce shop order statuses to the ChannelEngine order statuses.', 'channelengine-integration' ); ?></p>
    8185<form class="ce-form">
  • channelengine-integration/trunk/vendor/autoload.php

    r3174185 r3177316  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitbec998f2f7f062ba90f8fe4e3c01c268::getLoader();
     7return ComposerAutoloaderInit9806668fd8f582d83a8bcdfaf7949bb1::getLoader();
  • channelengine-integration/trunk/vendor/channelengine/integration-core/src/BusinessLogic/API/Orders/DTO/LineItem.php

    r3174185 r3177316  
    9494     */
    9595    protected $originalLineVat;
     96
     97    /**
     98     * The value of a single unit of
     99     * the ordered product excluding VAT.
     100     *
     101     * @var float|null
     102     */
     103    protected $unitPriceExclVat;
     104
     105    /**
     106     * Total value of the order line excluding VAT.
     107     *
     108     * @var float|null
     109     */
     110    protected $lineTotalExclVat;
     111
    96112    /**
    97113     * A percentage fee that is charged
     
    562578    {
    563579        $this->vatRate = $vatRate;
     580    }
     581
     582    /**
     583     * @return float|null
     584     */
     585    public function getUnitPriceExclVat()
     586    {
     587        return $this->unitPriceExclVat;
     588    }
     589
     590    /**
     591     * @param float|null $unitPriceExclVat
     592     */
     593    public function setUnitPriceExclVat($unitPriceExclVat)
     594    {
     595        $this->unitPriceExclVat = $unitPriceExclVat;
     596    }
     597
     598    /**
     599     * @return float|null
     600     */
     601    public function getLineTotalExclVat()
     602    {
     603        return $this->lineTotalExclVat;
     604    }
     605
     606    /**
     607     * @param float|null $lineTotalExclVat
     608     */
     609    public function setLineTotalExclVat($lineTotalExclVat)
     610    {
     611        $this->lineTotalExclVat = $lineTotalExclVat;
    564612    }
    565613
     
    578626        $lineItem->setOriginalLineTotalInclVat(static::getDataValue($data, 'OriginalLineTotalInclVat', null));
    579627        $lineItem->setOriginalLineVat(static::getDataValue($data, 'OriginalLineVat', null));
     628        $lineItem->setUnitPriceExclVat(static::getDataValue($data, 'UnitPriceExclVat', null));
     629        $lineItem->setLineTotalExclVat(static::getDataValue($data, 'LineTotalExclVat', null));
    580630        $lineItem->setOriginalFeeFixed(static::getDataValue($data, 'OriginalFeeFixed', null));
    581         $lineItem->setBundleProductMerchantProductNo(static::getDataValue($data, 'BundleProductMerchantProductNo', null));
     631        $lineItem->setBundleProductMerchantProductNo(static::getDataValue($data, 'BundleProductMerchantProductNo',
     632            null));
    582633        $lineItem->setChannelProductNo(static::getDataValue($data, 'ChannelProductNo', null));
    583634        $lineItem->setMerchantProductNo(static::getDataValue($data, 'MerchantProductNo', null));
     
    619670            'OriginalLineTotalInclVat' => $this->getOriginalLineTotalInclVat(),
    620671            'OriginalLineVat' => $this->getOriginalLineVat(),
     672            'UnitPriceExclVat' => $this->getUnitPriceExclVat(),
     673            'LineTotalExclVat' => $this->getLineTotalExclVat(),
    621674            'OriginalFeeFixed' => $this->getOriginalFeeFixed(),
    622675            'BundleProductMerchantProductNo' => $this->getBundleProductMerchantProductNo(),
     
    631684            'FeeRate' => $this->getFeeRate(),
    632685            'Condition' => $this->getCondition(),
    633             'ExpectedDeliveryDate' => substr(date_format($this->getExpectedDeliveryDate(), 'Y-m-d\TH:i:s.u'), 0, -3) . 'Z',
     686            'ExpectedDeliveryDate' => substr(date_format($this->getExpectedDeliveryDate(), 'Y-m-d\TH:i:s.u'), 0,
     687                    -3) . 'Z',
    634688        ];
    635689    }
  • channelengine-integration/trunk/vendor/channelengine/integration-core/src/BusinessLogic/API/Orders/DTO/Order.php

    r3174185 r3177316  
    187187     */
    188188    protected $originalTotalVat;
     189
     190    /**
     191     * The total value of the order lines excluding VAT.
     192     *
     193     * @var float|null
     194     */
     195    protected $subTotalExclVat;
     196
     197    /**
     198     * The total value of the order including VAT.
     199     *
     200     * @var float|null
     201     */
     202    protected $totalExclVat;
     203
     204    /**
     205     * The shipping fee excluding VAT.
     206     *
     207     * @var float|null
     208     */
     209    protected $shippingCostsExclVat;
     210
     211    /**
     212     * The original subtotal excluding VAT.
     213     *
     214     * @var float|null
     215     */
     216    protected $originalSubTotalExclVat;
     217
     218    /**
     219     * The original shipping costs excluding VAT.
     220     *
     221     * @var float|null
     222     */
     223    protected $originalShippingCostsExclVat;
     224
     225    /**
     226     * The original total excluding VAT.
     227     *
     228     * @var float|null
     229     */
     230    protected $originalTotalExclVat;
     231
    189232    /**
    190233     * @var LineItem[]
     
    842885    {
    843886        $this->extraData = $extraData;
     887    }
     888
     889    /**
     890     * @return float|null
     891     */
     892    public function getSubTotalExclVat()
     893    {
     894        return $this->subTotalExclVat;
     895    }
     896
     897    /**
     898     * @param float|null $subTotalExclVat
     899     */
     900    public function setSubTotalExclVat($subTotalExclVat)
     901    {
     902        $this->subTotalExclVat = $subTotalExclVat;
     903    }
     904
     905    /**
     906     * @return float|null
     907     */
     908    public function getTotalExclVat()
     909    {
     910        return $this->totalExclVat;
     911    }
     912
     913    /**
     914     * @param float|null $totalExclVat
     915     */
     916    public function setTotalExclVat($totalExclVat)
     917    {
     918        $this->totalExclVat = $totalExclVat;
     919    }
     920
     921    /**
     922     * @return float|null
     923     */
     924    public function getShippingCostsExclVat()
     925    {
     926        return $this->shippingCostsExclVat;
     927    }
     928
     929    /**
     930     * @param float|null $shippingCostsExclVat
     931     */
     932    public function setShippingCostsExclVat($shippingCostsExclVat)
     933    {
     934        $this->shippingCostsExclVat = $shippingCostsExclVat;
     935    }
     936
     937    /**
     938     * @return float|null
     939     */
     940    public function getOriginalSubTotalExclVat()
     941    {
     942        return $this->originalSubTotalExclVat;
     943    }
     944
     945    /**
     946     * @param float|null $originalSubTotalExclVat
     947     */
     948    public function setOriginalSubTotalExclVat($originalSubTotalExclVat)
     949    {
     950        $this->originalSubTotalExclVat = $originalSubTotalExclVat;
     951    }
     952
     953    /**
     954     * @return float|null
     955     */
     956    public function getOriginalShippingCostsExclVat()
     957    {
     958        return $this->originalShippingCostsExclVat;
     959    }
     960
     961    /**
     962     * @param float|null $originalShippingCostsExclVat
     963     */
     964    public function setOriginalShippingCostsExclVat($originalShippingCostsExclVat)
     965    {
     966        $this->originalShippingCostsExclVat = $originalShippingCostsExclVat;
     967    }
     968
     969    /**
     970     * @return float|null
     971     */
     972    public function getOriginalTotalExclVat()
     973    {
     974        return $this->originalTotalExclVat;
     975    }
     976
     977    /**
     978     * @param float|null $originalTotalExclVat
     979     */
     980    public function setOriginalTotalExclVat($originalTotalExclVat)
     981    {
     982        $this->originalTotalExclVat = $originalTotalExclVat;
    844983    }
    845984
     
    8731012        $order->setOriginalTotalInclVat(static::getDataValue($data, 'OriginalTotalInclVat', null));
    8741013        $order->setOriginalTotalVat(static::getDataValue($data, 'OriginalTotalVat', null));
     1014        $order->setSubTotalExclVat(static::getDataValue($data, 'SubTotalExclVat', null));
     1015        $order->setTotalExclVat(static::getDataValue($data, 'TotalExclVat', null));
     1016        $order->setShippingCostsExclVat(static::getDataValue($data, 'ShippingCostsExclVat', null));
     1017        $order->setOriginalSubTotalExclVat(static::getDataValue($data, 'OriginalSubTotalExclVat', null));
     1018        $order->setOriginalShippingCostsExclVat(static::getDataValue($data, 'OriginalShippingCostsExclVat', null));
     1019        $order->setOriginalTotalExclVat(static::getDataValue($data, 'OriginalTotalExclVat', null));
    8751020        $order->setLines(LineItem::fromBatch(static::getDataValue($data, 'Lines', [])));
    8761021        $order->setPhone(static::getDataValue($data, 'Phone', null));
     
    9241069            'OriginalTotalInclVat' => $this->getOriginalTotalInclVat(),
    9251070            'OriginalTotalVat' => $this->getOriginalTotalVat(),
     1071            'SubTotalExclVat' => $this->getSubTotalExclVat(),
     1072            'TotalExclVat' => $this->getTotalExclVat(),
     1073            'ShippingCostsExclVat' => $this->getShippingCostsExclVat(),
     1074            'OriginalSubTotalExclVat' => $this->getOriginalSubTotalExclVat(),
     1075            'OriginalShippingCostsExclVat' => $this->getOriginalShippingCostsExclVat(),
     1076            'OriginalTotalExclVat' => $this->getOriginalTotalExclVat(),
    9261077            'Lines' => $linesArray,
    9271078            'Phone' => $this->getPhone(),
  • channelengine-integration/trunk/vendor/channelengine/integration-core/src/BusinessLogic/Orders/Configuration/OrderSyncConfig.php

    r3174185 r3177316  
    2828        'unknownLinesHandling',
    2929        'fromDate',
    30         'enableReturnsSync'
     30        'enableReturnsSync',
     31        'enableVatExcludedPrices',
     32        'enableWCTaxCalculation'
    3133    ];
    3234    /**
     
    5961    protected $enableOrdersByMarketplaceSync;
    6062    /**
    61      * @var bool 
     63     * @var bool
    6264     */
    6365    protected $enableReduceStock;
     
    7476     */
    7577    protected $enableReturnsSync;
     78    /**
     79     * @var bool
     80     */
     81    protected $enableVatExcludedPrices;
     82    /**
     83     * @var bool
     84     */
     85    protected $enableWCTaxCalculation;
    7686
    7787    /**
     
    239249    }
    240250
     251    /**
     252     * @return bool
     253     */
     254    public function isEnableVatExcludedPrices() {
     255        return $this->enableVatExcludedPrices;
     256    }
     257
     258    /**
     259     * @param bool $enableVatExcludedPrices
     260     */
     261    public function setEnableVatExcludedPrices($enableVatExcludedPrices) {
     262        $this->enableVatExcludedPrices = $enableVatExcludedPrices;
     263    }
     264
     265    /**
     266     * @return bool
     267     */
     268    public function isEnableWCTaxCalculation()
     269    {
     270        return $this->enableWCTaxCalculation;
     271    }
     272
     273    /**
     274     * @param bool $enableWCTaxCalculation
     275     */
     276    public function setEnableWCTaxCalculation($enableWCTaxCalculation)
     277    {
     278        $this->enableWCTaxCalculation = $enableWCTaxCalculation;
     279    }
     280
    241281    public function getConfig()
    242282    {
  • channelengine-integration/trunk/vendor/composer/autoload_real.php

    r3174185 r3177316  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitbec998f2f7f062ba90f8fe4e3c01c268
     5class ComposerAutoloaderInit9806668fd8f582d83a8bcdfaf7949bb1
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitbec998f2f7f062ba90f8fe4e3c01c268', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit9806668fd8f582d83a8bcdfaf7949bb1', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitbec998f2f7f062ba90f8fe4e3c01c268', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit9806668fd8f582d83a8bcdfaf7949bb1', 'loadClassLoader'));
    3030
    3131        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3333            require __DIR__ . '/autoload_static.php';
    3434
    35             call_user_func(\Composer\Autoload\ComposerStaticInitbec998f2f7f062ba90f8fe4e3c01c268::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInit9806668fd8f582d83a8bcdfaf7949bb1::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
  • channelengine-integration/trunk/vendor/composer/autoload_static.php

    r3174185 r3177316  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitbec998f2f7f062ba90f8fe4e3c01c268
     7class ComposerStaticInit9806668fd8f582d83a8bcdfaf7949bb1
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    110110    {
    111111        return \Closure::bind(function () use ($loader) {
    112             $loader->prefixLengthsPsr4 = ComposerStaticInitbec998f2f7f062ba90f8fe4e3c01c268::$prefixLengthsPsr4;
    113             $loader->prefixDirsPsr4 = ComposerStaticInitbec998f2f7f062ba90f8fe4e3c01c268::$prefixDirsPsr4;
    114             $loader->classMap = ComposerStaticInitbec998f2f7f062ba90f8fe4e3c01c268::$classMap;
     112            $loader->prefixLengthsPsr4 = ComposerStaticInit9806668fd8f582d83a8bcdfaf7949bb1::$prefixLengthsPsr4;
     113            $loader->prefixDirsPsr4 = ComposerStaticInit9806668fd8f582d83a8bcdfaf7949bb1::$prefixDirsPsr4;
     114            $loader->classMap = ComposerStaticInit9806668fd8f582d83a8bcdfaf7949bb1::$classMap;
    115115
    116116        }, null, ClassLoader::class);
  • channelengine-integration/trunk/vendor/composer/installed.json

    r3174185 r3177316  
    88                "type": "git",
    99                "url": "git@github.com:channelengine/logeecom-core.git",
    10                 "reference": "88799f4d2647738abcf89185e51771e44c156f4f"
     10                "reference": "e24d15d979f5bf86d39bf27b73136c35faf384a1"
    1111            },
    1212            "dist": {
    1313                "type": "zip",
    14                 "url": "https://api.github.com/repos/channelengine/logeecom-core/zipball/88799f4d2647738abcf89185e51771e44c156f4f",
    15                 "reference": "88799f4d2647738abcf89185e51771e44c156f4f",
     14                "url": "https://api.github.com/repos/channelengine/logeecom-core/zipball/e24d15d979f5bf86d39bf27b73136c35faf384a1",
     15                "reference": "e24d15d979f5bf86d39bf27b73136c35faf384a1",
    1616                "shasum": ""
    1717            },
     
    2323                "phpunit/phpunit": "^5.7"
    2424            },
    25             "time": "2024-07-22T13:32:48+00:00",
     25            "time": "2024-10-28T13:19:14+00:00",
    2626            "type": "library",
    2727            "installation-source": "source",
  • channelengine-integration/trunk/vendor/composer/installed.php

    r3174185 r3177316  
    11<?php return array(
    22    'root' => array(
    3         'pretty_version' => '1.0.0+no-version-set',
    4         'version' => '1.0.0.0',
     3        'pretty_version' => 'dev-master',
     4        'version' => 'dev-master',
    55        'type' => 'library',
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => NULL,
     8        'reference' => '4fea55734833844d19ca037097db4cd04bffbc45',
    99        'name' => 'channelengine/woocommerce',
    1010        'dev' => false,
     
    1717            'install_path' => __DIR__ . '/../channelengine/integration-core',
    1818            'aliases' => array(),
    19             'reference' => '88799f4d2647738abcf89185e51771e44c156f4f',
     19            'reference' => 'e24d15d979f5bf86d39bf27b73136c35faf384a1',
    2020            'dev_requirement' => false,
    2121        ),
    2222        'channelengine/woocommerce' => array(
    23             'pretty_version' => '1.0.0+no-version-set',
    24             'version' => '1.0.0.0',
     23            'pretty_version' => 'dev-master',
     24            'version' => 'dev-master',
    2525            'type' => 'library',
    2626            'install_path' => __DIR__ . '/../../',
    2727            'aliases' => array(),
    28             'reference' => NULL,
     28            'reference' => '4fea55734833844d19ca037097db4cd04bffbc45',
    2929            'dev_requirement' => false,
    3030        ),
Note: See TracChangeset for help on using the changeset viewer.