Skip to content

Commit

Permalink
Merge branch 'release/2.5.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
joshangell committed Apr 9, 2021
2 parents dddc9f7 + d3121ae commit 8e6b403
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## Unreleased


## 2.5.7 - 2021-04-09

### Fixed
- Fixed an issue where order dates weren’t being sent to Vend with time zones. The format now conforms to RFC3339.


## 2.5.6 - 2021-03-11

### Fixed
- Fixed an issue where order level discounts weren’t showing the tax inside them


## 2.5.5 - 2021-01-05

### Fixed
Expand Down
5 changes: 3 additions & 2 deletions src/services/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use craft\commerce\models\LineItem;
use craft\commerce\Plugin as CommercePlugin;
use craft\helpers\Json;
use DateTimeInterface;
use Exception;
use Throwable;
use yii\base\InvalidConfigException;
Expand Down Expand Up @@ -203,12 +204,12 @@ public function registerSale(int $orderId) {
'customer_id' => $vendCustomerId,
'user_id' => $settings->vend_userId,
'status' => 'CLOSED',
'sale_date' => $order->dateOrdered->format('Y-m-d H:i:s'),
'sale_date' => $order->dateOrdered->format(DateTimeInterface::RFC3339),
'register_sale_products' => [],
'register_sale_payments' => [
[
'retailer_payment_type_id' => $settings->vend_retailerPaymentTypeId,
'payment_date' => $order->dateOrdered->format('Y-m-d H:i:s'),
'payment_date' => $order->dateOrdered->format(DateTimeInterface::RFC3339),
'amount' => $order->getTotalPaid()
]
]
Expand Down

0 comments on commit 8e6b403

Please sign in to comment.