From 9f809e7f551c8341f97dbff418c4ea4162ce3239 Mon Sep 17 00:00:00 2001
From: "G. Richardson" <grichardson@kivitec.de>
Date: Tue, 23 Jun 2020 09:22:50 +0200
Subject: [PATCH] =?utf8?q?S:D:Order:=20deliverydate=20Methode=20f=C3=BCr?=
 =?utf8?q?=20PTC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

---
 SL/DB/Order.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/SL/DB/Order.pm b/SL/DB/Order.pm
index bba7fc8ef..37322428a 100644
--- a/SL/DB/Order.pm
+++ b/SL/DB/Order.pm
@@ -85,6 +85,12 @@ sub is_type {
   return shift->type eq shift;
 }
 
+sub deliverydate {
+  # oe doesn't have deliverydate, but PTC checks for deliverydate or transdate to determine tax
+  # oe can't deal with deviating tax rates, but at least make sure PTC doesn't barf
+  return shift->transdate;
+}
+
 sub displayable_type {
   my $type = shift->type;
 
-- 
2.20.1