From da8d5a0133b0e23a2d5bf28354cf93dfdc5b5cd5 Mon Sep 17 00:00:00 2001 From: alina <1449359159@qq.com> Date: Fri, 24 Feb 2023 18:16:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E5=96=AE=E6=99=82=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B3=AC=E5=96=AE=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShowEasy/BookingMaintain_UpdService.cs | 27 +++++++++---------- .../EasyBL.WEBAPP/ShowEasy/OnsiteService.cs | 21 ++++++++++++--- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_UpdService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_UpdService.cs index d7ece29..0c10164 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_UpdService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_UpdService.cs @@ -114,21 +114,18 @@ namespace EasyBL.WEBAPP.WSM if (iRel > 0) { - if (sSupplierStatus == "01") { - //當時確認訂單后,需要產生一筆賬單資料 - var PayPayment = new SETB_SAL_Payment(); - PayPayment.PaymentID = Guid.NewGuid().ToString(); - PayPayment.BookingID = sBookingID; - PayPayment.PaymentNo = sBookingNo + "-01"; - PayPayment.PaymentMethod = sPayType; - PayPayment.CreateDate = DateTime.Now; - PayPayment.ModifyDate = DateTime.Now; - - iRel = db.Insertable(PayPayment).ExecuteCommand(); - } - - - + //if (sSupplierStatus == "01") { + // //當時確認訂單后,需要產生一筆賬單資料 + // var PayPayment = new SETB_SAL_Payment(); + // PayPayment.PaymentID = Guid.NewGuid().ToString(); + // PayPayment.BookingID = sBookingID; + // PayPayment.PaymentNo = sBookingNo + "-01"; + // PayPayment.PaymentMethod = sPayType; + // PayPayment.CreateDate = DateTime.Now; + // PayPayment.ModifyDate = DateTime.Now; + + // iRel = db.Insertable(PayPayment).ExecuteCommand(); + //} //確認 后給會員發信息講已確認 var saDataList = db.Queryable((t1, t2) => new object[] { diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/OnsiteService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/OnsiteService.cs index b2f3597..d501495 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/OnsiteService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/OnsiteService.cs @@ -1113,13 +1113,28 @@ namespace EasyBL.WEBAPP.ShowEasy rsBooking.LangType = Booking.LangType ?? "zh-TW"; rsBooking.OrgID = sORIGID; rsBooking.CreateDate = DateTime.Now; - - var iRel = db.Insertable(rsBooking).ExecuteCommand(); if (iRel > 0) { - //取得聯絡人的Email + + + //當時確認訂單后,需要產生一筆賬單資料 + var PayPayment = new SETB_SAL_Payment(); + PayPayment.PaymentID = Guid.NewGuid().ToString(); + PayPayment.BookingID = rsBooking.BookingID; + PayPayment.PaymentNo = rsBooking.BookingNo + "-01"; + PayPayment.PaymentMethod = rsBooking.PayType; + PayPayment.PaymentTerms = "1"; + if (rsBooking.PayType=="3") { + //現場付款 + PayPayment.PaymentDate = DateTime.Now; + } + PayPayment.Amount =float.Parse(rsBooking.TotalPrice); + PayPayment.CreateDate = DateTime.Now; + PayPayment.ModifyDate = DateTime.Now; + + iRel = db.Insertable(PayPayment).ExecuteCommand(); var objONSiteBaseInfo = db.Queryable() //搜尋條件