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() //搜尋條件