Project

General

Profile

Actions

VOC support #3160

closed

Request for correction of Issue Date and Due Date

Added by Tracy Tran 14 days ago. Updated 12 days ago.

Status:
완료성공(Resolve)
Priority:
보통(Normal)
Assignee:
Target version:
Start date:
02/26/2026
Due date:
02/26/2026
% Done:

100%

Estimated time:
Part:
Build env.:
Prod

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

image.png (118 KB) image.png Tracy Tran, 02/24/2026 06:32 AM
Actions #1

Updated by Tom Dong 13 days ago

  • Due date set to 02/26/2026
  • Status changed from 신규(New) to 진행(Doing)
  • Start date set to 02/26/2026
Actions #2

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

Actions #3

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.xmlgetBookingInvoiceAmountByVendor:

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-19
  • ISSUE_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ùng NOW() cho Due Date
  • PAYMENT_PERIOD_CODE = 'PMP04'KHÔNG được sử dụng vì là Prepay
Expected behavior với PMP04 (Postpay):
  • 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?

Actions #4

Updated by Tom Dong 12 days ago

  • Status changed from 진행(Doing) to QA test
  • Assignee changed from Tom Dong to Tracy Tran
  • % Done changed from 0 to 100
  • Build env. set to Prod
Actions #5

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

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 50 MB)