From ae36fe72e94e0ff39f3d432c2edfa70294d4aeb6 Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 18 Jul 2018 10:50:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E7=9A=84=E5=9C=B0=E5=8D=95=E5=9B=A2?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E8=A1=A8=E7=9A=84=E8=AE=A1=E7=AE=97,=20?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E4=BA=A7=E5=93=81=E7=BC=96=E5=8F=B7,=20?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=8B=BC=E5=9B=A2=E4=BA=A7=E5=93=81=E7=BC=96?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/order_finance.php | 88 +++++++++++++++++++ .../models/orderFinance_model.php | 11 +++ 2 files changed, 99 insertions(+) create mode 100644 webht/third_party/trippestOrderSync/controllers/order_finance.php create mode 100644 webht/third_party/trippestOrderSync/models/orderFinance_model.php diff --git a/webht/third_party/trippestOrderSync/controllers/order_finance.php b/webht/third_party/trippestOrderSync/controllers/order_finance.php new file mode 100644 index 00000000..41d20332 --- /dev/null +++ b/webht/third_party/trippestOrderSync/controllers/order_finance.php @@ -0,0 +1,88 @@ +equal_tours(); + foreach ($all_equals as $key => $equal) { + if (in_array($tour_code, $equal)) { + $equal_tour = $equal; + break; + } + } + return $equal_tour; + } + /** 产品编号不同实际是同一产品 */ + public function equal_tours() + { + return array( + array("SHSIC-31", "SHSIC-41"), + array("SHSIC-32", "SHSIC-42"), + array("SHSIC-33", "SHSIC-43"), + array("SHSIC-34", "SHSIC-44") + ); + } + + public function get_allowed_combine($tour_code="") + { + $allowed = null; + $all_allowed = $this->allowed_combine(); + foreach ($all_allowed as $key => $va) { + if (in_array($tour_code, $va)) { + $allowed = $va; + break; + } + } + return $allowed; + } + /** 不同产品但部分行程相同所以允许拼团 */ + public function allowed_combine() + { + return array( + array("XASIC-15", "XASIC-41"), + array("BJSIC-47", "BJSIC-41") + ); + } + +} + +/* End of file order_finance.php */ +/* Location: ./webht/third_party/trippestOrderSync/controllers/order_finance.php */ diff --git a/webht/third_party/trippestOrderSync/models/orderFinance_model.php b/webht/third_party/trippestOrderSync/models/orderFinance_model.php new file mode 100644 index 00000000..ee63d527 --- /dev/null +++ b/webht/third_party/trippestOrderSync/models/orderFinance_model.php @@ -0,0 +1,11 @@ +