@pisell/private-materials 6.4.49 → 6.4.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +12 -4
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +78 -42
- package/es/components/checkout/components/AmountSummary/index.js +39 -4
- package/es/components/checkout/components/PaymentDetailModal/index.js +72 -20
- package/es/components/checkout/components/PaymentDetailModal/index.less +23 -2
- package/es/components/checkout/hooks/useWalletPass.js +1 -0
- package/es/components/checkout/locales.d.ts +3 -0
- package/es/components/checkout/locales.js +3 -0
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/es/plus/saasCreateOrganization/index.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/es/plus/saasRegister/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +6 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +36 -9
- package/lib/components/checkout/components/AmountSummary/index.js +31 -3
- package/lib/components/checkout/components/PaymentDetailModal/index.js +49 -11
- package/lib/components/checkout/components/PaymentDetailModal/index.less +23 -2
- package/lib/components/checkout/hooks/useWalletPass.js +1 -0
- package/lib/components/checkout/locales.d.ts +3 -0
- package/lib/components/checkout/locales.js +3 -0
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/lib/plus/saasRegister/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/package.json +2 -2
@@ -12,6 +12,7 @@ import checkoutLocales from "../../locales";
|
|
12
12
|
import "./index.less";
|
13
13
|
import classNames from 'classnames';
|
14
14
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
15
|
+
import Decimal from 'decimal.js';
|
15
16
|
|
16
17
|
// 小计数据类型
|
17
18
|
|
@@ -101,26 +102,21 @@ function PaymentDetailModal(_ref) {
|
|
101
102
|
// 计算已支付总额 (只计算不带voucher_id的支付项)
|
102
103
|
var getTotalPaidAmount = function getTotalPaidAmount() {
|
103
104
|
return paymentItems.filter(function (item) {
|
104
|
-
return !item.voucher_id;
|
105
|
+
return !item.voucher_id || item.isSynced;
|
105
106
|
}).reduce(function (total, item) {
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
// 计算优惠券扣减总额 (只计算带voucher_id的支付项)
|
111
|
-
var getTotalVoucherAmount = function getTotalVoucherAmount() {
|
112
|
-
return paymentItems.filter(function (item) {
|
113
|
-
return item.voucher_id;
|
114
|
-
}).reduce(function (total, item) {
|
115
|
-
return total + Math.abs(item.amount);
|
107
|
+
var amount = new Decimal(Math.abs(item.amount));
|
108
|
+
var roundingAmount = new Decimal(Number(item.rounding_amount) > 0 ? 0 : item.rounding_amount || 0);
|
109
|
+
return new Decimal(total).plus(amount).plus(roundingAmount).toNumber();
|
116
110
|
}, 0);
|
117
111
|
};
|
118
112
|
|
119
113
|
// 计算Balance Due金额 (customAmount + 所有voucher扣减金额)
|
120
114
|
var getBalanceDueAmount = function getBalanceDueAmount() {
|
121
|
-
|
122
|
-
|
123
|
-
|
115
|
+
// debugger
|
116
|
+
// const baseAmount = customAmount ? parseFloat(customAmount) : 0;
|
117
|
+
// const voucherDeductions = getTotalVoucherAmount();
|
118
|
+
// return baseAmount + voucherDeductions;
|
119
|
+
return new Decimal(orderInfo.totalAmount || 0).sub(new Decimal(getTotalPaidAmount())).toNumber().toFixed(2);
|
124
120
|
};
|
125
121
|
|
126
122
|
// 处理 Void 按钮点击
|
@@ -133,25 +129,76 @@ function PaymentDetailModal(_ref) {
|
|
133
129
|
|
134
130
|
// 渲染支付项 (只渲染不带voucher_id的支付项)
|
135
131
|
var renderPaymentItems = function renderPaymentItems() {
|
132
|
+
var depositPayments = paymentItems.filter(function (item) {
|
133
|
+
return item.order_payment_type === 'deposit' && item.isSynced;
|
134
|
+
});
|
136
135
|
var regularPayments = paymentItems.filter(function (item) {
|
137
|
-
return
|
136
|
+
return item.isSynced && item.order_payment_type !== 'deposit';
|
138
137
|
});
|
139
|
-
if (!paymentItems || paymentItems.length === 0 || regularPayments.length === 0) {
|
138
|
+
if (!paymentItems || paymentItems.length === 0 || regularPayments.length === 0 && depositPayments.length === 0) {
|
140
139
|
return /*#__PURE__*/React.createElement("div", {
|
141
140
|
className: classNames('section-content')
|
142
141
|
}, /*#__PURE__*/React.createElement("div", {
|
143
142
|
className: classNames('no-payment-text')
|
144
143
|
}, getText('no.payments.recorded') || 'No payments recorded'));
|
145
144
|
}
|
145
|
+
var depositPaymentSummary = depositPayments.reduce(function (acc, item) {
|
146
|
+
return new Decimal(acc).plus(new Decimal(item.amount)).plus(new Decimal(Number(item.rounding_amount) > 0 ? 0 : item.rounding_amount || 0)).toNumber();
|
147
|
+
}, 0);
|
148
|
+
var regularPaymentSummary = regularPayments.reduce(function (acc, item) {
|
149
|
+
return new Decimal(acc).plus(new Decimal(item.amount)).plus(new Decimal(Number(item.rounding_amount) > 0 ? 0 : item.rounding_amount || 0)).toNumber();
|
150
|
+
}, 0);
|
146
151
|
return /*#__PURE__*/React.createElement("div", {
|
147
152
|
className: classNames('section-content')
|
148
153
|
}, /*#__PURE__*/React.createElement("div", {
|
149
154
|
className: classNames('payment-record-container')
|
150
|
-
},
|
155
|
+
}, depositPayments.length > 0 && /*#__PURE__*/React.createElement("div", {
|
156
|
+
className: classNames('payment-item-header')
|
157
|
+
}, /*#__PURE__*/React.createElement("div", null, getText('pisell2.subtotal.deposit') || 'Deposit'), /*#__PURE__*/React.createElement("div", null, formatAmountWithOptions(depositPaymentSummary, amountSymbol, {
|
158
|
+
precision: 2,
|
159
|
+
hideDecimalForWholeNumbers: false,
|
160
|
+
useThousandsSeparator: true,
|
161
|
+
showCurrencySymbol: true
|
162
|
+
}))), depositPayments.map(function (item) {
|
163
|
+
return /*#__PURE__*/React.createElement("div", {
|
164
|
+
key: item.uuid,
|
165
|
+
className: classNames('payment-item')
|
166
|
+
}, /*#__PURE__*/React.createElement("div", {
|
167
|
+
className: classNames('payment-item-bullet')
|
168
|
+
}), /*#__PURE__*/React.createElement("div", {
|
169
|
+
className: classNames('payment-item-content')
|
170
|
+
}, /*#__PURE__*/React.createElement("div", {
|
171
|
+
className: classNames('payment-item-text')
|
172
|
+
}, item.name, " - ", new Date().toLocaleDateString(), ' ', getText('pisell2.checkout.payment-detail.by') || 'by', ' ', getCustomerInfo().nickname), /*#__PURE__*/React.createElement("div", {
|
173
|
+
className: classNames('payment-item-actions')
|
174
|
+
}, /*#__PURE__*/React.createElement("div", {
|
175
|
+
className: classNames('payment-item-amount')
|
176
|
+
}, "-", formatAmountWithOptions(new Decimal(Math.abs(item.amount)).plus(new Decimal(Number(item.rounding_amount) > 0 ? 0 : item.rounding_amount || 0)).toNumber(), amountSymbol, {
|
177
|
+
precision: 2,
|
178
|
+
hideDecimalForWholeNumbers: false,
|
179
|
+
useThousandsSeparator: true,
|
180
|
+
showCurrencySymbol: true
|
181
|
+
})), shouldShowVoidButton(item) && /*#__PURE__*/React.createElement("button", {
|
182
|
+
className: classNames('void-button'),
|
183
|
+
onClick: function onClick() {
|
184
|
+
return handleVoidPayment(item);
|
185
|
+
},
|
186
|
+
type: "button"
|
187
|
+
}, getText('void') || 'Void'))));
|
188
|
+
}), regularPayments.length > 0 && /*#__PURE__*/React.createElement("div", {
|
189
|
+
className: classNames('payment-item-header')
|
190
|
+
}, /*#__PURE__*/React.createElement("div", null, getText('payment.text') || 'Payment'), /*#__PURE__*/React.createElement("div", null, formatAmountWithOptions(regularPaymentSummary, amountSymbol, {
|
191
|
+
precision: 2,
|
192
|
+
hideDecimalForWholeNumbers: false,
|
193
|
+
useThousandsSeparator: true,
|
194
|
+
showCurrencySymbol: true
|
195
|
+
}))), regularPayments.map(function (item) {
|
151
196
|
return /*#__PURE__*/React.createElement("div", {
|
152
197
|
key: item.uuid,
|
153
198
|
className: classNames('payment-item')
|
154
199
|
}, /*#__PURE__*/React.createElement("div", {
|
200
|
+
className: classNames('payment-item-bullet')
|
201
|
+
}), /*#__PURE__*/React.createElement("div", {
|
155
202
|
className: classNames('payment-item-content')
|
156
203
|
}, /*#__PURE__*/React.createElement("div", {
|
157
204
|
className: classNames('payment-item-text')
|
@@ -159,7 +206,7 @@ function PaymentDetailModal(_ref) {
|
|
159
206
|
className: classNames('payment-item-actions')
|
160
207
|
}, /*#__PURE__*/React.createElement("div", {
|
161
208
|
className: classNames('payment-item-amount')
|
162
|
-
}, "-", formatAmountWithOptions(Math.abs(item.amount)
|
209
|
+
}, "-", formatAmountWithOptions(new Decimal(Math.abs(item.amount)).plus(new Decimal(Number(item.rounding_amount) > 0 ? 0 : item.rounding_amount || 0)).toNumber(), amountSymbol, {
|
163
210
|
precision: 2,
|
164
211
|
hideDecimalForWholeNumbers: false,
|
165
212
|
useThousandsSeparator: true,
|
@@ -181,7 +228,7 @@ function PaymentDetailModal(_ref) {
|
|
181
228
|
|
182
229
|
// 1. 添加 paymentItems 中带 voucher_id 的支付项
|
183
230
|
// 这块先不用 下面钱包卡券应该包含了
|
184
|
-
// const voucherPayments = paymentItems.filter(item => item.voucher_id);
|
231
|
+
// const voucherPayments = paymentItems.filter(item => item.voucher_id && !item.isSynced);
|
185
232
|
// voucherPayments.forEach((item) => {
|
186
233
|
// items.push(
|
187
234
|
// <div key={`payment-${item.uuid}`} className={classNames('balance-item-row')}>
|
@@ -189,7 +236,12 @@ function PaymentDetailModal(_ref) {
|
|
189
236
|
// {item.name} - {item.voucher_id}
|
190
237
|
// </div>
|
191
238
|
// <div className={classNames('balance-item-amount')}>
|
192
|
-
//
|
239
|
+
// -{formatAmountWithOptions(Math.abs(item.amount), amountSymbol, {
|
240
|
+
// precision: 2,
|
241
|
+
// hideDecimalForWholeNumbers: false,
|
242
|
+
// useThousandsSeparator: true,
|
243
|
+
// showCurrencySymbol: true,
|
244
|
+
// })}
|
193
245
|
// </div>
|
194
246
|
// </div>
|
195
247
|
// );
|
@@ -263,7 +263,7 @@
|
|
263
263
|
flex-direction: column;
|
264
264
|
justify-content: flex-start;
|
265
265
|
align-items: flex-start;
|
266
|
-
gap:
|
266
|
+
gap: 8px;
|
267
267
|
}
|
268
268
|
|
269
269
|
.payment-record-header {
|
@@ -299,12 +299,33 @@
|
|
299
299
|
line-height: 20px;
|
300
300
|
word-wrap: break-word;
|
301
301
|
}
|
302
|
+
.payment-item-header {
|
303
|
+
width: 100%;
|
304
|
+
color: black;
|
305
|
+
font-size: 14px;
|
306
|
+
font-weight: 500;
|
307
|
+
line-height: 20px;
|
308
|
+
word-wrap: break-word;
|
309
|
+
display: flex;
|
310
|
+
justify-content: space-between;
|
311
|
+
}
|
302
312
|
|
303
313
|
.payment-item {
|
304
314
|
align-self: stretch;
|
305
315
|
display: flex;
|
306
|
-
justify-content:
|
316
|
+
justify-content: flex-start;
|
307
317
|
align-items: center;
|
318
|
+
gap: 8px;
|
319
|
+
margin-left: 10px;
|
320
|
+
margin-right: 64px;
|
321
|
+
}
|
322
|
+
|
323
|
+
.payment-item-bullet {
|
324
|
+
width: 6px;
|
325
|
+
height: 6px;
|
326
|
+
background-color: #475467;
|
327
|
+
border-radius: 50%;
|
328
|
+
flex-shrink: 0;
|
308
329
|
}
|
309
330
|
|
310
331
|
.payment-item-content {
|
@@ -433,6 +433,7 @@ export var useWalletPass = function useWalletPass(props) {
|
|
433
433
|
} else {
|
434
434
|
setWalletSelect([]);
|
435
435
|
notSetWalletSelectRef.current = false;
|
436
|
+
onSelectChange === null || onSelectChange === void 0 || onSelectChange([]);
|
436
437
|
}
|
437
438
|
|
438
439
|
// 获取折扣列表并按初始顺序排序(isSelected为true的在前)
|
@@ -122,6 +122,7 @@ declare const _default: {
|
|
122
122
|
'pisell2.checkout.manual-discount.no-amount': string;
|
123
123
|
'pisell2.checkout.manual-discount.has-payment-items': string;
|
124
124
|
'pisell2.checkout.manual-discount.invalid-amount': string;
|
125
|
+
'pisell2.checkout.can-not-change-deposit-amount': string;
|
125
126
|
'pisell2.checkout.wallet-balance-confirm.title': string;
|
126
127
|
'pisell2.checkout.wallet-balance-confirm.description-before': string;
|
127
128
|
'pisell2.checkout.wallet-balance-confirm.description-after': string;
|
@@ -281,6 +282,7 @@ declare const _default: {
|
|
281
282
|
'pisell2.checkout.manual-discount.no-amount': string;
|
282
283
|
'pisell2.checkout.manual-discount.has-payment-items': string;
|
283
284
|
'pisell2.checkout.manual-discount.invalid-amount': string;
|
285
|
+
'pisell2.checkout.can-not-change-deposit-amount': string;
|
284
286
|
'pisell2.checkout.wallet-balance-confirm.title': string;
|
285
287
|
'pisell2.checkout.wallet-balance-confirm.description-before': string;
|
286
288
|
'pisell2.checkout.wallet-balance-confirm.description-after': string;
|
@@ -456,6 +458,7 @@ declare const _default: {
|
|
456
458
|
'pisell2.checkout.manual-discount.no-amount': string;
|
457
459
|
'pisell2.checkout.manual-discount.has-payment-items': string;
|
458
460
|
'pisell2.checkout.manual-discount.invalid-amount': string;
|
461
|
+
'pisell2.checkout.can-not-change-deposit-amount': string;
|
459
462
|
'pisell2.checkout.wallet-balance-confirm.title': string;
|
460
463
|
'pisell2.checkout.wallet-balance-confirm.description-before': string;
|
461
464
|
'pisell2.checkout.wallet-balance-confirm.description-after': string;
|
@@ -154,6 +154,7 @@ export default {
|
|
154
154
|
'pisell2.checkout.manual-discount.no-amount': 'No order amount available for discount',
|
155
155
|
'pisell2.checkout.manual-discount.has-payment-items': 'Order already contains payment items, cannot manually adjust price',
|
156
156
|
'pisell2.checkout.manual-discount.invalid-amount': 'Please enter a valid amount greater than 0',
|
157
|
+
'pisell2.checkout.can-not-change-deposit-amount': 'Order already contains deposit payment items, cannot change deposit amount',
|
157
158
|
// Wallet balance confirmation modal
|
158
159
|
'pisell2.checkout.wallet-balance-confirm.title': 'Apply wallet balance now',
|
159
160
|
'pisell2.checkout.wallet-balance-confirm.description-before': ' will be deducted from selected wallet balance, order will be marked as ',
|
@@ -352,6 +353,7 @@ export default {
|
|
352
353
|
'pisell2.checkout.manual-discount.no-amount': '无可用的订单金额进行折扣',
|
353
354
|
'pisell2.checkout.manual-discount.has-payment-items': '订单已经含有支付项,不可手动改价',
|
354
355
|
'pisell2.checkout.manual-discount.invalid-amount': '请输入大于0的有效金额',
|
356
|
+
'pisell2.checkout.can-not-change-deposit-amount': '已经含有定金支付项,不可修改定金金额',
|
355
357
|
// Wallet balance confirmation modal
|
356
358
|
'pisell2.checkout.wallet-balance-confirm.title': '立即应用钱包余额',
|
357
359
|
'pisell2.checkout.wallet-balance-confirm.description-before': ' 将从所选钱包余额中扣除,订单将标记为 ',
|
@@ -588,6 +590,7 @@ export default {
|
|
588
590
|
'pisell2.checkout.manual-discount.no-amount': '無可用的訂單金額進行折扣',
|
589
591
|
'pisell2.checkout.manual-discount.has-payment-items': '訂單已經含有支付項,不可手動改價',
|
590
592
|
'pisell2.checkout.manual-discount.invalid-amount': '請輸入大於0的有效金額',
|
593
|
+
'pisell2.checkout.can-not-change-deposit-amount': '已經含有定金支付項,不可修改定金金額',
|
591
594
|
// Wallet balance confirmation modal
|
592
595
|
'pisell2.checkout.wallet-balance-confirm.title': '立即應用錢包餘額',
|
593
596
|
'pisell2.checkout.wallet-balance-confirm.description-before': ' 將從所選錢包餘額中扣除,訂單將標記為 ',
|
@@ -15,7 +15,7 @@ export declare const useStoreRef: <T extends {
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
18
|
-
readonly statusRef: React.MutableRefObject<"loading" | "
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
175
175
|
type: EActionTypes;
|
176
176
|
payload: {
|
177
|
-
status: "loading" | "
|
177
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
178
178
|
};
|
179
179
|
};
|
180
180
|
/**
|
@@ -295,10 +295,10 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
295
295
|
name?: string | undefined;
|
296
296
|
symbol?: string | undefined;
|
297
297
|
amount?: string | number | undefined;
|
298
|
-
mode?: "
|
298
|
+
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
300
|
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
301
|
-
action?: "
|
301
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
302
302
|
key?: number | undefined;
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
310
310
|
form?: string | undefined;
|
311
|
-
status?: "loading" | "
|
311
|
+
status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
312
312
|
warn?: string | undefined;
|
313
313
|
steps?: {
|
314
314
|
/** 用于重置当前步骤 */
|