VOC support #3160
closedRequest for correction of Issue Date and Due Date
100%
Description
Dear Team
Regarding, Dorsett by Agora Osaka Sakai - 605052(H-1001440,A-)
Recently, we have been experiencing an issue where the Issue Date and Due Date are the same.
Until now, our accounting staff in Japan have been manually correcting the Due Date, but
to avoid missed payments in the future, we would appreciate it if you could change the Due Date to the end of the month, as is the case with other properties.

(Properties where similar issues have previously occurred)
604630 - Hotel Villa Fontaine Tokyo - Kudanshita
604642 - Hotel Villa Fontaine Tokyo - Kayabacho
We apologize for the inconvenience, but we would appreciate your kind confirmation.
Thanks & Best Regards
Files
Updated by Tom Dong 12 days ago
Branch created: `develop-vn/tom/voc-support-3160-request-for-correction-of-issue-date-and-due-date`
Repository: oh-api
Workspace: ohmyhotel
Bitbucket URL: https://bitbucket.org/ohmyhotel/oh-api/branch/develop-vn/tom/voc-support-3160-request-for-correction-of-issue-date-and-due-date
Updated by Tom Dong 12 days ago
Root Cause Analysis: Issue Date = Due Date¶
Vendor Configuration¶
| Field | Value |
|---|---|
| Vendor Code | 605052 |
| Vendor Name | Dorsett by Agora Osaka Sakai |
| COMP_TYPE_CODE1 | CMP04 (NOT 3rd party) |
| PAYMENT_TYPE_CODE | Prepay |
| PAYMENT_PERIOD_CODE | PMP04 |
Root Cause¶
Trong AdminSettlementInvoiceMapper.xml → getBookingInvoiceAmountByVendor:
CASE
WHEN IS_3RD_PARTY = 'Y' THEN #{depositDueDate}
WHEN IS_3RD_PARTY = 'N' AND PAY_TYPE_CODE = 'Prepay' THEN NOW() -- ← ROOT CAUSE
WHEN IS_3RD_PARTY = 'N' AND PAY_TYPE_CODE = 'Postpay' THEN
-- PMP logic (PMP01-PMP06)
END AS DEPOSIT_DUE_DATE
Vì vendor có PAYMENT_TYPE_CODE = 'Prepay':
DEPOSIT_DUE_DATE = NOW() = 2026-02-19ISSUE_DATETIME = NOW() = 2026-02-19(khi INSERT)- → Issue Date = Due Date = 2026-02-19
Configuration Conflict¶
Vendor có config không hợp lý:PAYMENT_TYPE_CODE = 'Prepay'→ System dùngNOW()cho Due DatePAYMENT_PERIOD_CODE = 'PMP04'→ KHÔNG được sử dụng vì là Prepay
- Booking check-out: January 2026
- Due Date: End of next month = 2026-02-28
Solution Options¶
| Option | Description | Impact |
|---|---|---|
| A - Fix Data | Sửa VD_VENDOR_PAYMENT_CONDITION: PAYMENT_TYPE_CODE = 'Postpay' |
Due date sẽ tính theo PMP04 |
| B - Fix SQL | Sửa logic: Prepay cũng check PAYMENT_PERIOD_CODE |
Ảnh hưởng tất cả Prepay vendors |
| C - New Logic | Nếu Prepay + có PMP code → dùng PMP logic | Backward compatible |
Recommendation¶
Option A (Fix Data) - Sửa config vendor trong VD_VENDOR_PAYMENT_CONDITION:
UPDATE VD_VENDOR_PAYMENT_CONDITION SET PAYMENT_TYPE_CODE = 'Postpay' WHERE VENDOR_COMP_CODE = '605052' AND APPLIED_TO_DATE IS NULL;
Confirm với Business team: Vendor này thực sự là Prepay hay Postpay?
Updated by Tracy Tran 12 days ago
- Status changed from QA test to 완료성공(Resolve)
- Assignee changed from Tracy Tran to Tom Dong
informed JP team